From 01ef9aef0a87343a185afcd5019bcedc2c29111f Mon Sep 17 00:00:00 2001 From: "plind44@gmail.com" Date: Thu, 24 Apr 2014 14:51:25 +0000 Subject: [PATCH] MIPS: CodeStubs contain their corresponding Isolate* now. (part 2) Port r20940 (a5dde97) Original commit message: This CL mechanically removes all useless Isolate* parameters from code stub functions, making things quite a bit simpler. BUG=359977 LOG=y R=plind44@gmail.com Review URL: https://codereview.chromium.org/251473004 Patch from Balazs Kilvady . git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20945 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/mips/code-stubs-mips.cc | 93 +++++++++++++------------------------ src/mips/full-codegen-mips.cc | 8 ++-- src/mips/lithium-codegen-mips.cc | 28 +++++------ src/mips/lithium-mips.cc | 2 +- src/mips/macro-assembler-mips.cc | 8 ++-- src/mips/stub-cache-mips.cc | 4 +- test/cctest/test-code-stubs-mips.cc | 2 +- 7 files changed, 57 insertions(+), 88 deletions(-) diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc index fda01b0..2134617 100644 --- a/src/mips/code-stubs-mips.cc +++ b/src/mips/code-stubs-mips.cc @@ -40,7 +40,6 @@ namespace internal { void FastNewClosureStub::InitializeInterfaceDescriptor( - Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { static Register registers[] = { a2 }; descriptor->register_param_count_ = 1; @@ -51,7 +50,6 @@ void FastNewClosureStub::InitializeInterfaceDescriptor( void FastNewContextStub::InitializeInterfaceDescriptor( - Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { static Register registers[] = { a1 }; descriptor->register_param_count_ = 1; @@ -61,7 +59,6 @@ void FastNewContextStub::InitializeInterfaceDescriptor( void ToNumberStub::InitializeInterfaceDescriptor( - Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { static Register registers[] = { a0 }; descriptor->register_param_count_ = 1; @@ -71,7 +68,6 @@ void ToNumberStub::InitializeInterfaceDescriptor( void NumberToStringStub::InitializeInterfaceDescriptor( - Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { static Register registers[] = { a0 }; descriptor->register_param_count_ = 1; @@ -82,7 +78,6 @@ void NumberToStringStub::InitializeInterfaceDescriptor( void FastCloneShallowArrayStub::InitializeInterfaceDescriptor( - Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { static Register registers[] = { a3, a2, a1 }; descriptor->register_param_count_ = 3; @@ -94,7 +89,6 @@ void FastCloneShallowArrayStub::InitializeInterfaceDescriptor( void FastCloneShallowObjectStub::InitializeInterfaceDescriptor( - Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { static Register registers[] = { a3, a2, a1, a0 }; descriptor->register_param_count_ = 4; @@ -105,7 +99,6 @@ void FastCloneShallowObjectStub::InitializeInterfaceDescriptor( void CreateAllocationSiteStub::InitializeInterfaceDescriptor( - Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { static Register registers[] = { a2, a3 }; descriptor->register_param_count_ = 2; @@ -115,7 +108,6 @@ void CreateAllocationSiteStub::InitializeInterfaceDescriptor( void KeyedLoadFastElementStub::InitializeInterfaceDescriptor( - Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { static Register registers[] = { a1, a0 }; descriptor->register_param_count_ = 2; @@ -126,7 +118,6 @@ void KeyedLoadFastElementStub::InitializeInterfaceDescriptor( void KeyedLoadDictionaryElementStub::InitializeInterfaceDescriptor( - Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { static Register registers[] = {a1, a0 }; descriptor->register_param_count_ = 2; @@ -137,7 +128,6 @@ void KeyedLoadDictionaryElementStub::InitializeInterfaceDescriptor( void RegExpConstructResultStub::InitializeInterfaceDescriptor( - Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { static Register registers[] = { a2, a1, a0 }; descriptor->register_param_count_ = 3; @@ -148,7 +138,6 @@ void RegExpConstructResultStub::InitializeInterfaceDescriptor( void LoadFieldStub::InitializeInterfaceDescriptor( - Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { static Register registers[] = { a0 }; descriptor->register_param_count_ = 1; @@ -158,7 +147,6 @@ void LoadFieldStub::InitializeInterfaceDescriptor( void KeyedLoadFieldStub::InitializeInterfaceDescriptor( - Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { static Register registers[] = { a1 }; descriptor->register_param_count_ = 1; @@ -168,7 +156,6 @@ void KeyedLoadFieldStub::InitializeInterfaceDescriptor( void StringLengthStub::InitializeInterfaceDescriptor( - Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { static Register registers[] = { a0, a2 }; descriptor->register_param_count_ = 2; @@ -178,7 +165,6 @@ void StringLengthStub::InitializeInterfaceDescriptor( void KeyedStringLengthStub::InitializeInterfaceDescriptor( - Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { static Register registers[] = { a1, a0 }; descriptor->register_param_count_ = 2; @@ -188,7 +174,6 @@ void KeyedStringLengthStub::InitializeInterfaceDescriptor( void KeyedStoreFastElementStub::InitializeInterfaceDescriptor( - Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { static Register registers[] = { a2, a1, a0 }; descriptor->register_param_count_ = 3; @@ -199,7 +184,6 @@ void KeyedStoreFastElementStub::InitializeInterfaceDescriptor( void TransitionElementsKindStub::InitializeInterfaceDescriptor( - Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { static Register registers[] = { a0, a1 }; descriptor->register_param_count_ = 2; @@ -211,7 +195,6 @@ void TransitionElementsKindStub::InitializeInterfaceDescriptor( void CompareNilICStub::InitializeInterfaceDescriptor( - Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { static Register registers[] = { a0 }; descriptor->register_param_count_ = 1; @@ -219,12 +202,11 @@ void CompareNilICStub::InitializeInterfaceDescriptor( descriptor->deoptimization_handler_ = FUNCTION_ADDR(CompareNilIC_Miss); descriptor->SetMissHandler( - ExternalReference(IC_Utility(IC::kCompareNilIC_Miss), isolate)); + ExternalReference(IC_Utility(IC::kCompareNilIC_Miss), isolate())); } static void InitializeArrayConstructorDescriptor( - Isolate* isolate, CodeStubInterfaceDescriptor* descriptor, int constant_stack_parameter_count) { // register state @@ -253,7 +235,6 @@ static void InitializeArrayConstructorDescriptor( static void InitializeInternalArrayConstructorDescriptor( - Isolate* isolate, CodeStubInterfaceDescriptor* descriptor, int constant_stack_parameter_count) { // register state @@ -281,28 +262,24 @@ static void InitializeInternalArrayConstructorDescriptor( void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( - Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { - InitializeArrayConstructorDescriptor(isolate, descriptor, 0); + InitializeArrayConstructorDescriptor(descriptor, 0); } void ArraySingleArgumentConstructorStub::InitializeInterfaceDescriptor( - Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { - InitializeArrayConstructorDescriptor(isolate, descriptor, 1); + InitializeArrayConstructorDescriptor(descriptor, 1); } void ArrayNArgumentsConstructorStub::InitializeInterfaceDescriptor( - Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { - InitializeArrayConstructorDescriptor(isolate, descriptor, -1); + InitializeArrayConstructorDescriptor(descriptor, -1); } void ToBooleanStub::InitializeInterfaceDescriptor( - Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { static Register registers[] = { a0 }; descriptor->register_param_count_ = 1; @@ -310,33 +287,29 @@ void ToBooleanStub::InitializeInterfaceDescriptor( descriptor->deoptimization_handler_ = FUNCTION_ADDR(ToBooleanIC_Miss); descriptor->SetMissHandler( - ExternalReference(IC_Utility(IC::kToBooleanIC_Miss), isolate)); + ExternalReference(IC_Utility(IC::kToBooleanIC_Miss), isolate())); } void InternalArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( - Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { - InitializeInternalArrayConstructorDescriptor(isolate, descriptor, 0); + InitializeInternalArrayConstructorDescriptor(descriptor, 0); } void InternalArraySingleArgumentConstructorStub::InitializeInterfaceDescriptor( - Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { - InitializeInternalArrayConstructorDescriptor(isolate, descriptor, 1); + InitializeInternalArrayConstructorDescriptor(descriptor, 1); } void InternalArrayNArgumentsConstructorStub::InitializeInterfaceDescriptor( - Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { - InitializeInternalArrayConstructorDescriptor(isolate, descriptor, -1); + InitializeInternalArrayConstructorDescriptor(descriptor, -1); } void StoreGlobalStub::InitializeInterfaceDescriptor( - Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { static Register registers[] = { a1, a2, a0 }; descriptor->register_param_count_ = 3; @@ -347,7 +320,6 @@ void StoreGlobalStub::InitializeInterfaceDescriptor( void ElementsTransitionAndStoreStub::InitializeInterfaceDescriptor( - Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { static Register registers[] = { a0, a3, a1, a2 }; descriptor->register_param_count_ = 4; @@ -358,19 +330,17 @@ void ElementsTransitionAndStoreStub::InitializeInterfaceDescriptor( void BinaryOpICStub::InitializeInterfaceDescriptor( - Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { static Register registers[] = { a1, a0 }; descriptor->register_param_count_ = 2; descriptor->register_params_ = registers; descriptor->deoptimization_handler_ = FUNCTION_ADDR(BinaryOpIC_Miss); descriptor->SetMissHandler( - ExternalReference(IC_Utility(IC::kBinaryOpIC_Miss), isolate)); + ExternalReference(IC_Utility(IC::kBinaryOpIC_Miss), isolate())); } void BinaryOpWithAllocationSiteStub::InitializeInterfaceDescriptor( - Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { static Register registers[] = { a2, a1, a0 }; descriptor->register_param_count_ = 3; @@ -381,7 +351,6 @@ void BinaryOpWithAllocationSiteStub::InitializeInterfaceDescriptor( void StringAddStub::InitializeInterfaceDescriptor( - Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { static Register registers[] = { a1, a0 }; descriptor->register_param_count_ = 2; @@ -496,7 +465,7 @@ void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) { // Update the static counter each time a new code stub is generated. isolate()->counters()->code_stubs()->Increment(); - CodeStubInterfaceDescriptor* descriptor = GetInterfaceDescriptor(isolate()); + CodeStubInterfaceDescriptor* descriptor = GetInterfaceDescriptor(); int param_count = descriptor->register_param_count_; { // Call the runtime system in a fresh internal frame. @@ -764,8 +733,8 @@ void WriteInt32ToHeapNumberStub::GenerateFixedRegStubsAheadOfTime( Isolate* isolate) { WriteInt32ToHeapNumberStub stub1(isolate, a1, v0, a2, a3); WriteInt32ToHeapNumberStub stub2(isolate, a2, v0, a3, a0); - stub1.GetCode(isolate); - stub2.GetCode(isolate); + stub1.GetCode(); + stub2.GetCode(); } @@ -1568,20 +1537,20 @@ void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) { void StoreRegistersStateStub::GenerateAheadOfTime( Isolate* isolate) { StoreRegistersStateStub stub1(isolate, kDontSaveFPRegs); - stub1.GetCode(isolate); + stub1.GetCode(); // Hydrogen code stubs need stub2 at snapshot time. StoreRegistersStateStub stub2(isolate, kSaveFPRegs); - stub2.GetCode(isolate); + stub2.GetCode(); } void RestoreRegistersStateStub::GenerateAheadOfTime( Isolate* isolate) { RestoreRegistersStateStub stub1(isolate, kDontSaveFPRegs); - stub1.GetCode(isolate); + stub1.GetCode(); // Hydrogen code stubs need stub2 at snapshot time. RestoreRegistersStateStub stub2(isolate, kSaveFPRegs); - stub2.GetCode(isolate); + stub2.GetCode(); } @@ -1593,12 +1562,12 @@ void CodeStub::GenerateFPStubs(Isolate* isolate) { // regenerate, which would lead to code stub initialization state being messed // up. Code* save_doubles_code; - if (!save_doubles.FindCodeInCache(&save_doubles_code, isolate)) { - save_doubles_code = *save_doubles.GetCode(isolate); + if (!save_doubles.FindCodeInCache(&save_doubles_code)) { + save_doubles_code = *save_doubles.GetCode(); } Code* store_buffer_overflow_code; - if (!stub.FindCodeInCache(&store_buffer_overflow_code, isolate)) { - store_buffer_overflow_code = *stub.GetCode(isolate); + if (!stub.FindCodeInCache(&store_buffer_overflow_code)) { + store_buffer_overflow_code = *stub.GetCode(); } isolate->set_fp_stubs_generated(true); } @@ -1606,7 +1575,7 @@ void CodeStub::GenerateFPStubs(Isolate* isolate) { void CEntryStub::GenerateAheadOfTime(Isolate* isolate) { CEntryStub stub(isolate, 1, kDontSaveFPRegs); - stub.GetCode(isolate); + stub.GetCode(); } @@ -4062,7 +4031,7 @@ void ICCompareStub::GenerateNumbers(MacroAssembler* masm) { __ bind(&generic_stub); ICCompareStub stub(isolate(), op_, CompareIC::GENERIC, CompareIC::GENERIC, CompareIC::GENERIC); - __ Jump(stub.GetCode(isolate()), RelocInfo::CODE_TARGET); + __ Jump(stub.GetCode(), RelocInfo::CODE_TARGET); __ bind(&maybe_undefined1); if (Token::IsOrderedRelationalCompareOp(op_)) { @@ -4341,7 +4310,7 @@ void DirectCEntryStub::Generate(MacroAssembler* masm) { void DirectCEntryStub::GenerateCall(MacroAssembler* masm, Register target) { intptr_t loc = - reinterpret_cast(GetCode(isolate()).location()); + reinterpret_cast(GetCode().location()); __ Move(t9, target); __ li(ra, Operand(loc, RelocInfo::CODE_TARGET), CONSTANT_SIZE); __ Call(ra); @@ -4604,10 +4573,10 @@ void NameDictionaryLookupStub::Generate(MacroAssembler* masm) { void StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime( Isolate* isolate) { StoreBufferOverflowStub stub1(isolate, kDontSaveFPRegs); - stub1.GetCode(isolate); + stub1.GetCode(); // Hydrogen code stubs need stub2 at snapshot time. StoreBufferOverflowStub stub2(isolate, kSaveFPRegs); - stub2.GetCode(isolate); + stub2.GetCode(); } @@ -4874,7 +4843,7 @@ void StoreArrayLiteralElementStub::Generate(MacroAssembler* masm) { void StubFailureTrampolineStub::Generate(MacroAssembler* masm) { CEntryStub ces(isolate(), 1, fp_registers_ ? kSaveFPRegs : kDontSaveFPRegs); - __ Call(ces.GetCode(isolate()), RelocInfo::CODE_TARGET); + __ Call(ces.GetCode(), RelocInfo::CODE_TARGET); int parameter_count_offset = StubFailureTrampolineFrame::kCallerStackParameterCountFrameOffset; __ lw(a1, MemOperand(fp, parameter_count_offset)); @@ -5067,10 +5036,10 @@ static void ArrayConstructorStubAheadOfTimeHelper(Isolate* isolate) { for (int i = 0; i <= to_index; ++i) { ElementsKind kind = GetFastElementsKindFromSequenceIndex(i); T stub(isolate, kind); - stub.GetCode(isolate); + stub.GetCode(); if (AllocationSite::GetMode(kind) != DONT_TRACK_ALLOCATION_SITE) { T stub1(isolate, kind, DISABLE_ALLOCATION_SITES); - stub1.GetCode(isolate); + stub1.GetCode(); } } } @@ -5092,11 +5061,11 @@ void InternalArrayConstructorStubBase::GenerateStubsAheadOfTime( for (int i = 0; i < 2; i++) { // For internal arrays we only need a few things. InternalArrayNoArgumentConstructorStub stubh1(isolate, kinds[i]); - stubh1.GetCode(isolate); + stubh1.GetCode(); InternalArraySingleArgumentConstructorStub stubh2(isolate, kinds[i]); - stubh2.GetCode(isolate); + stubh2.GetCode(); InternalArrayNArgumentsConstructorStub stubh3(isolate, kinds[i]); - stubh3.GetCode(isolate); + stubh3.GetCode(); } } diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc index 425324e..8a1008d 100644 --- a/src/mips/full-codegen-mips.cc +++ b/src/mips/full-codegen-mips.cc @@ -2364,7 +2364,7 @@ void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr, __ bind(&stub_call); BinaryOpICStub stub(isolate(), op, mode); - CallIC(stub.GetCode(isolate()), expr->BinaryOperationFeedbackId()); + CallIC(stub.GetCode(), expr->BinaryOperationFeedbackId()); patch_site.EmitPatchInfo(); __ jmp(&done); @@ -2443,7 +2443,7 @@ void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, __ pop(a1); BinaryOpICStub stub(isolate(), op, mode); JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. - CallIC(stub.GetCode(isolate()), expr->BinaryOperationFeedbackId()); + CallIC(stub.GetCode(), expr->BinaryOperationFeedbackId()); patch_site.EmitPatchInfo(); context()->Plug(v0); } @@ -2957,7 +2957,7 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) { __ li(a3, Operand(Smi::FromInt(expr->CallNewFeedbackSlot()))); CallConstructStub stub(isolate(), RECORD_CALL_TARGET); - __ Call(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL); + __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); PrepareForBailoutForId(expr->ReturnId(), TOS_REG); context()->Plug(v0); } @@ -4467,7 +4467,7 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { SetSourcePosition(expr->position()); BinaryOpICStub stub(isolate(), Token::ADD, NO_OVERWRITE); - CallIC(stub.GetCode(isolate()), expr->CountBinOpFeedbackId()); + CallIC(stub.GetCode(), expr->CountBinOpFeedbackId()); patch_site.EmitPatchInfo(); __ bind(&done); diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc index b8d1d3c..bb9134a 100644 --- a/src/mips/lithium-codegen-mips.cc +++ b/src/mips/lithium-codegen-mips.cc @@ -1047,17 +1047,17 @@ void LCodeGen::DoCallStub(LCallStub* instr) { switch (instr->hydrogen()->major_key()) { case CodeStub::RegExpExec: { RegExpExecStub stub(isolate()); - CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); + CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); break; } case CodeStub::SubString: { SubStringStub stub(isolate()); - CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); + CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); break; } case CodeStub::StringCompare: { StringCompareStub stub(isolate()); - CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); + CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); break; } default: @@ -2012,7 +2012,7 @@ void LCodeGen::DoArithmeticT(LArithmeticT* instr) { ASSERT(ToRegister(instr->result()).is(v0)); BinaryOpICStub stub(isolate(), instr->op(), NO_OVERWRITE); - CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); + CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); // Other arch use a nop here, to signal that there is no inlined // patchable code. Mips does not need the nop, since our marker // instruction (andi zero_reg) will never be used in normal code. @@ -2654,7 +2654,7 @@ void LCodeGen::DoInstanceOf(LInstanceOf* instr) { ASSERT(result.is(v0)); InstanceofStub stub(isolate(), InstanceofStub::kArgsInRegisters); - CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); + CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); __ Branch(&true_label, eq, result, Operand(zero_reg)); __ li(result, Operand(factory()->false_value())); @@ -2774,7 +2774,7 @@ void LCodeGen::DoDeferredInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr, __ li(temp, Operand(delta * kPointerSize), CONSTANT_SIZE); __ StoreToSafepointRegisterSlot(temp, temp); } - CallCodeGeneric(stub.GetCode(isolate()), + CallCodeGeneric(stub.GetCode(), RelocInfo::CODE_TARGET, instr, RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); @@ -3969,7 +3969,7 @@ void LCodeGen::DoCallFunction(LCallFunction* instr) { int arity = instr->arity(); CallFunctionStub stub(isolate(), arity, instr->hydrogen()->function_flags()); - CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); + CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); } @@ -3982,7 +3982,7 @@ void LCodeGen::DoCallNew(LCallNew* instr) { // No cell in a2 for construct type feedback in optimized code __ LoadRoot(a2, Heap::kUndefinedValueRootIndex); CallConstructStub stub(isolate(), NO_CALL_FUNCTION_FLAGS); - CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); + CallCode(stub.GetCode(), RelocInfo::CONSTRUCT_CALL, instr); } @@ -4001,7 +4001,7 @@ void LCodeGen::DoCallNewArray(LCallNewArray* instr) { if (instr->arity() == 0) { ArrayNoArgumentConstructorStub stub(isolate(), kind, override_mode); - CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); + CallCode(stub.GetCode(), RelocInfo::CONSTRUCT_CALL, instr); } else if (instr->arity() == 1) { Label done; if (IsFastPackedElementsKind(kind)) { @@ -4015,17 +4015,17 @@ void LCodeGen::DoCallNewArray(LCallNewArray* instr) { ArraySingleArgumentConstructorStub stub(isolate(), holey_kind, override_mode); - CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); + CallCode(stub.GetCode(), RelocInfo::CONSTRUCT_CALL, instr); __ jmp(&done); __ bind(&packed_case); } ArraySingleArgumentConstructorStub stub(isolate(), kind, override_mode); - CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); + CallCode(stub.GetCode(), RelocInfo::CONSTRUCT_CALL, instr); __ bind(&done); } else { ArrayNArgumentsConstructorStub stub(isolate(), kind, override_mode); - CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); + CallCode(stub.GetCode(), RelocInfo::CONSTRUCT_CALL, instr); } } @@ -4459,7 +4459,7 @@ void LCodeGen::DoStringAdd(LStringAdd* instr) { StringAddStub stub(isolate(), instr->hydrogen()->flags(), instr->hydrogen()->pretenure_flag()); - CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); + CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); } @@ -5459,7 +5459,7 @@ void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { instr->hydrogen()->strict_mode(), instr->hydrogen()->is_generator()); __ li(a2, Operand(instr->hydrogen()->shared_info())); - CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); + CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); } else { __ li(a2, Operand(instr->hydrogen()->shared_info())); __ li(a1, Operand(pretenure ? factory()->true_value() diff --git a/src/mips/lithium-mips.cc b/src/mips/lithium-mips.cc index 0bfe7d2..886d941 100644 --- a/src/mips/lithium-mips.cc +++ b/src/mips/lithium-mips.cc @@ -2365,7 +2365,7 @@ LInstruction* LChunkBuilder::DoParameter(HParameter* instr) { } else { ASSERT(info()->IsStub()); CodeStubInterfaceDescriptor* descriptor = - info()->code_stub()->GetInterfaceDescriptor(info()->isolate()); + info()->code_stub()->GetInterfaceDescriptor(); int index = static_cast(instr->index()); Register reg = descriptor->GetParameterRegister(index); return DefineFixed(result, reg); diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc index 4e297a6..8cdd19d 100644 --- a/src/mips/macro-assembler-mips.cc +++ b/src/mips/macro-assembler-mips.cc @@ -2695,7 +2695,7 @@ void MacroAssembler::DebugBreak() { PrepareCEntryFunction(ExternalReference(Runtime::kDebugBreak, isolate())); CEntryStub ces(isolate(), 1); ASSERT(AllowThisStubCall(&ces)); - Call(ces.GetCode(isolate()), RelocInfo::DEBUG_BREAK); + Call(ces.GetCode(), RelocInfo::DEBUG_BREAK); } #endif // ENABLE_DEBUGGER_SUPPORT @@ -3894,7 +3894,7 @@ void MacroAssembler::CallStub(CodeStub* stub, const Operand& r2, BranchDelaySlot bd) { ASSERT(AllowThisStubCall(stub)); // Stub calls are not allowed in some stubs. - Call(stub->GetCode(isolate()), RelocInfo::CODE_TARGET, ast_id, + Call(stub->GetCode(), RelocInfo::CODE_TARGET, ast_id, cond, r1, r2, bd); } @@ -3904,7 +3904,7 @@ void MacroAssembler::TailCallStub(CodeStub* stub, Register r1, const Operand& r2, BranchDelaySlot bd) { - Jump(stub->GetCode(isolate()), RelocInfo::CODE_TARGET, cond, r1, r2, bd); + Jump(stub->GetCode(), RelocInfo::CODE_TARGET, cond, r1, r2, bd); } @@ -4259,7 +4259,7 @@ void MacroAssembler::JumpToExternalReference(const ExternalReference& builtin, BranchDelaySlot bd) { PrepareCEntryFunction(builtin); CEntryStub stub(isolate(), 1); - Jump(stub.GetCode(isolate()), + Jump(stub.GetCode(), RelocInfo::CODE_TARGET, al, zero_reg, diff --git a/src/mips/stub-cache-mips.cc b/src/mips/stub-cache-mips.cc index 721fc87..db926b3 100644 --- a/src/mips/stub-cache-mips.cc +++ b/src/mips/stub-cache-mips.cc @@ -1028,13 +1028,13 @@ void LoadStubCompiler::GenerateLoadField(Register reg, field.is_inobject(holder), field.translate(holder), representation); - GenerateTailCall(masm(), stub.GetCode(isolate())); + GenerateTailCall(masm(), stub.GetCode()); } else { KeyedLoadFieldStub stub(isolate(), field.is_inobject(holder), field.translate(holder), representation); - GenerateTailCall(masm(), stub.GetCode(isolate())); + GenerateTailCall(masm(), stub.GetCode()); } } diff --git a/test/cctest/test-code-stubs-mips.cc b/test/cctest/test-code-stubs-mips.cc index cf43a5c..f889796 100644 --- a/test/cctest/test-code-stubs-mips.cc +++ b/test/cctest/test-code-stubs-mips.cc @@ -57,7 +57,7 @@ ConvertDToIFunc MakeConvertDToIFuncTrampoline(Isolate* isolate, DoubleToIStub stub(isolate, source_reg, destination_reg, 0, true, inline_fastpath); - byte* start = stub.GetCode(isolate)->instruction_start(); + byte* start = stub.GetCode()->instruction_start(); Label done; // Save callee save registers. -- 2.7.4