Index: src/ia32/full-codegen-ia32.cc |
diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc |
index 0bbded15d2aa2c15339e28d22be9784e719a258b..9c76901fe001735e26bd56eb0af9828557fcbf12 100644 |
--- a/src/ia32/full-codegen-ia32.cc |
+++ b/src/ia32/full-codegen-ia32.cc |
@@ -259,7 +259,7 @@ void FullCodeGenerator::Generate() { |
scope()->VisitIllegalRedeclaration(this); |
} else { |
- PrepareForBailoutForId(AstNode::kFunctionEntryId, NO_REGISTERS); |
+ PrepareForBailoutForId(BailoutId::FunctionEntry(), NO_REGISTERS); |
{ Comment cmnt(masm_, "[ Declarations"); |
// For named function expressions, declare the function name as a |
// constant. |
@@ -274,7 +274,7 @@ void FullCodeGenerator::Generate() { |
} |
{ Comment cmnt(masm_, "[ Stack check"); |
- PrepareForBailoutForId(AstNode::kDeclarationsId, NO_REGISTERS); |
+ PrepareForBailoutForId(BailoutId::Declarations(), NO_REGISTERS); |
Label ok; |
ExternalReference stack_limit = |
ExternalReference::address_of_stack_limit(isolate()); |
@@ -1109,7 +1109,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) { |
isolate()->factory()->NewJSGlobalPropertyCell( |
Handle<Object>( |
Smi::FromInt(TypeFeedbackCells::kForInFastCaseMarker))); |
- RecordTypeFeedbackCell(stmt->PrepareId(), cell); |
+ RecordTypeFeedbackCell(stmt->ForInFeedbackId(), cell); |
__ LoadHeapObject(ebx, cell); |
__ mov(FieldOperand(ebx, JSGlobalPropertyCell::kValueOffset), |
Immediate(Smi::FromInt(TypeFeedbackCells::kForInSlowCaseMarker))); |
@@ -1579,7 +1579,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { |
Handle<Code> ic = is_classic_mode() |
? isolate()->builtins()->StoreIC_Initialize() |
: isolate()->builtins()->StoreIC_Initialize_Strict(); |
- CallIC(ic, RelocInfo::CODE_TARGET, key->id()); |
+ CallIC(ic, RelocInfo::CODE_TARGET, key->LiteralFeedbackId()); |
PrepareForBailoutForId(key->id(), NO_REGISTERS); |
} else { |
VisitForEffect(value); |
@@ -1851,14 +1851,14 @@ void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) { |
ASSERT(!key->handle()->IsSmi()); |
__ mov(ecx, Immediate(key->handle())); |
Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize(); |
- CallIC(ic, RelocInfo::CODE_TARGET, prop->id()); |
+ CallIC(ic, RelocInfo::CODE_TARGET, prop->PropertyFeedbackId()); |
} |
void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) { |
SetSourcePosition(prop->position()); |
Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); |
- CallIC(ic, RelocInfo::CODE_TARGET, prop->id()); |
+ CallIC(ic, RelocInfo::CODE_TARGET, prop->PropertyFeedbackId()); |
} |
@@ -1879,7 +1879,8 @@ void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr, |
__ bind(&stub_call); |
__ mov(eax, ecx); |
BinaryOpStub stub(op, mode); |
- CallIC(stub.GetCode(), RelocInfo::CODE_TARGET, expr->id()); |
+ CallIC(stub.GetCode(), RelocInfo::CODE_TARGET, |
+ expr->BinaryOperationFeedbackId()); |
patch_site.EmitPatchInfo(); |
__ jmp(&done, Label::kNear); |
@@ -1964,7 +1965,8 @@ void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, |
__ pop(edx); |
BinaryOpStub stub(op, mode); |
JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. |
- CallIC(stub.GetCode(), RelocInfo::CODE_TARGET, expr->id()); |
+ CallIC(stub.GetCode(), RelocInfo::CODE_TARGET, |
+ expr->BinaryOperationFeedbackId()); |
patch_site.EmitPatchInfo(); |
context()->Plug(eax); |
} |
@@ -2147,7 +2149,7 @@ void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) { |
Handle<Code> ic = is_classic_mode() |
? isolate()->builtins()->StoreIC_Initialize() |
: isolate()->builtins()->StoreIC_Initialize_Strict(); |
- CallIC(ic, RelocInfo::CODE_TARGET, expr->id()); |
+ CallIC(ic, RelocInfo::CODE_TARGET, expr->AssignmentFeedbackId()); |
// If the assignment ends an initialization block, revert to fast case. |
if (expr->ends_initialization_block()) { |
@@ -2190,7 +2192,7 @@ void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) { |
Handle<Code> ic = is_classic_mode() |
? isolate()->builtins()->KeyedStoreIC_Initialize() |
: isolate()->builtins()->KeyedStoreIC_Initialize_Strict(); |
- CallIC(ic, RelocInfo::CODE_TARGET, expr->id()); |
+ CallIC(ic, RelocInfo::CODE_TARGET, expr->AssignmentFeedbackId()); |
// If the assignment ends an initialization block, revert to fast case. |
if (expr->ends_initialization_block()) { |
@@ -2229,7 +2231,7 @@ void FullCodeGenerator::VisitProperty(Property* expr) { |
void FullCodeGenerator::CallIC(Handle<Code> code, |
RelocInfo::Mode rmode, |
- unsigned ast_id) { |
+ TypeFeedbackId ast_id) { |
ic_total_count_++; |
__ call(code, rmode, ast_id); |
} |
@@ -2253,7 +2255,7 @@ void FullCodeGenerator::EmitCallWithIC(Call* expr, |
SetSourcePosition(expr->position()); |
Handle<Code> ic = |
isolate()->stub_cache()->ComputeCallInitialize(arg_count, mode); |
- CallIC(ic, mode, expr->id()); |
+ CallIC(ic, mode, expr->CallFeedbackId()); |
RecordJSReturnSite(expr); |
// Restore context register. |
__ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
@@ -2285,7 +2287,7 @@ void FullCodeGenerator::EmitKeyedCallWithIC(Call* expr, |
Handle<Code> ic = |
isolate()->stub_cache()->ComputeKeyedCallInitialize(arg_count); |
__ mov(ecx, Operand(esp, (arg_count + 1) * kPointerSize)); // Key. |
- CallIC(ic, RelocInfo::CODE_TARGET, expr->id()); |
+ CallIC(ic, RelocInfo::CODE_TARGET, expr->CallFeedbackId()); |
RecordJSReturnSite(expr); |
// Restore context register. |
__ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
@@ -2311,12 +2313,12 @@ void FullCodeGenerator::EmitCallWithStub(Call* expr, CallFunctionFlags flags) { |
TypeFeedbackCells::UninitializedSentinel(isolate()); |
Handle<JSGlobalPropertyCell> cell = |
isolate()->factory()->NewJSGlobalPropertyCell(uninitialized); |
- RecordTypeFeedbackCell(expr->id(), cell); |
+ RecordTypeFeedbackCell(expr->CallFeedbackId(), cell); |
__ mov(ebx, cell); |
CallFunctionStub stub(arg_count, flags); |
__ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize)); |
- __ CallStub(&stub, expr->id()); |
+ __ CallStub(&stub, expr->CallFeedbackId()); |
RecordJSReturnSite(expr); |
// Restore context register. |
@@ -2496,7 +2498,7 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) { |
TypeFeedbackCells::UninitializedSentinel(isolate()); |
Handle<JSGlobalPropertyCell> cell = |
isolate()->factory()->NewJSGlobalPropertyCell(uninitialized); |
- RecordTypeFeedbackCell(expr->id(), cell); |
+ RecordTypeFeedbackCell(expr->CallNewFeedbackId(), cell); |
__ mov(ebx, cell); |
CallConstructStub stub(RECORD_CALL_TARGET); |
@@ -3814,7 +3816,7 @@ void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) { |
RelocInfo::Mode mode = RelocInfo::CODE_TARGET; |
Handle<Code> ic = |
isolate()->stub_cache()->ComputeCallInitialize(arg_count, mode); |
- CallIC(ic, mode, expr->id()); |
+ CallIC(ic, mode, expr->CallRuntimeFeedbackId()); |
// Restore context register. |
__ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
} else { |
@@ -3972,7 +3974,8 @@ void FullCodeGenerator::EmitUnaryOperation(UnaryOperation* expr, |
// accumulator register eax. |
VisitForAccumulatorValue(expr->expression()); |
SetSourcePosition(expr->position()); |
- CallIC(stub.GetCode(), RelocInfo::CODE_TARGET, expr->id()); |
+ CallIC(stub.GetCode(), RelocInfo::CODE_TARGET, |
+ expr->UnaryOperationFeedbackId()); |
context()->Plug(eax); |
} |
@@ -4093,7 +4096,7 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
__ mov(edx, eax); |
__ mov(eax, Immediate(Smi::FromInt(1))); |
BinaryOpStub stub(expr->binary_op(), NO_OVERWRITE); |
- CallIC(stub.GetCode(), RelocInfo::CODE_TARGET, expr->CountId()); |
+ CallIC(stub.GetCode(), RelocInfo::CODE_TARGET, expr->CountBinOpFeedbackId()); |
patch_site.EmitPatchInfo(); |
__ bind(&done); |
@@ -4127,7 +4130,7 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
Handle<Code> ic = is_classic_mode() |
? isolate()->builtins()->StoreIC_Initialize() |
: isolate()->builtins()->StoreIC_Initialize_Strict(); |
- CallIC(ic, RelocInfo::CODE_TARGET, expr->id()); |
+ CallIC(ic, RelocInfo::CODE_TARGET, expr->CountStoreFeedbackId()); |
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
if (expr->is_postfix()) { |
if (!context()->IsEffect()) { |
@@ -4144,7 +4147,7 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
Handle<Code> ic = is_classic_mode() |
? isolate()->builtins()->KeyedStoreIC_Initialize() |
: isolate()->builtins()->KeyedStoreIC_Initialize_Strict(); |
- CallIC(ic, RelocInfo::CODE_TARGET, expr->id()); |
+ CallIC(ic, RelocInfo::CODE_TARGET, expr->CountStoreFeedbackId()); |
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
if (expr->is_postfix()) { |
// Result is on the stack |
@@ -4352,7 +4355,7 @@ void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) { |
// Record position and call the compare IC. |
SetSourcePosition(expr->position()); |
Handle<Code> ic = CompareIC::GetUninitialized(op); |
- CallIC(ic, RelocInfo::CODE_TARGET, expr->id()); |
+ CallIC(ic, RelocInfo::CODE_TARGET, expr->CompareOperationFeedbackId()); |
patch_site.EmitPatchInfo(); |
PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |