Index: src/arm/full-codegen-arm.cc |
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc |
index 2edfd0aae2a2efef623dad46a08b0042ac02f884..5926767df6dc44fa0071eba3fe7cfbe4b1b41fdf 100644 |
--- a/src/arm/full-codegen-arm.cc |
+++ b/src/arm/full-codegen-arm.cc |
@@ -781,9 +781,10 @@ void FullCodeGenerator::EmitDeclaration(Variable* variable, |
prop->key()->AsLiteral()->handle()->IsSmi()); |
__ mov(r1, Operand(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); |
// Value in r0 is ignored (declarations are statements). |
} |
@@ -1186,8 +1187,8 @@ void FullCodeGenerator::EmitDynamicLoadFromSlotFastCase( |
ContextSlotOperandCheckExtensions(obj_proxy->var()->AsSlot(), |
slow)); |
__ mov(r0, Operand(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); |
} |
@@ -1253,8 +1254,7 @@ void FullCodeGenerator::EmitLoadGlobalSlotCheckExtensions( |
RelocInfo::Mode mode = (typeof_state == INSIDE_TYPEOF) |
? RelocInfo::CODE_TARGET |
: RelocInfo::CODE_TARGET_CONTEXT; |
- Handle<Code> ic(isolate()->builtins()->builtin( |
- Builtins::LoadIC_Initialize)); |
+ Handle<Code> ic = Builtins::builtin(Builtins::LoadIC_Initialize, isolate()); |
EmitCallIC(ic, mode); |
} |
@@ -1272,8 +1272,7 @@ void FullCodeGenerator::EmitVariableLoad(Variable* var) { |
// object (receiver) in r0. |
__ ldr(r0, GlobalObjectOperand()); |
__ mov(r2, Operand(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(r0); |
@@ -1332,8 +1331,8 @@ void FullCodeGenerator::EmitVariableLoad(Variable* var) { |
__ mov(r0, Operand(key_literal->handle())); |
// Call keyed load IC. It has arguments key and receiver in r0 and r1. |
- Handle<Code> ic(isolate()->builtins()->builtin( |
- Builtins::KeyedLoadIC_Initialize)); |
+ Handle<Code> ic = |
+ Builtins::builtin(Builtins::KeyedLoadIC_Initialize, isolate()); |
EmitCallIC(ic, RelocInfo::CODE_TARGET); |
context()->Plug(r0); |
} |
@@ -1442,8 +1441,8 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { |
VisitForAccumulatorValue(value); |
__ mov(r2, Operand(key->handle())); |
__ ldr(r1, MemOperand(sp)); |
- Handle<Code> ic(isolate()->builtins()->builtin( |
- Builtins::StoreIC_Initialize)); |
+ Handle<Code> ic = |
+ Builtins::builtin(Builtins::StoreIC_Initialize, isolate()); |
EmitCallIC(ic, RelocInfo::CODE_TARGET); |
PrepareForBailoutForId(key->id(), NO_REGISTERS); |
} else { |
@@ -1698,8 +1697,7 @@ void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) { |
Literal* key = prop->key()->AsLiteral(); |
__ mov(r2, Operand(key->handle())); |
// Call load IC. It has arguments receiver and property name r0 and r2. |
- Handle<Code> ic(isolate()->builtins()->builtin( |
- Builtins::LoadIC_Initialize)); |
+ Handle<Code> ic = Builtins::builtin(Builtins::LoadIC_Initialize, isolate()); |
EmitCallIC(ic, RelocInfo::CODE_TARGET); |
} |
@@ -1707,8 +1705,8 @@ void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) { |
void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) { |
SetSourcePosition(prop->position()); |
// Call keyed load IC. It has arguments key and receiver in r0 and r1. |
- Handle<Code> ic(isolate()->builtins()->builtin( |
- Builtins::KeyedLoadIC_Initialize)); |
+ Handle<Code> ic = |
+ Builtins::builtin(Builtins::KeyedLoadIC_Initialize, isolate()); |
EmitCallIC(ic, RelocInfo::CODE_TARGET); |
} |
@@ -1853,9 +1851,10 @@ void FullCodeGenerator::EmitAssignment(Expression* expr, int bailout_ast_id) { |
__ mov(r1, r0); |
__ pop(r0); // Restore value. |
__ mov(r2, Operand(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; |
} |
@@ -1876,9 +1875,10 @@ void FullCodeGenerator::EmitAssignment(Expression* expr, int bailout_ast_id) { |
__ pop(r2); |
} |
__ pop(r0); // 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; |
} |
@@ -1902,9 +1902,10 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, |
// r2, and the global object in r1. |
__ mov(r2, Operand(var->name())); |
__ ldr(r1, 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) { |
@@ -2011,9 +2012,10 @@ void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) { |
__ pop(r1); |
} |
- 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. |
@@ -2057,9 +2059,10 @@ void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) { |
__ pop(r2); |
} |
- 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. |
@@ -2344,8 +2347,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); |
__ ldr(r1, GlobalObjectOperand()); |
__ ldr(r1, FieldMemOperand(r1, GlobalObject::kGlobalReceiverOffset)); |
@@ -2413,8 +2416,8 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) { |
__ mov(r0, Operand(arg_count)); |
__ ldr(r1, MemOperand(sp, 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(r0); |
} |
@@ -3914,9 +3917,10 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
case NAMED_PROPERTY: { |
__ mov(r2, Operand(prop->key()->AsLiteral()->handle())); |
__ pop(r1); |
- 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()) { |
@@ -3931,9 +3935,10 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
case KEYED_PROPERTY: { |
__ pop(r1); // Key. |
__ pop(r2); // Receiver. |
- 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()) { |
@@ -3957,8 +3962,8 @@ void FullCodeGenerator::VisitForTypeofValue(Expression* expr) { |
Comment cmnt(masm_, "Global variable"); |
__ ldr(r0, GlobalObjectOperand()); |
__ mov(r2, Operand(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); |