diff options
Diffstat (limited to 'deps/v8/src/mips/full-codegen-mips.cc')
-rw-r--r-- | deps/v8/src/mips/full-codegen-mips.cc | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/deps/v8/src/mips/full-codegen-mips.cc b/deps/v8/src/mips/full-codegen-mips.cc index b60502c9a5..df3f4170b1 100644 --- a/deps/v8/src/mips/full-codegen-mips.cc +++ b/deps/v8/src/mips/full-codegen-mips.cc @@ -298,8 +298,7 @@ void FullCodeGenerator::Generate() { Label ok; __ LoadRoot(t0, Heap::kStackLimitRootIndex); __ Branch(&ok, hs, sp, Operand(t0)); - StackCheckStub stub; - __ CallStub(&stub); + __ Call(isolate()->builtins()->StackCheck(), RelocInfo::CODE_TARGET); __ bind(&ok); } @@ -369,9 +368,8 @@ void FullCodeGenerator::EmitBackEdgeBookkeeping(IterationStatement* stmt, EmitProfilingCounterDecrement(weight); __ slt(at, a3, zero_reg); __ beq(at, zero_reg, &ok); - // CallStub will emit a li t9 first, so it is safe to use the delay slot. - InterruptStub stub; - __ CallStub(&stub); + // Call will emit a li t9 first, so it is safe to use the delay slot. + __ Call(isolate()->builtins()->InterruptCheck(), RelocInfo::CODE_TARGET); // Record a mapping of this PC offset to the OSR id. This is used to find // the AST id from the unoptimized code in order to use it as a key into // the deoptimization input data found in the optimized code. @@ -418,8 +416,8 @@ void FullCodeGenerator::EmitReturnSequence() { __ push(a2); __ CallRuntime(Runtime::kOptimizeFunctionOnNextCall, 1); } else { - InterruptStub stub; - __ CallStub(&stub); + __ Call(isolate()->builtins()->InterruptCheck(), + RelocInfo::CODE_TARGET); } __ pop(v0); EmitProfilingCounterReset(); @@ -1333,8 +1331,7 @@ void FullCodeGenerator::EmitNewClosure(Handle<SharedFunctionInfo> info, scope()->is_function_scope() && info->num_literals() == 0) { FastNewClosureStub stub(info->language_mode(), info->is_generator()); - __ li(a0, Operand(info)); - __ push(a0); + __ li(a2, Operand(info)); __ CallStub(&stub); } else { __ li(a0, Operand(info)); @@ -3031,7 +3028,7 @@ void FullCodeGenerator::EmitIsStringWrapperSafeForDefaultValueOf( VisitForAccumulatorValue(args->at(0)); - Label materialize_true, materialize_false; + Label materialize_true, materialize_false, skip_lookup; Label* if_true = NULL; Label* if_false = NULL; Label* fall_through = NULL; @@ -3043,7 +3040,7 @@ void FullCodeGenerator::EmitIsStringWrapperSafeForDefaultValueOf( __ lw(a1, FieldMemOperand(v0, HeapObject::kMapOffset)); __ lbu(t0, FieldMemOperand(a1, Map::kBitField2Offset)); __ And(t0, t0, 1 << Map::kStringWrapperSafeForDefaultValueOf); - __ Branch(if_true, ne, t0, Operand(zero_reg)); + __ Branch(&skip_lookup, ne, t0, Operand(zero_reg)); // Check for fast case object. Generate false result for slow case object. __ lw(a2, FieldMemOperand(v0, JSObject::kPropertiesOffset)); @@ -3089,6 +3086,14 @@ void FullCodeGenerator::EmitIsStringWrapperSafeForDefaultValueOf( __ Branch(&loop, ne, t0, Operand(a2)); __ bind(&done); + + // Set the bit in the map to indicate that there is no local valueOf field. + __ lbu(a2, FieldMemOperand(a1, Map::kBitField2Offset)); + __ Or(a2, a2, Operand(1 << Map::kStringWrapperSafeForDefaultValueOf)); + __ sb(a2, FieldMemOperand(a1, Map::kBitField2Offset)); + + __ bind(&skip_lookup); + // If a valueOf property is not found on the object check that its // prototype is the un-modified String prototype. If not result is false. __ lw(a2, FieldMemOperand(a1, Map::kPrototypeOffset)); @@ -3097,16 +3102,9 @@ void FullCodeGenerator::EmitIsStringWrapperSafeForDefaultValueOf( __ lw(a3, ContextOperand(cp, Context::GLOBAL_OBJECT_INDEX)); __ lw(a3, FieldMemOperand(a3, GlobalObject::kNativeContextOffset)); __ lw(a3, ContextOperand(a3, Context::STRING_FUNCTION_PROTOTYPE_MAP_INDEX)); - __ Branch(if_false, ne, a2, Operand(a3)); - - // Set the bit in the map to indicate that it has been checked safe for - // default valueOf and set true result. - __ lbu(a2, FieldMemOperand(a1, Map::kBitField2Offset)); - __ Or(a2, a2, Operand(1 << Map::kStringWrapperSafeForDefaultValueOf)); - __ sb(a2, FieldMemOperand(a1, Map::kBitField2Offset)); - __ jmp(if_true); - PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); + Split(eq, a2, Operand(a3), if_true, if_false, fall_through); + context()->Plug(if_true, if_false); } @@ -3339,7 +3337,7 @@ void FullCodeGenerator::EmitLog(CallRuntime* expr) { // 2 (array): Arguments to the format string. ZoneList<Expression*>* args = expr->arguments(); ASSERT_EQ(args->length(), 3); - if (CodeGenerator::ShouldGenerateLog(args->at(0))) { + if (CodeGenerator::ShouldGenerateLog(isolate(), args->at(0))) { VisitForStackValue(args->at(1)); VisitForStackValue(args->at(2)); __ CallRuntime(Runtime::kLog, 2); |