From e05256a8256819091a5feca7618f96c757ae059a Mon Sep 17 00:00:00 2001 From: Dan Elphick Date: Wed, 19 Jun 2019 17:27:28 +0100 Subject: [PATCH] Move Bytecode function out of objects.cc Moves Bytecode::IsBytecodeEqual from objects.cc to code.cc. Bug: v8:9183 Change-Id: I1f6ff1cc388c5f22de951bc75514dd08c25e500a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1667420 Auto-Submit: Dan Elphick Commit-Queue: Ross McIlroy Reviewed-by: Ross McIlroy Cr-Commit-Position: refs/heads/master@{#62307} --- src/objects/code.cc | 10 ++++++++++ src/objects/objects.cc | 10 ---------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/objects/code.cc b/src/objects/code.cc index cc8fcbe3dc..aca54b9f8c 100644 --- a/src/objects/code.cc +++ b/src/objects/code.cc @@ -1085,5 +1085,15 @@ const char* DependentCode::DependencyGroupName(DependencyGroup group) { UNREACHABLE(); } +bool BytecodeArray::IsBytecodeEqual(const BytecodeArray other) const { + if (length() != other.length()) return false; + + for (int i = 0; i < length(); ++i) { + if (get(i) != other.get(i)) return false; + } + + return true; +} + } // namespace internal } // namespace v8 diff --git a/src/objects/objects.cc b/src/objects/objects.cc index ca9ba49f39..6ce62c443f 100644 --- a/src/objects/objects.cc +++ b/src/objects/objects.cc @@ -5550,16 +5550,6 @@ void SharedFunctionInfo::EnsureSourcePositionsAvailable( } } -bool BytecodeArray::IsBytecodeEqual(const BytecodeArray other) const { - if (length() != other.length()) return false; - - for (int i = 0; i < length(); ++i) { - if (get(i) != other.get(i)) return false; - } - - return true; -} - // static void JSArray::Initialize(Handle array, int capacity, int length) { DCHECK_GE(capacity, 0);