Index: src/mips/full-codegen-mips.cc |
=================================================================== |
--- src/mips/full-codegen-mips.cc (revision 8492) |
+++ src/mips/full-codegen-mips.cc (working copy) |
@@ -796,7 +796,7 @@ |
Handle<Code> ic = is_strict_mode() |
? isolate()->builtins()->KeyedStoreIC_Initialize_Strict() |
: isolate()->builtins()->KeyedStoreIC_Initialize(); |
- EmitCallIC(ic, RelocInfo::CODE_TARGET, AstNode::kNoNumber); |
+ __ CallWithAstId(ic); |
// Value in v0 is ignored (declarations are statements). |
} |
} |
@@ -871,7 +871,7 @@ |
// Record position before stub call for type feedback. |
SetSourcePosition(clause->position()); |
Handle<Code> ic = CompareIC::GetUninitialized(Token::EQ_STRICT); |
- EmitCallIC(ic, RelocInfo::CODE_TARGET, clause->CompareId()); |
+ __ CallWithAstId(ic, RelocInfo::CODE_TARGET, clause->CompareId()); |
patch_site.EmitPatchInfo(); |
__ Branch(&next_test, ne, v0, Operand(zero_reg)); |
@@ -1171,7 +1171,7 @@ |
? RelocInfo::CODE_TARGET |
: RelocInfo::CODE_TARGET_CONTEXT; |
Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize(); |
- EmitCallIC(ic, mode, AstNode::kNoNumber); |
+ __ CallWithAstId(ic, mode); |
} |
@@ -1251,7 +1251,7 @@ |
__ li(a0, Operand(key_literal->handle())); |
Handle<Code> ic = |
isolate()->builtins()->KeyedLoadIC_Initialize(); |
- EmitCallIC(ic, RelocInfo::CODE_TARGET, GetPropertyId(property)); |
+ __ CallWithAstId(ic, RelocInfo::CODE_TARGET, GetPropertyId(property)); |
__ Branch(done); |
} |
} |
@@ -1273,7 +1273,7 @@ |
__ lw(a0, GlobalObjectOperand()); |
__ li(a2, Operand(var->name())); |
Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize(); |
- EmitCallIC(ic, RelocInfo::CODE_TARGET_CONTEXT, AstNode::kNoNumber); |
+ __ CallWithAstId(ic, RelocInfo::CODE_TARGET_CONTEXT); |
context()->Plug(v0); |
} else if (slot->type() == Slot::LOOKUP) { |
@@ -1419,7 +1419,7 @@ |
Handle<Code> ic = is_strict_mode() |
? isolate()->builtins()->StoreIC_Initialize_Strict() |
: isolate()->builtins()->StoreIC_Initialize(); |
- EmitCallIC(ic, RelocInfo::CODE_TARGET, key->id()); |
+ __ CallWithAstId(ic, RelocInfo::CODE_TARGET, key->id()); |
PrepareForBailoutForId(key->id(), NO_REGISTERS); |
} else { |
VisitForEffect(value); |
@@ -1663,7 +1663,7 @@ |
__ li(a2, Operand(key->handle())); |
// Call load IC. It has arguments receiver and property name a0 and a2. |
Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize(); |
- EmitCallIC(ic, RelocInfo::CODE_TARGET, GetPropertyId(prop)); |
+ __ CallWithAstId(ic, RelocInfo::CODE_TARGET, GetPropertyId(prop)); |
} |
@@ -1672,7 +1672,7 @@ |
__ mov(a0, result_register()); |
// Call keyed load IC. It has arguments key and receiver in a0 and a1. |
Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); |
- EmitCallIC(ic, RelocInfo::CODE_TARGET, GetPropertyId(prop)); |
+ __ CallWithAstId(ic, RelocInfo::CODE_TARGET, GetPropertyId(prop)); |
} |
@@ -1700,7 +1700,7 @@ |
__ bind(&stub_call); |
BinaryOpStub stub(op, mode); |
- EmitCallIC(stub.GetCode(), RelocInfo::CODE_TARGET, expr->id()); |
+ __ CallWithAstId(stub.GetCode(), RelocInfo::CODE_TARGET, expr->id()); |
patch_site.EmitPatchInfo(); |
__ jmp(&done); |
@@ -1783,7 +1783,7 @@ |
__ pop(a1); |
BinaryOpStub stub(op, mode); |
JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. |
- EmitCallIC(stub.GetCode(), RelocInfo::CODE_TARGET, expr->id()); |
+ __ CallWithAstId(stub.GetCode(), RelocInfo::CODE_TARGET, expr->id()); |
patch_site.EmitPatchInfo(); |
context()->Plug(v0); |
} |
@@ -1824,7 +1824,7 @@ |
Handle<Code> ic = is_strict_mode() |
? isolate()->builtins()->StoreIC_Initialize_Strict() |
: isolate()->builtins()->StoreIC_Initialize(); |
- EmitCallIC(ic, RelocInfo::CODE_TARGET, AstNode::kNoNumber); |
+ __ CallWithAstId(ic); |
break; |
} |
case KEYED_PROPERTY: { |
@@ -1837,7 +1837,7 @@ |
Handle<Code> ic = is_strict_mode() |
? isolate()->builtins()->KeyedStoreIC_Initialize_Strict() |
: isolate()->builtins()->KeyedStoreIC_Initialize(); |
- EmitCallIC(ic, RelocInfo::CODE_TARGET, AstNode::kNoNumber); |
+ __ CallWithAstId(ic); |
break; |
} |
} |
@@ -1862,7 +1862,7 @@ |
Handle<Code> ic = is_strict_mode() |
? isolate()->builtins()->StoreIC_Initialize_Strict() |
: isolate()->builtins()->StoreIC_Initialize(); |
- EmitCallIC(ic, RelocInfo::CODE_TARGET_CONTEXT, AstNode::kNoNumber); |
+ __ CallWithAstId(ic, RelocInfo::CODE_TARGET_CONTEXT); |
} else if (op == Token::INIT_CONST) { |
// Like var declarations, const declarations are hoisted to function |
@@ -1960,7 +1960,7 @@ |
Handle<Code> ic = is_strict_mode() |
? isolate()->builtins()->StoreIC_Initialize_Strict() |
: isolate()->builtins()->StoreIC_Initialize(); |
- EmitCallIC(ic, RelocInfo::CODE_TARGET, expr->id()); |
+ __ CallWithAstId(ic, RelocInfo::CODE_TARGET, expr->id()); |
// If the assignment ends an initialization block, revert to fast case. |
if (expr->ends_initialization_block()) { |
@@ -2012,7 +2012,7 @@ |
Handle<Code> ic = is_strict_mode() |
? isolate()->builtins()->KeyedStoreIC_Initialize_Strict() |
: isolate()->builtins()->KeyedStoreIC_Initialize(); |
- EmitCallIC(ic, RelocInfo::CODE_TARGET, expr->id()); |
+ __ CallWithAstId(ic, RelocInfo::CODE_TARGET, expr->id()); |
// If the assignment ends an initialization block, revert to fast case. |
if (expr->ends_initialization_block()) { |
@@ -2065,7 +2065,7 @@ |
InLoopFlag in_loop = (loop_depth() > 0) ? IN_LOOP : NOT_IN_LOOP; |
Handle<Code> ic = |
isolate()->stub_cache()->ComputeCallInitialize(arg_count, in_loop, mode); |
- EmitCallIC(ic, mode, expr->id()); |
+ __ CallWithAstId(ic, mode, expr->id()); |
RecordJSReturnSite(expr); |
// Restore context register. |
__ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
@@ -2099,7 +2099,7 @@ |
Handle<Code> ic = |
isolate()->stub_cache()->ComputeKeyedCallInitialize(arg_count, in_loop); |
__ lw(a2, MemOperand(sp, (arg_count + 1) * kPointerSize)); // Key. |
- EmitCallIC(ic, RelocInfo::CODE_TARGET, expr->id()); |
+ __ CallWithAstId(ic, RelocInfo::CODE_TARGET, expr->id()); |
RecordJSReturnSite(expr); |
// Restore context register. |
__ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
@@ -2280,7 +2280,7 @@ |
} else { |
// Call to a keyed property. |
// For a synthetic property use keyed load IC followed by function call, |
- // for a regular property use keyed EmitCallIC. |
+ // for a regular property use EmitKeyedCallWithIC. |
if (prop->is_synthetic()) { |
// Do not visit the object and key subexpressions (they are shared |
// by all occurrences of the same rewritten parameter). |
@@ -2298,7 +2298,7 @@ |
SetSourcePosition(prop->position()); |
Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); |
- EmitCallIC(ic, RelocInfo::CODE_TARGET, GetPropertyId(prop)); |
+ __ CallWithAstId(ic, RelocInfo::CODE_TARGET, GetPropertyId(prop)); |
__ lw(a1, GlobalObjectOperand()); |
__ lw(a1, FieldMemOperand(a1, GlobalObject::kGlobalReceiverOffset)); |
__ Push(v0, a1); // Function, receiver. |
@@ -3628,7 +3628,7 @@ |
isolate()->stub_cache()->ComputeCallInitialize(arg_count, |
NOT_IN_LOOP, |
mode); |
- EmitCallIC(ic, mode, expr->id()); |
+ __ CallWithAstId(ic, mode, expr->id()); |
// Restore context register. |
__ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
} else { |
@@ -3771,7 +3771,7 @@ |
VisitForAccumulatorValue(expr->expression()); |
SetSourcePosition(expr->position()); |
__ mov(a0, result_register()); |
- EmitCallIC(stub.GetCode(), RelocInfo::CODE_TARGET, expr->id()); |
+ __ CallWithAstId(stub.GetCode(), RelocInfo::CODE_TARGET, expr->id()); |
context()->Plug(v0); |
} |
@@ -3882,7 +3882,7 @@ |
SetSourcePosition(expr->position()); |
BinaryOpStub stub(Token::ADD, NO_OVERWRITE); |
- EmitCallIC(stub.GetCode(), RelocInfo::CODE_TARGET, expr->CountId()); |
+ __ CallWithAstId(stub.GetCode(), RelocInfo::CODE_TARGET, expr->CountId()); |
patch_site.EmitPatchInfo(); |
__ bind(&done); |
@@ -3915,7 +3915,7 @@ |
Handle<Code> ic = is_strict_mode() |
? isolate()->builtins()->StoreIC_Initialize_Strict() |
: isolate()->builtins()->StoreIC_Initialize(); |
- EmitCallIC(ic, RelocInfo::CODE_TARGET, expr->id()); |
+ __ CallWithAstId(ic, RelocInfo::CODE_TARGET, expr->id()); |
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
if (expr->is_postfix()) { |
if (!context()->IsEffect()) { |
@@ -3933,7 +3933,7 @@ |
Handle<Code> ic = is_strict_mode() |
? isolate()->builtins()->KeyedStoreIC_Initialize_Strict() |
: isolate()->builtins()->KeyedStoreIC_Initialize(); |
- EmitCallIC(ic, RelocInfo::CODE_TARGET, expr->id()); |
+ __ CallWithAstId(ic, RelocInfo::CODE_TARGET, expr->id()); |
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
if (expr->is_postfix()) { |
if (!context()->IsEffect()) { |
@@ -3957,7 +3957,7 @@ |
Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize(); |
// Use a regular load, not a contextual load, to avoid a reference |
// error. |
- EmitCallIC(ic, RelocInfo::CODE_TARGET, AstNode::kNoNumber); |
+ __ CallWithAstId(ic); |
PrepareForBailout(expr, TOS_REG); |
context()->Plug(v0); |
} else if (proxy != NULL && |
@@ -4154,7 +4154,7 @@ |
// Record position and call the compare IC. |
SetSourcePosition(expr->position()); |
Handle<Code> ic = CompareIC::GetUninitialized(op); |
- EmitCallIC(ic, RelocInfo::CODE_TARGET, expr->id()); |
+ __ CallWithAstId(ic, RelocInfo::CODE_TARGET, expr->id()); |
patch_site.EmitPatchInfo(); |
PrepareForBailoutBeforeSplit(TOS_REG, true, if_true, if_false); |
Split(cc, v0, Operand(zero_reg), if_true, if_false, fall_through); |
@@ -4214,20 +4214,6 @@ |
} |
-void FullCodeGenerator::EmitCallIC(Handle<Code> ic, |
- RelocInfo::Mode mode, |
- unsigned ast_id) { |
- ASSERT(mode == RelocInfo::CODE_TARGET || |
- mode == RelocInfo::CODE_TARGET_CONTEXT); |
- if (ast_id == kNoASTId || mode == RelocInfo::CODE_TARGET_CONTEXT) { |
- __ Call(ic, mode); |
- } else { |
- ASSERT(mode == RelocInfo::CODE_TARGET); |
- __ CallWithAstId(ic, RelocInfo::CODE_TARGET_WITH_ID, ast_id); |
- } |
-} |
- |
- |
void FullCodeGenerator::StoreToFrameField(int frame_offset, Register value) { |
ASSERT_EQ(POINTER_SIZE_ALIGN(frame_offset), frame_offset); |
__ sw(value, MemOperand(fp, frame_offset)); |