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:
Dan Elphick 2019-06-19 17:27:28 +01:00 committed by Commit Bot
parent 7617d1a1e7
commit e05256a825
2 changed files with 10 additions and 10 deletions

View File

@ -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

View File

@ -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);