| Index: src/x64/lithium-codegen-x64.cc
|
| diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
|
| index 0cc8d16aab3210ddc42236c5486d85248d9f7943..c12e0b4324459327897b66d4eae66a0988d32ab2 100644
|
| --- a/src/x64/lithium-codegen-x64.cc
|
| +++ b/src/x64/lithium-codegen-x64.cc
|
| @@ -219,7 +219,7 @@ bool LCodeGen::GeneratePrologue() {
|
| Comment(";;; Allocate local context");
|
| // Argument to NewContext is the function, which is still in rdi.
|
| if (heap_slots <= FastNewContextStub::kMaximumSlots) {
|
| - FastNewContextStub stub(heap_slots);
|
| + FastNewContextStub stub(isolate(), heap_slots);
|
| __ CallStub(&stub);
|
| } else {
|
| __ Push(rdi);
|
| @@ -989,17 +989,17 @@ void LCodeGen::DoCallStub(LCallStub* instr) {
|
| ASSERT(ToRegister(instr->result()).is(rax));
|
| switch (instr->hydrogen()->major_key()) {
|
| case CodeStub::RegExpExec: {
|
| - RegExpExecStub stub;
|
| + RegExpExecStub stub(isolate());
|
| CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
|
| break;
|
| }
|
| case CodeStub::SubString: {
|
| - SubStringStub stub;
|
| + SubStringStub stub(isolate());
|
| CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
|
| break;
|
| }
|
| case CodeStub::StringCompare: {
|
| - StringCompareStub stub;
|
| + StringCompareStub stub(isolate());
|
| CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
|
| break;
|
| }
|
| @@ -2029,7 +2029,7 @@ void LCodeGen::DoArithmeticT(LArithmeticT* instr) {
|
| ASSERT(ToRegister(instr->right()).is(rax));
|
| ASSERT(ToRegister(instr->result()).is(rax));
|
|
|
| - BinaryOpICStub stub(instr->op(), NO_OVERWRITE);
|
| + BinaryOpICStub stub(isolate(), instr->op(), NO_OVERWRITE);
|
| CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
|
| }
|
|
|
| @@ -2623,7 +2623,7 @@ void LCodeGen::DoCmpMapAndBranch(LCmpMapAndBranch* instr) {
|
|
|
| void LCodeGen::DoInstanceOf(LInstanceOf* instr) {
|
| ASSERT(ToRegister(instr->context()).is(rsi));
|
| - InstanceofStub stub(InstanceofStub::kNoFlags);
|
| + InstanceofStub stub(isolate(), InstanceofStub::kNoFlags);
|
| __ Push(ToRegister(instr->left()));
|
| __ Push(ToRegister(instr->right()));
|
| CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
|
| @@ -2709,7 +2709,7 @@ void LCodeGen::DoDeferredInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr,
|
| PushSafepointRegistersScope scope(this);
|
| InstanceofStub::Flags flags = static_cast<InstanceofStub::Flags>(
|
| InstanceofStub::kNoFlags | InstanceofStub::kCallSiteInlineCheck);
|
| - InstanceofStub stub(flags);
|
| + InstanceofStub stub(isolate(), flags);
|
|
|
| __ Push(ToRegister(instr->value()));
|
| __ Push(instr->function());
|
| @@ -3802,7 +3802,7 @@ void LCodeGen::DoPower(LPower* instr) {
|
| ASSERT(ToDoubleRegister(instr->result()).is(xmm3));
|
|
|
| if (exponent_type.IsSmi()) {
|
| - MathPowStub stub(MathPowStub::TAGGED);
|
| + MathPowStub stub(isolate(), MathPowStub::TAGGED);
|
| __ CallStub(&stub);
|
| } else if (exponent_type.IsTagged()) {
|
| Label no_deopt;
|
| @@ -3810,14 +3810,14 @@ void LCodeGen::DoPower(LPower* instr) {
|
| __ CmpObjectType(exponent, HEAP_NUMBER_TYPE, rcx);
|
| DeoptimizeIf(not_equal, instr->environment());
|
| __ bind(&no_deopt);
|
| - MathPowStub stub(MathPowStub::TAGGED);
|
| + MathPowStub stub(isolate(), MathPowStub::TAGGED);
|
| __ CallStub(&stub);
|
| } else if (exponent_type.IsInteger32()) {
|
| - MathPowStub stub(MathPowStub::INTEGER);
|
| + MathPowStub stub(isolate(), MathPowStub::INTEGER);
|
| __ CallStub(&stub);
|
| } else {
|
| ASSERT(exponent_type.IsDouble());
|
| - MathPowStub stub(MathPowStub::DOUBLE);
|
| + MathPowStub stub(isolate(), MathPowStub::DOUBLE);
|
| __ CallStub(&stub);
|
| }
|
| }
|
| @@ -3908,7 +3908,7 @@ void LCodeGen::DoCallFunction(LCallFunction* instr) {
|
| ASSERT(ToRegister(instr->result()).is(rax));
|
|
|
| int arity = instr->arity();
|
| - CallFunctionStub stub(arity, instr->hydrogen()->function_flags());
|
| + CallFunctionStub stub(isolate(), arity, instr->hydrogen()->function_flags());
|
| CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
|
| }
|
|
|
| @@ -3921,7 +3921,7 @@ void LCodeGen::DoCallNew(LCallNew* instr) {
|
| __ Set(rax, instr->arity());
|
| // No cell in ebx for construct type feedback in optimized code
|
| __ LoadRoot(rbx, Heap::kUndefinedValueRootIndex);
|
| - CallConstructStub stub(NO_CALL_FUNCTION_FLAGS);
|
| + CallConstructStub stub(isolate(), NO_CALL_FUNCTION_FLAGS);
|
| CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr);
|
| }
|
|
|
| @@ -3940,7 +3940,7 @@ void LCodeGen::DoCallNewArray(LCallNewArray* instr) {
|
| : DONT_OVERRIDE;
|
|
|
| if (instr->arity() == 0) {
|
| - ArrayNoArgumentConstructorStub stub(kind, override_mode);
|
| + ArrayNoArgumentConstructorStub stub(isolate(), kind, override_mode);
|
| CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr);
|
| } else if (instr->arity() == 1) {
|
| Label done;
|
| @@ -3953,17 +3953,19 @@ void LCodeGen::DoCallNewArray(LCallNewArray* instr) {
|
| __ j(zero, &packed_case, Label::kNear);
|
|
|
| ElementsKind holey_kind = GetHoleyElementsKind(kind);
|
| - ArraySingleArgumentConstructorStub stub(holey_kind, override_mode);
|
| + ArraySingleArgumentConstructorStub stub(isolate(),
|
| + holey_kind,
|
| + override_mode);
|
| CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr);
|
| __ jmp(&done, Label::kNear);
|
| __ bind(&packed_case);
|
| }
|
|
|
| - ArraySingleArgumentConstructorStub stub(kind, override_mode);
|
| + ArraySingleArgumentConstructorStub stub(isolate(), kind, override_mode);
|
| CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr);
|
| __ bind(&done);
|
| } else {
|
| - ArrayNArgumentsConstructorStub stub(kind, override_mode);
|
| + ArrayNArgumentsConstructorStub stub(isolate(), kind, override_mode);
|
| CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr);
|
| }
|
| }
|
| @@ -4411,7 +4413,7 @@ void LCodeGen::DoTransitionElementsKind(LTransitionElementsKind* instr) {
|
| PushSafepointRegistersScope scope(this);
|
| __ Move(rbx, to_map);
|
| bool is_js_array = from_map->instance_type() == JS_ARRAY_TYPE;
|
| - TransitionElementsKindStub stub(from_kind, to_kind, is_js_array);
|
| + TransitionElementsKindStub stub(isolate(), from_kind, to_kind, is_js_array);
|
| __ CallStub(&stub);
|
| RecordSafepointWithLazyDeopt(instr, RECORD_SAFEPOINT_WITH_REGISTERS, 0);
|
| }
|
| @@ -4433,7 +4435,8 @@ void LCodeGen::DoStringAdd(LStringAdd* instr) {
|
| ASSERT(ToRegister(instr->context()).is(rsi));
|
| ASSERT(ToRegister(instr->left()).is(rdx));
|
| ASSERT(ToRegister(instr->right()).is(rax));
|
| - StringAddStub stub(instr->hydrogen()->flags(),
|
| + StringAddStub stub(isolate(),
|
| + instr->hydrogen()->flags(),
|
| instr->hydrogen()->pretenure_flag());
|
| CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
|
| }
|
| @@ -5314,7 +5317,8 @@ void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) {
|
| // space for nested functions that don't need literals cloning.
|
| bool pretenure = instr->hydrogen()->pretenure();
|
| if (!pretenure && instr->hydrogen()->has_no_literals()) {
|
| - FastNewClosureStub stub(instr->hydrogen()->strict_mode(),
|
| + FastNewClosureStub stub(isolate(),
|
| + instr->hydrogen()->strict_mode(),
|
| instr->hydrogen()->is_generator());
|
| __ Move(rbx, instr->hydrogen()->shared_info());
|
| CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
|
|
|