Commit e05256a8 authored by Dan Elphick's avatar Dan Elphick Committed by Commit Bot

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 <delphick@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62307}
parent 7617d1a1
...@@ -1085,5 +1085,15 @@ const char* DependentCode::DependencyGroupName(DependencyGroup group) { ...@@ -1085,5 +1085,15 @@ const char* DependentCode::DependencyGroupName(DependencyGroup group) {
UNREACHABLE(); 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 internal
} // namespace v8 } // namespace v8
...@@ -5550,16 +5550,6 @@ void SharedFunctionInfo::EnsureSourcePositionsAvailable( ...@@ -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 // static
void JSArray::Initialize(Handle<JSArray> array, int capacity, int length) { void JSArray::Initialize(Handle<JSArray> array, int capacity, int length) {
DCHECK_GE(capacity, 0); DCHECK_GE(capacity, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment