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
parent f73e033b
...@@ -88,6 +88,26 @@ void CreateAllocationSiteStub::InitializeInterfaceDescriptor( ...@@ -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( void RegExpConstructResultStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
static Register registers[] = { r2, r1, r0 }; static Register registers[] = { r2, r1, r0 };
...@@ -98,6 +118,16 @@ void RegExpConstructResultStub::InitializeInterfaceDescriptor( ...@@ -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( void LoadFieldStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
static Register registers[] = { r0 }; static Register registers[] = { r0 };
......
...@@ -545,17 +545,6 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { ...@@ -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) { void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
// ---------- S t a t e -------------- // ---------- S t a t e --------------
// -- lr : return address // -- lr : return address
......
...@@ -1263,18 +1263,14 @@ Handle<Code> LoadStubCompiler::CompileLoadNonexistent(Handle<HeapType> type, ...@@ -1263,18 +1263,14 @@ Handle<Code> LoadStubCompiler::CompileLoadNonexistent(Handle<HeapType> type,
Register* LoadStubCompiler::registers() { Register* LoadStubCompiler::registers() {
// receiver, name, scratch1, scratch2, scratch3, scratch4. // receiver, name, scratch1, scratch2, scratch3, scratch4.
Register receiver = LoadIC::kReceiverRegister; static Register registers[] = { r0, r2, r3, r1, r4, r5 };
Register name = LoadIC::kNameRegister;
static Register registers[] = { receiver, name, r3, r1, r4, r5 };
return registers; return registers;
} }
Register* KeyedLoadStubCompiler::registers() { Register* KeyedLoadStubCompiler::registers() {
// receiver, name, scratch1, scratch2, scratch3, scratch4. // receiver, name, scratch1, scratch2, scratch3, scratch4.
Register receiver = KeyedLoadIC::kReceiverRegister; static Register registers[] = { r1, r0, r2, r3, r4, r5 };
Register name = KeyedLoadIC::kNameRegister;
static Register registers[] = { receiver, name, r2, r3, r4, r5 };
return registers; return registers;
} }
......
...@@ -101,6 +101,40 @@ void CreateAllocationSiteStub::InitializeInterfaceDescriptor( ...@@ -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( void RegExpConstructResultStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
// x2: length // x2: length
......
...@@ -582,17 +582,6 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { ...@@ -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) { void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
// ---------- S t a t e -------------- // ---------- S t a t e --------------
// -- lr : return address // -- lr : return address
......
...@@ -1245,18 +1245,14 @@ Handle<Code> LoadStubCompiler::CompileLoadNonexistent(Handle<HeapType> type, ...@@ -1245,18 +1245,14 @@ Handle<Code> LoadStubCompiler::CompileLoadNonexistent(Handle<HeapType> type,
Register* LoadStubCompiler::registers() { Register* LoadStubCompiler::registers() {
// receiver, name, scratch1, scratch2, scratch3, scratch4. // receiver, name, scratch1, scratch2, scratch3, scratch4.
Register receiver = LoadIC::kReceiverRegister; static Register registers[] = { x0, x2, x3, x1, x4, x5 };
Register name = LoadIC::kNameRegister;
static Register registers[] = { receiver, name, x3, x1, x4, x5 };
return registers; return registers;
} }
Register* KeyedLoadStubCompiler::registers() { Register* KeyedLoadStubCompiler::registers() {
// receiver, name, scratch1, scratch2, scratch3, scratch4. // receiver, name/key, scratch1, scratch2, scratch3, scratch4.
Register receiver = KeyedLoadIC::kReceiverRegister; static Register registers[] = { x1, x0, x2, x3, x4, x5 };
Register name = KeyedLoadIC::kNameRegister;
static Register registers[] = { receiver, name, x2, x3, x4, x5 };
return registers; return registers;
} }
......
...@@ -539,14 +539,9 @@ Handle<Code> CreateAllocationSiteStub::GenerateCode() { ...@@ -539,14 +539,9 @@ Handle<Code> CreateAllocationSiteStub::GenerateCode() {
template <> template <>
HValue* CodeStubGraphBuilder<KeyedLoadFastElementStub>::BuildCodeStub() { HValue* CodeStubGraphBuilder<KeyedLoadFastElementStub>::BuildCodeStub() {
HInstruction* load = BuildUncheckedMonomorphicElementAccess( HInstruction* load = BuildUncheckedMonomorphicElementAccess(
GetParameter(KeyedLoadIC::kReceiverIndex), GetParameter(0), GetParameter(1), NULL,
GetParameter(KeyedLoadIC::kNameIndex), casted_stub()->is_js_array(), casted_stub()->elements_kind(),
NULL, LOAD, NEVER_RETURN_HOLE, STANDARD_STORE);
casted_stub()->is_js_array(),
casted_stub()->elements_kind(),
LOAD,
NEVER_RETURN_HOLE,
STANDARD_STORE);
return load; return load;
} }
...@@ -1376,8 +1371,8 @@ Handle<Code> FastNewContextStub::GenerateCode() { ...@@ -1376,8 +1371,8 @@ Handle<Code> FastNewContextStub::GenerateCode() {
template<> template<>
HValue* CodeStubGraphBuilder<KeyedLoadDictionaryElementStub>::BuildCodeStub() { HValue* CodeStubGraphBuilder<KeyedLoadDictionaryElementStub>::BuildCodeStub() {
HValue* receiver = GetParameter(KeyedLoadIC::kReceiverIndex); HValue* receiver = GetParameter(0);
HValue* key = GetParameter(KeyedLoadIC::kNameIndex); HValue* key = GetParameter(1);
Add<HCheckSmi>(key); Add<HCheckSmi>(key);
...@@ -1509,8 +1504,8 @@ void CodeStubGraphBuilder< ...@@ -1509,8 +1504,8 @@ void CodeStubGraphBuilder<
HValue* CodeStubGraphBuilder<KeyedLoadGenericElementStub>::BuildCodeStub() { HValue* CodeStubGraphBuilder<KeyedLoadGenericElementStub>::BuildCodeStub() {
HValue* receiver = GetParameter(KeyedLoadIC::kReceiverIndex); HValue* receiver = GetParameter(0);
HValue* key = GetParameter(KeyedLoadIC::kNameIndex); HValue* key = GetParameter(1);
// Split into a smi/integer case and unique string case. // Split into a smi/integer case and unique string case.
HIfContinuation index_name_split_continuation(graph()->CreateBasicBlock(), HIfContinuation index_name_split_continuation(graph()->CreateBasicBlock(),
......
...@@ -512,33 +512,6 @@ void JSEntryStub::FinishCode(Handle<Code> code) { ...@@ -512,33 +512,6 @@ void JSEntryStub::FinishCode(Handle<Code> 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( void KeyedLoadDictionaryElementPlatformStub::Generate(
MacroAssembler* masm) { MacroAssembler* masm) {
KeyedLoadStubCompiler::GenerateLoadDictionaryElement(masm); KeyedLoadStubCompiler::GenerateLoadDictionaryElement(masm);
......
...@@ -275,7 +275,7 @@ struct CodeStubInterfaceDescriptor { ...@@ -275,7 +275,7 @@ struct CodeStubInterfaceDescriptor {
// return sequence. Default value is -1, which means it is ignored. // return sequence. Default value is -1, which means it is ignored.
int hint_stack_parameter_count_; int hint_stack_parameter_count_;
StubFunctionMode function_mode_; StubFunctionMode function_mode_;
const Register* register_params_; Register* register_params_;
// Specifies Representations for the stub's parameter. Points to an array of // Specifies Representations for the stub's parameter. Points to an array of
// Representations of the same length of the numbers of parameters to the // Representations of the same length of the numbers of parameters to the
// stub, or if NULL (the default value), Representation of each parameter // stub, or if NULL (the default value), Representation of each parameter
......
...@@ -93,6 +93,26 @@ void CreateAllocationSiteStub::InitializeInterfaceDescriptor( ...@@ -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( void RegExpConstructResultStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
static Register registers[] = { ecx, ebx, eax }; static Register registers[] = { ecx, ebx, eax };
...@@ -103,6 +123,16 @@ void RegExpConstructResultStub::InitializeInterfaceDescriptor( ...@@ -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( void LoadFieldStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
static Register registers[] = { edx }; static Register registers[] = { edx };
......
...@@ -1025,17 +1025,6 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { ...@@ -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) { void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
// ----------- S t a t e ------------- // ----------- S t a t e -------------
// -- ecx : key // -- ecx : key
......
...@@ -1283,18 +1283,14 @@ Handle<Code> LoadStubCompiler::CompileLoadNonexistent(Handle<HeapType> type, ...@@ -1283,18 +1283,14 @@ Handle<Code> LoadStubCompiler::CompileLoadNonexistent(Handle<HeapType> type,
Register* LoadStubCompiler::registers() { Register* LoadStubCompiler::registers() {
// receiver, name, scratch1, scratch2, scratch3, scratch4. // receiver, name, scratch1, scratch2, scratch3, scratch4.
Register receiver = LoadIC::kReceiverRegister; static Register registers[] = { edx, ecx, ebx, eax, edi, no_reg };
Register name = LoadIC::kNameRegister;
static Register registers[] = { receiver, name, ebx, eax, edi, no_reg };
return registers; return registers;
} }
Register* KeyedLoadStubCompiler::registers() { Register* KeyedLoadStubCompiler::registers() {
// receiver, name, scratch1, scratch2, scratch3, scratch4. // receiver, name, scratch1, scratch2, scratch3, scratch4.
Register receiver = KeyedLoadIC::kReceiverRegister; static Register registers[] = { edx, ecx, ebx, eax, edi, no_reg };
Register name = KeyedLoadIC::kNameRegister;
static Register registers[] = { receiver, name, ebx, eax, edi, no_reg };
return registers; return registers;
} }
......
...@@ -398,15 +398,6 @@ class LoadIC: public IC { ...@@ -398,15 +398,6 @@ class LoadIC: public IC {
class ContextualModeBits: public BitField<ContextualMode, 0, 1> {}; class ContextualModeBits: public BitField<ContextualMode, 0, 1> {};
STATIC_ASSERT(static_cast<int>(NOT_CONTEXTUAL) == 0); STATIC_ASSERT(static_cast<int>(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) { static ExtraICState ComputeExtraICState(ContextualMode contextual_mode) {
return ContextualModeBits::encode(contextual_mode); return ContextualModeBits::encode(contextual_mode);
} }
...@@ -507,10 +498,6 @@ class KeyedLoadIC: public LoadIC { ...@@ -507,10 +498,6 @@ class KeyedLoadIC: public LoadIC {
ASSERT(target()->is_keyed_load_stub()); ASSERT(target()->is_keyed_load_stub());
} }
static const Register registers[kRegisterArgumentCount];
static Register kReceiverRegister;
static Register kNameRegister;
MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Object> object, MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Object> object,
Handle<Object> key); Handle<Object> key);
......
...@@ -89,6 +89,26 @@ void CreateAllocationSiteStub::InitializeInterfaceDescriptor( ...@@ -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( void RegExpConstructResultStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
static Register registers[] = { a2, a1, a0 }; static Register registers[] = { a2, a1, a0 };
...@@ -99,6 +119,16 @@ void RegExpConstructResultStub::InitializeInterfaceDescriptor( ...@@ -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( void LoadFieldStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
static Register registers[] = { a0 }; static Register registers[] = { a0 };
......
...@@ -560,17 +560,6 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { ...@@ -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) { void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
// ---------- S t a t e -------------- // ---------- S t a t e --------------
// -- ra : return address // -- ra : return address
......
...@@ -1253,18 +1253,14 @@ Handle<Code> LoadStubCompiler::CompileLoadNonexistent(Handle<HeapType> type, ...@@ -1253,18 +1253,14 @@ Handle<Code> LoadStubCompiler::CompileLoadNonexistent(Handle<HeapType> type,
Register* LoadStubCompiler::registers() { Register* LoadStubCompiler::registers() {
// receiver, name, scratch1, scratch2, scratch3, scratch4. // receiver, name, scratch1, scratch2, scratch3, scratch4.
Register receiver = LoadIC::kReceiverRegister; static Register registers[] = { a0, a2, a3, a1, t0, t1 };
Register name = LoadIC::kNameRegister;
static Register registers[] = { receiver, name, a3, a1, t0, t1 };
return registers; return registers;
} }
Register* KeyedLoadStubCompiler::registers() { Register* KeyedLoadStubCompiler::registers() {
// receiver, name, scratch1, scratch2, scratch3, scratch4. // receiver, name, scratch1, scratch2, scratch3, scratch4.
Register receiver = KeyedLoadIC::kReceiverRegister; static Register registers[] = { a1, a0, a2, a3, t0, t1 };
Register name = KeyedLoadIC::kNameRegister;
static Register registers[] = { receiver, name, a2, a3, t0, t1 };
return registers; return registers;
} }
......
...@@ -89,6 +89,26 @@ void CreateAllocationSiteStub::InitializeInterfaceDescriptor( ...@@ -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( void RegExpConstructResultStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
static Register registers[] = { rcx, rbx, rax }; static Register registers[] = { rcx, rbx, rax };
...@@ -99,6 +119,16 @@ void RegExpConstructResultStub::InitializeInterfaceDescriptor( ...@@ -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( void LoadFieldStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
static Register registers[] = { rax }; static Register registers[] = { rax };
......
...@@ -1052,17 +1052,6 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { ...@@ -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) { void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
// ----------- S t a t e ------------- // ----------- S t a t e -------------
// -- rax : key // -- rax : key
......
...@@ -1222,18 +1222,14 @@ Handle<Code> LoadStubCompiler::CompileLoadNonexistent(Handle<HeapType> type, ...@@ -1222,18 +1222,14 @@ Handle<Code> LoadStubCompiler::CompileLoadNonexistent(Handle<HeapType> type,
Register* LoadStubCompiler::registers() { Register* LoadStubCompiler::registers() {
// receiver, name, scratch1, scratch2, scratch3, scratch4. // receiver, name, scratch1, scratch2, scratch3, scratch4.
Register receiver = LoadIC::kReceiverRegister; static Register registers[] = { rax, rcx, rdx, rbx, rdi, r8 };
Register name = LoadIC::kNameRegister;
static Register registers[] = { receiver, name, rdx, rbx, rdi, r8 };
return registers; return registers;
} }
Register* KeyedLoadStubCompiler::registers() { Register* KeyedLoadStubCompiler::registers() {
// receiver, name, scratch1, scratch2, scratch3, scratch4. // receiver, name, scratch1, scratch2, scratch3, scratch4.
Register receiver = KeyedLoadIC::kReceiverRegister; static Register registers[] = { rdx, rax, rbx, rcx, rdi, r8 };
Register name = KeyedLoadIC::kNameRegister;
static Register registers[] = { receiver, name, rbx, rcx, rdi, r8 };
return registers; return registers;
} }
......
...@@ -92,6 +92,26 @@ void CreateAllocationSiteStub::InitializeInterfaceDescriptor( ...@@ -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( void RegExpConstructResultStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
static Register registers[] = { ecx, ebx, eax }; static Register registers[] = { ecx, ebx, eax };
...@@ -102,6 +122,16 @@ void RegExpConstructResultStub::InitializeInterfaceDescriptor( ...@@ -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( void LoadFieldStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
static Register registers[] = { edx }; static Register registers[] = { edx };
......
...@@ -1025,17 +1025,6 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { ...@@ -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) { void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
// ----------- S t a t e ------------- // ----------- S t a t e -------------
// -- ecx : key // -- ecx : key
......
...@@ -1282,18 +1282,14 @@ Handle<Code> LoadStubCompiler::CompileLoadNonexistent(Handle<HeapType> type, ...@@ -1282,18 +1282,14 @@ Handle<Code> LoadStubCompiler::CompileLoadNonexistent(Handle<HeapType> type,
Register* LoadStubCompiler::registers() { Register* LoadStubCompiler::registers() {
// receiver, name, scratch1, scratch2, scratch3, scratch4. // receiver, name, scratch1, scratch2, scratch3, scratch4.
Register receiver = LoadIC::kReceiverRegister; static Register registers[] = { edx, ecx, ebx, eax, edi, no_reg };
Register name = LoadIC::kNameRegister;
static Register registers[] = { receiver, name, ebx, eax, edi, no_reg };
return registers; return registers;
} }
Register* KeyedLoadStubCompiler::registers() { Register* KeyedLoadStubCompiler::registers() {
// receiver, name, scratch1, scratch2, scratch3, scratch4. // receiver, name, scratch1, scratch2, scratch3, scratch4.
Register receiver = KeyedLoadIC::kReceiverRegister; static Register registers[] = { edx, ecx, ebx, eax, edi, no_reg };
Register name = KeyedLoadIC::kNameRegister;
static Register registers[] = { receiver, name, ebx, eax, edi, no_reg };
return registers; return registers;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment