Index: src/mips64/builtins-mips64.cc |
diff --git a/src/mips64/builtins-mips64.cc b/src/mips64/builtins-mips64.cc |
index a6c0d7630da3ce35d97fed17dcbbf65717e88017..ce4716bdd1442f80aa91a3b1a17a3de063e92844 100644 |
--- a/src/mips64/builtins-mips64.cc |
+++ b/src/mips64/builtins-mips64.cc |
@@ -970,8 +970,15 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) { |
// Get the bytecode array from the function object and load the pointer to the |
// first entry into kInterpreterBytecodeRegister. |
__ ld(a0, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); |
+ Label load_debug_bytecode_array, bytecode_array_loaded; |
+ Register debug_info = kInterpreterBytecodeArrayRegister; |
+ DCHECK(!debug_info.is(a0)); |
+ __ ld(debug_info, FieldMemOperand(a0, SharedFunctionInfo::kDebugInfoOffset)); |
+ __ Branch(&load_debug_bytecode_array, ne, debug_info, |
+ Operand(DebugInfo::uninitialized())); |
__ ld(kInterpreterBytecodeArrayRegister, |
FieldMemOperand(a0, SharedFunctionInfo::kFunctionDataOffset)); |
+ __ bind(&bytecode_array_loaded); |
if (FLAG_debug_code) { |
// Check function data field is actually a BytecodeArray object. |
@@ -1042,6 +1049,12 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) { |
// Even though the first bytecode handler was called, we will never return. |
__ Abort(kUnexpectedReturnFromBytecodeHandler); |
+ |
+ // Load debug copy of the bytecode array. |
+ __ bind(&load_debug_bytecode_array); |
+ __ ld(kInterpreterBytecodeArrayRegister, |
+ FieldMemOperand(debug_info, DebugInfo::kAbstractCodeIndex)); |
+ __ Branch(&bytecode_array_loaded); |
} |