diff options
Diffstat (limited to 'deps/v8/src/objects/code.cc')
-rw-r--r-- | deps/v8/src/objects/code.cc | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/deps/v8/src/objects/code.cc b/deps/v8/src/objects/code.cc index 89180693a5..a51a8c5b79 100644 --- a/deps/v8/src/objects/code.cc +++ b/deps/v8/src/objects/code.cc @@ -352,7 +352,8 @@ bool Code::Inlines(SharedFunctionInfo sfi) { Code::OptimizedCodeIterator::OptimizedCodeIterator(Isolate* isolate) { isolate_ = isolate; Object list = isolate->heap()->native_contexts_list(); - next_context_ = list.IsUndefined(isolate_) ? Context() : Context::cast(list); + next_context_ = + list.IsUndefined(isolate_) ? NativeContext() : NativeContext::cast(list); } Code Code::OptimizedCodeIterator::Next() { @@ -366,8 +367,8 @@ Code Code::OptimizedCodeIterator::Next() { next = next_context_.OptimizedCodeListHead(); Object next_context = next_context_.next_context_link(); next_context_ = next_context.IsUndefined(isolate_) - ? Context() - : Context::cast(next_context); + ? NativeContext() + : NativeContext::cast(next_context); } else { // Exhausted contexts. return Code(); @@ -830,7 +831,8 @@ void BytecodeArray::Disassemble(std::ostream& os) { os << reinterpret_cast<const void*>(current_address) << " @ " << std::setw(4) << iterator.current_offset() << " : "; interpreter::BytecodeDecoder::Decode( - os, reinterpret_cast<byte*>(current_address), parameter_count()); + os, reinterpret_cast<byte*>(current_address), + static_cast<int>(parameter_count())); if (interpreter::Bytecodes::IsJump(iterator.current_bytecode())) { Address jump_target = base_address + iterator.GetJumpTargetOffset(); os << " (" << reinterpret_cast<void*>(jump_target) << " @ " @@ -856,7 +858,7 @@ void BytecodeArray::Disassemble(std::ostream& os) { os << "Constant pool (size = " << constant_pool().length() << ")\n"; #ifdef OBJECT_PRINT if (constant_pool().length() > 0) { - constant_pool().Print(); + constant_pool().Print(os); } #endif @@ -1084,5 +1086,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 |