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

PPC: Debugger: use debug break slots instead of ICs (except for calls).

Port a8a4c364

R=yangguo@chromium.org, dstence@us.ibm.com, michael_dawson@ca.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#29503}
parent 85ed098c
...@@ -157,50 +157,6 @@ void DebugCodegen::GenerateCallICStubDebugBreak(MacroAssembler* masm) { ...@@ -157,50 +157,6 @@ void DebugCodegen::GenerateCallICStubDebugBreak(MacroAssembler* masm) {
} }
void DebugCodegen::GenerateLoadICDebugBreak(MacroAssembler* masm) {
// Calling convention for IC load (from ic-ppc.cc).
Register receiver = LoadDescriptor::ReceiverRegister();
Register name = LoadDescriptor::NameRegister();
Register slot = LoadDescriptor::SlotRegister();
RegList regs = receiver.bit() | name.bit() | slot.bit();
Generate_DebugBreakCallHelper(masm, regs, 0);
}
void DebugCodegen::GenerateStoreICDebugBreak(MacroAssembler* masm) {
// Calling convention for IC store (from ic-ppc.cc).
Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreDescriptor::NameRegister();
Register value = StoreDescriptor::ValueRegister();
RegList regs = receiver.bit() | name.bit() | value.bit();
if (FLAG_vector_stores) {
regs |= VectorStoreICDescriptor::SlotRegister().bit();
}
Generate_DebugBreakCallHelper(masm, regs, 0);
}
void DebugCodegen::GenerateKeyedLoadICDebugBreak(MacroAssembler* masm) {
// Calling convention for keyed IC load (from ic-ppc.cc).
GenerateLoadICDebugBreak(masm);
}
void DebugCodegen::GenerateKeyedStoreICDebugBreak(MacroAssembler* masm) {
// Calling convention for IC keyed store call (from ic-ppc.cc).
GenerateStoreICDebugBreak(masm);
}
void DebugCodegen::GenerateCompareNilICDebugBreak(MacroAssembler* masm) {
// Register state for CompareNil IC
// ----------- S t a t e -------------
// -- r3 : value
// -----------------------------------
Generate_DebugBreakCallHelper(masm, r3.bit(), 0);
}
void DebugCodegen::GenerateReturnDebugBreak(MacroAssembler* masm) { void DebugCodegen::GenerateReturnDebugBreak(MacroAssembler* masm) {
// In places other than IC call sites it is expected that r3 is TOS which // In places other than IC call sites it is expected that r3 is TOS which
// is an object - this is not generally the case so this should be used with // is an object - this is not generally the case so this should be used with
......
...@@ -502,7 +502,7 @@ void FullCodeGenerator::EmitReturnSequence() { ...@@ -502,7 +502,7 @@ void FullCodeGenerator::EmitReturnSequence() {
Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm_); Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm_);
int32_t arg_count = info_->scope()->num_parameters() + 1; int32_t arg_count = info_->scope()->num_parameters() + 1;
int32_t sp_delta = arg_count * kPointerSize; int32_t sp_delta = arg_count * kPointerSize;
CodeGenerator::RecordPositions(masm_, function()->end_position() - 1); SetReturnPosition(function());
__ RecordJSReturn(); __ RecordJSReturn();
int no_frame_start = __ LeaveFrame(StackFrame::JAVA_SCRIPT, sp_delta); int no_frame_start = __ LeaveFrame(StackFrame::JAVA_SCRIPT, sp_delta);
#if V8_TARGET_ARCH_PPC64 #if V8_TARGET_ARCH_PPC64
...@@ -1053,7 +1053,7 @@ void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) { ...@@ -1053,7 +1053,7 @@ void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) {
} }
// Record position before stub call for type feedback. // Record position before stub call for type feedback.
SetSourcePosition(clause->position()); SetExpressionPosition(clause);
Handle<Code> ic = CodeFactory::CompareIC(isolate(), Token::EQ_STRICT, Handle<Code> ic = CodeFactory::CompareIC(isolate(), Token::EQ_STRICT,
strength(language_mode())).code(); strength(language_mode())).code();
CallIC(ic, clause->CompareId()); CallIC(ic, clause->CompareId());
...@@ -1101,8 +1101,9 @@ void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) { ...@@ -1101,8 +1101,9 @@ void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) {
void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) { void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
Comment cmnt(masm_, "[ ForInStatement"); Comment cmnt(masm_, "[ ForInStatement");
SetStatementPosition(stmt, SKIP_BREAK);
FeedbackVectorSlot slot = stmt->ForInFeedbackSlot(); FeedbackVectorSlot slot = stmt->ForInFeedbackSlot();
SetStatementPosition(stmt);
Label loop, exit; Label loop, exit;
ForIn loop_statement(this, stmt); ForIn loop_statement(this, stmt);
...@@ -1110,7 +1111,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) { ...@@ -1110,7 +1111,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
// Get the object to enumerate over. If the object is null or undefined, skip // Get the object to enumerate over. If the object is null or undefined, skip
// over the loop. See ECMA-262 version 5, section 12.6.4. // over the loop. See ECMA-262 version 5, section 12.6.4.
SetExpressionPosition(stmt->enumerable()); SetExpressionAsStatementPosition(stmt->enumerable());
VisitForAccumulatorValue(stmt->enumerable()); VisitForAccumulatorValue(stmt->enumerable());
__ LoadRoot(ip, Heap::kUndefinedValueRootIndex); __ LoadRoot(ip, Heap::kUndefinedValueRootIndex);
__ cmp(r3, ip); __ cmp(r3, ip);
...@@ -1216,7 +1217,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) { ...@@ -1216,7 +1217,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
// Generate code for doing the condition check. // Generate code for doing the condition check.
PrepareForBailoutForId(stmt->BodyId(), NO_REGISTERS); PrepareForBailoutForId(stmt->BodyId(), NO_REGISTERS);
__ bind(&loop); __ bind(&loop);
SetExpressionPosition(stmt->each()); SetExpressionAsStatementPosition(stmt->each());
// Load the current count to r3, load the length to r4. // Load the current count to r3, load the length to r4.
__ LoadP(r3, MemOperand(sp, 0 * kPointerSize)); __ LoadP(r3, MemOperand(sp, 0 * kPointerSize));
...@@ -1463,7 +1464,7 @@ void FullCodeGenerator::EmitDynamicLookupFastCase(VariableProxy* proxy, ...@@ -1463,7 +1464,7 @@ void FullCodeGenerator::EmitDynamicLookupFastCase(VariableProxy* proxy,
void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) { void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
// Record position before possible IC call. // Record position before possible IC call.
SetSourcePosition(proxy->position()); SetExpressionPosition(proxy);
PrepareForBailoutForId(proxy->BeforeId(), NO_REGISTERS); PrepareForBailoutForId(proxy->BeforeId(), NO_REGISTERS);
Variable* var = proxy->var(); Variable* var = proxy->var();
...@@ -1955,6 +1956,7 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) { ...@@ -1955,6 +1956,7 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) {
DCHECK(expr->target()->IsValidReferenceExpression()); DCHECK(expr->target()->IsValidReferenceExpression());
Comment cmnt(masm_, "[ Assignment"); Comment cmnt(masm_, "[ Assignment");
SetExpressionPosition(expr, INSERT_BREAK);
Property* property = expr->target()->AsProperty(); Property* property = expr->target()->AsProperty();
LhsKind assign_type = Property::GetAssignType(property); LhsKind assign_type = Property::GetAssignType(property);
...@@ -2048,7 +2050,6 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) { ...@@ -2048,7 +2050,6 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) {
__ push(r3); // Left operand goes on the stack. __ push(r3); // Left operand goes on the stack.
VisitForAccumulatorValue(expr->value()); VisitForAccumulatorValue(expr->value());
SetSourcePosition(expr->position() + 1);
AccumulatorValueContext context(this); AccumulatorValueContext context(this);
if (ShouldInlineSmiCase(op)) { if (ShouldInlineSmiCase(op)) {
EmitInlineSmiBinaryOp(expr->binary_operation(), op, expr->target(), EmitInlineSmiBinaryOp(expr->binary_operation(), op, expr->target(),
...@@ -2063,8 +2064,7 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) { ...@@ -2063,8 +2064,7 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) {
VisitForAccumulatorValue(expr->value()); VisitForAccumulatorValue(expr->value());
} }
// Record source position before possible IC call. SetExpressionPosition(expr);
SetSourcePosition(expr->position());
// Store the value. // Store the value.
switch (assign_type) { switch (assign_type) {
...@@ -2094,6 +2094,8 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) { ...@@ -2094,6 +2094,8 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) {
void FullCodeGenerator::VisitYield(Yield* expr) { void FullCodeGenerator::VisitYield(Yield* expr) {
Comment cmnt(masm_, "[ Yield"); Comment cmnt(masm_, "[ Yield");
SetExpressionPosition(expr);
// Evaluate yielded value first; the initial iterator definition depends on // Evaluate yielded value first; the initial iterator definition depends on
// this. It stays on the stack while we update the iterator. // this. It stays on the stack while we update the iterator.
VisitForStackValue(expr->expression()); VisitForStackValue(expr->expression());
...@@ -2400,7 +2402,7 @@ void FullCodeGenerator::EmitCreateIteratorResult(bool done) { ...@@ -2400,7 +2402,7 @@ void FullCodeGenerator::EmitCreateIteratorResult(bool done) {
void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) { void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
SetSourcePosition(prop->position()); SetExpressionPosition(prop);
Literal* key = prop->key()->AsLiteral(); Literal* key = prop->key()->AsLiteral();
DCHECK(!prop->IsSuperAccess()); DCHECK(!prop->IsSuperAccess());
...@@ -2413,7 +2415,7 @@ void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) { ...@@ -2413,7 +2415,7 @@ void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
void FullCodeGenerator::EmitNamedSuperPropertyLoad(Property* prop) { void FullCodeGenerator::EmitNamedSuperPropertyLoad(Property* prop) {
// Stack: receiver, home_object. // Stack: receiver, home_object.
SetSourcePosition(prop->position()); SetExpressionPosition(prop);
Literal* key = prop->key()->AsLiteral(); Literal* key = prop->key()->AsLiteral();
DCHECK(!key->value()->IsSmi()); DCHECK(!key->value()->IsSmi());
DCHECK(prop->IsSuperAccess()); DCHECK(prop->IsSuperAccess());
...@@ -2425,7 +2427,7 @@ void FullCodeGenerator::EmitNamedSuperPropertyLoad(Property* prop) { ...@@ -2425,7 +2427,7 @@ void FullCodeGenerator::EmitNamedSuperPropertyLoad(Property* prop) {
void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) { void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
SetSourcePosition(prop->position()); SetExpressionPosition(prop);
Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate(), language_mode()).code(); Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate(), language_mode()).code();
__ mov(LoadDescriptor::SlotRegister(), __ mov(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(prop->PropertyFeedbackSlot()))); Operand(SmiFromSlot(prop->PropertyFeedbackSlot())));
...@@ -2435,9 +2437,8 @@ void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) { ...@@ -2435,9 +2437,8 @@ void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
void FullCodeGenerator::EmitKeyedSuperPropertyLoad(Property* prop) { void FullCodeGenerator::EmitKeyedSuperPropertyLoad(Property* prop) {
// Stack: receiver, home_object, key. // Stack: receiver, home_object, key.
SetExpressionPosition(prop);
__ Push(Smi::FromInt(language_mode())); __ Push(Smi::FromInt(language_mode()));
SetSourcePosition(prop->position());
__ CallRuntime(Runtime::kLoadKeyedFromSuper, 4); __ CallRuntime(Runtime::kLoadKeyedFromSuper, 4);
} }
...@@ -2841,8 +2842,6 @@ void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) { ...@@ -2841,8 +2842,6 @@ void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) {
DCHECK(prop != NULL); DCHECK(prop != NULL);
DCHECK(prop->key()->IsLiteral()); DCHECK(prop->key()->IsLiteral());
// Record source code position before IC call.
SetSourcePosition(expr->position());
__ mov(StoreDescriptor::NameRegister(), __ mov(StoreDescriptor::NameRegister(),
Operand(prop->key()->AsLiteral()->value())); Operand(prop->key()->AsLiteral()->value()));
__ pop(StoreDescriptor::ReceiverRegister()); __ pop(StoreDescriptor::ReceiverRegister());
...@@ -2890,9 +2889,6 @@ void FullCodeGenerator::EmitKeyedSuperPropertyStore(Property* prop) { ...@@ -2890,9 +2889,6 @@ void FullCodeGenerator::EmitKeyedSuperPropertyStore(Property* prop) {
void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) { void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) {
// Assignment to a property, using a keyed store IC. // Assignment to a property, using a keyed store IC.
// Record source code position before IC call.
SetSourcePosition(expr->position());
__ Pop(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister()); __ Pop(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister());
DCHECK(StoreDescriptor::ValueRegister().is(r3)); DCHECK(StoreDescriptor::ValueRegister().is(r3));
...@@ -2912,6 +2908,8 @@ void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) { ...@@ -2912,6 +2908,8 @@ void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) {
void FullCodeGenerator::VisitProperty(Property* expr) { void FullCodeGenerator::VisitProperty(Property* expr) {
Comment cmnt(masm_, "[ Property"); Comment cmnt(masm_, "[ Property");
SetExpressionPosition(expr);
Expression* key = expr->key(); Expression* key = expr->key();
if (key->IsPropertyName()) { if (key->IsPropertyName()) {
...@@ -2991,8 +2989,8 @@ void FullCodeGenerator::EmitSuperCallWithLoadIC(Call* expr) { ...@@ -2991,8 +2989,8 @@ void FullCodeGenerator::EmitSuperCallWithLoadIC(Call* expr) {
DCHECK(callee->IsProperty()); DCHECK(callee->IsProperty());
Property* prop = callee->AsProperty(); Property* prop = callee->AsProperty();
DCHECK(prop->IsSuperAccess()); DCHECK(prop->IsSuperAccess());
SetExpressionPosition(prop);
SetSourcePosition(prop->position());
Literal* key = prop->key()->AsLiteral(); Literal* key = prop->key()->AsLiteral();
DCHECK(!key->value()->IsSmi()); DCHECK(!key->value()->IsSmi());
// Load the function from the receiver. // Load the function from the receiver.
...@@ -3053,7 +3051,7 @@ void FullCodeGenerator::EmitKeyedSuperCallWithLoadIC(Call* expr) { ...@@ -3053,7 +3051,7 @@ void FullCodeGenerator::EmitKeyedSuperCallWithLoadIC(Call* expr) {
Property* prop = callee->AsProperty(); Property* prop = callee->AsProperty();
DCHECK(prop->IsSuperAccess()); DCHECK(prop->IsSuperAccess());
SetSourcePosition(prop->position()); SetExpressionPosition(prop);
// Load the function from the receiver. // Load the function from the receiver.
const Register scratch = r4; const Register scratch = r4;
SuperPropertyReference* super_ref = prop->obj()->AsSuperPropertyReference(); SuperPropertyReference* super_ref = prop->obj()->AsSuperPropertyReference();
...@@ -3087,15 +3085,11 @@ void FullCodeGenerator::EmitCall(Call* expr, CallICState::CallType call_type) { ...@@ -3087,15 +3085,11 @@ void FullCodeGenerator::EmitCall(Call* expr, CallICState::CallType call_type) {
// Load the arguments. // Load the arguments.
ZoneList<Expression*>* args = expr->arguments(); ZoneList<Expression*>* args = expr->arguments();
int arg_count = args->length(); int arg_count = args->length();
{ for (int i = 0; i < arg_count; i++) {
PreservePositionScope scope(masm()->positions_recorder()); VisitForStackValue(args->at(i));
for (int i = 0; i < arg_count; i++) {
VisitForStackValue(args->at(i));
}
} }
// Record source position of the IC call. SetExpressionPosition(expr);
SetSourcePosition(expr->position());
Handle<Code> ic = CodeFactory::CallIC(isolate(), arg_count, call_type).code(); Handle<Code> ic = CodeFactory::CallIC(isolate(), arg_count, call_type).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);
...@@ -3154,13 +3148,11 @@ void FullCodeGenerator::PushCalleeAndWithBaseObject(Call* expr) { ...@@ -3154,13 +3148,11 @@ void FullCodeGenerator::PushCalleeAndWithBaseObject(Call* expr) {
VariableProxy* callee = expr->expression()->AsVariableProxy(); VariableProxy* callee = expr->expression()->AsVariableProxy();
if (callee->var()->IsLookupSlot()) { if (callee->var()->IsLookupSlot()) {
Label slow, done; Label slow, done;
SetSourcePosition(callee->position()); SetExpressionPosition(callee);
{ // Generate code for loading from variables potentially shadowed by
PreservePositionScope scope(masm()->positions_recorder()); // eval-introduced variables.
// Generate code for loading from variables potentially shadowed by EmitDynamicLookupFastCase(callee, NOT_INSIDE_TYPEOF, &slow, &done);
// eval-introduced variables.
EmitDynamicLookupFastCase(callee, NOT_INSIDE_TYPEOF, &slow, &done);
}
__ bind(&slow); __ bind(&slow);
// Call the runtime to find the function to call (returned in r3) and // Call the runtime to find the function to call (returned in r3) and
// the object holding it (returned in r4). // the object holding it (returned in r4).
...@@ -3213,29 +3205,26 @@ void FullCodeGenerator::VisitCall(Call* expr) { ...@@ -3213,29 +3205,26 @@ void FullCodeGenerator::VisitCall(Call* expr) {
ZoneList<Expression*>* args = expr->arguments(); ZoneList<Expression*>* args = expr->arguments();
int arg_count = args->length(); int arg_count = args->length();
{ PushCalleeAndWithBaseObject(expr);
PreservePositionScope pos_scope(masm()->positions_recorder());
PushCalleeAndWithBaseObject(expr);
// Push the arguments. // Push the arguments.
for (int i = 0; i < arg_count; i++) { for (int i = 0; i < arg_count; i++) {
VisitForStackValue(args->at(i)); VisitForStackValue(args->at(i));
} }
// Push a copy of the function (found below the arguments) and // Push a copy of the function (found below the arguments) and
// resolve eval. // resolve eval.
__ LoadP(r4, MemOperand(sp, (arg_count + 1) * kPointerSize), r0); __ LoadP(r4, MemOperand(sp, (arg_count + 1) * kPointerSize), r0);
__ push(r4); __ push(r4);
EmitResolvePossiblyDirectEval(arg_count); EmitResolvePossiblyDirectEval(arg_count);
// Touch up the stack with the resolved function. // Touch up the stack with the resolved function.
__ StoreP(r3, MemOperand(sp, (arg_count + 1) * kPointerSize), r0); __ StoreP(r3, MemOperand(sp, (arg_count + 1) * kPointerSize), r0);
PrepareForBailoutForId(expr->EvalId(), NO_REGISTERS); PrepareForBailoutForId(expr->EvalId(), NO_REGISTERS);
}
// Record source position for debugger. // Record source position for debugger.
SetSourcePosition(expr->position()); SetExpressionPosition(expr);
CallFunctionStub stub(isolate(), arg_count, NO_CALL_FUNCTION_FLAGS); CallFunctionStub stub(isolate(), arg_count, NO_CALL_FUNCTION_FLAGS);
__ LoadP(r4, MemOperand(sp, (arg_count + 1) * kPointerSize), r0); __ LoadP(r4, MemOperand(sp, (arg_count + 1) * kPointerSize), r0);
__ CallStub(&stub); __ CallStub(&stub);
...@@ -3260,10 +3249,7 @@ void FullCodeGenerator::VisitCall(Call* expr) { ...@@ -3260,10 +3249,7 @@ void FullCodeGenerator::VisitCall(Call* expr) {
EmitKeyedSuperCallWithLoadIC(expr); EmitKeyedSuperCallWithLoadIC(expr);
} }
} else { } else {
{ VisitForStackValue(property->obj());
PreservePositionScope scope(masm()->positions_recorder());
VisitForStackValue(property->obj());
}
if (is_named_call) { if (is_named_call) {
EmitCallWithLoadIC(expr); EmitCallWithLoadIC(expr);
} else { } else {
...@@ -3275,10 +3261,7 @@ void FullCodeGenerator::VisitCall(Call* expr) { ...@@ -3275,10 +3261,7 @@ void FullCodeGenerator::VisitCall(Call* expr) {
} else { } else {
DCHECK(call_type == Call::OTHER_CALL); DCHECK(call_type == Call::OTHER_CALL);
// Call to an arbitrary expression not handled specially above. // Call to an arbitrary expression not handled specially above.
{ VisitForStackValue(callee);
PreservePositionScope scope(masm()->positions_recorder());
VisitForStackValue(callee);
}
__ LoadRoot(r4, Heap::kUndefinedValueRootIndex); __ LoadRoot(r4, Heap::kUndefinedValueRootIndex);
__ push(r4); __ push(r4);
// Emit function call. // Emit function call.
...@@ -3313,7 +3296,7 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) { ...@@ -3313,7 +3296,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.
SetSourcePosition(expr->position()); SetExpressionPosition(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));
...@@ -3356,7 +3339,7 @@ void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { ...@@ -3356,7 +3339,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.
SetSourcePosition(expr->position()); SetExpressionPosition(expr);
// Load function and argument count into r1 and r0. // Load function and argument count into r1 and r0.
__ mov(r3, Operand(arg_count)); __ mov(r3, Operand(arg_count));
...@@ -4765,8 +4748,7 @@ void FullCodeGenerator::EmitCallJSRuntimeFunction(CallRuntime* expr) { ...@@ -4765,8 +4748,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();
// Record source position of the IC call. SetExpressionPosition(expr);
SetSourcePosition(expr->position());
CallFunctionStub stub(isolate(), arg_count, NO_CALL_FUNCTION_FLAGS); CallFunctionStub stub(isolate(), arg_count, NO_CALL_FUNCTION_FLAGS);
__ LoadP(r4, MemOperand(sp, (arg_count + 1) * kPointerSize), r0); __ LoadP(r4, MemOperand(sp, (arg_count + 1) * kPointerSize), r0);
__ CallStub(&stub); __ CallStub(&stub);
...@@ -4940,7 +4922,6 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { ...@@ -4940,7 +4922,6 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
DCHECK(expr->expression()->IsValidReferenceExpression()); DCHECK(expr->expression()->IsValidReferenceExpression());
Comment cmnt(masm_, "[ CountOperation"); Comment cmnt(masm_, "[ CountOperation");
SetSourcePosition(expr->position());
Property* prop = expr->expression()->AsProperty(); Property* prop = expr->expression()->AsProperty();
LhsKind assign_type = Property::GetAssignType(prop); LhsKind assign_type = Property::GetAssignType(prop);
...@@ -5096,8 +5077,7 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { ...@@ -5096,8 +5077,7 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
__ mr(r4, r3); __ mr(r4, r3);
__ LoadSmiLiteral(r3, Smi::FromInt(count_value)); __ LoadSmiLiteral(r3, Smi::FromInt(count_value));
// Record position before stub call. SetExpressionPosition(expr);
SetSourcePosition(expr->position());
Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), Token::ADD, Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), Token::ADD,
strength(language_mode())).code(); strength(language_mode())).code();
...@@ -5316,7 +5296,7 @@ void FullCodeGenerator::EmitLiteralCompareTypeof(Expression* expr, ...@@ -5316,7 +5296,7 @@ void FullCodeGenerator::EmitLiteralCompareTypeof(Expression* expr,
void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) { void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) {
Comment cmnt(masm_, "[ CompareOperation"); Comment cmnt(masm_, "[ CompareOperation");
SetSourcePosition(expr->position()); SetExpressionPosition(expr);
// First we try a fast inlined version of the compare when one of // First we try a fast inlined version of the compare when one of
// the operands is a literal. // the operands is a literal.
...@@ -5370,8 +5350,6 @@ void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) { ...@@ -5370,8 +5350,6 @@ void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) {
__ bind(&slow_case); __ bind(&slow_case);
} }
// Record position and call the compare IC.
SetSourcePosition(expr->position());
Handle<Code> ic = CodeFactory::CompareIC( Handle<Code> ic = CodeFactory::CompareIC(
isolate(), op, strength(language_mode())).code(); isolate(), op, strength(language_mode())).code();
CallIC(ic, expr->CompareOperationFeedbackId()); CallIC(ic, expr->CompareOperationFeedbackId());
......
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