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

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

Issue 2927813004: PPC/s390: [debug] Untangle DebugInfo from break point support (Closed)
Patch Set: Created 3 years, 6 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/s390/builtins-s390.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/ppc/builtins-ppc.cc
diff --git a/src/builtins/ppc/builtins-ppc.cc b/src/builtins/ppc/builtins-ppc.cc
index 5a54017aa6bf03e991550865ed4036d38bd05cff..6ebcb0cb4772e4a5a99520e08e89af02bb69583e 100644
--- a/src/builtins/ppc/builtins-ppc.cc
+++ b/src/builtins/ppc/builtins-ppc.cc
@@ -1086,20 +1086,15 @@ 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;
__ LoadP(r3, FieldMemOperand(r4, JSFunction::kSharedFunctionInfoOffset));
- Label array_done;
- Register debug_info = r5;
- DCHECK(!debug_info.is(r3));
- __ LoadP(debug_info,
- FieldMemOperand(r3, SharedFunctionInfo::kDebugInfoOffset));
// Load original bytecode array or the debug copy.
__ LoadP(kInterpreterBytecodeArrayRegister,
FieldMemOperand(r3, SharedFunctionInfo::kFunctionDataOffset));
- __ TestIfSmi(debug_info, r0);
- __ beq(&array_done, cr0);
- __ LoadP(kInterpreterBytecodeArrayRegister,
- FieldMemOperand(debug_info, DebugInfo::kDebugBytecodeArrayOffset));
- __ bind(&array_done);
+ __ LoadP(r5, FieldMemOperand(r3, SharedFunctionInfo::kDebugInfoOffset));
+ __ TestIfSmi(r5, r0);
+ __ bne(&maybe_load_debug_bytecode_array, cr0);
+ __ 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
@@ -1193,6 +1188,20 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
LeaveInterpreterFrame(masm, r5);
__ blr();
+ // Load debug copy of the bytecode array if it exists.
+ // kInterpreterBytecodeArrayRegister is already loaded with
+ // SharedFunctionInfo::kFunctionDataOffset.
+ Label done;
+ __ bind(&maybe_load_debug_bytecode_array);
+ __ LoadP(ip, FieldMemOperand(r5, DebugInfo::kFlagsOffset));
+ __ SmiUntag(ip);
+ __ andi(r0, ip, Operand(DebugInfo::kHasBreakInfo));
+ __ beq(&done, cr0);
+ __ LoadP(kInterpreterBytecodeArrayRegister,
+ FieldMemOperand(r5, DebugInfo::kDebugBytecodeArrayOffset));
+ __ bind(&done);
+ __ 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/s390/builtins-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698