Commit 74d92ca8 authored by mbrandy's avatar mbrandy Committed by Commit bot

PPC: [debugger] simplify reloc info for debug break slots.

Port 531dde9f

Original commit message:
    The new step-in implementation no longer tries to predict the step-in
    target, so we don't need the arguments count nor call type anymore.

R=yangguo@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#32533}
parent 9151860c
...@@ -24,12 +24,11 @@ void EmitDebugBreakSlot(MacroAssembler* masm) { ...@@ -24,12 +24,11 @@ void EmitDebugBreakSlot(MacroAssembler* masm) {
} }
void DebugCodegen::GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode, void DebugCodegen::GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode) {
int call_argc) {
// Generate enough nop's to make space for a call instruction. Avoid emitting // Generate enough nop's to make space for a call instruction. Avoid emitting
// the trampoline pool in the debug break slot code. // the trampoline pool in the debug break slot code.
Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm); Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm);
masm->RecordDebugBreakSlot(mode, call_argc); masm->RecordDebugBreakSlot(mode);
EmitDebugBreakSlot(masm); EmitDebugBreakSlot(masm);
} }
......
...@@ -2011,7 +2011,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) { ...@@ -2011,7 +2011,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
CallIC(ic, TypeFeedbackId::None()); CallIC(ic, TypeFeedbackId::None());
__ mr(r4, r3); __ mr(r4, r3);
__ StoreP(r4, MemOperand(sp, 2 * kPointerSize)); __ StoreP(r4, MemOperand(sp, 2 * kPointerSize));
SetCallPosition(expr, 1); SetCallPosition(expr);
__ li(r3, Operand(1)); __ li(r3, Operand(1));
__ Call( __ Call(
isolate()->builtins()->Call(ConvertReceiverMode::kNotNullOrUndefined), isolate()->builtins()->Call(ConvertReceiverMode::kNotNullOrUndefined),
...@@ -2867,7 +2867,7 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) { ...@@ -2867,7 +2867,7 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) {
} }
PrepareForBailoutForId(expr->CallId(), NO_REGISTERS); PrepareForBailoutForId(expr->CallId(), NO_REGISTERS);
SetCallPosition(expr, arg_count); SetCallPosition(expr);
Handle<Code> ic = CodeFactory::CallIC(isolate(), arg_count, mode).code(); Handle<Code> ic = CodeFactory::CallIC(isolate(), arg_count, mode).code();
__ LoadSmiLiteral(r6, SmiFromSlot(expr->CallFeedbackICSlot())); __ LoadSmiLiteral(r6, SmiFromSlot(expr->CallFeedbackICSlot()));
__ LoadP(r4, MemOperand(sp, (arg_count + 1) * kPointerSize), r0); __ LoadP(r4, MemOperand(sp, (arg_count + 1) * kPointerSize), r0);
...@@ -2975,7 +2975,7 @@ void FullCodeGenerator::EmitPossiblyEvalCall(Call* expr) { ...@@ -2975,7 +2975,7 @@ void FullCodeGenerator::EmitPossiblyEvalCall(Call* expr) {
PrepareForBailoutForId(expr->EvalId(), NO_REGISTERS); PrepareForBailoutForId(expr->EvalId(), NO_REGISTERS);
// Record source position for debugger. // Record source position for debugger.
SetCallPosition(expr, arg_count); SetCallPosition(expr);
__ LoadP(r4, MemOperand(sp, (arg_count + 1) * kPointerSize), r0); __ LoadP(r4, MemOperand(sp, (arg_count + 1) * kPointerSize), r0);
__ mov(r3, Operand(arg_count)); __ mov(r3, Operand(arg_count));
__ Call(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); __ Call(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET);
...@@ -3007,7 +3007,7 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) { ...@@ -3007,7 +3007,7 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) {
// Call the construct call builtin that handles allocation and // Call the construct call builtin that handles allocation and
// constructor invocation. // constructor invocation.
SetConstructCallPosition(expr, arg_count); SetConstructCallPosition(expr);
// Load function and argument count into r4 and r3. // Load function and argument count into r4 and r3.
__ mov(r3, Operand(arg_count)); __ mov(r3, Operand(arg_count));
...@@ -3043,7 +3043,7 @@ void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { ...@@ -3043,7 +3043,7 @@ void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) {
// Call the construct call builtin that handles allocation and // Call the construct call builtin that handles allocation and
// constructor invocation. // constructor invocation.
SetConstructCallPosition(expr, arg_count); SetConstructCallPosition(expr);
// Load new target into r6. // Load new target into r6.
VisitForAccumulatorValue(super_call_ref->new_target_var()); VisitForAccumulatorValue(super_call_ref->new_target_var());
...@@ -3744,7 +3744,7 @@ void FullCodeGenerator::EmitDefaultConstructorCallSuper(CallRuntime* expr) { ...@@ -3744,7 +3744,7 @@ void FullCodeGenerator::EmitDefaultConstructorCallSuper(CallRuntime* expr) {
// Call the construct call builtin that handles allocation and // Call the construct call builtin that handles allocation and
// constructor invocation. // constructor invocation.
SetConstructCallPosition(expr, 0); SetConstructCallPosition(expr);
// Check if the calling frame is an arguments adaptor frame. // Check if the calling frame is an arguments adaptor frame.
Label adaptor_frame, args_set_up, runtime; Label adaptor_frame, args_set_up, runtime;
...@@ -4135,7 +4135,7 @@ void FullCodeGenerator::EmitCallJSRuntimeFunction(CallRuntime* expr) { ...@@ -4135,7 +4135,7 @@ void FullCodeGenerator::EmitCallJSRuntimeFunction(CallRuntime* expr) {
ZoneList<Expression*>* args = expr->arguments(); ZoneList<Expression*>* args = expr->arguments();
int arg_count = args->length(); int arg_count = args->length();
SetCallPosition(expr, arg_count); SetCallPosition(expr);
__ LoadP(r4, MemOperand(sp, (arg_count + 1) * kPointerSize), r0); __ LoadP(r4, MemOperand(sp, (arg_count + 1) * kPointerSize), r0);
__ mov(r3, Operand(arg_count)); __ mov(r3, Operand(arg_count));
__ Call(isolate()->builtins()->Call(ConvertReceiverMode::kNullOrUndefined), __ Call(isolate()->builtins()->Call(ConvertReceiverMode::kNullOrUndefined),
......
...@@ -1174,7 +1174,7 @@ class Assembler : public AssemblerBase { ...@@ -1174,7 +1174,7 @@ class Assembler : public AssemblerBase {
void RecordGeneratorContinuation(); void RecordGeneratorContinuation();
// Mark address of a debug break slot. // Mark address of a debug break slot.
void RecordDebugBreakSlot(RelocInfo::Mode mode, int argc = 0); void RecordDebugBreakSlot(RelocInfo::Mode mode);
// Record the AST id of the CallIC being compiled, so that it can be placed // Record the AST id of the CallIC being compiled, so that it can be placed
// in the relocation information. // in the relocation information.
......
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