diff options
Diffstat (limited to 'deps/v8/src/crankshaft/arm64/lithium-codegen-arm64.cc')
-rw-r--r-- | deps/v8/src/crankshaft/arm64/lithium-codegen-arm64.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/deps/v8/src/crankshaft/arm64/lithium-codegen-arm64.cc b/deps/v8/src/crankshaft/arm64/lithium-codegen-arm64.cc index 4d8e6615e7..141ac3f610 100644 --- a/deps/v8/src/crankshaft/arm64/lithium-codegen-arm64.cc +++ b/deps/v8/src/crankshaft/arm64/lithium-codegen-arm64.cc @@ -6,6 +6,7 @@ #include "src/arm64/frames-arm64.h" #include "src/base/bits.h" +#include "src/builtins/builtins-constructor.h" #include "src/code-factory.h" #include "src/code-stubs.h" #include "src/crankshaft/arm64/lithium-gap-resolver-arm64.h" @@ -618,14 +619,17 @@ void LCodeGen::DoPrologue(LPrologue* instr) { __ CallRuntime(Runtime::kNewScriptContext); deopt_mode = Safepoint::kLazyDeopt; } else { - if (slots <= FastNewFunctionContextStub::kMaximumSlots) { - FastNewFunctionContextStub stub(isolate()); + if (slots <= + ConstructorBuiltinsAssembler::MaximumFunctionContextSlots()) { + Callable callable = CodeFactory::FastNewFunctionContext( + isolate(), info()->scope()->scope_type()); __ Mov(FastNewFunctionContextDescriptor::SlotsRegister(), slots); - __ CallStub(&stub); - // Result of FastNewFunctionContextStub is always in new space. + __ Call(callable.code(), RelocInfo::CODE_TARGET); + // Result of the FastNewFunctionContext builtin is always in new space. need_write_barrier = false; } else { __ Push(x1); + __ Push(Smi::FromInt(info()->scope()->scope_type())); __ CallRuntime(Runtime::kNewFunctionContext); } } @@ -3243,7 +3247,7 @@ void LCodeGen::DoLoadKeyedFixed(LLoadKeyedFixed* instr) { // protector cell contains (Smi) Isolate::kProtectorValid. Otherwise // it needs to bail out. __ LoadRoot(result, Heap::kArrayProtectorRootIndex); - __ Ldr(result, FieldMemOperand(result, Cell::kValueOffset)); + __ Ldr(result, FieldMemOperand(result, PropertyCell::kValueOffset)); __ Cmp(result, Operand(Smi::FromInt(Isolate::kProtectorValid))); DeoptimizeIf(ne, instr, DeoptimizeReason::kHole); } @@ -4595,7 +4599,7 @@ void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) { // TODO(all): if Mov could handle object in new space then it could be used // here. - __ LoadHeapObject(scratch1, instr->hydrogen()->pairs()); + __ LoadHeapObject(scratch1, instr->hydrogen()->declarations()); __ Mov(scratch2, Smi::FromInt(instr->hydrogen()->flags())); __ Push(scratch1, scratch2); __ LoadHeapObject(scratch1, instr->hydrogen()->feedback_vector()); |