X87: Use the same registers for StoreIC and KeyedStoreIC.
port r22387 original commit message: Use the same registers for StoreIC and KeyedStoreIC. Based on https://codereview.chromium.org/389283002 ("Use register parameters in ElementsTransitionGenerator") which must land first. BUG= R=weiliang.lin@intel.com Review URL: https://codereview.chromium.org/391933002 Patch from Chunyang Dai <chunyang.dai@intel.com>. git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22405 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
0827316df5
commit
1ca4454aeb
@ -225,14 +225,6 @@ void ToBooleanStub::InitializeInterfaceDescriptor(
|
||||
}
|
||||
|
||||
|
||||
void ElementsTransitionAndStoreStub::InitializeInterfaceDescriptor(
|
||||
CodeStubInterfaceDescriptor* descriptor) {
|
||||
Register registers[] = { eax, ebx, ecx, edx };
|
||||
descriptor->Initialize(ARRAY_SIZE(registers), registers,
|
||||
FUNCTION_ADDR(ElementsTransitionAndStoreIC_Miss));
|
||||
}
|
||||
|
||||
|
||||
void BinaryOpICStub::InitializeInterfaceDescriptor(
|
||||
CodeStubInterfaceDescriptor* descriptor) {
|
||||
Register registers[] = { edx, eax };
|
||||
|
@ -1041,6 +1041,11 @@ const Register KeyedStoreIC::ValueRegister() {
|
||||
}
|
||||
|
||||
|
||||
const Register KeyedStoreIC::MapRegister() {
|
||||
return ebx;
|
||||
}
|
||||
|
||||
|
||||
void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
|
||||
// Return address is on the stack.
|
||||
LoadIC_PushArgs(masm);
|
||||
|
@ -1313,10 +1313,11 @@ Register* StoreStubCompiler::registers() {
|
||||
|
||||
|
||||
Register* KeyedStoreStubCompiler::registers() {
|
||||
// receiver, name, scratch1, scratch2, scratch3.
|
||||
// receiver, name, scratch1/map, scratch2, scratch3.
|
||||
Register receiver = KeyedStoreIC::ReceiverRegister();
|
||||
Register name = KeyedStoreIC::NameRegister();
|
||||
static Register registers[] = { receiver, name, ebx, edi, no_reg };
|
||||
Register map = KeyedStoreIC::MapRegister();
|
||||
static Register registers[] = { receiver, name, map, edi, no_reg };
|
||||
return registers;
|
||||
}
|
||||
|
||||
@ -1417,7 +1418,10 @@ Handle<Code> BaseLoadStoreStubCompiler::CompilePolymorphicIC(
|
||||
Label* smi_target = IncludesNumberType(types) ? &number_case : &miss;
|
||||
__ JumpIfSmi(receiver(), smi_target);
|
||||
|
||||
// Polymorphic keyed stores may use the map register
|
||||
Register map_reg = scratch1();
|
||||
ASSERT(kind() != Code::KEYED_STORE_IC ||
|
||||
map_reg.is(KeyedStoreIC::MapRegister()));
|
||||
__ mov(map_reg, FieldOperand(receiver(), HeapObject::kMapOffset));
|
||||
int receiver_count = types->length();
|
||||
int number_of_handled_maps = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user