| Index: src/arm64/full-codegen-arm64.cc
|
| diff --git a/src/arm64/full-codegen-arm64.cc b/src/arm64/full-codegen-arm64.cc
|
| index 2e576ad24d87ac8068201f156e14d2938edae9f5..a8d799e210d5787513fbf823813c05f73aa66aae 100644
|
| --- a/src/arm64/full-codegen-arm64.cc
|
| +++ b/src/arm64/full-codegen-arm64.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #if V8_TARGET_ARCH_ARM64
|
|
|
| +#include "src/code-factory.h"
|
| #include "src/code-stubs.h"
|
| #include "src/codegen.h"
|
| #include "src/compiler.h"
|
| @@ -1050,7 +1051,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();
|
|
|
| @@ -1960,7 +1962,7 @@ 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()->KeyedLoadIC_Initialize();
|
| + Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code();
|
| if (FLAG_vector_ics) {
|
| __ Mov(VectorLoadICDescriptor::SlotRegister(),
|
| Smi::FromInt(prop->PropertyFeedbackSlot()));
|
| @@ -1990,10 +1992,11 @@ void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr,
|
| patch_site.EmitJumpIfSmi(x10, &both_smis);
|
|
|
| __ Bind(&stub_call);
|
| - BinaryOpICStub stub(isolate(), op, mode);
|
| +
|
| + Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), op, mode).code();
|
| {
|
| Assembler::BlockPoolsScope scope(masm_);
|
| - CallIC(stub.GetCode(), expr->BinaryOperationFeedbackId());
|
| + CallIC(code, expr->BinaryOperationFeedbackId());
|
| patch_site.EmitPatchInfo();
|
| }
|
| __ B(&done);
|
| @@ -2074,11 +2077,11 @@ void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr,
|
| Token::Value op,
|
| OverwriteMode mode) {
|
| __ Pop(x1);
|
| - BinaryOpICStub stub(isolate(), op, mode);
|
| + Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), op, mode).code();
|
| JumpPatchSite patch_site(masm_); // Unbound, signals no inlined smi code.
|
| {
|
| Assembler::BlockPoolsScope scope(masm_);
|
| - CallIC(stub.GetCode(), expr->BinaryOperationFeedbackId());
|
| + CallIC(code, expr->BinaryOperationFeedbackId());
|
| patch_site.EmitPatchInfo();
|
| }
|
| context()->Plug(x0);
|
| @@ -2125,9 +2128,8 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) {
|
| __ Mov(StoreDescriptor::NameRegister(), x0);
|
| __ Pop(StoreDescriptor::ReceiverRegister(),
|
| StoreDescriptor::ValueRegister());
|
| - 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;
|
| }
|
| @@ -2247,9 +2249,7 @@ void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) {
|
| __ Pop(StoreDescriptor::NameRegister(), StoreDescriptor::ReceiverRegister());
|
| DCHECK(StoreDescriptor::ValueRegister().is(x0));
|
|
|
| - 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);
|
| @@ -4022,8 +4022,9 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
|
|
|
| {
|
| Assembler::BlockPoolsScope scope(masm_);
|
| - 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);
|
| @@ -4068,9 +4069,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()) {
|
| @@ -4268,7 +4268,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);
|
| @@ -4454,7 +4454,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
|
| __ Mov(VectorLoadICDescriptor::SlotRegister(),
|
| Smi::FromInt(expr->KeyedLoadFeedbackSlot()));
|
| }
|
| - Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
|
| + Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code();
|
| CallIC(ic, TypeFeedbackId::None());
|
| __ Mov(x1, x0);
|
| __ Poke(x1, 2 * kPointerSize);
|
|
|