Index: src/x64/full-codegen-x64.cc |
diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc |
index 44ffc29b4e8980532632fd99c426f9415da3052b..dbb32b23390a8cb4dc455ecf26be871be3f33777 100644 |
--- a/src/x64/full-codegen-x64.cc |
+++ b/src/x64/full-codegen-x64.cc |
@@ -230,7 +230,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(rdi); |
@@ -291,7 +291,7 @@ void FullCodeGenerator::Generate() { |
} else { |
type = ArgumentsAccessStub::NEW_SLOPPY_FAST; |
} |
- ArgumentsAccessStub stub(type); |
+ ArgumentsAccessStub stub(isolate(), type); |
__ CallStub(&stub); |
SetVar(arguments, rax, rbx, rdx); |
@@ -1337,7 +1337,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()); |
__ Move(rbx, info); |
__ CallStub(&stub); |
} else { |
@@ -1671,7 +1673,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { |
__ Move(rbx, Smi::FromInt(expr->literal_index())); |
__ Move(rcx, constant_properties); |
__ Move(rdx, Smi::FromInt(flags)); |
- FastCloneShallowObjectStub stub(properties_count); |
+ FastCloneShallowObjectStub stub(isolate(), properties_count); |
__ CallStub(&stub); |
} |
@@ -1806,6 +1808,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { |
__ Move(rbx, Smi::FromInt(expr->literal_index())); |
__ Move(rcx, constant_elements); |
FastCloneShallowArrayStub stub( |
+ isolate(), |
FastCloneShallowArrayStub::COPY_ON_WRITE_ELEMENTS, |
allocation_site_mode, |
length); |
@@ -1834,7 +1837,9 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { |
__ movp(rax, FieldOperand(rbx, JSFunction::kLiteralsOffset)); |
__ Move(rbx, Smi::FromInt(expr->literal_index())); |
__ Move(rcx, constant_elements); |
- FastCloneShallowArrayStub stub(mode, allocation_site_mode, length); |
+ FastCloneShallowArrayStub stub(isolate(), |
+ mode, |
+ allocation_site_mode, length); |
__ CallStub(&stub); |
} |
@@ -1871,7 +1876,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { |
} else { |
// Store the subexpression value in the array's elements. |
__ Move(rcx, Smi::FromInt(i)); |
- StoreArrayLiteralElementStub stub; |
+ StoreArrayLiteralElementStub stub(isolate()); |
__ CallStub(&stub); |
} |
@@ -2121,7 +2126,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) { |
CallIC(ic, TypeFeedbackId::None()); |
__ movp(rdi, rax); |
__ movp(Operand(rsp, 2 * kPointerSize), rdi); |
- CallFunctionStub stub(1, CALL_AS_METHOD); |
+ CallFunctionStub stub(isolate(), 1, CALL_AS_METHOD); |
__ CallStub(&stub); |
__ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); |
@@ -2329,7 +2334,7 @@ void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr, |
__ bind(&stub_call); |
__ movp(rax, rcx); |
- BinaryOpICStub stub(op, mode); |
+ BinaryOpICStub stub(isolate(), op, mode); |
CallIC(stub.GetCode(isolate()), expr->BinaryOperationFeedbackId()); |
patch_site.EmitPatchInfo(); |
__ jmp(&done, Label::kNear); |
@@ -2377,7 +2382,7 @@ void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, |
Token::Value op, |
OverwriteMode mode) { |
__ Pop(rdx); |
- 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(); |
@@ -2617,7 +2622,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); |
__ movp(rdi, Operand(rsp, (arg_count + 1) * kPointerSize)); |
__ CallStub(&stub); |
@@ -2659,7 +2664,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); |
__ movp(rdi, Operand(rsp, (arg_count + 1) * kPointerSize)); |
__ CallStub(&stub); |
@@ -2690,7 +2695,7 @@ void FullCodeGenerator::EmitCallWithStub(Call* expr) { |
__ Move(rdx, 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); |
__ movp(rdi, Operand(rsp, (arg_count + 1) * kPointerSize)); |
__ CallStub(&stub); |
RecordJSReturnSite(expr); |
@@ -2762,7 +2767,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); |
__ movp(rdi, Operand(rsp, (arg_count + 1) * kPointerSize)); |
__ CallStub(&stub); |
RecordJSReturnSite(expr); |
@@ -2876,7 +2881,7 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) { |
__ Move(rbx, FeedbackVector()); |
__ Move(rdx, 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(rax); |
@@ -3248,7 +3253,7 @@ void FullCodeGenerator::EmitArguments(CallRuntime* expr) { |
VisitForAccumulatorValue(args->at(0)); |
__ movp(rdx, rax); |
__ Move(rax, Smi::FromInt(info_->scope()->num_parameters())); |
- ArgumentsAccessStub stub(ArgumentsAccessStub::READ_ELEMENT); |
+ ArgumentsAccessStub stub(isolate(), ArgumentsAccessStub::READ_ELEMENT); |
__ CallStub(&stub); |
context()->Plug(rax); |
} |
@@ -3361,7 +3366,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)); |
@@ -3374,7 +3379,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)); |
@@ -3524,7 +3529,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(rax); |
} |
@@ -3565,7 +3570,7 @@ void FullCodeGenerator::EmitNumberToString(CallRuntime* expr) { |
// Load the argument into rax and call the stub. |
VisitForAccumulatorValue(args->at(0)); |
- NumberToStringStub stub; |
+ NumberToStringStub stub(isolate()); |
__ CallStub(&stub); |
context()->Plug(rax); |
} |
@@ -3691,7 +3696,7 @@ void FullCodeGenerator::EmitStringAdd(CallRuntime* expr) { |
VisitForAccumulatorValue(args->at(1)); |
__ Pop(rdx); |
- StringAddStub stub(STRING_ADD_CHECK_BOTH, NOT_TENURED); |
+ StringAddStub stub(isolate(), STRING_ADD_CHECK_BOTH, NOT_TENURED); |
__ CallStub(&stub); |
context()->Plug(rax); |
} |
@@ -3704,7 +3709,7 @@ void FullCodeGenerator::EmitStringCompare(CallRuntime* expr) { |
VisitForStackValue(args->at(0)); |
VisitForStackValue(args->at(1)); |
- StringCompareStub stub; |
+ StringCompareStub stub(isolate()); |
__ CallStub(&stub); |
context()->Plug(rax); |
} |
@@ -3743,7 +3748,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)); |
@@ -4169,7 +4174,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); |
__ movp(rdi, Operand(rsp, (arg_count + 1) * kPointerSize)); |
__ CallStub(&stub); |
@@ -4392,7 +4397,7 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
__ bind(&slow); |
} |
- ToNumberStub convert_stub; |
+ ToNumberStub convert_stub(isolate()); |
__ CallStub(&convert_stub); |
// Save result for postfix expressions. |
@@ -4422,7 +4427,7 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
__ bind(&stub_call); |
__ movp(rdx, rax); |
__ Move(rax, Smi::FromInt(1)); |
- BinaryOpICStub stub(expr->binary_op(), NO_OVERWRITE); |
+ BinaryOpICStub stub(isolate(), expr->binary_op(), NO_OVERWRITE); |
CallIC(stub.GetCode(isolate()), expr->CountBinOpFeedbackId()); |
patch_site.EmitPatchInfo(); |
__ bind(&done); |
@@ -4632,7 +4637,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); |
__ testp(rax, rax); |