Index: src/mips/builtins-mips.cc |
diff --git a/src/mips/builtins-mips.cc b/src/mips/builtins-mips.cc |
index 9b79da73fbbc772fc32666de3e94fa408ae042f0..281dc62c6b498ef8a0d28b3800862bcf89142b2d 100644 |
--- a/src/mips/builtins-mips.cc |
+++ b/src/mips/builtins-mips.cc |
@@ -854,8 +854,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. |
__ lw(a0, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); |
+ Label load_debug_bytecode_array, bytecode_array_loaded; |
+ Register debug_info = kInterpreterBytecodeArrayRegister; |
+ DCHECK(!debug_info.is(a0)); |
+ __ lw(debug_info, FieldMemOperand(a0, SharedFunctionInfo::kDebugInfoOffset)); |
+ __ Branch(&load_debug_bytecode_array, ne, debug_info, |
+ Operand(DebugInfo::uninitialized())); |
__ lw(kInterpreterBytecodeArrayRegister, |
FieldMemOperand(a0, SharedFunctionInfo::kFunctionDataOffset)); |
+ __ bind(&bytecode_array_loaded); |
if (FLAG_debug_code) { |
// Check function data field is actually a BytecodeArray object. |
@@ -926,6 +933,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); |
+ __ lw(kInterpreterBytecodeArrayRegister, |
+ FieldMemOperand(debug_info, DebugInfo::kAbstractCodeIndex)); |
+ __ Branch(&bytecode_array_loaded); |
} |