[debugger] simplify reloc info for debug break slots.

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=verwaest@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#32516}
This commit is contained in:
yangguo 2015-12-02 06:13:39 -08:00 committed by Commit bot
parent 7d6c566622
commit 531dde9f80
28 changed files with 84 additions and 137 deletions

View File

@ -1314,7 +1314,7 @@ class Assembler : public AssemblerBase {
void RecordGeneratorContinuation();
// 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
// in the relocation information.

View File

@ -2871,7 +2871,7 @@ void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) {
// We do not try to reuse pool constants.
RelocInfo rinfo(isolate(), reinterpret_cast<byte*>(pc_), rmode, data, NULL);
if (((rmode >= RelocInfo::COMMENT) &&
(rmode <= RelocInfo::DEBUG_BREAK_SLOT_AT_CONSTRUCT_CALL)) ||
(rmode <= RelocInfo::DEBUG_BREAK_SLOT_AT_CALL)) ||
(rmode == RelocInfo::INTERNAL_REFERENCE) ||
(rmode == RelocInfo::CONST_POOL) || (rmode == RelocInfo::VENEER_POOL) ||
(rmode == RelocInfo::DEOPT_REASON) ||

View File

@ -933,7 +933,7 @@ class Assembler : public AssemblerBase {
void RecordGeneratorContinuation();
// Mark address of a debug break slot.
void RecordDebugBreakSlot(RelocInfo::Mode mode, int argc = 0);
void RecordDebugBreakSlot(RelocInfo::Mode mode);
// Record the emission of a constant pool.
//

View File

@ -508,9 +508,7 @@ void RelocInfoWriter::Write(const RelocInfo* rinfo) {
if (RelocInfo::IsComment(rmode)) {
WriteData(rinfo->data());
} else if (RelocInfo::IsConstPool(rmode) ||
RelocInfo::IsVeneerPool(rmode) ||
RelocInfo::IsDebugBreakSlotAtCall(rmode) ||
RelocInfo::IsDebugBreakSlotAtConstructCall(rmode)) {
RelocInfo::IsVeneerPool(rmode)) {
WriteIntData(static_cast<int>(rinfo->data()));
}
}
@ -701,9 +699,7 @@ void RelocIterator::next() {
Advance(kIntSize);
}
} else if (RelocInfo::IsConstPool(rmode) ||
RelocInfo::IsVeneerPool(rmode) ||
RelocInfo::IsDebugBreakSlotAtCall(rmode) ||
RelocInfo::IsDebugBreakSlotAtConstructCall(rmode)) {
RelocInfo::IsVeneerPool(rmode)) {
if (SetMode(rmode)) {
AdvanceReadInt();
return;
@ -833,8 +829,6 @@ const char* RelocInfo::RelocModeName(RelocInfo::Mode rmode) {
return "debug break slot at return";
case DEBUG_BREAK_SLOT_AT_CALL:
return "debug break slot at call";
case DEBUG_BREAK_SLOT_AT_CONSTRUCT_CALL:
return "debug break slot at construct call";
case CODE_AGE_SEQUENCE:
return "code age sequence";
case GENERATOR_CONTINUATION:
@ -931,7 +925,6 @@ void RelocInfo::Verify(Isolate* isolate) {
case DEBUG_BREAK_SLOT_AT_POSITION:
case DEBUG_BREAK_SLOT_AT_RETURN:
case DEBUG_BREAK_SLOT_AT_CALL:
case DEBUG_BREAK_SLOT_AT_CONSTRUCT_CALL:
case GENERATOR_CONTINUATION:
case NONE32:
case NONE64:
@ -948,12 +941,6 @@ void RelocInfo::Verify(Isolate* isolate) {
#endif // VERIFY_HEAP
int RelocInfo::DebugBreakCallArgumentsCount(intptr_t data) {
return static_cast<int>(data);
}
// -----------------------------------------------------------------------------
// Implementation of ExternalReference
void ExternalReference::SetUp() {
@ -1883,11 +1870,10 @@ void Assembler::RecordGeneratorContinuation() {
}
void Assembler::RecordDebugBreakSlot(RelocInfo::Mode mode, int call_argc) {
void Assembler::RecordDebugBreakSlot(RelocInfo::Mode mode) {
EnsureSpace ensure_space(this);
DCHECK(RelocInfo::IsDebugBreakSlot(mode));
intptr_t data = static_cast<intptr_t>(call_argc);
RecordRelocInfo(mode, data);
RecordRelocInfo(mode);
}

View File

@ -391,7 +391,6 @@ class RelocInfo {
DEBUG_BREAK_SLOT_AT_POSITION,
DEBUG_BREAK_SLOT_AT_RETURN,
DEBUG_BREAK_SLOT_AT_CALL,
DEBUG_BREAK_SLOT_AT_CONSTRUCT_CALL,
EXTERNAL_REFERENCE, // The address of an external C++ function.
INTERNAL_REFERENCE, // An address inside the same function.
@ -484,8 +483,7 @@ class RelocInfo {
}
static inline bool IsDebugBreakSlot(Mode mode) {
return IsDebugBreakSlotAtPosition(mode) || IsDebugBreakSlotAtReturn(mode) ||
IsDebugBreakSlotAtCall(mode) ||
IsDebugBreakSlotAtConstructCall(mode);
IsDebugBreakSlotAtCall(mode);
}
static inline bool IsDebugBreakSlotAtPosition(Mode mode) {
return mode == DEBUG_BREAK_SLOT_AT_POSITION;
@ -496,9 +494,6 @@ class RelocInfo {
static inline bool IsDebugBreakSlotAtCall(Mode mode) {
return mode == DEBUG_BREAK_SLOT_AT_CALL;
}
static inline bool IsDebugBreakSlotAtConstructCall(Mode mode) {
return mode == DEBUG_BREAK_SLOT_AT_CONSTRUCT_CALL;
}
static inline bool IsDebuggerStatement(Mode mode) {
return mode == DEBUGGER_STATEMENT;
}
@ -537,9 +532,6 @@ class RelocInfo {
// constant pool, otherwise the pointer is embedded in the instruction stream.
bool IsInConstantPool();
static int DebugBreakCallArgumentsCount(intptr_t data);
// Read/modify the code target in the branch/call instruction
// this relocation applies to;
// can only be called if IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)
INLINE(Address target_address());
@ -649,9 +641,9 @@ class RelocInfo {
static const int kPositionMask = 1 << POSITION | 1 << STATEMENT_POSITION;
static const int kDataMask =
(1 << CODE_TARGET_WITH_ID) | kPositionMask | (1 << COMMENT);
static const int kDebugBreakSlotMask =
1 << DEBUG_BREAK_SLOT_AT_POSITION | 1 << DEBUG_BREAK_SLOT_AT_RETURN |
1 << DEBUG_BREAK_SLOT_AT_CALL | 1 << DEBUG_BREAK_SLOT_AT_CONSTRUCT_CALL;
static const int kDebugBreakSlotMask = 1 << DEBUG_BREAK_SLOT_AT_POSITION |
1 << DEBUG_BREAK_SLOT_AT_RETURN |
1 << DEBUG_BREAK_SLOT_AT_CALL;
static const int kApplyMask; // Modes affected by apply. Depends on arch.
private:

View File

@ -24,12 +24,11 @@ void EmitDebugBreakSlot(MacroAssembler* masm) {
}
void DebugCodegen::GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode,
int call_argc) {
void DebugCodegen::GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode) {
// Generate enough nop's to make space for a call instruction. Avoid emitting
// the constant pool in the debug break slot code.
Assembler::BlockConstPoolScope block_const_pool(masm);
masm->RecordDebugBreakSlot(mode, call_argc);
masm->RecordDebugBreakSlot(mode);
EmitDebugBreakSlot(masm);
}

View File

@ -25,12 +25,11 @@ void EmitDebugBreakSlot(Assembler* masm) {
}
void DebugCodegen::GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode,
int call_argc) {
void DebugCodegen::GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode) {
// Generate enough nop's to make space for a call instruction. Avoid emitting
// the constant pool in the debug break slot code.
InstructionAccurateScope scope(masm, Assembler::kDebugBreakSlotInstructions);
masm->RecordDebugBreakSlot(mode, call_argc);
masm->RecordDebugBreakSlot(mode);
EmitDebugBreakSlot(masm);
}

View File

@ -86,7 +86,6 @@ int BreakLocation::Iterator::GetModeMask(BreakLocatorType type) {
mask |= RelocInfo::ModeMask(RelocInfo::STATEMENT_POSITION);
mask |= RelocInfo::ModeMask(RelocInfo::DEBUG_BREAK_SLOT_AT_RETURN);
mask |= RelocInfo::ModeMask(RelocInfo::DEBUG_BREAK_SLOT_AT_CALL);
mask |= RelocInfo::ModeMask(RelocInfo::DEBUG_BREAK_SLOT_AT_CONSTRUCT_CALL);
if (type == ALL_BREAK_LOCATIONS) {
mask |= RelocInfo::ModeMask(RelocInfo::DEBUG_BREAK_SLOT_AT_POSITION);
mask |= RelocInfo::ModeMask(RelocInfo::DEBUGGER_STATEMENT);
@ -300,11 +299,6 @@ void BreakLocation::ClearDebugBreak() {
}
bool BreakLocation::IsStepInLocation() const {
return IsConstructCall() || IsCall();
}
bool BreakLocation::IsDebugBreak() const {
if (IsDebugBreakSlot()) {
return rinfo().IsPatchedDebugBreakSlotSequence();
@ -1606,7 +1600,7 @@ void Debug::GetStepinPositions(JavaScriptFrame* frame, StackFrame::Id frame_id,
if (frame_it.frame()->id() != frame_id) continue;
}
}
if (location.IsStepInLocation()) results_out->Add(location.position());
if (location.IsCall()) results_out->Add(location.position());
}
}

View File

@ -83,15 +83,6 @@ class BreakLocation {
inline bool IsCall() const {
return RelocInfo::IsDebugBreakSlotAtCall(rmode_);
}
inline bool IsConstructCall() const {
return RelocInfo::IsDebugBreakSlotAtConstructCall(rmode_);
}
inline int CallArgumentsCount() const {
DCHECK(IsStepInLocation());
return RelocInfo::DebugBreakCallArgumentsCount(data_);
}
bool IsStepInLocation() const;
inline bool HasBreakPoint() const {
return debug_info_->HasBreakPoint(pc_offset_);
}
@ -775,8 +766,7 @@ class DebugCodegen : public AllStatic {
static void GenerateFrameDropperLiveEdit(MacroAssembler* masm);
static void GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode,
int call_argc = -1);
static void GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode);
static void PatchDebugBreakSlot(Isolate* isolate, Address pc,
Handle<Code> code);

View File

@ -23,10 +23,9 @@ void EmitDebugBreakSlot(MacroAssembler* masm) {
}
void DebugCodegen::GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode,
int call_argc) {
void DebugCodegen::GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode) {
// Generate enough nop's to make space for a call instruction.
masm->RecordDebugBreakSlot(mode, call_argc);
masm->RecordDebugBreakSlot(mode);
EmitDebugBreakSlot(masm);
}

View File

@ -24,12 +24,11 @@ void EmitDebugBreakSlot(MacroAssembler* masm) {
}
void DebugCodegen::GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode,
int call_argc) {
void DebugCodegen::GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode) {
// Generate enough nop's to make space for a call instruction. Avoid emitting
// the trampoline pool in the debug break slot code.
Assembler::BlockTrampolinePoolScope block_pool(masm);
masm->RecordDebugBreakSlot(mode, call_argc);
masm->RecordDebugBreakSlot(mode);
EmitDebugBreakSlot(masm);
}

View File

@ -23,12 +23,11 @@ void EmitDebugBreakSlot(MacroAssembler* masm) {
}
void DebugCodegen::GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode,
int call_argc) {
void DebugCodegen::GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode) {
// Generate enough nop's to make space for a call instruction. Avoid emitting
// the trampoline pool in the debug break slot code.
Assembler::BlockTrampolinePoolScope block_pool(masm);
masm->RecordDebugBreakSlot(mode, call_argc);
masm->RecordDebugBreakSlot(mode);
EmitDebugBreakSlot(masm);
}

View File

@ -24,10 +24,9 @@ void EmitDebugBreakSlot(MacroAssembler* masm) {
}
void DebugCodegen::GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode,
int call_argc) {
void DebugCodegen::GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode) {
// Generate enough nop's to make space for a call instruction.
masm->RecordDebugBreakSlot(mode, call_argc);
masm->RecordDebugBreakSlot(mode);
EmitDebugBreakSlot(masm);
}

View File

@ -2046,7 +2046,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
CallIC(ic, TypeFeedbackId::None());
__ mov(r1, r0);
__ str(r1, MemOperand(sp, 2 * kPointerSize));
SetCallPosition(expr, 1);
SetCallPosition(expr);
__ mov(r0, Operand(1));
__ Call(
isolate()->builtins()->Call(ConvertReceiverMode::kNotNullOrUndefined),
@ -2873,7 +2873,7 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) {
}
PrepareForBailoutForId(expr->CallId(), NO_REGISTERS);
SetCallPosition(expr, arg_count);
SetCallPosition(expr);
Handle<Code> ic = CodeFactory::CallIC(isolate(), arg_count, mode).code();
__ mov(r3, Operand(SmiFromSlot(expr->CallFeedbackICSlot())));
__ ldr(r1, MemOperand(sp, (arg_count + 1) * kPointerSize));
@ -2981,7 +2981,7 @@ void FullCodeGenerator::EmitPossiblyEvalCall(Call* expr) {
PrepareForBailoutForId(expr->EvalId(), NO_REGISTERS);
// Record source position for debugger.
SetCallPosition(expr, arg_count);
SetCallPosition(expr);
__ ldr(r1, MemOperand(sp, (arg_count + 1) * kPointerSize));
__ mov(r0, Operand(arg_count));
__ Call(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET);
@ -3013,7 +3013,7 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) {
// Call the construct call builtin that handles allocation and
// constructor invocation.
SetConstructCallPosition(expr, arg_count);
SetConstructCallPosition(expr);
// Load function and argument count into r1 and r0.
__ mov(r0, Operand(arg_count));
@ -3049,7 +3049,7 @@ void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) {
// Call the construct call builtin that handles allocation and
// constructor invocation.
SetConstructCallPosition(expr, arg_count);
SetConstructCallPosition(expr);
// Load new target into r3.
VisitForAccumulatorValue(super_call_ref->new_target_var());
@ -3746,7 +3746,7 @@ void FullCodeGenerator::EmitDefaultConstructorCallSuper(CallRuntime* expr) {
// Call the construct call builtin that handles allocation and
// constructor invocation.
SetConstructCallPosition(expr, 0);
SetConstructCallPosition(expr);
// Load new target into r3.
__ ldr(r3, MemOperand(sp, 1 * kPointerSize));
@ -4117,7 +4117,7 @@ void FullCodeGenerator::EmitCallJSRuntimeFunction(CallRuntime* expr) {
ZoneList<Expression*>* args = expr->arguments();
int arg_count = args->length();
SetCallPosition(expr, arg_count);
SetCallPosition(expr);
__ ldr(r1, MemOperand(sp, (arg_count + 1) * kPointerSize));
__ mov(r0, Operand(arg_count));
__ Call(isolate()->builtins()->Call(ConvertReceiverMode::kNullOrUndefined),

View File

@ -2584,7 +2584,7 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) {
}
PrepareForBailoutForId(expr->CallId(), NO_REGISTERS);
SetCallPosition(expr, arg_count);
SetCallPosition(expr);
Handle<Code> ic = CodeFactory::CallIC(isolate(), arg_count, mode).code();
__ Mov(x3, SmiFromSlot(expr->CallFeedbackICSlot()));
@ -2693,7 +2693,7 @@ void FullCodeGenerator::EmitPossiblyEvalCall(Call* expr) {
PrepareForBailoutForId(expr->EvalId(), NO_REGISTERS);
// Record source position for debugger.
SetCallPosition(expr, arg_count);
SetCallPosition(expr);
// Call the evaluated function.
__ Peek(x1, (arg_count + 1) * kXRegSize);
@ -2727,7 +2727,7 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) {
// Call the construct call builtin that handles allocation and
// constructor invocation.
SetConstructCallPosition(expr, arg_count);
SetConstructCallPosition(expr);
// Load function and argument count into x1 and x0.
__ Mov(x0, arg_count);
@ -2763,7 +2763,7 @@ void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) {
// Call the construct call builtin that handles allocation and
// constructor invocation.
SetConstructCallPosition(expr, arg_count);
SetConstructCallPosition(expr);
// Load new target into x3.
VisitForAccumulatorValue(super_call_ref->new_target_var());
@ -3462,7 +3462,7 @@ void FullCodeGenerator::EmitDefaultConstructorCallSuper(CallRuntime* expr) {
// Call the construct call builtin that handles allocation and
// constructor invocation.
SetConstructCallPosition(expr, 0);
SetConstructCallPosition(expr);
// Load new target into x3.
__ Peek(x3, 1 * kPointerSize);
@ -3827,7 +3827,7 @@ void FullCodeGenerator::EmitCallJSRuntimeFunction(CallRuntime* expr) {
ZoneList<Expression*>* args = expr->arguments();
int arg_count = args->length();
SetCallPosition(expr, arg_count);
SetCallPosition(expr);
__ Peek(x1, (arg_count + 1) * kPointerSize);
__ Mov(x0, arg_count);
__ Call(isolate()->builtins()->Call(ConvertReceiverMode::kNullOrUndefined),
@ -4588,7 +4588,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
CallIC(ic, TypeFeedbackId::None());
__ Mov(x1, x0);
__ Poke(x1, 2 * kPointerSize);
SetCallPosition(expr, 1);
SetCallPosition(expr);
__ Mov(x0, 1);
__ Call(
isolate()->builtins()->Call(ConvertReceiverMode::kNotNullOrUndefined),

View File

@ -602,24 +602,12 @@ void FullCodeGenerator::SetExpressionAsStatementPosition(Expression* expr) {
}
void FullCodeGenerator::SetCallPosition(Expression* expr, int argc) {
void FullCodeGenerator::SetCallPosition(Expression* expr) {
if (expr->position() == RelocInfo::kNoPosition) return;
RecordPosition(masm_, expr->position());
if (info_->is_debug()) {
// Always emit a debug break slot before a call.
DebugCodegen::GenerateSlot(masm_, RelocInfo::DEBUG_BREAK_SLOT_AT_CALL,
argc);
}
}
void FullCodeGenerator::SetConstructCallPosition(Expression* expr, int argc) {
if (expr->position() == RelocInfo::kNoPosition) return;
RecordPosition(masm_, expr->position());
if (info_->is_debug()) {
// Always emit a debug break slot before a construct call.
DebugCodegen::GenerateSlot(
masm_, RelocInfo::DEBUG_BREAK_SLOT_AT_CONSTRUCT_CALL, argc);
DebugCodegen::GenerateSlot(masm_, RelocInfo::DEBUG_BREAK_SLOT_AT_CALL);
}
}

View File

@ -659,9 +659,12 @@ class FullCodeGenerator: public AstVisitor {
// This is used in loop headers where we want to break for each iteration.
void SetExpressionAsStatementPosition(Expression* expr);
void SetCallPosition(Expression* expr, int argc);
void SetCallPosition(Expression* expr);
void SetConstructCallPosition(Expression* expr, int argc);
void SetConstructCallPosition(Expression* expr) {
// Currently call and construct calls are treated the same wrt debugging.
SetCallPosition(expr);
}
// Non-local control flow support.
void EnterTryBlock(int handler_index, Label* handler);

View File

@ -1965,7 +1965,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
CallIC(ic, TypeFeedbackId::None());
__ mov(edi, eax);
__ mov(Operand(esp, 2 * kPointerSize), edi);
SetCallPosition(expr, 1);
SetCallPosition(expr);
__ Set(eax, 1);
__ Call(
isolate()->builtins()->Call(ConvertReceiverMode::kNotNullOrUndefined),
@ -2763,7 +2763,7 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) {
}
PrepareForBailoutForId(expr->CallId(), NO_REGISTERS);
SetCallPosition(expr, arg_count);
SetCallPosition(expr);
Handle<Code> ic = CodeFactory::CallIC(isolate(), arg_count, mode).code();
__ Move(edx, Immediate(SmiFromSlot(expr->CallFeedbackICSlot())));
__ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize));
@ -2867,7 +2867,7 @@ void FullCodeGenerator::EmitPossiblyEvalCall(Call* expr) {
PrepareForBailoutForId(expr->EvalId(), NO_REGISTERS);
SetCallPosition(expr, arg_count);
SetCallPosition(expr);
__ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize));
__ Set(eax, arg_count);
__ Call(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET);
@ -2899,7 +2899,7 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) {
// Call the construct call builtin that handles allocation and
// constructor invocation.
SetConstructCallPosition(expr, arg_count);
SetConstructCallPosition(expr);
// Load function and argument count into edi and eax.
__ Move(eax, Immediate(arg_count));
@ -2935,7 +2935,7 @@ void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) {
// Call the construct call builtin that handles allocation and
// constructor invocation.
SetConstructCallPosition(expr, arg_count);
SetConstructCallPosition(expr);
// Load new target into edx.
VisitForAccumulatorValue(super_call_ref->new_target_var());
@ -3642,7 +3642,7 @@ void FullCodeGenerator::EmitDefaultConstructorCallSuper(CallRuntime* expr) {
// Call the construct call builtin that handles allocation and
// constructor invocation.
SetConstructCallPosition(expr, 0);
SetConstructCallPosition(expr);
// Check if the calling frame is an arguments adaptor frame.
Label adaptor_frame, args_set_up, runtime;
@ -4042,7 +4042,7 @@ void FullCodeGenerator::EmitCallJSRuntimeFunction(CallRuntime* expr) {
ZoneList<Expression*>* args = expr->arguments();
int arg_count = args->length();
SetCallPosition(expr, arg_count);
SetCallPosition(expr);
__ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize));
__ Set(eax, arg_count);
__ Call(isolate()->builtins()->Call(ConvertReceiverMode::kNullOrUndefined),

View File

@ -2051,7 +2051,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ mov(a0, v0);
__ mov(a1, a0);
__ sw(a1, MemOperand(sp, 2 * kPointerSize));
SetCallPosition(expr, 1);
SetCallPosition(expr);
__ li(a0, Operand(1));
__ Call(
isolate()->builtins()->Call(ConvertReceiverMode::kNotNullOrUndefined),
@ -2869,7 +2869,7 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) {
PrepareForBailoutForId(expr->CallId(), NO_REGISTERS);
// Record source position of the IC call.
SetCallPosition(expr, arg_count);
SetCallPosition(expr);
Handle<Code> ic = CodeFactory::CallIC(isolate(), arg_count, mode).code();
__ li(a3, Operand(SmiFromSlot(expr->CallFeedbackICSlot())));
__ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize));
@ -2976,7 +2976,7 @@ void FullCodeGenerator::EmitPossiblyEvalCall(Call* expr) {
PrepareForBailoutForId(expr->EvalId(), NO_REGISTERS);
// Record source position for debugger.
SetCallPosition(expr, arg_count);
SetCallPosition(expr);
__ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize));
__ li(a0, Operand(arg_count));
__ Call(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET);
@ -3008,7 +3008,7 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) {
// Call the construct call builtin that handles allocation and
// constructor invocation.
SetConstructCallPosition(expr, arg_count);
SetConstructCallPosition(expr);
// Load function and argument count into a1 and a0.
__ li(a0, Operand(arg_count));
@ -3044,7 +3044,7 @@ void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) {
// Call the construct call builtin that handles allocation and
// constructor invocation.
SetConstructCallPosition(expr, arg_count);
SetConstructCallPosition(expr);
// Load new target into a3.
VisitForAccumulatorValue(super_call_ref->new_target_var());
@ -3763,7 +3763,7 @@ void FullCodeGenerator::EmitDefaultConstructorCallSuper(CallRuntime* expr) {
// Call the construct call builtin that handles allocation and
// constructor invocation.
SetConstructCallPosition(expr, 0);
SetConstructCallPosition(expr);
// Load new target into a3.
__ lw(a3, MemOperand(sp, 1 * kPointerSize));
@ -4137,7 +4137,7 @@ void FullCodeGenerator::EmitCallJSRuntimeFunction(CallRuntime* expr) {
ZoneList<Expression*>* args = expr->arguments();
int arg_count = args->length();
SetCallPosition(expr, arg_count);
SetCallPosition(expr);
__ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize));
__ li(a0, Operand(arg_count));
__ Call(isolate()->builtins()->Call(ConvertReceiverMode::kNullOrUndefined),

View File

@ -2049,7 +2049,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ mov(a0, v0);
__ mov(a1, a0);
__ sd(a1, MemOperand(sp, 2 * kPointerSize));
SetCallPosition(expr, 1);
SetCallPosition(expr);
__ li(a0, Operand(1));
__ Call(
isolate()->builtins()->Call(ConvertReceiverMode::kNotNullOrUndefined),
@ -2874,7 +2874,7 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) {
PrepareForBailoutForId(expr->CallId(), NO_REGISTERS);
// Record source position of the IC call.
SetCallPosition(expr, arg_count);
SetCallPosition(expr);
Handle<Code> ic = CodeFactory::CallIC(isolate(), arg_count, mode).code();
__ li(a3, Operand(SmiFromSlot(expr->CallFeedbackICSlot())));
__ ld(a1, MemOperand(sp, (arg_count + 1) * kPointerSize));
@ -2980,7 +2980,7 @@ void FullCodeGenerator::EmitPossiblyEvalCall(Call* expr) {
PrepareForBailoutForId(expr->EvalId(), NO_REGISTERS);
// Record source position for debugger.
SetCallPosition(expr, arg_count);
SetCallPosition(expr);
__ ld(a1, MemOperand(sp, (arg_count + 1) * kPointerSize));
__ li(a0, Operand(arg_count));
__ Call(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET);
@ -3012,7 +3012,7 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) {
// Call the construct call builtin that handles allocation and
// constructor invocation.
SetConstructCallPosition(expr, arg_count);
SetConstructCallPosition(expr);
// Load function and argument count into a1 and a0.
__ li(a0, Operand(arg_count));
@ -3048,7 +3048,7 @@ void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) {
// Call the construct call builtin that handles allocation and
// constructor invocation.
SetConstructCallPosition(expr, arg_count);
SetConstructCallPosition(expr);
// Load new target into a3.
VisitForAccumulatorValue(super_call_ref->new_target_var());
@ -3768,7 +3768,7 @@ void FullCodeGenerator::EmitDefaultConstructorCallSuper(CallRuntime* expr) {
// Call the construct call builtin that handles allocation and
// constructor invocation.
SetConstructCallPosition(expr, 0);
SetConstructCallPosition(expr);
// Load new target into a3.
__ ld(a3, MemOperand(sp, 1 * kPointerSize));
@ -4142,7 +4142,7 @@ void FullCodeGenerator::EmitCallJSRuntimeFunction(CallRuntime* expr) {
ZoneList<Expression*>* args = expr->arguments();
int arg_count = args->length();
SetCallPosition(expr, arg_count);
SetCallPosition(expr);
__ ld(a1, MemOperand(sp, (arg_count + 1) * kPointerSize));
__ li(a0, Operand(arg_count));
__ Call(isolate()->builtins()->Call(ConvertReceiverMode::kNullOrUndefined),

View File

@ -1988,7 +1988,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ movp(rdi, rax);
__ movp(Operand(rsp, 2 * kPointerSize), rdi);
SetCallPosition(expr, 1);
SetCallPosition(expr);
__ Set(rax, 1);
__ Call(
isolate()->builtins()->Call(ConvertReceiverMode::kNotNullOrUndefined),
@ -2747,7 +2747,7 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) {
}
PrepareForBailoutForId(expr->CallId(), NO_REGISTERS);
SetCallPosition(expr, arg_count);
SetCallPosition(expr);
Handle<Code> ic = CodeFactory::CallIC(isolate(), arg_count, mode).code();
__ Move(rdx, SmiFromSlot(expr->CallFeedbackICSlot()));
__ movp(rdi, Operand(rsp, (arg_count + 1) * kPointerSize));
@ -2850,7 +2850,7 @@ void FullCodeGenerator::EmitPossiblyEvalCall(Call* expr) {
PrepareForBailoutForId(expr->EvalId(), NO_REGISTERS);
SetCallPosition(expr, arg_count);
SetCallPosition(expr);
__ movp(rdi, Operand(rsp, (arg_count + 1) * kPointerSize));
__ Set(rax, arg_count);
__ Call(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET);
@ -2882,7 +2882,7 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) {
// Call the construct call builtin that handles allocation and
// constructor invocation.
SetConstructCallPosition(expr, arg_count);
SetConstructCallPosition(expr);
// Load function and argument count into rdi and rax.
__ Set(rax, arg_count);
@ -2918,7 +2918,7 @@ void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) {
// Call the construct call builtin that handles allocation and
// constructor invocation.
SetConstructCallPosition(expr, arg_count);
SetConstructCallPosition(expr);
// Load new target into rdx.
VisitForAccumulatorValue(super_call_ref->new_target_var());
@ -3630,7 +3630,7 @@ void FullCodeGenerator::EmitDefaultConstructorCallSuper(CallRuntime* expr) {
// Call the construct call builtin that handles allocation and
// constructor invocation.
SetConstructCallPosition(expr, 0);
SetConstructCallPosition(expr);
// Check if the calling frame is an arguments adaptor frame.
Label adaptor_frame, args_set_up, runtime;
@ -4049,7 +4049,7 @@ void FullCodeGenerator::EmitCallJSRuntimeFunction(CallRuntime* expr) {
ZoneList<Expression*>* args = expr->arguments();
int arg_count = args->length();
SetCallPosition(expr, arg_count);
SetCallPosition(expr);
__ movp(rdi, Operand(rsp, (arg_count + 1) * kPointerSize));
__ Set(rax, arg_count);
__ Call(isolate()->builtins()->Call(ConvertReceiverMode::kNullOrUndefined),

View File

@ -1957,7 +1957,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
CallIC(ic, TypeFeedbackId::None());
__ mov(edi, eax);
__ mov(Operand(esp, 2 * kPointerSize), edi);
SetCallPosition(expr, 1);
SetCallPosition(expr);
__ Set(eax, 1);
__ Call(
isolate()->builtins()->Call(ConvertReceiverMode::kNotNullOrUndefined),
@ -2755,7 +2755,7 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) {
}
PrepareForBailoutForId(expr->CallId(), NO_REGISTERS);
SetCallPosition(expr, arg_count);
SetCallPosition(expr);
Handle<Code> ic = CodeFactory::CallIC(isolate(), arg_count, mode).code();
__ Move(edx, Immediate(SmiFromSlot(expr->CallFeedbackICSlot())));
__ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize));
@ -2859,7 +2859,7 @@ void FullCodeGenerator::EmitPossiblyEvalCall(Call* expr) {
PrepareForBailoutForId(expr->EvalId(), NO_REGISTERS);
SetCallPosition(expr, arg_count);
SetCallPosition(expr);
__ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize));
__ Set(eax, arg_count);
__ Call(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET);
@ -4034,7 +4034,7 @@ void FullCodeGenerator::EmitCallJSRuntimeFunction(CallRuntime* expr) {
ZoneList<Expression*>* args = expr->arguments();
int arg_count = args->length();
SetCallPosition(expr, arg_count);
SetCallPosition(expr);
__ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize));
__ Set(eax, arg_count);
__ Call(isolate()->builtins()->Call(ConvertReceiverMode::kNullOrUndefined),

View File

@ -1400,7 +1400,7 @@ class Assembler : public AssemblerBase {
void RecordGeneratorContinuation();
// Mark address of a debug break slot.
void RecordDebugBreakSlot(RelocInfo::Mode mode, int argc = 0);
void RecordDebugBreakSlot(RelocInfo::Mode mode);
// Record a comment relocation entry that can be used by a disassembler.
// Use --code-comments to enable.

View File

@ -2896,7 +2896,7 @@ void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) {
// We do not try to reuse pool constants.
RelocInfo rinfo(isolate(), pc_, rmode, data, NULL);
if (rmode >= RelocInfo::COMMENT &&
rmode <= RelocInfo::DEBUG_BREAK_SLOT_AT_CONSTRUCT_CALL) {
rmode <= RelocInfo::DEBUG_BREAK_SLOT_AT_CALL) {
// Adjust code for new modes.
DCHECK(RelocInfo::IsDebugBreakSlot(rmode)
|| RelocInfo::IsComment(rmode)

View File

@ -1011,7 +1011,7 @@ class Assembler : public AssemblerBase {
void RecordGeneratorContinuation();
// 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
// in the relocation information.

View File

@ -3114,7 +3114,7 @@ void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) {
// We do not try to reuse pool constants.
RelocInfo rinfo(isolate(), pc_, rmode, data, NULL);
if (rmode >= RelocInfo::COMMENT &&
rmode <= RelocInfo::DEBUG_BREAK_SLOT_AT_CONSTRUCT_CALL) {
rmode <= RelocInfo::DEBUG_BREAK_SLOT_AT_CALL) {
// Adjust code for new modes.
DCHECK(RelocInfo::IsDebugBreakSlot(rmode)
|| RelocInfo::IsComment(rmode)

View File

@ -1047,7 +1047,7 @@ class Assembler : public AssemblerBase {
void RecordGeneratorContinuation();
// 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
// in the relocation information.

View File

@ -1652,7 +1652,7 @@ class Assembler : public AssemblerBase {
void RecordGeneratorContinuation();
// Mark address of a debug break slot.
void RecordDebugBreakSlot(RelocInfo::Mode mode, int argc = 0);
void RecordDebugBreakSlot(RelocInfo::Mode mode);
// Record a comment relocation entry that can be used by a disassembler.
// Use --code-comments to enable.