Index: src/runtime/runtime-interpreter.cc |
diff --git a/src/runtime/runtime-interpreter.cc b/src/runtime/runtime-interpreter.cc |
index 854cead4e593522b06fd6b6996c542de52298ccf..f870d23c2648f5679cb235e85db5d34f618b85d9 100644 |
--- a/src/runtime/runtime-interpreter.cc |
+++ b/src/runtime/runtime-interpreter.cc |
@@ -64,14 +64,11 @@ void PrintRegisters(std::ostream& os, bool is_input, |
os << " ]" << std::endl; |
} |
- // Find the location of the register file. |
+ // Print the registers. |
JavaScriptFrameIterator frame_iterator( |
bytecode_iterator.bytecode_array()->GetIsolate()); |
- JavaScriptFrame* frame = frame_iterator.frame(); |
- Address register_file = |
- frame->fp() + InterpreterFrameConstants::kRegisterFilePointerFromFp; |
- |
- // Print the registers. |
+ InterpretedFrame* frame = |
+ reinterpret_cast<InterpretedFrame*>(frame_iterator.frame()); |
int operand_count = interpreter::Bytecodes::NumberOfOperands(bytecode); |
for (int operand_index = 0; operand_index < operand_count; operand_index++) { |
interpreter::OperandType operand_type = |
@@ -86,8 +83,7 @@ void PrintRegisters(std::ostream& os, bool is_input, |
int range = bytecode_iterator.GetRegisterOperandRange(operand_index); |
for (int reg_index = first_reg.index(); |
reg_index < first_reg.index() + range; reg_index++) { |
- Address reg_location = register_file - reg_index * kPointerSize; |
- Object* reg_object = Memory::Object_at(reg_location); |
+ Object* reg_object = frame->ReadInterpreterRegister(reg_index); |
os << " [ " << std::setw(kRegFieldWidth) |
<< interpreter::Register(reg_index).ToString( |
bytecode_iterator.bytecode_array()->parameter_count()) |