Commit d15d2cf2 authored by mbrandy's avatar mbrandy Committed by Commit bot

PPC: [interpreter, debugger] support debug breaks via bytecode array copy

Port e032a98d

R=yangguo@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=v8:4690
LOG=N

Review URL: https://codereview.chromium.org/1721673003

Cr-Commit-Position: refs/heads/master@{#34198}
parent aadd792d
......@@ -859,8 +859,19 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
// Get the bytecode array from the function object and load the pointer to the
// first entry into kInterpreterBytecodeRegister.
__ 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));
__ CmpSmiLiteral(debug_info, DebugInfo::uninitialized(), r0);
__ beq(&array_done);
__ LoadP(kInterpreterBytecodeArrayRegister,
FieldMemOperand(debug_info, DebugInfo::kAbstractCodeIndex));
__ bind(&array_done);
if (FLAG_debug_code) {
// Check function data field is actually a BytecodeArray object.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment