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: Ross McIlroy <rmcilroy@chromium.org> Cr-Commit-Position: refs/heads/master@{#62307}
This commit is contained in:
parent
7617d1a1e7
commit
e05256a825
@ -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
|
||||
|
@ -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<JSArray> array, int capacity, int length) {
|
||||
DCHECK_GE(capacity, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user