Index: src/arm/full-codegen-arm.cc |
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc |
index 361f4a8901bb6c4e19591c300c24bb6b985863ed..40faedda2f049df4e391293490e61cf3d9d9a074 100644 |
--- a/src/arm/full-codegen-arm.cc |
+++ b/src/arm/full-codegen-arm.cc |
@@ -6,6 +6,7 @@ |
#if V8_TARGET_ARCH_ARM |
+#include "src/code-factory.h" |
#include "src/code-stubs.h" |
#include "src/codegen.h" |
#include "src/compiler.h" |
@@ -1053,7 +1054,8 @@ void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) { |
// Record position before stub call for type feedback. |
SetSourcePosition(clause->position()); |
- Handle<Code> ic = CompareIC::GetUninitialized(isolate(), Token::EQ_STRICT); |
+ Handle<Code> ic = |
+ CodeFactory::CompareIC(isolate(), Token::EQ_STRICT).code(); |
CallIC(ic, clause->CompareId()); |
patch_site.EmitPatchInfo(); |
@@ -2090,7 +2092,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) { |
__ mov(VectorLoadICDescriptor::SlotRegister(), |
Operand(Smi::FromInt(expr->KeyedLoadFeedbackSlot()))); |
} |
- Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); |
+ Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code(); |
CallIC(ic, TypeFeedbackId::None()); |
__ mov(r1, r0); |
__ str(r1, MemOperand(sp, 2 * kPointerSize)); |
@@ -2310,7 +2312,7 @@ void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) { |
void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) { |
SetSourcePosition(prop->position()); |
- Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); |
+ Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code(); |
if (FLAG_vector_ics) { |
__ mov(VectorLoadICDescriptor::SlotRegister(), |
Operand(Smi::FromInt(prop->PropertyFeedbackSlot()))); |
@@ -2343,8 +2345,8 @@ void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr, |
patch_site.EmitJumpIfSmi(scratch1, &smi_case); |
__ bind(&stub_call); |
- BinaryOpICStub stub(isolate(), op, mode); |
- CallIC(stub.GetCode(), expr->BinaryOperationFeedbackId()); |
+ Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), op, mode).code(); |
+ CallIC(code, expr->BinaryOperationFeedbackId()); |
patch_site.EmitPatchInfo(); |
__ jmp(&done); |
@@ -2419,9 +2421,9 @@ void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, |
Token::Value op, |
OverwriteMode mode) { |
__ pop(r1); |
- BinaryOpICStub stub(isolate(), op, mode); |
+ Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), op, mode).code(); |
JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. |
- CallIC(stub.GetCode(), expr->BinaryOperationFeedbackId()); |
+ CallIC(code, expr->BinaryOperationFeedbackId()); |
patch_site.EmitPatchInfo(); |
context()->Plug(r0); |
} |
@@ -2465,9 +2467,8 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) { |
__ Move(StoreDescriptor::NameRegister(), r0); |
__ Pop(StoreDescriptor::ValueRegister(), |
StoreDescriptor::ReceiverRegister()); |
- Handle<Code> ic = strict_mode() == SLOPPY |
- ? isolate()->builtins()->KeyedStoreIC_Initialize() |
- : isolate()->builtins()->KeyedStoreIC_Initialize_Strict(); |
+ Handle<Code> ic = |
+ CodeFactory::KeyedStoreIC(isolate(), strict_mode()).code(); |
CallIC(ic); |
break; |
} |
@@ -2583,9 +2584,7 @@ void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) { |
__ Pop(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister()); |
DCHECK(StoreDescriptor::ValueRegister().is(r0)); |
- Handle<Code> ic = strict_mode() == SLOPPY |
- ? isolate()->builtins()->KeyedStoreIC_Initialize() |
- : isolate()->builtins()->KeyedStoreIC_Initialize_Strict(); |
+ Handle<Code> ic = CodeFactory::KeyedStoreIC(isolate(), strict_mode()).code(); |
CallIC(ic, expr->AssignmentFeedbackId()); |
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
@@ -4357,8 +4356,9 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
// Record position before stub call. |
SetSourcePosition(expr->position()); |
- BinaryOpICStub stub(isolate(), Token::ADD, NO_OVERWRITE); |
- CallIC(stub.GetCode(), expr->CountBinOpFeedbackId()); |
+ Handle<Code> code = |
+ CodeFactory::BinaryOpIC(isolate(), Token::ADD, NO_OVERWRITE).code(); |
+ CallIC(code, expr->CountBinOpFeedbackId()); |
patch_site.EmitPatchInfo(); |
__ bind(&done); |
@@ -4402,9 +4402,8 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
case KEYED_PROPERTY: { |
__ Pop(StoreDescriptor::ReceiverRegister(), |
StoreDescriptor::NameRegister()); |
- Handle<Code> ic = strict_mode() == SLOPPY |
- ? isolate()->builtins()->KeyedStoreIC_Initialize() |
- : isolate()->builtins()->KeyedStoreIC_Initialize_Strict(); |
+ Handle<Code> ic = |
+ CodeFactory::KeyedStoreIC(isolate(), strict_mode()).code(); |
CallIC(ic, expr->CountStoreFeedbackId()); |
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
if (expr->is_postfix()) { |
@@ -4594,7 +4593,7 @@ void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) { |
// Record position and call the compare IC. |
SetSourcePosition(expr->position()); |
- Handle<Code> ic = CompareIC::GetUninitialized(isolate(), op); |
+ Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code(); |
CallIC(ic, expr->CompareOperationFeedbackId()); |
patch_site.EmitPatchInfo(); |
PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |