Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Unified Diff: src/builtins/arm/builtins-arm.cc

Issue 2909893002: [debug] Untangle DebugInfo from break point support (Closed)
Patch Set: Address comments Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/builtins/arm64/builtins-arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/arm/builtins-arm.cc
diff --git a/src/builtins/arm/builtins-arm.cc b/src/builtins/arm/builtins-arm.cc
index 286df2eea793f370a964cde4388c808fad7e9a36..b85468993a0a86216496542fcb6c39aeb762bea3 100644
--- a/src/builtins/arm/builtins-arm.cc
+++ b/src/builtins/arm/builtins-arm.cc
@@ -1051,16 +1051,14 @@ 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(r0, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset));
- Register debug_info = kInterpreterBytecodeArrayRegister;
- DCHECK(!debug_info.is(r0));
- __ ldr(debug_info, FieldMemOperand(r0, SharedFunctionInfo::kDebugInfoOffset));
- __ SmiTst(debug_info);
- // Load original bytecode array or the debug copy.
__ ldr(kInterpreterBytecodeArrayRegister,
- FieldMemOperand(r0, SharedFunctionInfo::kFunctionDataOffset), eq);
- __ ldr(kInterpreterBytecodeArrayRegister,
- FieldMemOperand(debug_info, DebugInfo::kDebugBytecodeArrayIndex), ne);
+ FieldMemOperand(r0, SharedFunctionInfo::kFunctionDataOffset));
+ __ ldr(r2, FieldMemOperand(r0, SharedFunctionInfo::kDebugInfoOffset));
+ __ SmiTst(r2);
+ __ b(ne, &maybe_load_debug_bytecode_array);
+ __ bind(&bytecode_array_loaded);
// Check whether we should continue to use the interpreter.
// TODO(rmcilroy) Remove self healing once liveedit only has to deal with
@@ -1150,6 +1148,17 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
LeaveInterpreterFrame(masm, r2);
__ Jump(lr);
+ // Load debug copy of the bytecode array if it exists.
+ // kInterpreterBytecodeArrayRegister is already loaded with
+ // SharedFunctionInfo::kFunctionDataOffset.
+ __ bind(&maybe_load_debug_bytecode_array);
+ __ ldr(r9, FieldMemOperand(r2, DebugInfo::kFlagsOffset));
+ __ SmiUntag(r9);
+ __ tst(r9, Operand(DebugInfo::kHasBreakInfo));
+ __ ldr(kInterpreterBytecodeArrayRegister,
+ FieldMemOperand(r2, DebugInfo::kDebugBytecodeArrayOffset), ne);
+ __ b(&bytecode_array_loaded);
+
// If the shared code is no longer this entry trampoline, then the underlying
// function has been switched to a different kind of code and we heal the
// closure by switching the code entry field over to the new code as well.
« no previous file with comments | « no previous file | src/builtins/arm64/builtins-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698