From: mvstanton@chromium.org Date: Mon, 23 Jun 2014 14:28:38 +0000 (+0000) Subject: Revert "Create a RegisterSpec class inside of the IC that provides:" X-Git-Tag: upstream/4.7.83~8595 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=41e2dc70636d65db16c0968bd3941471916afff3;p=platform%2Fupstream%2Fv8.git Revert "Create a RegisterSpec class inside of the IC that provides:" This reverts commit r21939 due to a static initializer issue. TBR=marja@chromium.org Review URL: https://codereview.chromium.org/339663008 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21943 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc index 2339a60..033413b 100644 --- a/src/arm/code-stubs-arm.cc +++ b/src/arm/code-stubs-arm.cc @@ -88,6 +88,26 @@ void CreateAllocationSiteStub::InitializeInterfaceDescriptor( } +void KeyedLoadFastElementStub::InitializeInterfaceDescriptor( + CodeStubInterfaceDescriptor* descriptor) { + static Register registers[] = { r1, r0 }; + descriptor->register_param_count_ = 2; + descriptor->register_params_ = registers; + descriptor->deoptimization_handler_ = + FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure); +} + + +void KeyedLoadDictionaryElementStub::InitializeInterfaceDescriptor( + CodeStubInterfaceDescriptor* descriptor) { + static Register registers[] = { r1, r0 }; + descriptor->register_param_count_ = 2; + descriptor->register_params_ = registers; + descriptor->deoptimization_handler_ = + FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure); +} + + void RegExpConstructResultStub::InitializeInterfaceDescriptor( CodeStubInterfaceDescriptor* descriptor) { static Register registers[] = { r2, r1, r0 }; @@ -98,6 +118,16 @@ void RegExpConstructResultStub::InitializeInterfaceDescriptor( } +void KeyedLoadGenericElementStub::InitializeInterfaceDescriptor( + CodeStubInterfaceDescriptor* descriptor) { + static Register registers[] = { r1, r0 }; + descriptor->register_param_count_ = 2; + descriptor->register_params_ = registers; + descriptor->deoptimization_handler_ = + Runtime::FunctionForId(Runtime::kKeyedGetProperty)->entry; +} + + void LoadFieldStub::InitializeInterfaceDescriptor( CodeStubInterfaceDescriptor* descriptor) { static Register registers[] = { r0 }; diff --git a/src/arm/ic-arm.cc b/src/arm/ic-arm.cc index 3596bfb..1028f8f 100644 --- a/src/arm/ic-arm.cc +++ b/src/arm/ic-arm.cc @@ -545,17 +545,6 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { } -// IC register specifications -Register LoadIC::kReceiverRegister = r0; -Register LoadIC::kNameRegister = r2; -const Register LoadIC::registers[] = { kReceiverRegister, kNameRegister }; - - -Register KeyedLoadIC::kReceiverRegister = r1; -Register KeyedLoadIC::kNameRegister = r0; -const Register KeyedLoadIC::registers[] = { kReceiverRegister, kNameRegister }; - - void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { // ---------- S t a t e -------------- // -- lr : return address diff --git a/src/arm/stub-cache-arm.cc b/src/arm/stub-cache-arm.cc index 5372b06..23ee05d 100644 --- a/src/arm/stub-cache-arm.cc +++ b/src/arm/stub-cache-arm.cc @@ -1263,18 +1263,14 @@ Handle LoadStubCompiler::CompileLoadNonexistent(Handle type, Register* LoadStubCompiler::registers() { // receiver, name, scratch1, scratch2, scratch3, scratch4. - Register receiver = LoadIC::kReceiverRegister; - Register name = LoadIC::kNameRegister; - static Register registers[] = { receiver, name, r3, r1, r4, r5 }; + static Register registers[] = { r0, r2, r3, r1, r4, r5 }; return registers; } Register* KeyedLoadStubCompiler::registers() { // receiver, name, scratch1, scratch2, scratch3, scratch4. - Register receiver = KeyedLoadIC::kReceiverRegister; - Register name = KeyedLoadIC::kNameRegister; - static Register registers[] = { receiver, name, r2, r3, r4, r5 }; + static Register registers[] = { r1, r0, r2, r3, r4, r5 }; return registers; } diff --git a/src/arm64/code-stubs-arm64.cc b/src/arm64/code-stubs-arm64.cc index decf0b0..70ead44 100644 --- a/src/arm64/code-stubs-arm64.cc +++ b/src/arm64/code-stubs-arm64.cc @@ -101,6 +101,40 @@ void CreateAllocationSiteStub::InitializeInterfaceDescriptor( } +void KeyedLoadGenericElementStub::InitializeInterfaceDescriptor( + CodeStubInterfaceDescriptor* descriptor) { + static Register registers[] = { x1, x0 }; + descriptor->register_param_count_ = 2; + descriptor->register_params_ = registers; + descriptor->deoptimization_handler_ = + Runtime::FunctionForId(Runtime::kKeyedGetProperty)->entry; +} + + +void KeyedLoadFastElementStub::InitializeInterfaceDescriptor( + CodeStubInterfaceDescriptor* descriptor) { + // x1: receiver + // x0: key + static Register registers[] = { x1, x0 }; + descriptor->register_param_count_ = sizeof(registers) / sizeof(registers[0]); + descriptor->register_params_ = registers; + descriptor->deoptimization_handler_ = + FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure); +} + + +void KeyedLoadDictionaryElementStub::InitializeInterfaceDescriptor( + CodeStubInterfaceDescriptor* descriptor) { + // x1: receiver + // x0: key + static Register registers[] = { x1, x0 }; + descriptor->register_param_count_ = sizeof(registers) / sizeof(registers[0]); + descriptor->register_params_ = registers; + descriptor->deoptimization_handler_ = + FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure); +} + + void RegExpConstructResultStub::InitializeInterfaceDescriptor( CodeStubInterfaceDescriptor* descriptor) { // x2: length diff --git a/src/arm64/ic-arm64.cc b/src/arm64/ic-arm64.cc index 62a0771..842b3e7 100644 --- a/src/arm64/ic-arm64.cc +++ b/src/arm64/ic-arm64.cc @@ -582,17 +582,6 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { } -// IC register specifications -Register LoadIC::kReceiverRegister = x0; -Register LoadIC::kNameRegister = x2; -const Register LoadIC::registers[] = { kReceiverRegister, kNameRegister }; - - -Register KeyedLoadIC::kReceiverRegister = x1; -Register KeyedLoadIC::kNameRegister = x0; -const Register KeyedLoadIC::registers[] = { kReceiverRegister, kNameRegister }; - - void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { // ---------- S t a t e -------------- // -- lr : return address diff --git a/src/arm64/stub-cache-arm64.cc b/src/arm64/stub-cache-arm64.cc index 0088a4d..9311645 100644 --- a/src/arm64/stub-cache-arm64.cc +++ b/src/arm64/stub-cache-arm64.cc @@ -1245,18 +1245,14 @@ Handle LoadStubCompiler::CompileLoadNonexistent(Handle type, Register* LoadStubCompiler::registers() { // receiver, name, scratch1, scratch2, scratch3, scratch4. - Register receiver = LoadIC::kReceiverRegister; - Register name = LoadIC::kNameRegister; - static Register registers[] = { receiver, name, x3, x1, x4, x5 }; + static Register registers[] = { x0, x2, x3, x1, x4, x5 }; return registers; } Register* KeyedLoadStubCompiler::registers() { - // receiver, name, scratch1, scratch2, scratch3, scratch4. - Register receiver = KeyedLoadIC::kReceiverRegister; - Register name = KeyedLoadIC::kNameRegister; - static Register registers[] = { receiver, name, x2, x3, x4, x5 }; + // receiver, name/key, scratch1, scratch2, scratch3, scratch4. + static Register registers[] = { x1, x0, x2, x3, x4, x5 }; return registers; } diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc index e3c8c14..8342f9f 100644 --- a/src/code-stubs-hydrogen.cc +++ b/src/code-stubs-hydrogen.cc @@ -539,14 +539,9 @@ Handle CreateAllocationSiteStub::GenerateCode() { template <> HValue* CodeStubGraphBuilder::BuildCodeStub() { HInstruction* load = BuildUncheckedMonomorphicElementAccess( - GetParameter(KeyedLoadIC::kReceiverIndex), - GetParameter(KeyedLoadIC::kNameIndex), - NULL, - casted_stub()->is_js_array(), - casted_stub()->elements_kind(), - LOAD, - NEVER_RETURN_HOLE, - STANDARD_STORE); + GetParameter(0), GetParameter(1), NULL, + casted_stub()->is_js_array(), casted_stub()->elements_kind(), + LOAD, NEVER_RETURN_HOLE, STANDARD_STORE); return load; } @@ -1376,8 +1371,8 @@ Handle FastNewContextStub::GenerateCode() { template<> HValue* CodeStubGraphBuilder::BuildCodeStub() { - HValue* receiver = GetParameter(KeyedLoadIC::kReceiverIndex); - HValue* key = GetParameter(KeyedLoadIC::kNameIndex); + HValue* receiver = GetParameter(0); + HValue* key = GetParameter(1); Add(key); @@ -1509,8 +1504,8 @@ void CodeStubGraphBuilder< HValue* CodeStubGraphBuilder::BuildCodeStub() { - HValue* receiver = GetParameter(KeyedLoadIC::kReceiverIndex); - HValue* key = GetParameter(KeyedLoadIC::kNameIndex); + HValue* receiver = GetParameter(0); + HValue* key = GetParameter(1); // Split into a smi/integer case and unique string case. HIfContinuation index_name_split_continuation(graph()->CreateBasicBlock(), diff --git a/src/code-stubs.cc b/src/code-stubs.cc index 4687fd8..f61035e 100644 --- a/src/code-stubs.cc +++ b/src/code-stubs.cc @@ -512,33 +512,6 @@ void JSEntryStub::FinishCode(Handle code) { } -void KeyedLoadFastElementStub::InitializeInterfaceDescriptor( - CodeStubInterfaceDescriptor* descriptor) { - descriptor->register_param_count_ = KeyedLoadIC::kRegisterArgumentCount; - descriptor->register_params_ = KeyedLoadIC::registers; - descriptor->deoptimization_handler_ = - FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure); -} - - -void KeyedLoadDictionaryElementStub::InitializeInterfaceDescriptor( - CodeStubInterfaceDescriptor* descriptor) { - descriptor->register_param_count_ = KeyedLoadIC::kRegisterArgumentCount; - descriptor->register_params_ = KeyedLoadIC::registers; - descriptor->deoptimization_handler_ = - FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure); -} - - -void KeyedLoadGenericElementStub::InitializeInterfaceDescriptor( - CodeStubInterfaceDescriptor* descriptor) { - descriptor->register_param_count_ = KeyedLoadIC::kRegisterArgumentCount; - descriptor->register_params_ = KeyedLoadIC::registers; - descriptor->deoptimization_handler_ = - Runtime::FunctionForId(Runtime::kKeyedGetProperty)->entry; -} - - void KeyedLoadDictionaryElementPlatformStub::Generate( MacroAssembler* masm) { KeyedLoadStubCompiler::GenerateLoadDictionaryElement(masm); diff --git a/src/code-stubs.h b/src/code-stubs.h index f3dd049..b243b56 100644 --- a/src/code-stubs.h +++ b/src/code-stubs.h @@ -275,7 +275,7 @@ struct CodeStubInterfaceDescriptor { // return sequence. Default value is -1, which means it is ignored. int hint_stack_parameter_count_; StubFunctionMode function_mode_; - const Register* register_params_; + Register* register_params_; // Specifies Representations for the stub's parameter. Points to an array of // Representations of the same length of the numbers of parameters to the // stub, or if NULL (the default value), Representation of each parameter diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc index e95e9c0..9a6719b 100644 --- a/src/ia32/code-stubs-ia32.cc +++ b/src/ia32/code-stubs-ia32.cc @@ -93,6 +93,26 @@ void CreateAllocationSiteStub::InitializeInterfaceDescriptor( } +void KeyedLoadFastElementStub::InitializeInterfaceDescriptor( + CodeStubInterfaceDescriptor* descriptor) { + static Register registers[] = { edx, ecx }; + descriptor->register_param_count_ = 2; + descriptor->register_params_ = registers; + descriptor->deoptimization_handler_ = + FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure); +} + + +void KeyedLoadDictionaryElementStub::InitializeInterfaceDescriptor( + CodeStubInterfaceDescriptor* descriptor) { + static Register registers[] = { edx, ecx }; + descriptor->register_param_count_ = 2; + descriptor->register_params_ = registers; + descriptor->deoptimization_handler_ = + FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure); +} + + void RegExpConstructResultStub::InitializeInterfaceDescriptor( CodeStubInterfaceDescriptor* descriptor) { static Register registers[] = { ecx, ebx, eax }; @@ -103,6 +123,16 @@ void RegExpConstructResultStub::InitializeInterfaceDescriptor( } +void KeyedLoadGenericElementStub::InitializeInterfaceDescriptor( + CodeStubInterfaceDescriptor* descriptor) { + static Register registers[] = { edx, ecx }; + descriptor->register_param_count_ = 2; + descriptor->register_params_ = registers; + descriptor->deoptimization_handler_ = + Runtime::FunctionForId(Runtime::kKeyedGetProperty)->entry; +} + + void LoadFieldStub::InitializeInterfaceDescriptor( CodeStubInterfaceDescriptor* descriptor) { static Register registers[] = { edx }; diff --git a/src/ia32/ic-ia32.cc b/src/ia32/ic-ia32.cc index c36e6a4..b0e4ca0 100644 --- a/src/ia32/ic-ia32.cc +++ b/src/ia32/ic-ia32.cc @@ -1025,17 +1025,6 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { } -// IC register specifications -Register LoadIC::kReceiverRegister = edx; -Register LoadIC::kNameRegister = ecx; -const Register LoadIC::registers[] = { kReceiverRegister, kNameRegister }; - - -Register KeyedLoadIC::kReceiverRegister = LoadIC::kReceiverRegister; -Register KeyedLoadIC::kNameRegister = LoadIC::kNameRegister; -const Register KeyedLoadIC::registers[] = { kReceiverRegister, kNameRegister }; - - void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { // ----------- S t a t e ------------- // -- ecx : key diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc index 6590488..e70e5a2 100644 --- a/src/ia32/stub-cache-ia32.cc +++ b/src/ia32/stub-cache-ia32.cc @@ -1283,18 +1283,14 @@ Handle LoadStubCompiler::CompileLoadNonexistent(Handle type, Register* LoadStubCompiler::registers() { // receiver, name, scratch1, scratch2, scratch3, scratch4. - Register receiver = LoadIC::kReceiverRegister; - Register name = LoadIC::kNameRegister; - static Register registers[] = { receiver, name, ebx, eax, edi, no_reg }; + static Register registers[] = { edx, ecx, ebx, eax, edi, no_reg }; return registers; } Register* KeyedLoadStubCompiler::registers() { // receiver, name, scratch1, scratch2, scratch3, scratch4. - Register receiver = KeyedLoadIC::kReceiverRegister; - Register name = KeyedLoadIC::kNameRegister; - static Register registers[] = { receiver, name, ebx, eax, edi, no_reg }; + static Register registers[] = { edx, ecx, ebx, eax, edi, no_reg }; return registers; } diff --git a/src/ic.h b/src/ic.h index f2a792b..3f55043 100644 --- a/src/ic.h +++ b/src/ic.h @@ -398,15 +398,6 @@ class LoadIC: public IC { class ContextualModeBits: public BitField {}; STATIC_ASSERT(static_cast(NOT_CONTEXTUAL) == 0); - enum RegisterInfo { - kReceiverIndex, - kNameIndex, - kRegisterArgumentCount - }; - static Register kReceiverRegister; - static Register kNameRegister; - static const Register registers[kRegisterArgumentCount]; - static ExtraICState ComputeExtraICState(ContextualMode contextual_mode) { return ContextualModeBits::encode(contextual_mode); } @@ -507,10 +498,6 @@ class KeyedLoadIC: public LoadIC { ASSERT(target()->is_keyed_load_stub()); } - static const Register registers[kRegisterArgumentCount]; - static Register kReceiverRegister; - static Register kNameRegister; - MUST_USE_RESULT MaybeHandle Load(Handle object, Handle key); diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc index 10359a5..0287a9a 100644 --- a/src/mips/code-stubs-mips.cc +++ b/src/mips/code-stubs-mips.cc @@ -89,6 +89,26 @@ void CreateAllocationSiteStub::InitializeInterfaceDescriptor( } +void KeyedLoadFastElementStub::InitializeInterfaceDescriptor( + CodeStubInterfaceDescriptor* descriptor) { + static Register registers[] = { a1, a0 }; + descriptor->register_param_count_ = 2; + descriptor->register_params_ = registers; + descriptor->deoptimization_handler_ = + FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure); +} + + +void KeyedLoadDictionaryElementStub::InitializeInterfaceDescriptor( + CodeStubInterfaceDescriptor* descriptor) { + static Register registers[] = {a1, a0 }; + descriptor->register_param_count_ = 2; + descriptor->register_params_ = registers; + descriptor->deoptimization_handler_ = + FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure); +} + + void RegExpConstructResultStub::InitializeInterfaceDescriptor( CodeStubInterfaceDescriptor* descriptor) { static Register registers[] = { a2, a1, a0 }; @@ -99,6 +119,16 @@ void RegExpConstructResultStub::InitializeInterfaceDescriptor( } +void KeyedLoadGenericElementStub::InitializeInterfaceDescriptor( + CodeStubInterfaceDescriptor* descriptor) { + static Register registers[] = { a1, a0 }; + descriptor->register_param_count_ = 2; + descriptor->register_params_ = registers; + descriptor->deoptimization_handler_ = + Runtime::FunctionForId(Runtime::kKeyedGetProperty)->entry; +} + + void LoadFieldStub::InitializeInterfaceDescriptor( CodeStubInterfaceDescriptor* descriptor) { static Register registers[] = { a0 }; diff --git a/src/mips/ic-mips.cc b/src/mips/ic-mips.cc index 2316933..cbf721a 100644 --- a/src/mips/ic-mips.cc +++ b/src/mips/ic-mips.cc @@ -560,17 +560,6 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { } -// IC register specifications -Register LoadIC::kReceiverRegister = a0; -Register LoadIC::kNameRegister = a2; -const Register LoadIC::registers[] = { kReceiverRegister, kNameRegister }; - - -Register KeyedLoadIC::kReceiverRegister = a1; -Register KeyedLoadIC::kNameRegister = a0; -const Register KeyedLoadIC::registers[] = { kReceiverRegister, kNameRegister }; - - void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { // ---------- S t a t e -------------- // -- ra : return address diff --git a/src/mips/stub-cache-mips.cc b/src/mips/stub-cache-mips.cc index f409fe4..d7e7b2e 100644 --- a/src/mips/stub-cache-mips.cc +++ b/src/mips/stub-cache-mips.cc @@ -1253,18 +1253,14 @@ Handle LoadStubCompiler::CompileLoadNonexistent(Handle type, Register* LoadStubCompiler::registers() { // receiver, name, scratch1, scratch2, scratch3, scratch4. - Register receiver = LoadIC::kReceiverRegister; - Register name = LoadIC::kNameRegister; - static Register registers[] = { receiver, name, a3, a1, t0, t1 }; + static Register registers[] = { a0, a2, a3, a1, t0, t1 }; return registers; } Register* KeyedLoadStubCompiler::registers() { // receiver, name, scratch1, scratch2, scratch3, scratch4. - Register receiver = KeyedLoadIC::kReceiverRegister; - Register name = KeyedLoadIC::kNameRegister; - static Register registers[] = { receiver, name, a2, a3, t0, t1 }; + static Register registers[] = { a1, a0, a2, a3, t0, t1 }; return registers; } diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc index 6ace698..0bc5739 100644 --- a/src/x64/code-stubs-x64.cc +++ b/src/x64/code-stubs-x64.cc @@ -89,6 +89,26 @@ void CreateAllocationSiteStub::InitializeInterfaceDescriptor( } +void KeyedLoadFastElementStub::InitializeInterfaceDescriptor( + CodeStubInterfaceDescriptor* descriptor) { + static Register registers[] = { rdx, rax }; + descriptor->register_param_count_ = 2; + descriptor->register_params_ = registers; + descriptor->deoptimization_handler_ = + FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure); +} + + +void KeyedLoadDictionaryElementStub::InitializeInterfaceDescriptor( + CodeStubInterfaceDescriptor* descriptor) { + static Register registers[] = { rdx, rax }; + descriptor->register_param_count_ = 2; + descriptor->register_params_ = registers; + descriptor->deoptimization_handler_ = + FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure); +} + + void RegExpConstructResultStub::InitializeInterfaceDescriptor( CodeStubInterfaceDescriptor* descriptor) { static Register registers[] = { rcx, rbx, rax }; @@ -99,6 +119,16 @@ void RegExpConstructResultStub::InitializeInterfaceDescriptor( } +void KeyedLoadGenericElementStub::InitializeInterfaceDescriptor( + CodeStubInterfaceDescriptor* descriptor) { + static Register registers[] = { rdx, rax }; + descriptor->register_param_count_ = 2; + descriptor->register_params_ = registers; + descriptor->deoptimization_handler_ = + Runtime::FunctionForId(Runtime::kKeyedGetProperty)->entry; +} + + void LoadFieldStub::InitializeInterfaceDescriptor( CodeStubInterfaceDescriptor* descriptor) { static Register registers[] = { rax }; diff --git a/src/x64/ic-x64.cc b/src/x64/ic-x64.cc index 7ad3f50..0cda1df 100644 --- a/src/x64/ic-x64.cc +++ b/src/x64/ic-x64.cc @@ -1052,17 +1052,6 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { } -// IC register specifications -Register LoadIC::kReceiverRegister = rax; -Register LoadIC::kNameRegister = rcx; -const Register LoadIC::registers[] = { kReceiverRegister, kNameRegister }; - - -Register KeyedLoadIC::kReceiverRegister = rdx; -Register KeyedLoadIC::kNameRegister = rax; -const Register KeyedLoadIC::registers[] = { kReceiverRegister, kNameRegister }; - - void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { // ----------- S t a t e ------------- // -- rax : key diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc index 7bc588f..c5af9bb 100644 --- a/src/x64/stub-cache-x64.cc +++ b/src/x64/stub-cache-x64.cc @@ -1222,18 +1222,14 @@ Handle LoadStubCompiler::CompileLoadNonexistent(Handle type, Register* LoadStubCompiler::registers() { // receiver, name, scratch1, scratch2, scratch3, scratch4. - Register receiver = LoadIC::kReceiverRegister; - Register name = LoadIC::kNameRegister; - static Register registers[] = { receiver, name, rdx, rbx, rdi, r8 }; + static Register registers[] = { rax, rcx, rdx, rbx, rdi, r8 }; return registers; } Register* KeyedLoadStubCompiler::registers() { // receiver, name, scratch1, scratch2, scratch3, scratch4. - Register receiver = KeyedLoadIC::kReceiverRegister; - Register name = KeyedLoadIC::kNameRegister; - static Register registers[] = { receiver, name, rbx, rcx, rdi, r8 }; + static Register registers[] = { rdx, rax, rbx, rcx, rdi, r8 }; return registers; } diff --git a/src/x87/code-stubs-x87.cc b/src/x87/code-stubs-x87.cc index 2ef1d9b..6c61fe7 100644 --- a/src/x87/code-stubs-x87.cc +++ b/src/x87/code-stubs-x87.cc @@ -92,6 +92,26 @@ void CreateAllocationSiteStub::InitializeInterfaceDescriptor( } +void KeyedLoadFastElementStub::InitializeInterfaceDescriptor( + CodeStubInterfaceDescriptor* descriptor) { + static Register registers[] = { edx, ecx }; + descriptor->register_param_count_ = 2; + descriptor->register_params_ = registers; + descriptor->deoptimization_handler_ = + FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure); +} + + +void KeyedLoadDictionaryElementStub::InitializeInterfaceDescriptor( + CodeStubInterfaceDescriptor* descriptor) { + static Register registers[] = { edx, ecx }; + descriptor->register_param_count_ = 2; + descriptor->register_params_ = registers; + descriptor->deoptimization_handler_ = + FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure); +} + + void RegExpConstructResultStub::InitializeInterfaceDescriptor( CodeStubInterfaceDescriptor* descriptor) { static Register registers[] = { ecx, ebx, eax }; @@ -102,6 +122,16 @@ void RegExpConstructResultStub::InitializeInterfaceDescriptor( } +void KeyedLoadGenericElementStub::InitializeInterfaceDescriptor( + CodeStubInterfaceDescriptor* descriptor) { + static Register registers[] = { edx, ecx }; + descriptor->register_param_count_ = 2; + descriptor->register_params_ = registers; + descriptor->deoptimization_handler_ = + Runtime::FunctionForId(Runtime::kKeyedGetProperty)->entry; +} + + void LoadFieldStub::InitializeInterfaceDescriptor( CodeStubInterfaceDescriptor* descriptor) { static Register registers[] = { edx }; diff --git a/src/x87/ic-x87.cc b/src/x87/ic-x87.cc index 618346b..6cd9ac4 100644 --- a/src/x87/ic-x87.cc +++ b/src/x87/ic-x87.cc @@ -1025,17 +1025,6 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { } -// IC register specifications -Register LoadIC::kReceiverRegister = edx; -Register LoadIC::kNameRegister = ecx; -const Register LoadIC::registers[] = { kReceiverRegister, kNameRegister }; - - -Register KeyedLoadIC::kReceiverRegister = LoadIC::kReceiverRegister; -Register KeyedLoadIC::kNameRegister = LoadIC::kNameRegister; -const Register KeyedLoadIC::registers[] = { kReceiverRegister, kNameRegister }; - - void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { // ----------- S t a t e ------------- // -- ecx : key diff --git a/src/x87/stub-cache-x87.cc b/src/x87/stub-cache-x87.cc index 33aafa8..b2ba6b1 100644 --- a/src/x87/stub-cache-x87.cc +++ b/src/x87/stub-cache-x87.cc @@ -1282,18 +1282,14 @@ Handle LoadStubCompiler::CompileLoadNonexistent(Handle type, Register* LoadStubCompiler::registers() { // receiver, name, scratch1, scratch2, scratch3, scratch4. - Register receiver = LoadIC::kReceiverRegister; - Register name = LoadIC::kNameRegister; - static Register registers[] = { receiver, name, ebx, eax, edi, no_reg }; + static Register registers[] = { edx, ecx, ebx, eax, edi, no_reg }; return registers; } Register* KeyedLoadStubCompiler::registers() { // receiver, name, scratch1, scratch2, scratch3, scratch4. - Register receiver = KeyedLoadIC::kReceiverRegister; - Register name = KeyedLoadIC::kNameRegister; - static Register registers[] = { receiver, name, ebx, eax, edi, no_reg }; + static Register registers[] = { edx, ecx, ebx, eax, edi, no_reg }; return registers; }