| Index: src/mips64/full-codegen-mips64.cc
|
| diff --git a/src/mips64/full-codegen-mips64.cc b/src/mips64/full-codegen-mips64.cc
|
| index 082303967720c1088fbd399f9d139d7395953cb6..30896d7a6a35f65569d89257dc9a4ff99d336790 100644
|
| --- a/src/mips64/full-codegen-mips64.cc
|
| +++ b/src/mips64/full-codegen-mips64.cc
|
| @@ -14,6 +14,7 @@
|
| // places where we have to move a previous result in v0 to a0 for the
|
| // next call: mov(a0, v0). This is not needed on the other architectures.
|
|
|
| +#include "src/code-factory.h"
|
| #include "src/code-stubs.h"
|
| #include "src/codegen.h"
|
| #include "src/compiler.h"
|
| @@ -1041,7 +1042,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();
|
|
|
| @@ -2078,7 +2080,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
|
| __ li(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(a0, v0);
|
| __ mov(a1, a0);
|
| @@ -2289,7 +2291,7 @@ void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
|
| void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
|
| SetSourcePosition(prop->position());
|
| // Call keyed load IC. It has register arguments receiver and key.
|
| - Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
|
| + Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code();
|
| if (FLAG_vector_ics) {
|
| __ li(VectorLoadICDescriptor::SlotRegister(),
|
| Operand(Smi::FromInt(prop->PropertyFeedbackSlot())));
|
| @@ -2323,8 +2325,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);
|
|
|
| @@ -2397,9 +2399,9 @@ void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr,
|
| OverwriteMode mode) {
|
| __ mov(a0, result_register());
|
| __ pop(a1);
|
| - 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(v0);
|
| }
|
| @@ -2443,9 +2445,8 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) {
|
| __ Move(StoreDescriptor::NameRegister(), result_register());
|
| __ 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;
|
| }
|
| @@ -2570,9 +2571,7 @@ void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) {
|
| __ Pop(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister());
|
| DCHECK(StoreDescriptor::ValueRegister().is(a0));
|
|
|
| - 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);
|
| @@ -4373,8 +4372,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);
|
|
|
| @@ -4420,9 +4420,8 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
|
| __ mov(StoreDescriptor::ValueRegister(), result_register());
|
| __ 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()) {
|
| @@ -4607,7 +4606,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);
|
|
|