Index: src/ia32/full-codegen-ia32.cc |
diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc |
index b1c53d64c5fdf3230e0bd2caccd8e5904858f613..0adfa3decd0305ab811306dc8b0944322fc12788 100644 |
--- a/src/ia32/full-codegen-ia32.cc |
+++ b/src/ia32/full-codegen-ia32.cc |
@@ -732,9 +732,10 @@ void FullCodeGenerator::EmitDeclaration(Variable* variable, |
prop->key()->AsLiteral()->handle()->IsSmi()); |
__ Set(ecx, Immediate(prop->key()->AsLiteral()->handle())); |
- Handle<Code> ic(isolate()->builtins()->builtin(is_strict_mode() |
+ Builtins::Name builtin = is_strict_mode() |
? Builtins::KeyedStoreIC_Initialize_Strict |
- : Builtins::KeyedStoreIC_Initialize)); |
+ : Builtins::KeyedStoreIC_Initialize; |
+ Handle<Code> ic = Builtins::builtin(builtin, isolate()); |
EmitCallIC(ic, RelocInfo::CODE_TARGET); |
} |
} |
@@ -1102,8 +1103,7 @@ void FullCodeGenerator::EmitLoadGlobalSlotCheckExtensions( |
// load IC call. |
__ mov(eax, GlobalObjectOperand()); |
__ mov(ecx, slot->var()->name()); |
- Handle<Code> ic(isolate()->builtins()->builtin( |
- Builtins::LoadIC_Initialize)); |
+ Handle<Code> ic = Builtins::builtin(Builtins::LoadIC_Initialize, isolate()); |
RelocInfo::Mode mode = (typeof_state == INSIDE_TYPEOF) |
? RelocInfo::CODE_TARGET |
: RelocInfo::CODE_TARGET_CONTEXT; |
@@ -1186,8 +1186,8 @@ void FullCodeGenerator::EmitDynamicLoadFromSlotFastCase( |
ContextSlotOperandCheckExtensions(obj_proxy->var()->AsSlot(), |
slow)); |
__ mov(eax, Immediate(key_literal->handle())); |
- Handle<Code> ic(isolate()->builtins()->builtin( |
- Builtins::KeyedLoadIC_Initialize)); |
+ Handle<Code> ic = |
+ Builtins::builtin(Builtins::KeyedLoadIC_Initialize, isolate()); |
EmitCallIC(ic, RelocInfo::CODE_TARGET); |
__ jmp(done); |
} |
@@ -1210,8 +1210,8 @@ void FullCodeGenerator::EmitVariableLoad(Variable* var) { |
// object on the stack. |
__ mov(eax, GlobalObjectOperand()); |
__ mov(ecx, var->name()); |
- Handle<Code> ic(isolate()->builtins()->builtin( |
- Builtins::LoadIC_Initialize)); |
+ Handle<Code> ic = |
+ Builtins::builtin(Builtins::LoadIC_Initialize, isolate()); |
EmitCallIC(ic, RelocInfo::CODE_TARGET_CONTEXT); |
context()->Plug(eax); |
@@ -1274,8 +1274,8 @@ void FullCodeGenerator::EmitVariableLoad(Variable* var) { |
__ mov(eax, Immediate(key_literal->handle())); |
// Do a keyed property load. |
- Handle<Code> ic(isolate()->builtins()->builtin( |
- Builtins::KeyedLoadIC_Initialize)); |
+ Handle<Code> ic = Builtins::builtin(Builtins::KeyedLoadIC_Initialize, |
+ isolate()); |
EmitCallIC(ic, RelocInfo::CODE_TARGET); |
// Drop key and object left on the stack by IC. |
@@ -1386,9 +1386,10 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { |
VisitForAccumulatorValue(value); |
__ mov(ecx, Immediate(key->handle())); |
__ mov(edx, Operand(esp, 0)); |
- Handle<Code> ic(isolate()->builtins()->builtin( |
- is_strict_mode() ? Builtins::StoreIC_Initialize_Strict |
- : Builtins::StoreIC_Initialize)); |
+ Builtins::Name builtin = is_strict_mode() |
+ ? Builtins::StoreIC_Initialize_Strict |
+ : Builtins::StoreIC_Initialize; |
+ Handle<Code> ic = Builtins::builtin(builtin, isolate()); |
EmitCallIC(ic, RelocInfo::CODE_TARGET); |
PrepareForBailoutForId(key->id(), NO_REGISTERS); |
} else { |
@@ -1637,16 +1638,15 @@ void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) { |
SetSourcePosition(prop->position()); |
Literal* key = prop->key()->AsLiteral(); |
__ mov(ecx, Immediate(key->handle())); |
- Handle<Code> ic(isolate()->builtins()->builtin( |
- Builtins::LoadIC_Initialize)); |
+ Handle<Code> ic = Builtins::builtin(Builtins::LoadIC_Initialize, isolate()); |
EmitCallIC(ic, RelocInfo::CODE_TARGET); |
} |
void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) { |
SetSourcePosition(prop->position()); |
- Handle<Code> ic(isolate()->builtins()->builtin( |
- Builtins::KeyedLoadIC_Initialize)); |
+ Handle<Code> ic = |
+ Builtins::builtin(Builtins::KeyedLoadIC_Initialize, isolate()); |
EmitCallIC(ic, RelocInfo::CODE_TARGET); |
} |
@@ -1787,9 +1787,10 @@ void FullCodeGenerator::EmitAssignment(Expression* expr, int bailout_ast_id) { |
__ mov(edx, eax); |
__ pop(eax); // Restore value. |
__ mov(ecx, prop->key()->AsLiteral()->handle()); |
- Handle<Code> ic(isolate()->builtins()->builtin( |
- is_strict_mode() ? Builtins::StoreIC_Initialize_Strict |
- : Builtins::StoreIC_Initialize)); |
+ Builtins::Name builtin = is_strict_mode() |
+ ? Builtins::StoreIC_Initialize_Strict |
+ : Builtins::StoreIC_Initialize; |
+ Handle<Code> ic = Builtins::builtin(builtin, isolate()); |
EmitCallIC(ic, RelocInfo::CODE_TARGET); |
break; |
} |
@@ -1810,9 +1811,10 @@ void FullCodeGenerator::EmitAssignment(Expression* expr, int bailout_ast_id) { |
__ pop(edx); |
} |
__ pop(eax); // Restore value. |
- Handle<Code> ic(isolate()->builtins()->builtin( |
- is_strict_mode() ? Builtins::KeyedStoreIC_Initialize_Strict |
- : Builtins::KeyedStoreIC_Initialize)); |
+ Builtins::Name builtin = is_strict_mode() |
+ ? Builtins::KeyedStoreIC_Initialize_Strict |
+ : Builtins::KeyedStoreIC_Initialize; |
+ Handle<Code> ic = Builtins::builtin(builtin, isolate()); |
EmitCallIC(ic, RelocInfo::CODE_TARGET); |
break; |
} |
@@ -1836,9 +1838,10 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, |
// ecx, and the global object on the stack. |
__ mov(ecx, var->name()); |
__ mov(edx, GlobalObjectOperand()); |
- Handle<Code> ic(isolate()->builtins()->builtin( |
- is_strict_mode() ? Builtins::StoreIC_Initialize_Strict |
- : Builtins::StoreIC_Initialize)); |
+ Builtins::Name builtin = is_strict_mode() |
+ ? Builtins::StoreIC_Initialize_Strict |
+ : Builtins::StoreIC_Initialize; |
+ Handle<Code> ic = Builtins::builtin(builtin, isolate()); |
EmitCallIC(ic, RelocInfo::CODE_TARGET_CONTEXT); |
} else if (op == Token::INIT_CONST) { |
@@ -1939,9 +1942,10 @@ void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) { |
} else { |
__ pop(edx); |
} |
- Handle<Code> ic(isolate()->builtins()->builtin( |
- is_strict_mode() ? Builtins::StoreIC_Initialize_Strict |
- : Builtins::StoreIC_Initialize)); |
+ Builtins::Name builtin = is_strict_mode() |
+ ? Builtins::StoreIC_Initialize_Strict |
+ : Builtins::StoreIC_Initialize; |
+ Handle<Code> ic = Builtins::builtin(builtin, isolate()); |
EmitCallIC(ic, RelocInfo::CODE_TARGET); |
// If the assignment ends an initialization block, revert to fast case. |
@@ -1979,9 +1983,10 @@ void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) { |
} |
// Record source code position before IC call. |
SetSourcePosition(expr->position()); |
- Handle<Code> ic(isolate()->builtins()->builtin( |
- is_strict_mode() ? Builtins::KeyedStoreIC_Initialize_Strict |
- : Builtins::KeyedStoreIC_Initialize)); |
+ Builtins::Name builtin = is_strict_mode() |
+ ? Builtins::KeyedStoreIC_Initialize_Strict |
+ : Builtins::KeyedStoreIC_Initialize; |
+ Handle<Code> ic = Builtins::builtin(builtin, isolate()); |
EmitCallIC(ic, RelocInfo::CODE_TARGET); |
// If the assignment ends an initialization block, revert to fast case. |
@@ -2257,8 +2262,8 @@ void FullCodeGenerator::VisitCall(Call* expr) { |
// Record source code position for IC call. |
SetSourcePosition(prop->position()); |
- Handle<Code> ic(isolate()->builtins()->builtin( |
- Builtins::KeyedLoadIC_Initialize)); |
+ Handle<Code> ic = |
+ Builtins::builtin(Builtins::KeyedLoadIC_Initialize, isolate()); |
EmitCallIC(ic, RelocInfo::CODE_TARGET); |
// Push result (function). |
__ push(eax); |
@@ -2326,8 +2331,8 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) { |
__ Set(eax, Immediate(arg_count)); |
__ mov(edi, Operand(esp, arg_count * kPointerSize)); |
- Handle<Code> construct_builtin(isolate()->builtins()->builtin( |
- Builtins::JSConstructCall)); |
+ Handle<Code> construct_builtin = |
+ Builtins::builtin(Builtins::JSConstructCall, isolate()); |
__ call(construct_builtin, RelocInfo::CONSTRUCT_CALL); |
context()->Plug(eax); |
} |
@@ -3873,9 +3878,10 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
case NAMED_PROPERTY: { |
__ mov(ecx, prop->key()->AsLiteral()->handle()); |
__ pop(edx); |
- Handle<Code> ic(isolate()->builtins()->builtin( |
- is_strict_mode() ? Builtins::StoreIC_Initialize_Strict |
- : Builtins::StoreIC_Initialize)); |
+ Builtins::Name builtin = is_strict_mode() |
+ ? Builtins::StoreIC_Initialize_Strict |
+ : Builtins::StoreIC_Initialize; |
+ Handle<Code> ic = Builtins::builtin(builtin, isolate()); |
EmitCallIC(ic, RelocInfo::CODE_TARGET); |
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
if (expr->is_postfix()) { |
@@ -3890,9 +3896,10 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
case KEYED_PROPERTY: { |
__ pop(ecx); |
__ pop(edx); |
- Handle<Code> ic(isolate()->builtins()->builtin( |
- is_strict_mode() ? Builtins::KeyedStoreIC_Initialize_Strict |
- : Builtins::KeyedStoreIC_Initialize)); |
+ Builtins::Name builtin = is_strict_mode() |
+ ? Builtins::KeyedStoreIC_Initialize_Strict |
+ : Builtins::KeyedStoreIC_Initialize; |
+ Handle<Code> ic = Builtins::builtin(builtin, isolate()); |
EmitCallIC(ic, RelocInfo::CODE_TARGET); |
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
if (expr->is_postfix()) { |
@@ -3918,8 +3925,7 @@ void FullCodeGenerator::VisitForTypeofValue(Expression* expr) { |
Comment cmnt(masm_, "Global variable"); |
__ mov(eax, GlobalObjectOperand()); |
__ mov(ecx, Immediate(proxy->name())); |
- Handle<Code> ic(isolate()->builtins()->builtin( |
- Builtins::LoadIC_Initialize)); |
+ Handle<Code> ic = Builtins::builtin(Builtins::LoadIC_Initialize, isolate()); |
// Use a regular load, not a contextual load, to avoid a reference |
// error. |
EmitCallIC(ic, RelocInfo::CODE_TARGET); |