Unbreak compilation on MIPS after EmitCallIC removal.
Note: It has only been verified that compilation is OK, nothing more... ;-) Review URL: http://codereview.chromium.org/7273097 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8493 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
8a3d8b41e8
commit
a482bd7ee3
@ -796,7 +796,7 @@ void FullCodeGenerator::EmitDeclaration(Variable* variable,
|
||||
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 @@ void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) {
|
||||
// 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 @@ void FullCodeGenerator::EmitLoadGlobalSlotCheckExtensions(
|
||||
? 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 @@ void FullCodeGenerator::EmitDynamicLoadFromSlotFastCase(
|
||||
__ 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 @@ void FullCodeGenerator::EmitVariableLoad(Variable* var) {
|
||||
__ 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 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
|
||||
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 @@ void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
|
||||
__ 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 @@ void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
|
||||
__ 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 @@ void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr,
|
||||
|
||||
__ 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 @@ void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr,
|
||||
__ 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 @@ void FullCodeGenerator::EmitAssignment(Expression* expr, int bailout_ast_id) {
|
||||
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 @@ void FullCodeGenerator::EmitAssignment(Expression* expr, int bailout_ast_id) {
|
||||
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 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var,
|
||||
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 @@ void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) {
|
||||
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 @@ void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) {
|
||||
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 @@ void FullCodeGenerator::EmitCallWithIC(Call* expr,
|
||||
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 @@ void FullCodeGenerator::EmitKeyedCallWithIC(Call* expr,
|
||||
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 @@ void FullCodeGenerator::VisitCall(Call* expr) {
|
||||
} 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 @@ void FullCodeGenerator::VisitCall(Call* expr) {
|
||||
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 @@ void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) {
|
||||
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 @@ void FullCodeGenerator::EmitUnaryOperation(UnaryOperation* expr,
|
||||
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 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
|
||||
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 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
|
||||
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 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
|
||||
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 @@ void FullCodeGenerator::VisitForTypeofValue(Expression* expr) {
|
||||
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 @@ void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) {
|
||||
// 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 @@ Register FullCodeGenerator::context_register() {
|
||||
}
|
||||
|
||||
|
||||
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));
|
||||
|
@ -2088,10 +2088,12 @@ void MacroAssembler::CallWithAstId(Handle<Code> code,
|
||||
Condition cond,
|
||||
Register r1,
|
||||
const Operand& r2) {
|
||||
ASSERT(rmode == RelocInfo::CODE_TARGET_WITH_ID);
|
||||
ASSERT(ast_id != kNoASTId);
|
||||
ASSERT(ast_id_for_reloc_info_ == kNoASTId);
|
||||
ast_id_for_reloc_info_ = ast_id;
|
||||
ASSERT(RelocInfo::IsCodeTarget(rmode));
|
||||
if (rmode == RelocInfo::CODE_TARGET && ast_id != kNoASTId) {
|
||||
ASSERT(ast_id_for_reloc_info_ == kNoASTId);
|
||||
ast_id_for_reloc_info_ = ast_id;
|
||||
rmode = RelocInfo::CODE_TARGET_WITH_ID;
|
||||
}
|
||||
Call(reinterpret_cast<intptr_t>(code.location()), rmode, cond, r1, r2);
|
||||
}
|
||||
|
||||
|
@ -181,8 +181,8 @@ DECLARE_NOTARGET_PROTOTYPE(Ret)
|
||||
#undef DECLARE_BRANCH_PROTOTYPES
|
||||
|
||||
void CallWithAstId(Handle<Code> code,
|
||||
RelocInfo::Mode rmode,
|
||||
unsigned ast_id,
|
||||
RelocInfo::Mode rmode = RelocInfo::CODE_TARGET,
|
||||
unsigned ast_id = kNoASTId,
|
||||
Condition cond = al,
|
||||
Register r1 = zero_reg,
|
||||
const Operand& r2 = Operand(zero_reg));
|
||||
|
Loading…
Reference in New Issue
Block a user