Create a RegisterSpec class inside of the IC that provides:
1) symbolic names for the register (like, edx == receiver) 2) can return an array of registers 3) defines ordering when passed on the stack Code that implements or uses the IC should use this RegisterSpec instead of "knowing" what the registers are. Or at least have the RegisterSpec to validate it's assumptions. R=jkummerow@chromium.org Review URL: https://codereview.chromium.org/340363002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21939 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
23521436fb
commit
b3f8487726
@ -88,26 +88,6 @@ 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 };
|
||||
@ -118,16 +98,6 @@ 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 };
|
||||
|
@ -545,6 +545,17 @@ 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
|
||||
|
@ -1263,14 +1263,18 @@ Handle<Code> LoadStubCompiler::CompileLoadNonexistent(Handle<HeapType> type,
|
||||
|
||||
Register* LoadStubCompiler::registers() {
|
||||
// receiver, name, scratch1, scratch2, scratch3, scratch4.
|
||||
static Register registers[] = { r0, r2, r3, r1, r4, r5 };
|
||||
Register receiver = LoadIC::kReceiverRegister;
|
||||
Register name = LoadIC::kNameRegister;
|
||||
static Register registers[] = { receiver, name, r3, r1, r4, r5 };
|
||||
return registers;
|
||||
}
|
||||
|
||||
|
||||
Register* KeyedLoadStubCompiler::registers() {
|
||||
// receiver, name, scratch1, scratch2, scratch3, scratch4.
|
||||
static Register registers[] = { r1, r0, r2, r3, r4, r5 };
|
||||
Register receiver = KeyedLoadIC::kReceiverRegister;
|
||||
Register name = KeyedLoadIC::kNameRegister;
|
||||
static Register registers[] = { receiver, name, r2, r3, r4, r5 };
|
||||
return registers;
|
||||
}
|
||||
|
||||
|
@ -101,40 +101,6 @@ 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
|
||||
|
@ -582,6 +582,17 @@ 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
|
||||
|
@ -1245,14 +1245,18 @@ Handle<Code> LoadStubCompiler::CompileLoadNonexistent(Handle<HeapType> type,
|
||||
|
||||
Register* LoadStubCompiler::registers() {
|
||||
// receiver, name, scratch1, scratch2, scratch3, scratch4.
|
||||
static Register registers[] = { x0, x2, x3, x1, x4, x5 };
|
||||
Register receiver = LoadIC::kReceiverRegister;
|
||||
Register name = LoadIC::kNameRegister;
|
||||
static Register registers[] = { receiver, name, x3, x1, x4, x5 };
|
||||
return registers;
|
||||
}
|
||||
|
||||
|
||||
Register* KeyedLoadStubCompiler::registers() {
|
||||
// receiver, name/key, scratch1, scratch2, scratch3, scratch4.
|
||||
static Register registers[] = { x1, x0, x2, x3, x4, x5 };
|
||||
// receiver, name, scratch1, scratch2, scratch3, scratch4.
|
||||
Register receiver = KeyedLoadIC::kReceiverRegister;
|
||||
Register name = KeyedLoadIC::kNameRegister;
|
||||
static Register registers[] = { receiver, name, x2, x3, x4, x5 };
|
||||
return registers;
|
||||
}
|
||||
|
||||
|
@ -539,9 +539,14 @@ Handle<Code> CreateAllocationSiteStub::GenerateCode() {
|
||||
template <>
|
||||
HValue* CodeStubGraphBuilder<KeyedLoadFastElementStub>::BuildCodeStub() {
|
||||
HInstruction* load = BuildUncheckedMonomorphicElementAccess(
|
||||
GetParameter(0), GetParameter(1), NULL,
|
||||
casted_stub()->is_js_array(), casted_stub()->elements_kind(),
|
||||
LOAD, NEVER_RETURN_HOLE, STANDARD_STORE);
|
||||
GetParameter(KeyedLoadIC::kReceiverIndex),
|
||||
GetParameter(KeyedLoadIC::kNameIndex),
|
||||
NULL,
|
||||
casted_stub()->is_js_array(),
|
||||
casted_stub()->elements_kind(),
|
||||
LOAD,
|
||||
NEVER_RETURN_HOLE,
|
||||
STANDARD_STORE);
|
||||
return load;
|
||||
}
|
||||
|
||||
@ -1371,8 +1376,8 @@ Handle<Code> FastNewContextStub::GenerateCode() {
|
||||
|
||||
template<>
|
||||
HValue* CodeStubGraphBuilder<KeyedLoadDictionaryElementStub>::BuildCodeStub() {
|
||||
HValue* receiver = GetParameter(0);
|
||||
HValue* key = GetParameter(1);
|
||||
HValue* receiver = GetParameter(KeyedLoadIC::kReceiverIndex);
|
||||
HValue* key = GetParameter(KeyedLoadIC::kNameIndex);
|
||||
|
||||
Add<HCheckSmi>(key);
|
||||
|
||||
@ -1504,8 +1509,8 @@ void CodeStubGraphBuilder<
|
||||
|
||||
|
||||
HValue* CodeStubGraphBuilder<KeyedLoadGenericElementStub>::BuildCodeStub() {
|
||||
HValue* receiver = GetParameter(0);
|
||||
HValue* key = GetParameter(1);
|
||||
HValue* receiver = GetParameter(KeyedLoadIC::kReceiverIndex);
|
||||
HValue* key = GetParameter(KeyedLoadIC::kNameIndex);
|
||||
|
||||
// Split into a smi/integer case and unique string case.
|
||||
HIfContinuation index_name_split_continuation(graph()->CreateBasicBlock(),
|
||||
|
@ -512,6 +512,33 @@ 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(
|
||||
MacroAssembler* masm) {
|
||||
KeyedLoadStubCompiler::GenerateLoadDictionaryElement(masm);
|
||||
|
@ -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_;
|
||||
Register* register_params_;
|
||||
const 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
|
||||
|
@ -93,26 +93,6 @@ 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 };
|
||||
@ -123,16 +103,6 @@ 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 };
|
||||
|
@ -1025,6 +1025,17 @@ 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
|
||||
|
@ -1283,14 +1283,18 @@ Handle<Code> LoadStubCompiler::CompileLoadNonexistent(Handle<HeapType> type,
|
||||
|
||||
Register* LoadStubCompiler::registers() {
|
||||
// receiver, name, scratch1, scratch2, scratch3, scratch4.
|
||||
static Register registers[] = { edx, ecx, ebx, eax, edi, no_reg };
|
||||
Register receiver = LoadIC::kReceiverRegister;
|
||||
Register name = LoadIC::kNameRegister;
|
||||
static Register registers[] = { receiver, name, ebx, eax, edi, no_reg };
|
||||
return registers;
|
||||
}
|
||||
|
||||
|
||||
Register* KeyedLoadStubCompiler::registers() {
|
||||
// receiver, name, scratch1, scratch2, scratch3, scratch4.
|
||||
static Register registers[] = { edx, ecx, ebx, eax, edi, no_reg };
|
||||
Register receiver = KeyedLoadIC::kReceiverRegister;
|
||||
Register name = KeyedLoadIC::kNameRegister;
|
||||
static Register registers[] = { receiver, name, ebx, eax, edi, no_reg };
|
||||
return registers;
|
||||
}
|
||||
|
||||
|
13
src/ic.h
13
src/ic.h
@ -398,6 +398,15 @@ class LoadIC: public IC {
|
||||
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);
|
||||
}
|
||||
@ -498,6 +507,10 @@ 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<Object> Load(Handle<Object> object,
|
||||
Handle<Object> key);
|
||||
|
||||
|
@ -89,26 +89,6 @@ 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 };
|
||||
@ -119,16 +99,6 @@ 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 };
|
||||
|
@ -560,6 +560,17 @@ 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
|
||||
|
@ -1253,14 +1253,18 @@ Handle<Code> LoadStubCompiler::CompileLoadNonexistent(Handle<HeapType> type,
|
||||
|
||||
Register* LoadStubCompiler::registers() {
|
||||
// receiver, name, scratch1, scratch2, scratch3, scratch4.
|
||||
static Register registers[] = { a0, a2, a3, a1, t0, t1 };
|
||||
Register receiver = LoadIC::kReceiverRegister;
|
||||
Register name = LoadIC::kNameRegister;
|
||||
static Register registers[] = { receiver, name, a3, a1, t0, t1 };
|
||||
return registers;
|
||||
}
|
||||
|
||||
|
||||
Register* KeyedLoadStubCompiler::registers() {
|
||||
// receiver, name, scratch1, scratch2, scratch3, scratch4.
|
||||
static Register registers[] = { a1, a0, a2, a3, t0, t1 };
|
||||
Register receiver = KeyedLoadIC::kReceiverRegister;
|
||||
Register name = KeyedLoadIC::kNameRegister;
|
||||
static Register registers[] = { receiver, name, a2, a3, t0, t1 };
|
||||
return registers;
|
||||
}
|
||||
|
||||
|
@ -89,26 +89,6 @@ 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 };
|
||||
@ -119,16 +99,6 @@ 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 };
|
||||
|
@ -1052,6 +1052,17 @@ 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
|
||||
|
@ -1222,14 +1222,18 @@ Handle<Code> LoadStubCompiler::CompileLoadNonexistent(Handle<HeapType> type,
|
||||
|
||||
Register* LoadStubCompiler::registers() {
|
||||
// receiver, name, scratch1, scratch2, scratch3, scratch4.
|
||||
static Register registers[] = { rax, rcx, rdx, rbx, rdi, r8 };
|
||||
Register receiver = LoadIC::kReceiverRegister;
|
||||
Register name = LoadIC::kNameRegister;
|
||||
static Register registers[] = { receiver, name, rdx, rbx, rdi, r8 };
|
||||
return registers;
|
||||
}
|
||||
|
||||
|
||||
Register* KeyedLoadStubCompiler::registers() {
|
||||
// receiver, name, scratch1, scratch2, scratch3, scratch4.
|
||||
static Register registers[] = { rdx, rax, rbx, rcx, rdi, r8 };
|
||||
Register receiver = KeyedLoadIC::kReceiverRegister;
|
||||
Register name = KeyedLoadIC::kNameRegister;
|
||||
static Register registers[] = { receiver, name, rbx, rcx, rdi, r8 };
|
||||
return registers;
|
||||
}
|
||||
|
||||
|
@ -92,26 +92,6 @@ 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 };
|
||||
@ -122,16 +102,6 @@ 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 };
|
||||
|
@ -1025,6 +1025,17 @@ 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
|
||||
|
@ -1282,14 +1282,18 @@ Handle<Code> LoadStubCompiler::CompileLoadNonexistent(Handle<HeapType> type,
|
||||
|
||||
Register* LoadStubCompiler::registers() {
|
||||
// receiver, name, scratch1, scratch2, scratch3, scratch4.
|
||||
static Register registers[] = { edx, ecx, ebx, eax, edi, no_reg };
|
||||
Register receiver = LoadIC::kReceiverRegister;
|
||||
Register name = LoadIC::kNameRegister;
|
||||
static Register registers[] = { receiver, name, ebx, eax, edi, no_reg };
|
||||
return registers;
|
||||
}
|
||||
|
||||
|
||||
Register* KeyedLoadStubCompiler::registers() {
|
||||
// receiver, name, scratch1, scratch2, scratch3, scratch4.
|
||||
static Register registers[] = { edx, ecx, ebx, eax, edi, no_reg };
|
||||
Register receiver = KeyedLoadIC::kReceiverRegister;
|
||||
Register name = KeyedLoadIC::kNameRegister;
|
||||
static Register registers[] = { receiver, name, ebx, eax, edi, no_reg };
|
||||
return registers;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user