Index: src/mips/full-codegen-mips.cc |
diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc |
index 1466af61c58616f708459837fe677fb0b661f2da..425324e4232187e4b2adafe9133d173f346deac7 100644 |
--- a/src/mips/full-codegen-mips.cc |
+++ b/src/mips/full-codegen-mips.cc |
@@ -249,7 +249,7 @@ void FullCodeGenerator::Generate() { |
__ Push(info->scope()->GetScopeInfo()); |
__ CallRuntime(Runtime::kHiddenNewGlobalContext, 2); |
} else if (heap_slots <= FastNewContextStub::kMaximumSlots) { |
- FastNewContextStub stub(heap_slots); |
+ FastNewContextStub stub(isolate(), heap_slots); |
__ CallStub(&stub); |
} else { |
__ push(a1); |
@@ -310,7 +310,7 @@ void FullCodeGenerator::Generate() { |
} else { |
type = ArgumentsAccessStub::NEW_SLOPPY_FAST; |
} |
- ArgumentsAccessStub stub(type); |
+ ArgumentsAccessStub stub(isolate(), type); |
__ CallStub(&stub); |
SetVar(arguments, v0, a1, a2); |
@@ -1368,7 +1368,9 @@ void FullCodeGenerator::EmitNewClosure(Handle<SharedFunctionInfo> info, |
!pretenure && |
scope()->is_function_scope() && |
info->num_literals() == 0) { |
- FastNewClosureStub stub(info->strict_mode(), info->is_generator()); |
+ FastNewClosureStub stub(isolate(), |
+ info->strict_mode(), |
+ info->is_generator()); |
__ li(a2, Operand(info)); |
__ CallStub(&stub); |
} else { |
@@ -1693,7 +1695,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { |
__ Push(a3, a2, a1, a0); |
__ CallRuntime(Runtime::kHiddenCreateObjectLiteral, 4); |
} else { |
- FastCloneShallowObjectStub stub(properties_count); |
+ FastCloneShallowObjectStub stub(isolate(), properties_count); |
__ CallStub(&stub); |
} |
@@ -1835,6 +1837,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { |
if (has_fast_elements && constant_elements_values->map() == |
isolate()->heap()->fixed_cow_array_map()) { |
FastCloneShallowArrayStub stub( |
+ isolate(), |
FastCloneShallowArrayStub::COPY_ON_WRITE_ELEMENTS, |
allocation_site_mode, |
length); |
@@ -1856,7 +1859,8 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { |
mode = FastCloneShallowArrayStub::CLONE_ELEMENTS; |
} |
- FastCloneShallowArrayStub stub(mode, allocation_site_mode, length); |
+ FastCloneShallowArrayStub stub(isolate(), mode, allocation_site_mode, |
+ length); |
__ CallStub(&stub); |
} |
@@ -1890,7 +1894,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { |
} else { |
__ li(a3, Operand(Smi::FromInt(i))); |
__ mov(a0, result_register()); |
- StoreArrayLiteralElementStub stub; |
+ StoreArrayLiteralElementStub stub(isolate()); |
__ CallStub(&stub); |
} |
@@ -2138,7 +2142,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) { |
__ mov(a0, v0); |
__ mov(a1, a0); |
__ sw(a1, MemOperand(sp, 2 * kPointerSize)); |
- CallFunctionStub stub(1, CALL_AS_METHOD); |
+ CallFunctionStub stub(isolate(), 1, CALL_AS_METHOD); |
__ CallStub(&stub); |
__ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
@@ -2359,7 +2363,7 @@ void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr, |
patch_site.EmitJumpIfSmi(scratch1, &smi_case); |
__ bind(&stub_call); |
- BinaryOpICStub stub(op, mode); |
+ BinaryOpICStub stub(isolate(), op, mode); |
CallIC(stub.GetCode(isolate()), expr->BinaryOperationFeedbackId()); |
patch_site.EmitPatchInfo(); |
__ jmp(&done); |
@@ -2437,7 +2441,7 @@ void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, |
OverwriteMode mode) { |
__ mov(a0, result_register()); |
__ pop(a1); |
- BinaryOpICStub stub(op, mode); |
+ BinaryOpICStub stub(isolate(), op, mode); |
JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. |
CallIC(stub.GetCode(isolate()), expr->BinaryOperationFeedbackId()); |
patch_site.EmitPatchInfo(); |
@@ -2686,7 +2690,7 @@ void FullCodeGenerator::EmitCallWithIC(Call* expr) { |
} |
// Record source position for debugger. |
SetSourcePosition(expr->position()); |
- CallFunctionStub stub(arg_count, flags); |
+ CallFunctionStub stub(isolate(), arg_count, flags); |
__ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize)); |
__ CallStub(&stub); |
@@ -2728,7 +2732,7 @@ void FullCodeGenerator::EmitKeyedCallWithIC(Call* expr, |
// Record source position for debugger. |
SetSourcePosition(expr->position()); |
- CallFunctionStub stub(arg_count, CALL_AS_METHOD); |
+ CallFunctionStub stub(isolate(), arg_count, CALL_AS_METHOD); |
__ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize)); |
__ CallStub(&stub); |
@@ -2759,7 +2763,7 @@ void FullCodeGenerator::EmitCallWithStub(Call* expr) { |
__ li(a3, Operand(Smi::FromInt(expr->CallFeedbackSlot()))); |
// Record call targets in unoptimized code. |
- CallFunctionStub stub(arg_count, RECORD_CALL_TARGET); |
+ CallFunctionStub stub(isolate(), arg_count, RECORD_CALL_TARGET); |
__ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize)); |
__ CallStub(&stub); |
RecordJSReturnSite(expr); |
@@ -2835,7 +2839,7 @@ void FullCodeGenerator::VisitCall(Call* expr) { |
} |
// Record source position for debugger. |
SetSourcePosition(expr->position()); |
- CallFunctionStub stub(arg_count, NO_CALL_FUNCTION_FLAGS); |
+ CallFunctionStub stub(isolate(), arg_count, NO_CALL_FUNCTION_FLAGS); |
__ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize)); |
__ CallStub(&stub); |
RecordJSReturnSite(expr); |
@@ -2952,7 +2956,7 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) { |
__ li(a2, FeedbackVector()); |
__ li(a3, Operand(Smi::FromInt(expr->CallNewFeedbackSlot()))); |
- CallConstructStub stub(RECORD_CALL_TARGET); |
+ CallConstructStub stub(isolate(), RECORD_CALL_TARGET); |
__ Call(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL); |
PrepareForBailoutForId(expr->ReturnId(), TOS_REG); |
context()->Plug(v0); |
@@ -3328,7 +3332,7 @@ void FullCodeGenerator::EmitArguments(CallRuntime* expr) { |
VisitForAccumulatorValue(args->at(0)); |
__ mov(a1, v0); |
__ li(a0, Operand(Smi::FromInt(info_->scope()->num_parameters()))); |
- ArgumentsAccessStub stub(ArgumentsAccessStub::READ_ELEMENT); |
+ ArgumentsAccessStub stub(isolate(), ArgumentsAccessStub::READ_ELEMENT); |
__ CallStub(&stub); |
context()->Plug(v0); |
} |
@@ -3439,7 +3443,7 @@ void FullCodeGenerator::EmitLog(CallRuntime* expr) { |
void FullCodeGenerator::EmitSubString(CallRuntime* expr) { |
// Load the arguments on the stack and call the stub. |
- SubStringStub stub; |
+ SubStringStub stub(isolate()); |
ZoneList<Expression*>* args = expr->arguments(); |
ASSERT(args->length() == 3); |
VisitForStackValue(args->at(0)); |
@@ -3452,7 +3456,7 @@ void FullCodeGenerator::EmitSubString(CallRuntime* expr) { |
void FullCodeGenerator::EmitRegExpExec(CallRuntime* expr) { |
// Load the arguments on the stack and call the stub. |
- RegExpExecStub stub; |
+ RegExpExecStub stub(isolate()); |
ZoneList<Expression*>* args = expr->arguments(); |
ASSERT(args->length() == 4); |
VisitForStackValue(args->at(0)); |
@@ -3611,7 +3615,7 @@ void FullCodeGenerator::EmitMathPow(CallRuntime* expr) { |
ASSERT(args->length() == 2); |
VisitForStackValue(args->at(0)); |
VisitForStackValue(args->at(1)); |
- MathPowStub stub(MathPowStub::ON_STACK); |
+ MathPowStub stub(isolate(), MathPowStub::ON_STACK); |
__ CallStub(&stub); |
context()->Plug(v0); |
} |
@@ -3654,7 +3658,7 @@ void FullCodeGenerator::EmitNumberToString(CallRuntime* expr) { |
VisitForAccumulatorValue(args->at(0)); |
__ mov(a0, result_register()); |
- NumberToStringStub stub; |
+ NumberToStringStub stub(isolate()); |
__ CallStub(&stub); |
context()->Plug(v0); |
} |
@@ -3783,7 +3787,7 @@ void FullCodeGenerator::EmitStringAdd(CallRuntime* expr) { |
__ pop(a1); |
__ mov(a0, result_register()); // StringAddStub requires args in a0, a1. |
- StringAddStub stub(STRING_ADD_CHECK_BOTH, NOT_TENURED); |
+ StringAddStub stub(isolate(), STRING_ADD_CHECK_BOTH, NOT_TENURED); |
__ CallStub(&stub); |
context()->Plug(v0); |
} |
@@ -3796,7 +3800,7 @@ void FullCodeGenerator::EmitStringCompare(CallRuntime* expr) { |
VisitForStackValue(args->at(0)); |
VisitForStackValue(args->at(1)); |
- StringCompareStub stub; |
+ StringCompareStub stub(isolate()); |
__ CallStub(&stub); |
context()->Plug(v0); |
} |
@@ -3835,7 +3839,7 @@ void FullCodeGenerator::EmitCallFunction(CallRuntime* expr) { |
void FullCodeGenerator::EmitRegExpConstructResult(CallRuntime* expr) { |
- RegExpConstructResultStub stub; |
+ RegExpConstructResultStub stub(isolate()); |
ZoneList<Expression*>* args = expr->arguments(); |
ASSERT(args->length() == 3); |
VisitForStackValue(args->at(0)); |
@@ -4210,7 +4214,7 @@ void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) { |
// Record source position of the IC call. |
SetSourcePosition(expr->position()); |
- CallFunctionStub stub(arg_count, NO_CALL_FUNCTION_FLAGS); |
+ CallFunctionStub stub(isolate(), arg_count, NO_CALL_FUNCTION_FLAGS); |
__ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize)); |
__ CallStub(&stub); |
@@ -4432,7 +4436,7 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
__ jmp(&stub_call); |
__ bind(&slow); |
} |
- ToNumberStub convert_stub; |
+ ToNumberStub convert_stub(isolate()); |
__ CallStub(&convert_stub); |
// Save result for postfix expressions. |
@@ -4462,7 +4466,7 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
// Record position before stub call. |
SetSourcePosition(expr->position()); |
- BinaryOpICStub stub(Token::ADD, NO_OVERWRITE); |
+ BinaryOpICStub stub(isolate(), Token::ADD, NO_OVERWRITE); |
CallIC(stub.GetCode(isolate()), expr->CountBinOpFeedbackId()); |
patch_site.EmitPatchInfo(); |
__ bind(&done); |
@@ -4671,7 +4675,7 @@ void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) { |
case Token::INSTANCEOF: { |
VisitForStackValue(expr->right()); |
- InstanceofStub stub(InstanceofStub::kNoFlags); |
+ InstanceofStub stub(isolate(), InstanceofStub::kNoFlags); |
__ CallStub(&stub); |
PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
// The stub returns 0 for true. |