}
+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 };
}
+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 };
}
-// 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
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;
}
}
+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
}
-// 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
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;
}
template <>
HValue* CodeStubGraphBuilder<KeyedLoadFastElementStub>::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;
}
template<>
HValue* CodeStubGraphBuilder<KeyedLoadDictionaryElementStub>::BuildCodeStub() {
- HValue* receiver = GetParameter(KeyedLoadIC::kReceiverIndex);
- HValue* key = GetParameter(KeyedLoadIC::kNameIndex);
+ HValue* receiver = GetParameter(0);
+ HValue* key = GetParameter(1);
Add<HCheckSmi>(key);
HValue* CodeStubGraphBuilder<KeyedLoadGenericElementStub>::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(),
}
-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);
// 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
}
+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 };
}
+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 };
}
-// 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
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;
}
class ContextualModeBits: public BitField<ContextualMode, 0, 1> {};
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) {
return ContextualModeBits::encode(contextual_mode);
}
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,
Handle<Object> key);
}
+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 };
}
+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 };
}
-// 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
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;
}
}
+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 };
}
+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 };
}
-// 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
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;
}
}
+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 };
}
+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 };
}
-// 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
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;
}