| Index: src/ia32/code-stubs-ia32.cc
|
| diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc
|
| index 39cb3b833e5c82f717154b321fdca6083f39adb9..fe1c71dd9ad8a57ffeaf06f519da82771ff3def6 100644
|
| --- a/src/ia32/code-stubs-ia32.cc
|
| +++ b/src/ia32/code-stubs-ia32.cc
|
| @@ -44,7 +44,6 @@ namespace internal {
|
|
|
|
|
| void FastNewClosureStub::InitializeInterfaceDescriptor(
|
| - Isolate* isolate,
|
| CodeStubInterfaceDescriptor* descriptor) {
|
| static Register registers[] = { ebx };
|
| descriptor->register_param_count_ = 1;
|
| @@ -55,7 +54,6 @@ void FastNewClosureStub::InitializeInterfaceDescriptor(
|
|
|
|
|
| void FastNewContextStub::InitializeInterfaceDescriptor(
|
| - Isolate* isolate,
|
| CodeStubInterfaceDescriptor* descriptor) {
|
| static Register registers[] = { edi };
|
| descriptor->register_param_count_ = 1;
|
| @@ -65,7 +63,6 @@ void FastNewContextStub::InitializeInterfaceDescriptor(
|
|
|
|
|
| void ToNumberStub::InitializeInterfaceDescriptor(
|
| - Isolate* isolate,
|
| CodeStubInterfaceDescriptor* descriptor) {
|
| static Register registers[] = { eax };
|
| descriptor->register_param_count_ = 1;
|
| @@ -75,7 +72,6 @@ void ToNumberStub::InitializeInterfaceDescriptor(
|
|
|
|
|
| void NumberToStringStub::InitializeInterfaceDescriptor(
|
| - Isolate* isolate,
|
| CodeStubInterfaceDescriptor* descriptor) {
|
| static Register registers[] = { eax };
|
| descriptor->register_param_count_ = 1;
|
| @@ -86,7 +82,6 @@ void NumberToStringStub::InitializeInterfaceDescriptor(
|
|
|
|
|
| void FastCloneShallowArrayStub::InitializeInterfaceDescriptor(
|
| - Isolate* isolate,
|
| CodeStubInterfaceDescriptor* descriptor) {
|
| static Register registers[] = { eax, ebx, ecx };
|
| descriptor->register_param_count_ = 3;
|
| @@ -98,7 +93,6 @@ void FastCloneShallowArrayStub::InitializeInterfaceDescriptor(
|
|
|
|
|
| void FastCloneShallowObjectStub::InitializeInterfaceDescriptor(
|
| - Isolate* isolate,
|
| CodeStubInterfaceDescriptor* descriptor) {
|
| static Register registers[] = { eax, ebx, ecx, edx };
|
| descriptor->register_param_count_ = 4;
|
| @@ -109,7 +103,6 @@ void FastCloneShallowObjectStub::InitializeInterfaceDescriptor(
|
|
|
|
|
| void CreateAllocationSiteStub::InitializeInterfaceDescriptor(
|
| - Isolate* isolate,
|
| CodeStubInterfaceDescriptor* descriptor) {
|
| static Register registers[] = { ebx, edx };
|
| descriptor->register_param_count_ = 2;
|
| @@ -119,7 +112,6 @@ void CreateAllocationSiteStub::InitializeInterfaceDescriptor(
|
|
|
|
|
| void KeyedLoadFastElementStub::InitializeInterfaceDescriptor(
|
| - Isolate* isolate,
|
| CodeStubInterfaceDescriptor* descriptor) {
|
| static Register registers[] = { edx, ecx };
|
| descriptor->register_param_count_ = 2;
|
| @@ -130,7 +122,6 @@ void KeyedLoadFastElementStub::InitializeInterfaceDescriptor(
|
|
|
|
|
| void KeyedLoadDictionaryElementStub::InitializeInterfaceDescriptor(
|
| - Isolate* isolate,
|
| CodeStubInterfaceDescriptor* descriptor) {
|
| static Register registers[] = { edx, ecx };
|
| descriptor->register_param_count_ = 2;
|
| @@ -141,7 +132,6 @@ void KeyedLoadDictionaryElementStub::InitializeInterfaceDescriptor(
|
|
|
|
|
| void RegExpConstructResultStub::InitializeInterfaceDescriptor(
|
| - Isolate* isolate,
|
| CodeStubInterfaceDescriptor* descriptor) {
|
| static Register registers[] = { ecx, ebx, eax };
|
| descriptor->register_param_count_ = 3;
|
| @@ -152,7 +142,6 @@ void RegExpConstructResultStub::InitializeInterfaceDescriptor(
|
|
|
|
|
| void LoadFieldStub::InitializeInterfaceDescriptor(
|
| - Isolate* isolate,
|
| CodeStubInterfaceDescriptor* descriptor) {
|
| static Register registers[] = { edx };
|
| descriptor->register_param_count_ = 1;
|
| @@ -162,7 +151,6 @@ void LoadFieldStub::InitializeInterfaceDescriptor(
|
|
|
|
|
| void KeyedLoadFieldStub::InitializeInterfaceDescriptor(
|
| - Isolate* isolate,
|
| CodeStubInterfaceDescriptor* descriptor) {
|
| static Register registers[] = { edx };
|
| descriptor->register_param_count_ = 1;
|
| @@ -172,7 +160,6 @@ void KeyedLoadFieldStub::InitializeInterfaceDescriptor(
|
|
|
|
|
| void StringLengthStub::InitializeInterfaceDescriptor(
|
| - Isolate* isolate,
|
| CodeStubInterfaceDescriptor* descriptor) {
|
| static Register registers[] = { edx, ecx };
|
| descriptor->register_param_count_ = 2;
|
| @@ -182,7 +169,6 @@ void StringLengthStub::InitializeInterfaceDescriptor(
|
|
|
|
|
| void KeyedStringLengthStub::InitializeInterfaceDescriptor(
|
| - Isolate* isolate,
|
| CodeStubInterfaceDescriptor* descriptor) {
|
| static Register registers[] = { edx, ecx };
|
| descriptor->register_param_count_ = 2;
|
| @@ -192,7 +178,6 @@ void KeyedStringLengthStub::InitializeInterfaceDescriptor(
|
|
|
|
|
| void KeyedStoreFastElementStub::InitializeInterfaceDescriptor(
|
| - Isolate* isolate,
|
| CodeStubInterfaceDescriptor* descriptor) {
|
| static Register registers[] = { edx, ecx, eax };
|
| descriptor->register_param_count_ = 3;
|
| @@ -203,7 +188,6 @@ void KeyedStoreFastElementStub::InitializeInterfaceDescriptor(
|
|
|
|
|
| void TransitionElementsKindStub::InitializeInterfaceDescriptor(
|
| - Isolate* isolate,
|
| CodeStubInterfaceDescriptor* descriptor) {
|
| static Register registers[] = { eax, ebx };
|
| descriptor->register_param_count_ = 2;
|
| @@ -243,7 +227,6 @@ static void InitializeArrayConstructorDescriptor(
|
|
|
|
|
| static void InitializeInternalArrayConstructorDescriptor(
|
| - Isolate* isolate,
|
| CodeStubInterfaceDescriptor* descriptor,
|
| int constant_stack_parameter_count) {
|
| // register state
|
| @@ -271,49 +254,42 @@ static void InitializeInternalArrayConstructorDescriptor(
|
|
|
|
|
| void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor(
|
| - Isolate* isolate,
|
| CodeStubInterfaceDescriptor* descriptor) {
|
| - InitializeArrayConstructorDescriptor(isolate, descriptor, 0);
|
| + InitializeArrayConstructorDescriptor(isolate(), descriptor, 0);
|
| }
|
|
|
|
|
| void ArraySingleArgumentConstructorStub::InitializeInterfaceDescriptor(
|
| - Isolate* isolate,
|
| CodeStubInterfaceDescriptor* descriptor) {
|
| - InitializeArrayConstructorDescriptor(isolate, descriptor, 1);
|
| + InitializeArrayConstructorDescriptor(isolate(), descriptor, 1);
|
| }
|
|
|
|
|
| void ArrayNArgumentsConstructorStub::InitializeInterfaceDescriptor(
|
| - Isolate* isolate,
|
| CodeStubInterfaceDescriptor* descriptor) {
|
| - InitializeArrayConstructorDescriptor(isolate, descriptor, -1);
|
| + InitializeArrayConstructorDescriptor(isolate(), descriptor, -1);
|
| }
|
|
|
|
|
| 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 CompareNilICStub::InitializeInterfaceDescriptor(
|
| - Isolate* isolate,
|
| CodeStubInterfaceDescriptor* descriptor) {
|
| static Register registers[] = { eax };
|
| descriptor->register_param_count_ = 1;
|
| @@ -321,11 +297,10 @@ 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()));
|
| }
|
|
|
| void ToBooleanStub::InitializeInterfaceDescriptor(
|
| - Isolate* isolate,
|
| CodeStubInterfaceDescriptor* descriptor) {
|
| static Register registers[] = { eax };
|
| descriptor->register_param_count_ = 1;
|
| @@ -333,12 +308,11 @@ 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 StoreGlobalStub::InitializeInterfaceDescriptor(
|
| - Isolate* isolate,
|
| CodeStubInterfaceDescriptor* descriptor) {
|
| static Register registers[] = { edx, ecx, eax };
|
| descriptor->register_param_count_ = 3;
|
| @@ -349,7 +323,6 @@ void StoreGlobalStub::InitializeInterfaceDescriptor(
|
|
|
|
|
| void ElementsTransitionAndStoreStub::InitializeInterfaceDescriptor(
|
| - Isolate* isolate,
|
| CodeStubInterfaceDescriptor* descriptor) {
|
| static Register registers[] = { eax, ebx, ecx, edx };
|
| descriptor->register_param_count_ = 4;
|
| @@ -360,19 +333,17 @@ void ElementsTransitionAndStoreStub::InitializeInterfaceDescriptor(
|
|
|
|
|
| void BinaryOpICStub::InitializeInterfaceDescriptor(
|
| - Isolate* isolate,
|
| CodeStubInterfaceDescriptor* descriptor) {
|
| static Register registers[] = { edx, eax };
|
| 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[] = { ecx, edx, eax };
|
| descriptor->register_param_count_ = 3;
|
| @@ -383,7 +354,6 @@ void BinaryOpWithAllocationSiteStub::InitializeInterfaceDescriptor(
|
|
|
|
|
| void StringAddStub::InitializeInterfaceDescriptor(
|
| - Isolate* isolate,
|
| CodeStubInterfaceDescriptor* descriptor) {
|
| static Register registers[] = { edx, eax };
|
| descriptor->register_param_count_ = 2;
|
| @@ -484,7 +454,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.
|
| @@ -2563,8 +2533,8 @@ void CodeStub::GenerateFPStubs(Isolate* isolate) {
|
| // Stubs might already be in the snapshot, detect that and don't 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());
|
| }
|
| isolate->set_fp_stubs_generated(true);
|
| }
|
| @@ -2573,7 +2543,7 @@ void CodeStub::GenerateFPStubs(Isolate* isolate) {
|
|
|
| void CEntryStub::GenerateAheadOfTime(Isolate* isolate) {
|
| CEntryStub stub(isolate, 1, kDontSaveFPRegs);
|
| - stub.GetCode(isolate);
|
| + stub.GetCode();
|
| }
|
|
|
|
|
| @@ -3778,7 +3748,7 @@ void ICCompareStub::GenerateNumbers(MacroAssembler* masm) {
|
| __ bind(&generic_stub);
|
| ICCompareStub stub(isolate(), op_, CompareIC::GENERIC, CompareIC::GENERIC,
|
| CompareIC::GENERIC);
|
| - __ jmp(stub.GetCode(isolate()), RelocInfo::CODE_TARGET);
|
| + __ jmp(stub.GetCode(), RelocInfo::CODE_TARGET);
|
|
|
| __ bind(&maybe_undefined1);
|
| if (Token::IsOrderedRelationalCompareOp(op_)) {
|
| @@ -4263,10 +4233,10 @@ void NameDictionaryLookupStub::Generate(MacroAssembler* masm) {
|
| void StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(
|
| Isolate* isolate) {
|
| StoreBufferOverflowStub stub(isolate, kDontSaveFPRegs);
|
| - stub.GetCode(isolate);
|
| + stub.GetCode();
|
| if (CpuFeatures::IsSafeForSnapshot(SSE2)) {
|
| StoreBufferOverflowStub stub2(isolate, kSaveFPRegs);
|
| - stub2.GetCode(isolate);
|
| + stub2.GetCode();
|
| }
|
| }
|
|
|
| @@ -4557,7 +4527,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;
|
| __ mov(ebx, MemOperand(ebp, parameter_count_offset));
|
| @@ -4728,10 +4698,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();
|
| }
|
| }
|
| }
|
| @@ -4753,11 +4723,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();
|
| }
|
| }
|
|
|
|
|