diff options
Diffstat (limited to 'deps/v8/src/crankshaft/mips64/lithium-codegen-mips64.cc')
-rw-r--r-- | deps/v8/src/crankshaft/mips64/lithium-codegen-mips64.cc | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/deps/v8/src/crankshaft/mips64/lithium-codegen-mips64.cc b/deps/v8/src/crankshaft/mips64/lithium-codegen-mips64.cc index 1531996c19..350cede90b 100644 --- a/deps/v8/src/crankshaft/mips64/lithium-codegen-mips64.cc +++ b/deps/v8/src/crankshaft/mips64/lithium-codegen-mips64.cc @@ -4,6 +4,7 @@ #include "src/crankshaft/mips64/lithium-codegen-mips64.h" +#include "src/builtins/builtins-constructor.h" #include "src/code-factory.h" #include "src/code-stubs.h" #include "src/crankshaft/hydrogen-osr.h" @@ -178,15 +179,18 @@ 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()); __ li(FastNewFunctionContextDescriptor::SlotsRegister(), Operand(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(a1); + __ Push(Smi::FromInt(info()->scope()->scope_type())); __ CallRuntime(Runtime::kNewFunctionContext); } } @@ -1888,16 +1892,15 @@ void LCodeGen::DoMathMinMax(LMathMinMax* instr) { FPURegister result_reg = ToDoubleRegister(instr->result()); Label nan, done; if (operation == HMathMinMax::kMathMax) { - __ MaxNaNCheck_d(result_reg, left_reg, right_reg, &nan); + __ Float64Max(result_reg, left_reg, right_reg, &nan); } else { DCHECK(operation == HMathMinMax::kMathMin); - __ MinNaNCheck_d(result_reg, left_reg, right_reg, &nan); + __ Float64Min(result_reg, left_reg, right_reg, &nan); } __ Branch(&done); __ bind(&nan); - __ LoadRoot(scratch, Heap::kNanValueRootIndex); - __ ldc1(result_reg, FieldMemOperand(scratch, HeapNumber::kValueOffset)); + __ add_d(result_reg, left_reg, right_reg); __ bind(&done); } @@ -2976,7 +2979,7 @@ void LCodeGen::DoLoadKeyedFixedArray(LLoadKeyed* instr) { // it needs to bail out. __ LoadRoot(result, Heap::kArrayProtectorRootIndex); // The comparison only needs LS bits of value, which is a smi. - __ ld(result, FieldMemOperand(result, Cell::kValueOffset)); + __ ld(result, FieldMemOperand(result, PropertyCell::kValueOffset)); DeoptimizeIf(ne, instr, DeoptimizeReason::kHole, result, Operand(Smi::FromInt(Isolate::kProtectorValid))); } @@ -3245,7 +3248,7 @@ void LCodeGen::DoContext(LContext* instr) { void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) { DCHECK(ToRegister(instr->context()).is(cp)); - __ li(scratch0(), instr->hydrogen()->pairs()); + __ li(scratch0(), instr->hydrogen()->declarations()); __ li(scratch1(), Operand(Smi::FromInt(instr->hydrogen()->flags()))); __ Push(scratch0(), scratch1()); __ li(scratch0(), instr->hydrogen()->feedback_vector()); @@ -4246,15 +4249,7 @@ void LCodeGen::DoDeferredMaybeGrowElements(LMaybeGrowElements* instr) { LOperand* key = instr->key(); if (key->IsConstantOperand()) { - LConstantOperand* constant_key = LConstantOperand::cast(key); - int32_t int_key = ToInteger32(constant_key); - if (Smi::IsValid(int_key)) { - __ li(a3, Operand(Smi::FromInt(int_key))); - } else { - // We should never get here at runtime because there is a smi check on - // the key before this point. - __ stop("expected smi"); - } + __ li(a3, Operand(ToSmi(LConstantOperand::cast(key)))); } else { __ mov(a3, ToRegister(key)); __ SmiTag(a3); |