Fix x64 typefeedback for property assignments.
There was not ast-id recorded. I removed the default arguments for the helper functions that emit IC calls to make sure we are not missing other places. Review URL: http://codereview.chromium.org/6878009 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7644 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
06932d0e6b
commit
2d8556827e
@ -783,7 +783,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);
|
||||
EmitCallIC(ic, RelocInfo::CODE_TARGET, AstNode::kNoNumber);
|
||||
// Value in r0 is ignored (declarations are statements).
|
||||
}
|
||||
}
|
||||
@ -1166,7 +1166,7 @@ void FullCodeGenerator::EmitLoadGlobalSlotCheckExtensions(
|
||||
? RelocInfo::CODE_TARGET
|
||||
: RelocInfo::CODE_TARGET_CONTEXT;
|
||||
Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize();
|
||||
EmitCallIC(ic, mode);
|
||||
EmitCallIC(ic, mode, AstNode::kNoNumber);
|
||||
}
|
||||
|
||||
|
||||
@ -1248,7 +1248,7 @@ void FullCodeGenerator::EmitDynamicLoadFromSlotFastCase(
|
||||
__ mov(r0, Operand(key_literal->handle()));
|
||||
Handle<Code> ic =
|
||||
isolate()->builtins()->KeyedLoadIC_Initialize();
|
||||
EmitCallIC(ic, RelocInfo::CODE_TARGET);
|
||||
EmitCallIC(ic, RelocInfo::CODE_TARGET, AstNode::kNoNumber);
|
||||
__ jmp(done);
|
||||
}
|
||||
}
|
||||
@ -1271,7 +1271,7 @@ void FullCodeGenerator::EmitVariableLoad(Variable* var) {
|
||||
__ ldr(r0, GlobalObjectOperand());
|
||||
__ mov(r2, Operand(var->name()));
|
||||
Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize();
|
||||
EmitCallIC(ic, RelocInfo::CODE_TARGET_CONTEXT);
|
||||
EmitCallIC(ic, RelocInfo::CODE_TARGET_CONTEXT, AstNode::kNoNumber);
|
||||
context()->Plug(r0);
|
||||
|
||||
} else if (slot != NULL && slot->type() == Slot::LOOKUP) {
|
||||
@ -1330,7 +1330,7 @@ void FullCodeGenerator::EmitVariableLoad(Variable* var) {
|
||||
|
||||
// Call keyed load IC. It has arguments key and receiver in r0 and r1.
|
||||
Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
|
||||
EmitCallIC(ic, RelocInfo::CODE_TARGET);
|
||||
EmitCallIC(ic, RelocInfo::CODE_TARGET, AstNode::kNoNumber);
|
||||
context()->Plug(r0);
|
||||
}
|
||||
}
|
||||
@ -1696,7 +1696,7 @@ void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
|
||||
// Call load IC. It has arguments receiver and property name r0 and r2.
|
||||
Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize();
|
||||
if (prop->is_synthetic()) {
|
||||
EmitCallIC(ic, RelocInfo::CODE_TARGET);
|
||||
EmitCallIC(ic, RelocInfo::CODE_TARGET, AstNode::kNoNumber);
|
||||
} else {
|
||||
EmitCallIC(ic, RelocInfo::CODE_TARGET_WITH_ID, prop->id());
|
||||
}
|
||||
@ -1708,7 +1708,7 @@ void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
|
||||
// Call keyed load IC. It has arguments key and receiver in r0 and r1.
|
||||
Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
|
||||
if (prop->is_synthetic()) {
|
||||
EmitCallIC(ic, RelocInfo::CODE_TARGET);
|
||||
EmitCallIC(ic, RelocInfo::CODE_TARGET, AstNode::kNoNumber);
|
||||
} else {
|
||||
EmitCallIC(ic, RelocInfo::CODE_TARGET_WITH_ID, prop->id());
|
||||
}
|
||||
@ -1859,7 +1859,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);
|
||||
EmitCallIC(ic, RelocInfo::CODE_TARGET, AstNode::kNoNumber);
|
||||
break;
|
||||
}
|
||||
case KEYED_PROPERTY: {
|
||||
@ -1882,7 +1882,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);
|
||||
EmitCallIC(ic, RelocInfo::CODE_TARGET, AstNode::kNoNumber);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1908,7 +1908,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);
|
||||
EmitCallIC(ic, RelocInfo::CODE_TARGET_CONTEXT, AstNode::kNoNumber);
|
||||
|
||||
} else if (op == Token::INIT_CONST) {
|
||||
// Like var declarations, const declarations are hoisted to function
|
||||
@ -2350,7 +2350,7 @@ void FullCodeGenerator::VisitCall(Call* expr) {
|
||||
SetSourcePosition(prop->position());
|
||||
|
||||
Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
|
||||
EmitCallIC(ic, RelocInfo::CODE_TARGET);
|
||||
EmitCallIC(ic, RelocInfo::CODE_TARGET, AstNode::kNoNumber);
|
||||
__ ldr(r1, GlobalObjectOperand());
|
||||
__ ldr(r1, FieldMemOperand(r1, GlobalObject::kGlobalReceiverOffset));
|
||||
__ Push(r0, r1); // Function, receiver.
|
||||
@ -4023,7 +4023,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);
|
||||
EmitCallIC(ic, RelocInfo::CODE_TARGET, AstNode::kNoNumber);
|
||||
PrepareForBailout(expr, TOS_REG);
|
||||
context()->Plug(r0);
|
||||
} else if (proxy != NULL &&
|
||||
|
@ -515,14 +515,14 @@ class FullCodeGenerator: public AstVisitor {
|
||||
// Helper for calling an IC stub.
|
||||
void EmitCallIC(Handle<Code> ic,
|
||||
RelocInfo::Mode mode,
|
||||
unsigned ast_id = AstNode::kNoNumber);
|
||||
unsigned ast_id);
|
||||
|
||||
// Calling an IC stub with a patch site. Passing NULL for patch_site
|
||||
// or non NULL patch_site which is not activated indicates no inlined smi code
|
||||
// and emits a nop after the IC call.
|
||||
void EmitCallIC(Handle<Code> ic,
|
||||
JumpPatchSite* patch_site,
|
||||
unsigned ast_id = AstNode::kNoNumber);
|
||||
unsigned ast_id);
|
||||
|
||||
// Set fields in the stack frame. Offsets are the frame pointer relative
|
||||
// offsets defined in, e.g., StandardFrameConstants.
|
||||
|
@ -740,7 +740,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);
|
||||
EmitCallIC(ic, RelocInfo::CODE_TARGET, AstNode::kNoNumber);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1111,7 +1111,7 @@ void FullCodeGenerator::EmitLoadGlobalSlotCheckExtensions(
|
||||
RelocInfo::Mode mode = (typeof_state == INSIDE_TYPEOF)
|
||||
? RelocInfo::CODE_TARGET
|
||||
: RelocInfo::CODE_TARGET_CONTEXT;
|
||||
EmitCallIC(ic, mode);
|
||||
EmitCallIC(ic, mode, AstNode::kNoNumber);
|
||||
}
|
||||
|
||||
|
||||
@ -1215,7 +1215,7 @@ void FullCodeGenerator::EmitVariableLoad(Variable* var) {
|
||||
__ mov(eax, GlobalObjectOperand());
|
||||
__ mov(ecx, var->name());
|
||||
Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize();
|
||||
EmitCallIC(ic, RelocInfo::CODE_TARGET_CONTEXT);
|
||||
EmitCallIC(ic, RelocInfo::CODE_TARGET_CONTEXT, AstNode::kNoNumber);
|
||||
context()->Plug(eax);
|
||||
|
||||
} else if (slot != NULL && slot->type() == Slot::LOOKUP) {
|
||||
@ -1791,7 +1791,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);
|
||||
EmitCallIC(ic, RelocInfo::CODE_TARGET, AstNode::kNoNumber);
|
||||
break;
|
||||
}
|
||||
case KEYED_PROPERTY: {
|
||||
@ -1814,7 +1814,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);
|
||||
EmitCallIC(ic, RelocInfo::CODE_TARGET, AstNode::kNoNumber);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1840,7 +1840,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);
|
||||
EmitCallIC(ic, RelocInfo::CODE_TARGET_CONTEXT, AstNode::kNoNumber);
|
||||
|
||||
} else if (op == Token::INIT_CONST) {
|
||||
// Like var declarations, const declarations are hoisted to function
|
||||
@ -3983,7 +3983,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);
|
||||
EmitCallIC(ic, RelocInfo::CODE_TARGET, AstNode::kNoNumber);
|
||||
PrepareForBailout(expr, TOS_REG);
|
||||
context()->Plug(eax);
|
||||
} else if (proxy != NULL &&
|
||||
|
@ -1131,7 +1131,7 @@ void FullCodeGenerator::EmitLoadGlobalSlotCheckExtensions(
|
||||
RelocInfo::Mode mode = (typeof_state == INSIDE_TYPEOF)
|
||||
? RelocInfo::CODE_TARGET
|
||||
: RelocInfo::CODE_TARGET_CONTEXT;
|
||||
EmitCallIC(ic, mode);
|
||||
EmitCallIC(ic, mode, AstNode::kNoNumber);
|
||||
}
|
||||
|
||||
|
||||
@ -1235,7 +1235,7 @@ void FullCodeGenerator::EmitVariableLoad(Variable* var) {
|
||||
__ Move(rcx, var->name());
|
||||
__ movq(rax, GlobalObjectOperand());
|
||||
Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize();
|
||||
EmitCallIC(ic, RelocInfo::CODE_TARGET_CONTEXT);
|
||||
EmitCallIC(ic, RelocInfo::CODE_TARGET_CONTEXT, AstNode::kNoNumber);
|
||||
context()->Plug(rax);
|
||||
|
||||
} else if (slot != NULL && slot->type() == Slot::LOOKUP) {
|
||||
@ -1769,7 +1769,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);
|
||||
EmitCallIC(ic, RelocInfo::CODE_TARGET, AstNode::kNoNumber);
|
||||
break;
|
||||
}
|
||||
case KEYED_PROPERTY: {
|
||||
@ -1792,7 +1792,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);
|
||||
EmitCallIC(ic, RelocInfo::CODE_TARGET, AstNode::kNoNumber);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1818,7 +1818,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);
|
||||
EmitCallIC(ic, RelocInfo::CODE_TARGET_CONTEXT, AstNode::kNoNumber);
|
||||
|
||||
} else if (op == Token::INIT_CONST) {
|
||||
// Like var declarations, const declarations are hoisted to function
|
||||
@ -1921,7 +1921,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);
|
||||
EmitCallIC(ic, RelocInfo::CODE_TARGET, expr->id());
|
||||
|
||||
// If the assignment ends an initialization block, revert to fast case.
|
||||
if (expr->ends_initialization_block()) {
|
||||
@ -3962,7 +3962,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);
|
||||
EmitCallIC(ic, RelocInfo::CODE_TARGET, AstNode::kNoNumber);
|
||||
PrepareForBailout(expr, TOS_REG);
|
||||
context()->Plug(rax);
|
||||
} else if (proxy != NULL &&
|
||||
|
Loading…
Reference in New Issue
Block a user