Index: src/ia32/full-codegen-ia32.cc |
diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc |
index db1430b5757a34479ce14dabb84627c8a57ed6cf..da7278b42ba0c25f5b1dcda96fe5ba1634b37972 100644 |
--- a/src/ia32/full-codegen-ia32.cc |
+++ b/src/ia32/full-codegen-ia32.cc |
@@ -6,6 +6,7 @@ |
#if V8_TARGET_ARCH_IA32 |
+#include "src/code-factory.h" |
#include "src/code-stubs.h" |
#include "src/codegen.h" |
#include "src/compiler.h" |
@@ -987,7 +988,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(); |
@@ -2024,7 +2026,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) { |
__ mov(VectorLoadICDescriptor::SlotRegister(), |
Immediate(Smi::FromInt(expr->KeyedLoadFeedbackSlot()))); |
} |
- Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); |
+ Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code(); |
CallIC(ic, TypeFeedbackId::None()); |
__ mov(edi, eax); |
__ mov(Operand(esp, 2 * kPointerSize), edi); |
@@ -2230,7 +2232,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(), |
Immediate(Smi::FromInt(prop->PropertyFeedbackSlot()))); |
@@ -2257,8 +2259,8 @@ void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr, |
__ bind(&stub_call); |
__ mov(eax, ecx); |
- 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, Label::kNear); |
@@ -2340,9 +2342,9 @@ void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, |
Token::Value op, |
OverwriteMode mode) { |
__ pop(edx); |
- 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(eax); |
} |
@@ -2386,9 +2388,8 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) { |
__ Move(StoreDescriptor::NameRegister(), eax); |
__ pop(StoreDescriptor::ReceiverRegister()); // Receiver. |
__ pop(StoreDescriptor::ValueRegister()); // Restore value. |
- 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; |
} |
@@ -2505,9 +2506,7 @@ void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) { |
DCHECK(StoreDescriptor::ValueRegister().is(eax)); |
// Record source code position before IC call. |
SetSourcePosition(expr->position()); |
- 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); |
@@ -4325,8 +4324,9 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
__ bind(&stub_call); |
__ mov(edx, eax); |
__ mov(eax, Immediate(Smi::FromInt(1))); |
- BinaryOpICStub stub(isolate(), expr->binary_op(), NO_OVERWRITE); |
- CallIC(stub.GetCode(), expr->CountBinOpFeedbackId()); |
+ Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), expr->binary_op(), |
+ NO_OVERWRITE).code(); |
+ CallIC(code, expr->CountBinOpFeedbackId()); |
patch_site.EmitPatchInfo(); |
__ bind(&done); |
@@ -4372,9 +4372,8 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
case KEYED_PROPERTY: { |
__ pop(StoreDescriptor::NameRegister()); |
__ pop(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, expr->CountStoreFeedbackId()); |
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
if (expr->is_postfix()) { |
@@ -4563,7 +4562,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(); |