| Index: src/builtins/arm64/builtins-arm64.cc
|
| diff --git a/src/builtins/arm64/builtins-arm64.cc b/src/builtins/arm64/builtins-arm64.cc
|
| index 7e96dc4fb3658f52886ad35af4050a7d753008cf..80d04e847fd96667cfd49e9283a004716fa46996 100644
|
| --- a/src/builtins/arm64/builtins-arm64.cc
|
| +++ b/src/builtins/arm64/builtins-arm64.cc
|
| @@ -1074,14 +1074,12 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
|
|
|
| // Get the bytecode array from the function object (or from the DebugInfo if
|
| // it is present) and load it into kInterpreterBytecodeArrayRegister.
|
| + Label maybe_load_debug_bytecode_array, bytecode_array_loaded;
|
| __ Ldr(x0, FieldMemOperand(x1, JSFunction::kSharedFunctionInfoOffset));
|
| - Register debug_info = kInterpreterBytecodeArrayRegister;
|
| - Label load_debug_bytecode_array, bytecode_array_loaded;
|
| - DCHECK(!debug_info.is(x0));
|
| - __ Ldr(debug_info, FieldMemOperand(x0, SharedFunctionInfo::kDebugInfoOffset));
|
| - __ JumpIfNotSmi(debug_info, &load_debug_bytecode_array);
|
| __ Ldr(kInterpreterBytecodeArrayRegister,
|
| FieldMemOperand(x0, SharedFunctionInfo::kFunctionDataOffset));
|
| + __ Ldr(x11, FieldMemOperand(x0, SharedFunctionInfo::kDebugInfoOffset));
|
| + __ JumpIfNotSmi(x11, &maybe_load_debug_bytecode_array);
|
| __ Bind(&bytecode_array_loaded);
|
|
|
| // Check whether we should continue to use the interpreter.
|
| @@ -1170,10 +1168,16 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
|
| LeaveInterpreterFrame(masm, x2);
|
| __ Ret();
|
|
|
| - // Load debug copy of the bytecode array.
|
| - __ Bind(&load_debug_bytecode_array);
|
| + // Load debug copy of the bytecode array if it exists.
|
| + // kInterpreterBytecodeArrayRegister is already loaded with
|
| + // SharedFunctionInfo::kFunctionDataOffset.
|
| + __ Bind(&maybe_load_debug_bytecode_array);
|
| + __ Ldr(x10, FieldMemOperand(x11, DebugInfo::kFlagsOffset));
|
| + __ SmiUntag(x10);
|
| + __ TestAndBranchIfAllClear(x10, DebugInfo::kHasBreakInfo,
|
| + &bytecode_array_loaded);
|
| __ Ldr(kInterpreterBytecodeArrayRegister,
|
| - FieldMemOperand(debug_info, DebugInfo::kDebugBytecodeArrayIndex));
|
| + FieldMemOperand(x11, DebugInfo::kDebugBytecodeArrayOffset));
|
| __ B(&bytecode_array_loaded);
|
|
|
| // If the shared code is no longer this entry trampoline, then the underlying
|
|
|