Cleanup interface descriptors to reflect that vectors are part of loads.

Also removed ornamentation like "VectorRaw" from stub names.

BUG=

Review URL: https://codereview.chromium.org/1144063002

Cr-Commit-Position: refs/heads/master@{#28516}
This commit is contained in:
mvstanton 2015-05-20 06:19:11 -07:00 committed by Commit bot
parent 8236bfbae3
commit 09aaf003a9
58 changed files with 383 additions and 415 deletions

View File

@ -1489,8 +1489,8 @@ void FunctionPrototypeStub::Generate(MacroAssembler* masm) {
Register receiver = LoadDescriptor::ReceiverRegister();
// Ensure that the vector and slot registers won't be clobbered before
// calling the miss handler.
DCHECK(!AreAliased(r4, r5, VectorLoadICDescriptor::VectorRegister(),
VectorLoadICDescriptor::SlotRegister()));
DCHECK(!AreAliased(r4, r5, LoadWithVectorDescriptor::VectorRegister(),
LoadWithVectorDescriptor::SlotRegister()));
NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, r4,
r5, &miss);
@ -1509,8 +1509,8 @@ void LoadIndexedStringStub::Generate(MacroAssembler* masm) {
Register scratch = r5;
Register result = r0;
DCHECK(!scratch.is(receiver) && !scratch.is(index));
DCHECK(!scratch.is(VectorLoadICDescriptor::VectorRegister()) &&
result.is(VectorLoadICDescriptor::SlotRegister()));
DCHECK(!scratch.is(LoadWithVectorDescriptor::VectorRegister()) &&
result.is(LoadWithVectorDescriptor::SlotRegister()));
// StringCharAtGenerator doesn't use the result register until it's passed
// the different miss possibilities. If it did, we would have a conflict
@ -2952,8 +2952,8 @@ void StringCharCodeAtGenerator::GenerateSlow(
DONT_DO_SMI_CHECK);
call_helper.BeforeCall(masm);
if (embed_mode == PART_OF_IC_HANDLER) {
__ Push(VectorLoadICDescriptor::VectorRegister(),
VectorLoadICDescriptor::SlotRegister(), object_, index_);
__ Push(LoadWithVectorDescriptor::VectorRegister(),
LoadWithVectorDescriptor::SlotRegister(), object_, index_);
} else {
// index_ is consumed by runtime conversion function.
__ Push(object_, index_);
@ -2969,8 +2969,8 @@ void StringCharCodeAtGenerator::GenerateSlow(
// have a chance to overwrite it.
__ Move(index_, r0);
if (embed_mode == PART_OF_IC_HANDLER) {
__ Pop(VectorLoadICDescriptor::VectorRegister(),
VectorLoadICDescriptor::SlotRegister(), object_);
__ Pop(LoadWithVectorDescriptor::VectorRegister(),
LoadWithVectorDescriptor::SlotRegister(), object_);
} else {
__ pop(object_);
}
@ -4362,15 +4362,15 @@ void StubFailureTrampolineStub::Generate(MacroAssembler* masm) {
void LoadICTrampolineStub::Generate(MacroAssembler* masm) {
EmitLoadTypeFeedbackVector(masm, VectorLoadICDescriptor::VectorRegister());
VectorRawLoadStub stub(isolate(), state());
EmitLoadTypeFeedbackVector(masm, LoadWithVectorDescriptor::VectorRegister());
LoadICStub stub(isolate(), state());
stub.GenerateForTrampoline(masm);
}
void KeyedLoadICTrampolineStub::Generate(MacroAssembler* masm) {
EmitLoadTypeFeedbackVector(masm, VectorLoadICDescriptor::VectorRegister());
VectorRawKeyedLoadStub stub(isolate());
EmitLoadTypeFeedbackVector(masm, LoadWithVectorDescriptor::VectorRegister());
KeyedLoadICStub stub(isolate());
stub.GenerateForTrampoline(masm);
}
@ -4389,12 +4389,10 @@ void CallIC_ArrayTrampolineStub::Generate(MacroAssembler* masm) {
}
void VectorRawLoadStub::Generate(MacroAssembler* masm) {
GenerateImpl(masm, false);
}
void LoadICStub::Generate(MacroAssembler* masm) { GenerateImpl(masm, false); }
void VectorRawLoadStub::GenerateForTrampoline(MacroAssembler* masm) {
void LoadICStub::GenerateForTrampoline(MacroAssembler* masm) {
GenerateImpl(masm, true);
}
@ -4488,11 +4486,11 @@ static void HandleMonomorphicCase(MacroAssembler* masm, Register receiver,
}
void VectorRawLoadStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
Register receiver = VectorLoadICDescriptor::ReceiverRegister(); // r1
Register name = VectorLoadICDescriptor::NameRegister(); // r2
Register vector = VectorLoadICDescriptor::VectorRegister(); // r3
Register slot = VectorLoadICDescriptor::SlotRegister(); // r0
void LoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
Register receiver = LoadWithVectorDescriptor::ReceiverRegister(); // r1
Register name = LoadWithVectorDescriptor::NameRegister(); // r2
Register vector = LoadWithVectorDescriptor::VectorRegister(); // r3
Register slot = LoadWithVectorDescriptor::SlotRegister(); // r0
Register feedback = r4;
Register receiver_map = r5;
Register scratch1 = r8;
@ -4535,21 +4533,21 @@ void VectorRawLoadStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
}
void VectorRawKeyedLoadStub::Generate(MacroAssembler* masm) {
void KeyedLoadICStub::Generate(MacroAssembler* masm) {
GenerateImpl(masm, false);
}
void VectorRawKeyedLoadStub::GenerateForTrampoline(MacroAssembler* masm) {
void KeyedLoadICStub::GenerateForTrampoline(MacroAssembler* masm) {
GenerateImpl(masm, true);
}
void VectorRawKeyedLoadStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
Register receiver = VectorLoadICDescriptor::ReceiverRegister(); // r1
Register key = VectorLoadICDescriptor::NameRegister(); // r2
Register vector = VectorLoadICDescriptor::VectorRegister(); // r3
Register slot = VectorLoadICDescriptor::SlotRegister(); // r0
void KeyedLoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
Register receiver = LoadWithVectorDescriptor::ReceiverRegister(); // r1
Register key = LoadWithVectorDescriptor::NameRegister(); // r2
Register vector = LoadWithVectorDescriptor::VectorRegister(); // r3
Register slot = LoadWithVectorDescriptor::SlotRegister(); // r0
Register feedback = r4;
Register receiver_map = r5;
Register scratch1 = r8;

View File

@ -144,8 +144,8 @@ void DebugCodegen::GenerateLoadICDebugBreak(MacroAssembler* masm) {
// Calling convention for IC load (from ic-arm.cc).
Register receiver = LoadDescriptor::ReceiverRegister();
Register name = LoadDescriptor::NameRegister();
RegList regs = receiver.bit() | name.bit() |
VectorLoadICTrampolineDescriptor::SlotRegister().bit();
Register slot = LoadDescriptor::SlotRegister();
RegList regs = receiver.bit() | name.bit() | slot.bit();
Generate_DebugBreakCallHelper(masm, regs, 0);
}

View File

@ -1334,7 +1334,7 @@ void FullCodeGenerator::EmitLoadHomeObject(SuperReference* expr) {
Handle<Symbol> home_object_symbol(isolate()->heap()->home_object_symbol());
__ Move(LoadDescriptor::NameRegister(), home_object_symbol);
__ mov(VectorLoadICDescriptor::SlotRegister(),
__ mov(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(expr->HomeObjectFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL);
@ -1409,7 +1409,7 @@ void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy,
__ ldr(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
__ mov(LoadDescriptor::NameRegister(), Operand(proxy->var()->name()));
__ mov(VectorLoadICDescriptor::SlotRegister(),
__ mov(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(proxy->VariableFeedbackSlot())));
ContextualMode mode = (typeof_state == INSIDE_TYPEOF)
@ -1497,7 +1497,7 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
Comment cmnt(masm_, "[ Global variable");
__ ldr(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
__ mov(LoadDescriptor::NameRegister(), Operand(var->name()));
__ mov(VectorLoadICDescriptor::SlotRegister(),
__ mov(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(proxy->VariableFeedbackSlot())));
CallGlobalLoadIC(var->name());
context()->Plug(r0);
@ -2193,7 +2193,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ bind(&l_call);
__ ldr(load_receiver, MemOperand(sp, kPointerSize));
__ ldr(load_name, MemOperand(sp, 2 * kPointerSize));
__ mov(VectorLoadICDescriptor::SlotRegister(),
__ mov(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(expr->KeyedLoadFeedbackSlot())));
Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code();
CallIC(ic, TypeFeedbackId::None());
@ -2211,7 +2211,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ push(load_receiver); // save result
__ LoadRoot(load_name, Heap::kdone_stringRootIndex); // "done"
__ mov(VectorLoadICDescriptor::SlotRegister(),
__ mov(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(expr->DoneFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL); // r0=result.done
Handle<Code> bool_ic = ToBooleanStub::GetUninitialized(isolate());
@ -2222,7 +2222,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
// result.value
__ pop(load_receiver); // result
__ LoadRoot(load_name, Heap::kvalue_stringRootIndex); // "value"
__ mov(VectorLoadICDescriptor::SlotRegister(),
__ mov(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(expr->ValueFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL); // r0=result.value
context()->DropAndPlug(2, r0); // drop iter and g
@ -2375,7 +2375,7 @@ void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
DCHECK(!prop->IsSuperAccess());
__ mov(LoadDescriptor::NameRegister(), Operand(key->value()));
__ mov(VectorLoadICDescriptor::SlotRegister(),
__ mov(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(prop->PropertyFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL);
}
@ -2396,7 +2396,7 @@ void FullCodeGenerator::EmitNamedSuperPropertyLoad(Property* prop) {
void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
SetSourcePosition(prop->position());
Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code();
__ mov(VectorLoadICDescriptor::SlotRegister(),
__ mov(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(prop->PropertyFeedbackSlot())));
CallIC(ic);
}
@ -4611,7 +4611,7 @@ void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) {
// Load the function from the receiver.
__ mov(LoadDescriptor::NameRegister(), Operand(expr->name()));
__ mov(VectorLoadICDescriptor::SlotRegister(),
__ mov(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(expr->CallRuntimeFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL);
}
@ -5046,7 +5046,7 @@ void FullCodeGenerator::VisitForTypeofValue(Expression* expr) {
Comment cmnt(masm_, "[ Global variable");
__ ldr(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
__ mov(LoadDescriptor::NameRegister(), Operand(proxy->name()));
__ mov(VectorLoadICDescriptor::SlotRegister(),
__ mov(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(proxy->VariableFeedbackSlot())));
// Use a regular load, not a contextual load, to avoid a reference
// error.

View File

@ -16,12 +16,10 @@ const Register CallInterfaceDescriptor::ContextRegister() { return cp; }
const Register LoadDescriptor::ReceiverRegister() { return r1; }
const Register LoadDescriptor::NameRegister() { return r2; }
const Register LoadDescriptor::SlotRegister() { return r0; }
const Register VectorLoadICTrampolineDescriptor::SlotRegister() { return r0; }
const Register VectorLoadICDescriptor::VectorRegister() { return r3; }
const Register LoadWithVectorDescriptor::VectorRegister() { return r3; }
const Register StoreDescriptor::ReceiverRegister() { return r1; }

View File

@ -2134,7 +2134,7 @@ LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister());
LOperand* vector = NULL;
if (instr->HasVectorAndSlot()) {
vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
}
LLoadGlobalGeneric* result =
new(zone()) LLoadGlobalGeneric(context, global_object, vector);
@ -2183,7 +2183,7 @@ LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
UseFixed(instr->object(), LoadDescriptor::ReceiverRegister());
LOperand* vector = NULL;
if (instr->HasVectorAndSlot()) {
vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
}
LInstruction* result =
@ -2257,7 +2257,7 @@ LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister());
LOperand* vector = NULL;
if (instr->HasVectorAndSlot()) {
vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
}
LInstruction* result =

View File

@ -2989,8 +2989,8 @@ void LCodeGen::DoReturn(LReturn* instr) {
template <class T>
void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
Register vector_register = ToRegister(instr->temp_vector());
Register slot_register = VectorLoadICDescriptor::SlotRegister();
DCHECK(vector_register.is(VectorLoadICDescriptor::VectorRegister()));
Register slot_register = LoadDescriptor::SlotRegister();
DCHECK(vector_register.is(LoadWithVectorDescriptor::VectorRegister()));
DCHECK(slot_register.is(r0));
AllowDeferredHandleDereference vector_structure_check;

View File

@ -1449,8 +1449,8 @@ void FunctionPrototypeStub::Generate(MacroAssembler* masm) {
Register receiver = LoadDescriptor::ReceiverRegister();
// Ensure that the vector and slot registers won't be clobbered before
// calling the miss handler.
DCHECK(!AreAliased(x10, x11, VectorLoadICDescriptor::VectorRegister(),
VectorLoadICDescriptor::SlotRegister()));
DCHECK(!AreAliased(x10, x11, LoadWithVectorDescriptor::VectorRegister(),
LoadWithVectorDescriptor::SlotRegister()));
NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, x10,
x11, &miss);
@ -1470,8 +1470,8 @@ void LoadIndexedStringStub::Generate(MacroAssembler* masm) {
Register result = x0;
Register scratch = x10;
DCHECK(!scratch.is(receiver) && !scratch.is(index));
DCHECK(!scratch.is(VectorLoadICDescriptor::VectorRegister()) &&
result.is(VectorLoadICDescriptor::SlotRegister()));
DCHECK(!scratch.is(LoadWithVectorDescriptor::VectorRegister()) &&
result.is(LoadWithVectorDescriptor::SlotRegister()));
// StringCharAtGenerator doesn't use the result register until it's passed
// the different miss possibilities. If it did, we would have a conflict
@ -3353,8 +3353,8 @@ void StringCharCodeAtGenerator::GenerateSlow(
__ JumpIfNotHeapNumber(index_, index_not_number_);
call_helper.BeforeCall(masm);
if (embed_mode == PART_OF_IC_HANDLER) {
__ Push(VectorLoadICDescriptor::VectorRegister(),
VectorLoadICDescriptor::SlotRegister(), object_, index_);
__ Push(LoadWithVectorDescriptor::VectorRegister(),
LoadWithVectorDescriptor::SlotRegister(), object_, index_);
} else {
// Save object_ on the stack and pass index_ as argument for runtime call.
__ Push(object_, index_);
@ -3370,8 +3370,8 @@ void StringCharCodeAtGenerator::GenerateSlow(
// have a chance to overwrite it.
__ Mov(index_, x0);
if (embed_mode == PART_OF_IC_HANDLER) {
__ Pop(object_, VectorLoadICDescriptor::SlotRegister(),
VectorLoadICDescriptor::VectorRegister());
__ Pop(object_, LoadWithVectorDescriptor::SlotRegister(),
LoadWithVectorDescriptor::VectorRegister());
} else {
__ Pop(object_);
}
@ -4495,15 +4495,15 @@ void StubFailureTrampolineStub::Generate(MacroAssembler* masm) {
void LoadICTrampolineStub::Generate(MacroAssembler* masm) {
EmitLoadTypeFeedbackVector(masm, VectorLoadICDescriptor::VectorRegister());
VectorRawLoadStub stub(isolate(), state());
EmitLoadTypeFeedbackVector(masm, LoadWithVectorDescriptor::VectorRegister());
LoadICStub stub(isolate(), state());
stub.GenerateForTrampoline(masm);
}
void KeyedLoadICTrampolineStub::Generate(MacroAssembler* masm) {
EmitLoadTypeFeedbackVector(masm, VectorLoadICDescriptor::VectorRegister());
VectorRawKeyedLoadStub stub(isolate());
EmitLoadTypeFeedbackVector(masm, LoadWithVectorDescriptor::VectorRegister());
KeyedLoadICStub stub(isolate());
stub.GenerateForTrampoline(masm);
}
@ -4522,12 +4522,10 @@ void CallIC_ArrayTrampolineStub::Generate(MacroAssembler* masm) {
}
void VectorRawLoadStub::Generate(MacroAssembler* masm) {
GenerateImpl(masm, false);
}
void LoadICStub::Generate(MacroAssembler* masm) { GenerateImpl(masm, false); }
void VectorRawLoadStub::GenerateForTrampoline(MacroAssembler* masm) {
void LoadICStub::GenerateForTrampoline(MacroAssembler* masm) {
GenerateImpl(masm, true);
}
@ -4624,11 +4622,11 @@ static void HandleMonomorphicCase(MacroAssembler* masm, Register receiver,
}
void VectorRawLoadStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
Register receiver = VectorLoadICDescriptor::ReceiverRegister(); // x1
Register name = VectorLoadICDescriptor::NameRegister(); // x2
Register vector = VectorLoadICDescriptor::VectorRegister(); // x3
Register slot = VectorLoadICDescriptor::SlotRegister(); // x0
void LoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
Register receiver = LoadWithVectorDescriptor::ReceiverRegister(); // x1
Register name = LoadWithVectorDescriptor::NameRegister(); // x2
Register vector = LoadWithVectorDescriptor::VectorRegister(); // x3
Register slot = LoadWithVectorDescriptor::SlotRegister(); // x0
Register feedback = x4;
Register receiver_map = x5;
Register scratch1 = x6;
@ -4668,21 +4666,21 @@ void VectorRawLoadStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
}
void VectorRawKeyedLoadStub::Generate(MacroAssembler* masm) {
void KeyedLoadICStub::Generate(MacroAssembler* masm) {
GenerateImpl(masm, false);
}
void VectorRawKeyedLoadStub::GenerateForTrampoline(MacroAssembler* masm) {
void KeyedLoadICStub::GenerateForTrampoline(MacroAssembler* masm) {
GenerateImpl(masm, true);
}
void VectorRawKeyedLoadStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
Register receiver = VectorLoadICDescriptor::ReceiverRegister(); // x1
Register key = VectorLoadICDescriptor::NameRegister(); // x2
Register vector = VectorLoadICDescriptor::VectorRegister(); // x3
Register slot = VectorLoadICDescriptor::SlotRegister(); // x0
void KeyedLoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
Register receiver = LoadWithVectorDescriptor::ReceiverRegister(); // x1
Register key = LoadWithVectorDescriptor::NameRegister(); // x2
Register vector = LoadWithVectorDescriptor::VectorRegister(); // x3
Register slot = LoadWithVectorDescriptor::SlotRegister(); // x0
Register feedback = x4;
Register receiver_map = x5;
Register scratch1 = x6;

View File

@ -207,8 +207,8 @@ void DebugCodegen::GenerateLoadICDebugBreak(MacroAssembler* masm) {
// Calling convention for IC load (from ic-arm.cc).
Register receiver = LoadDescriptor::ReceiverRegister();
Register name = LoadDescriptor::NameRegister();
RegList regs = receiver.Bit() | name.Bit() |
VectorLoadICTrampolineDescriptor::SlotRegister().Bit();
Register slot = LoadDescriptor::SlotRegister();
RegList regs = receiver.Bit() | name.Bit() | slot.Bit();
Generate_DebugBreakCallHelper(masm, regs, 0, x10);
}

View File

@ -1319,7 +1319,7 @@ void FullCodeGenerator::EmitLoadHomeObject(SuperReference* expr) {
Handle<Symbol> home_object_symbol(isolate()->heap()->home_object_symbol());
__ Mov(LoadDescriptor::NameRegister(), Operand(home_object_symbol));
__ Mov(VectorLoadICDescriptor::SlotRegister(),
__ Mov(LoadDescriptor::SlotRegister(),
SmiFromSlot(expr->HomeObjectFeedbackSlot()));
CallLoadIC(NOT_CONTEXTUAL);
@ -1389,7 +1389,7 @@ void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy,
__ Ldr(LoadDescriptor::ReceiverRegister(), GlobalObjectMemOperand());
__ Mov(LoadDescriptor::NameRegister(), Operand(proxy->var()->name()));
__ Mov(VectorLoadICDescriptor::SlotRegister(),
__ Mov(LoadDescriptor::SlotRegister(),
SmiFromSlot(proxy->VariableFeedbackSlot()));
ContextualMode mode = (typeof_state == INSIDE_TYPEOF) ? NOT_CONTEXTUAL
@ -1473,7 +1473,7 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
Comment cmnt(masm_, "Global variable");
__ Ldr(LoadDescriptor::ReceiverRegister(), GlobalObjectMemOperand());
__ Mov(LoadDescriptor::NameRegister(), Operand(var->name()));
__ Mov(VectorLoadICDescriptor::SlotRegister(),
__ Mov(LoadDescriptor::SlotRegister(),
SmiFromSlot(proxy->VariableFeedbackSlot()));
CallGlobalLoadIC(var->name());
context()->Plug(x0);
@ -2047,7 +2047,7 @@ void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
DCHECK(!prop->IsSuperAccess());
__ Mov(LoadDescriptor::NameRegister(), Operand(key->value()));
__ Mov(VectorLoadICDescriptor::SlotRegister(),
__ Mov(LoadDescriptor::SlotRegister(),
SmiFromSlot(prop->PropertyFeedbackSlot()));
CallLoadIC(NOT_CONTEXTUAL);
}
@ -2069,7 +2069,7 @@ void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
SetSourcePosition(prop->position());
// Call keyed load IC. It has arguments key and receiver in x0 and x1.
Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code();
__ Mov(VectorLoadICDescriptor::SlotRegister(),
__ Mov(LoadDescriptor::SlotRegister(),
SmiFromSlot(prop->PropertyFeedbackSlot()));
CallIC(ic);
}
@ -4298,7 +4298,7 @@ void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) {
// Load the function from the receiver.
Handle<String> name = expr->name();
__ Mov(LoadDescriptor::NameRegister(), Operand(name));
__ Mov(VectorLoadICDescriptor::SlotRegister(),
__ Mov(LoadDescriptor::SlotRegister(),
SmiFromSlot(expr->CallRuntimeFeedbackSlot()));
CallLoadIC(NOT_CONTEXTUAL);
}
@ -4728,7 +4728,7 @@ void FullCodeGenerator::VisitForTypeofValue(Expression* expr) {
Comment cmnt(masm_, "Global variable");
__ Ldr(LoadDescriptor::ReceiverRegister(), GlobalObjectMemOperand());
__ Mov(LoadDescriptor::NameRegister(), Operand(proxy->name()));
__ Mov(VectorLoadICDescriptor::SlotRegister(),
__ Mov(LoadDescriptor::SlotRegister(),
SmiFromSlot(proxy->VariableFeedbackSlot()));
// Use a regular load, not a contextual load, to avoid a reference
// error.
@ -5083,7 +5083,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ Bind(&l_call);
__ Peek(load_receiver, 1 * kPointerSize);
__ Peek(load_name, 2 * kPointerSize);
__ Mov(VectorLoadICDescriptor::SlotRegister(),
__ Mov(LoadDescriptor::SlotRegister(),
SmiFromSlot(expr->KeyedLoadFeedbackSlot()));
Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code();
CallIC(ic, TypeFeedbackId::None());
@ -5101,7 +5101,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ Push(load_receiver); // save result
__ LoadRoot(load_name, Heap::kdone_stringRootIndex); // "done"
__ Mov(VectorLoadICDescriptor::SlotRegister(),
__ Mov(LoadDescriptor::SlotRegister(),
SmiFromSlot(expr->DoneFeedbackSlot()));
CallLoadIC(NOT_CONTEXTUAL); // x0=result.done
// The ToBooleanStub argument (result.done) is in x0.
@ -5112,7 +5112,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
// result.value
__ Pop(load_receiver); // result
__ LoadRoot(load_name, Heap::kvalue_stringRootIndex); // "value"
__ Mov(VectorLoadICDescriptor::SlotRegister(),
__ Mov(LoadDescriptor::SlotRegister(),
SmiFromSlot(expr->ValueFeedbackSlot()));
CallLoadIC(NOT_CONTEXTUAL); // x0=result.value
context()->DropAndPlug(2, x0); // drop iter and g

View File

@ -16,12 +16,10 @@ const Register CallInterfaceDescriptor::ContextRegister() { return cp; }
const Register LoadDescriptor::ReceiverRegister() { return x1; }
const Register LoadDescriptor::NameRegister() { return x2; }
const Register LoadDescriptor::SlotRegister() { return x0; }
const Register VectorLoadICTrampolineDescriptor::SlotRegister() { return x0; }
const Register VectorLoadICDescriptor::VectorRegister() { return x3; }
const Register LoadWithVectorDescriptor::VectorRegister() { return x3; }
const Register StoreDescriptor::ReceiverRegister() { return x1; }

View File

@ -1686,7 +1686,7 @@ LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister());
LOperand* vector = NULL;
if (instr->HasVectorAndSlot()) {
vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
}
LLoadGlobalGeneric* result =
@ -1752,7 +1752,7 @@ LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister());
LOperand* vector = NULL;
if (instr->HasVectorAndSlot()) {
vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
}
LInstruction* result =
@ -1774,7 +1774,7 @@ LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
UseFixed(instr->object(), LoadDescriptor::ReceiverRegister());
LOperand* vector = NULL;
if (instr->HasVectorAndSlot()) {
vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
}
LInstruction* result =

View File

@ -3342,8 +3342,8 @@ void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) {
template <class T>
void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
Register vector_register = ToRegister(instr->temp_vector());
Register slot_register = VectorLoadICDescriptor::SlotRegister();
DCHECK(vector_register.is(VectorLoadICDescriptor::VectorRegister()));
Register slot_register = LoadWithVectorDescriptor::SlotRegister();
DCHECK(vector_register.is(LoadWithVectorDescriptor::VectorRegister()));
DCHECK(slot_register.is(x0));
AllowDeferredHandleDereference vector_structure_check;

View File

@ -26,7 +26,7 @@ Callable CodeFactory::LoadICInOptimizedCode(
InlineCacheState initialization_state) {
auto code = LoadIC::initialize_stub_in_optimized_code(
isolate, LoadICState(mode).GetExtraICState(), initialization_state);
return Callable(code, VectorLoadICDescriptor(isolate));
return Callable(code, LoadWithVectorDescriptor(isolate));
}
@ -43,7 +43,7 @@ Callable CodeFactory::KeyedLoadICInOptimizedCode(
auto code = KeyedLoadIC::initialize_stub_in_optimized_code(
isolate, initialization_state);
if (initialization_state != MEGAMORPHIC) {
return Callable(code, VectorLoadICDescriptor(isolate));
return Callable(code, LoadWithVectorDescriptor(isolate));
}
return Callable(code, LoadDescriptor(isolate));
}

View File

@ -618,7 +618,7 @@ void HandlerStub::InitializeDescriptor(CodeStubDescriptor* descriptor) {
CallInterfaceDescriptor HandlerStub::GetCallInterfaceDescriptor() {
if (kind() == Code::LOAD_IC || kind() == Code::KEYED_LOAD_IC) {
return VectorLoadICDescriptor(isolate());
return LoadWithVectorDescriptor(isolate());
} else {
DCHECK_EQ(Code::STORE_IC, kind());
return StoreDescriptor(isolate());

View File

@ -85,8 +85,8 @@ namespace internal {
V(StringAdd) \
V(ToBoolean) \
V(TransitionElementsKind) \
V(VectorRawKeyedLoad) \
V(VectorRawLoad) \
V(KeyedLoadIC) \
V(LoadIC) \
/* TurboFanCodeStubs */ \
V(StringLengthTF) \
V(MathFloor) \
@ -627,8 +627,8 @@ class MathFloorStub : public TurboFanCodeStub {
class StringLengthTFStub : public TurboFanCodeStub {
DEFINE_TURBOFAN_CODE_STUB(StringLengthTF, TurboFanCodeStub, LoadDescriptor,
0);
DEFINE_TURBOFAN_CODE_STUB(StringLengthTF, TurboFanCodeStub,
LoadWithVectorDescriptor, 0);
public:
Code::Kind GetCodeKind() const override { return Code::HANDLER; }
@ -986,7 +986,7 @@ class FunctionPrototypeStub : public PlatformCodeStub {
// translated to a hydrogen code stub, a new CallInterfaceDescriptor
// should be created that just uses that register for more efficient code.
CallInterfaceDescriptor GetCallInterfaceDescriptor() override {
return VectorLoadICDescriptor(isolate());
return LoadWithVectorDescriptor(isolate());
}
DEFINE_PLATFORM_CODE_STUB(FunctionPrototype, PlatformCodeStub);
@ -2077,7 +2077,7 @@ class LoadDictionaryElementStub : public HydrogenCodeStub {
: HydrogenCodeStub(isolate) {}
CallInterfaceDescriptor GetCallInterfaceDescriptor() override {
return VectorLoadICDescriptor(isolate());
return LoadWithVectorDescriptor(isolate());
}
DEFINE_HYDROGEN_CODE_STUB(LoadDictionaryElement, HydrogenCodeStub);
@ -2091,9 +2091,6 @@ class KeyedLoadGenericStub : public HydrogenCodeStub {
Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; }
InlineCacheState GetICState() const override { return GENERIC; }
// Since KeyedLoadGeneric stub doesn't miss (simply calls runtime), it
// doesn't need to use the VectorLoadICDescriptor for the case when
// flag --vector-ics is true.
DEFINE_CALL_INTERFACE_DESCRIPTOR(Load);
DEFINE_HYDROGEN_CODE_STUB(KeyedLoadGeneric, HydrogenCodeStub);
@ -2120,7 +2117,7 @@ class LoadICTrampolineStub : public PlatformCodeStub {
return LoadICState(static_cast<ExtraICState>(minor_key_));
}
DEFINE_CALL_INTERFACE_DESCRIPTOR(VectorLoadICTrampoline);
DEFINE_CALL_INTERFACE_DESCRIPTOR(Load);
DEFINE_PLATFORM_CODE_STUB(LoadICTrampoline, PlatformCodeStub);
};
@ -2171,9 +2168,9 @@ class CallIC_ArrayTrampolineStub : public CallICTrampolineStub {
};
class VectorRawLoadStub : public PlatformCodeStub {
class LoadICStub : public PlatformCodeStub {
public:
explicit VectorRawLoadStub(Isolate* isolate, const LoadICState& state)
explicit LoadICStub(Isolate* isolate, const LoadICState& state)
: PlatformCodeStub(isolate) {
minor_key_ = state.GetExtraICState();
}
@ -2188,18 +2185,17 @@ class VectorRawLoadStub : public PlatformCodeStub {
return static_cast<ExtraICState>(minor_key_);
}
DEFINE_CALL_INTERFACE_DESCRIPTOR(VectorLoadIC);
DEFINE_PLATFORM_CODE_STUB(VectorRawLoad, PlatformCodeStub);
DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector);
DEFINE_PLATFORM_CODE_STUB(LoadIC, PlatformCodeStub);
protected:
void GenerateImpl(MacroAssembler* masm, bool in_frame);
};
class VectorRawKeyedLoadStub : public PlatformCodeStub {
class KeyedLoadICStub : public PlatformCodeStub {
public:
explicit VectorRawKeyedLoadStub(Isolate* isolate)
: PlatformCodeStub(isolate) {}
explicit KeyedLoadICStub(Isolate* isolate) : PlatformCodeStub(isolate) {}
void GenerateForTrampoline(MacroAssembler* masm);
@ -2209,8 +2205,8 @@ class VectorRawKeyedLoadStub : public PlatformCodeStub {
virtual InlineCacheState GetICState() const final override { return DEFAULT; }
DEFINE_CALL_INTERFACE_DESCRIPTOR(VectorLoadIC);
DEFINE_PLATFORM_CODE_STUB(VectorRawKeyedLoad, PlatformCodeStub);
DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector);
DEFINE_PLATFORM_CODE_STUB(KeyedLoadIC, PlatformCodeStub);
protected:
void GenerateImpl(MacroAssembler* masm, bool in_frame);

View File

@ -708,8 +708,8 @@ void LoadIndexedStringStub::Generate(MacroAssembler* masm) {
DCHECK(!scratch.is(receiver) && !scratch.is(index));
Register result = eax;
DCHECK(!result.is(scratch));
DCHECK(!scratch.is(VectorLoadICDescriptor::VectorRegister()) &&
result.is(VectorLoadICDescriptor::SlotRegister()));
DCHECK(!scratch.is(LoadWithVectorDescriptor::VectorRegister()) &&
result.is(LoadDescriptor::SlotRegister()));
// StringCharAtGenerator doesn't use the result register until it's passed
// the different miss possibilities. If it did, we would have a conflict
@ -2969,8 +2969,8 @@ void StringCharCodeAtGenerator::GenerateSlow(
DONT_DO_SMI_CHECK);
call_helper.BeforeCall(masm);
if (embed_mode == PART_OF_IC_HANDLER) {
__ push(VectorLoadICDescriptor::VectorRegister());
__ push(VectorLoadICDescriptor::SlotRegister());
__ push(LoadWithVectorDescriptor::VectorRegister());
__ push(LoadDescriptor::SlotRegister());
}
__ push(object_);
__ push(index_); // Consumed by runtime conversion function.
@ -2988,8 +2988,8 @@ void StringCharCodeAtGenerator::GenerateSlow(
}
__ pop(object_);
if (embed_mode == PART_OF_IC_HANDLER) {
__ pop(VectorLoadICDescriptor::SlotRegister());
__ pop(VectorLoadICDescriptor::VectorRegister());
__ pop(LoadDescriptor::SlotRegister());
__ pop(LoadWithVectorDescriptor::VectorRegister());
}
// Reload the instance type.
__ mov(result_, FieldOperand(object_, HeapObject::kMapOffset));
@ -4420,15 +4420,15 @@ void StubFailureTrampolineStub::Generate(MacroAssembler* masm) {
void LoadICTrampolineStub::Generate(MacroAssembler* masm) {
EmitLoadTypeFeedbackVector(masm, VectorLoadICDescriptor::VectorRegister());
VectorRawLoadStub stub(isolate(), state());
EmitLoadTypeFeedbackVector(masm, LoadWithVectorDescriptor::VectorRegister());
LoadICStub stub(isolate(), state());
stub.GenerateForTrampoline(masm);
}
void KeyedLoadICTrampolineStub::Generate(MacroAssembler* masm) {
EmitLoadTypeFeedbackVector(masm, VectorLoadICDescriptor::VectorRegister());
VectorRawKeyedLoadStub stub(isolate());
EmitLoadTypeFeedbackVector(masm, LoadWithVectorDescriptor::VectorRegister());
KeyedLoadICStub stub(isolate());
stub.GenerateForTrampoline(masm);
}
@ -4545,21 +4545,19 @@ static void HandleMonomorphicCase(MacroAssembler* masm, Register receiver,
}
void VectorRawLoadStub::Generate(MacroAssembler* masm) {
GenerateImpl(masm, false);
}
void LoadICStub::Generate(MacroAssembler* masm) { GenerateImpl(masm, false); }
void VectorRawLoadStub::GenerateForTrampoline(MacroAssembler* masm) {
void LoadICStub::GenerateForTrampoline(MacroAssembler* masm) {
GenerateImpl(masm, true);
}
void VectorRawLoadStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
Register receiver = VectorLoadICDescriptor::ReceiverRegister(); // edx
Register name = VectorLoadICDescriptor::NameRegister(); // ecx
Register vector = VectorLoadICDescriptor::VectorRegister(); // ebx
Register slot = VectorLoadICDescriptor::SlotRegister(); // eax
void LoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
Register receiver = LoadWithVectorDescriptor::ReceiverRegister(); // edx
Register name = LoadWithVectorDescriptor::NameRegister(); // ecx
Register vector = LoadWithVectorDescriptor::VectorRegister(); // ebx
Register slot = LoadWithVectorDescriptor::SlotRegister(); // eax
Register scratch = edi;
__ mov(scratch, FieldOperand(vector, slot, times_half_pointer_size,
FixedArray::kHeaderSize));
@ -4594,21 +4592,21 @@ void VectorRawLoadStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
}
void VectorRawKeyedLoadStub::Generate(MacroAssembler* masm) {
void KeyedLoadICStub::Generate(MacroAssembler* masm) {
GenerateImpl(masm, false);
}
void VectorRawKeyedLoadStub::GenerateForTrampoline(MacroAssembler* masm) {
void KeyedLoadICStub::GenerateForTrampoline(MacroAssembler* masm) {
GenerateImpl(masm, true);
}
void VectorRawKeyedLoadStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
Register receiver = VectorLoadICDescriptor::ReceiverRegister(); // edx
Register key = VectorLoadICDescriptor::NameRegister(); // ecx
Register vector = VectorLoadICDescriptor::VectorRegister(); // ebx
Register slot = VectorLoadICDescriptor::SlotRegister(); // eax
void KeyedLoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
Register receiver = LoadWithVectorDescriptor::ReceiverRegister(); // edx
Register key = LoadWithVectorDescriptor::NameRegister(); // ecx
Register vector = LoadWithVectorDescriptor::VectorRegister(); // ebx
Register slot = LoadWithVectorDescriptor::SlotRegister(); // eax
Register feedback = edi;
__ mov(feedback, FieldOperand(vector, slot, times_half_pointer_size,
FixedArray::kHeaderSize));

View File

@ -183,8 +183,8 @@ void DebugCodegen::GenerateLoadICDebugBreak(MacroAssembler* masm) {
// Register state for IC load call (from ic-ia32.cc).
Register receiver = LoadDescriptor::ReceiverRegister();
Register name = LoadDescriptor::NameRegister();
RegList regs = receiver.bit() | name.bit() |
VectorLoadICTrampolineDescriptor::SlotRegister().bit();
Register slot = LoadDescriptor::SlotRegister();
RegList regs = receiver.bit() | name.bit() | slot.bit();
Generate_DebugBreakCallHelper(masm, regs, 0, false);
}

View File

@ -1260,7 +1260,7 @@ void FullCodeGenerator::EmitLoadHomeObject(SuperReference* expr) {
Handle<Symbol> home_object_symbol(isolate()->heap()->home_object_symbol());
__ mov(LoadDescriptor::NameRegister(), home_object_symbol);
__ mov(VectorLoadICDescriptor::SlotRegister(),
__ mov(LoadDescriptor::SlotRegister(),
Immediate(SmiFromSlot(expr->HomeObjectFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL);
@ -1337,7 +1337,7 @@ void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy,
// load IC call.
__ mov(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
__ mov(LoadDescriptor::NameRegister(), proxy->var()->name());
__ mov(VectorLoadICDescriptor::SlotRegister(),
__ mov(LoadDescriptor::SlotRegister(),
Immediate(SmiFromSlot(proxy->VariableFeedbackSlot())));
ContextualMode mode = (typeof_state == INSIDE_TYPEOF)
@ -1423,7 +1423,7 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
Comment cmnt(masm_, "[ Global variable");
__ mov(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
__ mov(LoadDescriptor::NameRegister(), var->name());
__ mov(VectorLoadICDescriptor::SlotRegister(),
__ mov(LoadDescriptor::SlotRegister(),
Immediate(SmiFromSlot(proxy->VariableFeedbackSlot())));
CallGlobalLoadIC(var->name());
context()->Plug(eax);
@ -2118,7 +2118,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
// result = receiver[f](arg);
__ bind(&l_call);
__ mov(load_receiver, Operand(esp, kPointerSize));
__ mov(VectorLoadICDescriptor::SlotRegister(),
__ mov(LoadDescriptor::SlotRegister(),
Immediate(SmiFromSlot(expr->KeyedLoadFeedbackSlot())));
Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code();
CallIC(ic, TypeFeedbackId::None());
@ -2136,7 +2136,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ Move(load_receiver, eax); // result
__ mov(load_name,
isolate()->factory()->done_string()); // "done"
__ mov(VectorLoadICDescriptor::SlotRegister(),
__ mov(LoadDescriptor::SlotRegister(),
Immediate(SmiFromSlot(expr->DoneFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL); // result.done in eax
Handle<Code> bool_ic = ToBooleanStub::GetUninitialized(isolate());
@ -2148,7 +2148,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ pop(load_receiver); // result
__ mov(load_name,
isolate()->factory()->value_string()); // "value"
__ mov(VectorLoadICDescriptor::SlotRegister(),
__ mov(LoadDescriptor::SlotRegister(),
Immediate(SmiFromSlot(expr->ValueFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL); // result.value in eax
context()->DropAndPlug(2, eax); // drop iter and g
@ -2287,7 +2287,7 @@ void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
DCHECK(!prop->IsSuperAccess());
__ mov(LoadDescriptor::NameRegister(), Immediate(key->value()));
__ mov(VectorLoadICDescriptor::SlotRegister(),
__ mov(LoadDescriptor::SlotRegister(),
Immediate(SmiFromSlot(prop->PropertyFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL);
}
@ -2308,7 +2308,7 @@ void FullCodeGenerator::EmitNamedSuperPropertyLoad(Property* prop) {
void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
SetSourcePosition(prop->position());
Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code();
__ mov(VectorLoadICDescriptor::SlotRegister(),
__ mov(LoadDescriptor::SlotRegister(),
Immediate(SmiFromSlot(prop->PropertyFeedbackSlot())));
CallIC(ic);
}
@ -4534,7 +4534,7 @@ void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) {
// Load the function from the receiver.
__ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, 0));
__ mov(LoadDescriptor::NameRegister(), Immediate(expr->name()));
__ mov(VectorLoadICDescriptor::SlotRegister(),
__ mov(LoadDescriptor::SlotRegister(),
Immediate(SmiFromSlot(expr->CallRuntimeFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL);
}
@ -4975,7 +4975,7 @@ void FullCodeGenerator::VisitForTypeofValue(Expression* expr) {
Comment cmnt(masm_, "[ Global variable");
__ mov(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
__ mov(LoadDescriptor::NameRegister(), Immediate(proxy->name()));
__ mov(VectorLoadICDescriptor::SlotRegister(),
__ mov(LoadDescriptor::SlotRegister(),
Immediate(SmiFromSlot(proxy->VariableFeedbackSlot())));
// Use a regular load, not a contextual load, to avoid a reference
// error.

View File

@ -16,12 +16,9 @@ const Register CallInterfaceDescriptor::ContextRegister() { return esi; }
const Register LoadDescriptor::ReceiverRegister() { return edx; }
const Register LoadDescriptor::NameRegister() { return ecx; }
const Register LoadDescriptor::SlotRegister() { return eax; }
const Register VectorLoadICTrampolineDescriptor::SlotRegister() { return eax; }
const Register VectorLoadICDescriptor::VectorRegister() { return ebx; }
const Register LoadWithVectorDescriptor::VectorRegister() { return ebx; }
const Register StoreDescriptor::ReceiverRegister() { return edx; }

View File

@ -2870,8 +2870,8 @@ void LCodeGen::DoReturn(LReturn* instr) {
template <class T>
void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
Register vector_register = ToRegister(instr->temp_vector());
Register slot_register = VectorLoadICDescriptor::SlotRegister();
DCHECK(vector_register.is(VectorLoadICDescriptor::VectorRegister()));
Register slot_register = LoadWithVectorDescriptor::SlotRegister();
DCHECK(vector_register.is(LoadWithVectorDescriptor::VectorRegister()));
DCHECK(slot_register.is(eax));
AllowDeferredHandleDereference vector_structure_check;

View File

@ -2127,7 +2127,7 @@ LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister());
LOperand* vector = NULL;
if (instr->HasVectorAndSlot()) {
vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
}
LLoadGlobalGeneric* result =
@ -2181,7 +2181,7 @@ LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
UseFixed(instr->object(), LoadDescriptor::ReceiverRegister());
LOperand* vector = NULL;
if (instr->HasVectorAndSlot()) {
vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
}
LLoadNamedGeneric* result = new(zone()) LLoadNamedGeneric(
context, object, vector);
@ -2253,7 +2253,7 @@ LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister());
LOperand* vector = NULL;
if (instr->HasVectorAndSlot()) {
vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
}
LLoadKeyedGeneric* result =
new(zone()) LLoadKeyedGeneric(context, object, key, vector);

View File

@ -54,12 +54,8 @@ class PropertyAccessCompiler BASE_EMBEDDED {
Register receiver() const { return registers_[0]; }
Register name() const { return registers_[1]; }
Register slot() const {
return VectorLoadICDescriptor::SlotRegister();
}
Register vector() const {
return VectorLoadICDescriptor::VectorRegister();
}
Register slot() const { return LoadDescriptor::SlotRegister(); }
Register vector() const { return LoadWithVectorDescriptor::VectorRegister(); }
Register scratch1() const { return registers_[2]; }
Register scratch2() const { return registers_[3]; }
Register scratch3() const { return registers_[4]; }

View File

@ -289,8 +289,8 @@ static const Register LoadIC_TempRegister() { return r3; }
static void LoadIC_PushArgs(MacroAssembler* masm) {
Register receiver = LoadDescriptor::ReceiverRegister();
Register name = LoadDescriptor::NameRegister();
Register slot = VectorLoadICDescriptor::SlotRegister();
Register vector = VectorLoadICDescriptor::VectorRegister();
Register slot = LoadDescriptor::SlotRegister();
Register vector = LoadWithVectorDescriptor::VectorRegister();
__ Push(receiver, name, slot, vector);
}
@ -300,8 +300,8 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
// The return address is in lr.
Isolate* isolate = masm->isolate();
DCHECK(!AreAliased(r4, r5, VectorLoadICDescriptor::SlotRegister(),
VectorLoadICDescriptor::VectorRegister()));
DCHECK(!AreAliased(r4, r5, LoadWithVectorDescriptor::SlotRegister(),
LoadWithVectorDescriptor::VectorRegister()));
__ IncrementCounter(isolate->counters()->load_miss(), 1, r4, r5);
LoadIC_PushArgs(masm);
@ -436,8 +436,8 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
// The return address is in lr.
Isolate* isolate = masm->isolate();
DCHECK(!AreAliased(r4, r5, VectorLoadICDescriptor::SlotRegister(),
VectorLoadICDescriptor::VectorRegister()));
DCHECK(!AreAliased(r4, r5, LoadWithVectorDescriptor::SlotRegister(),
LoadWithVectorDescriptor::VectorRegister()));
__ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, r4, r5);
LoadIC_PushArgs(masm);
@ -523,8 +523,8 @@ void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm) {
// The handlers in the stub cache expect a vector and slot. Since we won't
// change the IC from any downstream misses, a dummy vector can be used.
Register vector = VectorLoadICDescriptor::VectorRegister();
Register slot = VectorLoadICDescriptor::SlotRegister();
Register vector = LoadWithVectorDescriptor::VectorRegister();
Register slot = LoadWithVectorDescriptor::SlotRegister();
DCHECK(!AreAliased(vector, slot, r4, r5, r6, r9));
Handle<TypeFeedbackVector> dummy_vector = Handle<TypeFeedbackVector>::cast(
masm->isolate()->factory()->keyed_load_dummy_vector());

View File

@ -125,8 +125,8 @@ void StubCache::GenerateProbe(MacroAssembler* masm, Code::Kind ic_kind,
// extra3 don't conflict with the vector and slot registers, which need
// to be preserved for a handler call or miss.
if (IC::ICUseVector(ic_kind)) {
Register vector = VectorLoadICDescriptor::VectorRegister();
Register slot = VectorLoadICDescriptor::SlotRegister();
Register vector = LoadWithVectorDescriptor::VectorRegister();
Register slot = LoadWithVectorDescriptor::SlotRegister();
DCHECK(!AreAliased(vector, slot, scratch, extra, extra2, extra3));
}
#endif

View File

@ -368,15 +368,15 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
Isolate* isolate = masm->isolate();
ASM_LOCATION("LoadIC::GenerateMiss");
DCHECK(!AreAliased(x4, x5, VectorLoadICDescriptor::SlotRegister(),
VectorLoadICDescriptor::VectorRegister()));
DCHECK(!AreAliased(x4, x5, LoadWithVectorDescriptor::SlotRegister(),
LoadWithVectorDescriptor::VectorRegister()));
__ IncrementCounter(isolate->counters()->load_miss(), 1, x4, x5);
// Perform tail call to the entry.
__ Push(VectorLoadICDescriptor::ReceiverRegister(),
VectorLoadICDescriptor::NameRegister(),
VectorLoadICDescriptor::SlotRegister(),
VectorLoadICDescriptor::VectorRegister());
__ Push(LoadWithVectorDescriptor::ReceiverRegister(),
LoadWithVectorDescriptor::NameRegister(),
LoadWithVectorDescriptor::SlotRegister(),
LoadWithVectorDescriptor::VectorRegister());
ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate);
int arg_count = 4;
__ TailCallExternalReference(ref, arg_count, 1);
@ -440,14 +440,14 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
// The return address is in lr.
Isolate* isolate = masm->isolate();
DCHECK(!AreAliased(x10, x11, VectorLoadICDescriptor::SlotRegister(),
VectorLoadICDescriptor::VectorRegister()));
DCHECK(!AreAliased(x10, x11, LoadWithVectorDescriptor::SlotRegister(),
LoadWithVectorDescriptor::VectorRegister()));
__ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, x10, x11);
__ Push(VectorLoadICDescriptor::ReceiverRegister(),
VectorLoadICDescriptor::NameRegister(),
VectorLoadICDescriptor::SlotRegister(),
VectorLoadICDescriptor::VectorRegister());
__ Push(LoadWithVectorDescriptor::ReceiverRegister(),
LoadWithVectorDescriptor::NameRegister(),
LoadWithVectorDescriptor::SlotRegister(),
LoadWithVectorDescriptor::VectorRegister());
// Perform tail call to the entry.
ExternalReference ref =
@ -525,8 +525,8 @@ static void GenerateKeyedLoadWithNameKey(MacroAssembler* masm, Register key,
// The handlers in the stub cache expect a vector and slot. Since we won't
// change the IC from any downstream misses, a dummy vector can be used.
Register vector = VectorLoadICDescriptor::VectorRegister();
Register slot = VectorLoadICDescriptor::SlotRegister();
Register vector = LoadWithVectorDescriptor::VectorRegister();
Register slot = LoadWithVectorDescriptor::SlotRegister();
DCHECK(!AreAliased(vector, slot, scratch1, scratch2, scratch3, scratch4));
Handle<TypeFeedbackVector> dummy_vector = Handle<TypeFeedbackVector>::cast(
masm->isolate()->factory()->keyed_load_dummy_vector());

View File

@ -116,8 +116,8 @@ void StubCache::GenerateProbe(MacroAssembler* masm, Code::Kind ic_kind,
// extra3 don't conflict with the vector and slot registers, which need
// to be preserved for a handler call or miss.
if (IC::ICUseVector(ic_kind)) {
Register vector = VectorLoadICDescriptor::VectorRegister();
Register slot = VectorLoadICDescriptor::SlotRegister();
Register vector = LoadWithVectorDescriptor::VectorRegister();
Register slot = LoadWithVectorDescriptor::SlotRegister();
DCHECK(!AreAliased(vector, slot, scratch, extra, extra2, extra3));
}
#endif

View File

@ -412,8 +412,8 @@ void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm) {
masm->isolate()->stub_cache()->GenerateProbe(masm, Code::KEYED_LOAD_IC, flags,
false, receiver, key, ebx, edi);
__ pop(VectorLoadICDescriptor::VectorRegister());
__ pop(VectorLoadICDescriptor::SlotRegister());
__ pop(LoadWithVectorDescriptor::VectorRegister());
__ pop(LoadDescriptor::SlotRegister());
// Cache miss.
GenerateMiss(masm);
@ -729,8 +729,8 @@ static void LoadIC_PushArgs(MacroAssembler* masm) {
Register receiver = LoadDescriptor::ReceiverRegister();
Register name = LoadDescriptor::NameRegister();
Register slot = VectorLoadICDescriptor::SlotRegister();
Register vector = VectorLoadICDescriptor::VectorRegister();
Register slot = LoadDescriptor::SlotRegister();
Register vector = LoadWithVectorDescriptor::VectorRegister();
DCHECK(!edi.is(receiver) && !edi.is(name) && !edi.is(slot) &&
!edi.is(vector));

View File

@ -61,8 +61,8 @@ static void ProbeTable(Isolate* isolate, MacroAssembler* masm,
if (IC::ICUseVector(ic_kind)) {
// The vector and slot were pushed onto the stack before starting the
// probe, and need to be dropped before calling the handler.
__ pop(VectorLoadICDescriptor::VectorRegister());
__ pop(VectorLoadICDescriptor::SlotRegister());
__ pop(LoadWithVectorDescriptor::VectorRegister());
__ pop(LoadDescriptor::SlotRegister());
}
if (leave_frame) __ leave();
@ -112,8 +112,8 @@ static void ProbeTable(Isolate* isolate, MacroAssembler* masm,
if (IC::ICUseVector(ic_kind)) {
// The vector and slot were pushed onto the stack before starting the
// probe, and need to be dropped before calling the handler.
Register vector = VectorLoadICDescriptor::VectorRegister();
Register slot = VectorLoadICDescriptor::SlotRegister();
Register vector = LoadWithVectorDescriptor::VectorRegister();
Register slot = LoadDescriptor::SlotRegister();
DCHECK(!offset.is(vector) && !offset.is(slot));
__ pop(vector);

View File

@ -922,7 +922,7 @@ Handle<Code> LoadIC::initialize_stub(Isolate* isolate,
Handle<Code> LoadIC::initialize_stub_in_optimized_code(
Isolate* isolate, ExtraICState extra_state, State initialization_state) {
return VectorRawLoadStub(isolate, LoadICState(extra_state)).GetCode();
return LoadICStub(isolate, LoadICState(extra_state)).GetCode();
}
@ -934,7 +934,7 @@ Handle<Code> KeyedLoadIC::initialize_stub(Isolate* isolate) {
Handle<Code> KeyedLoadIC::initialize_stub_in_optimized_code(
Isolate* isolate, State initialization_state) {
if (initialization_state != MEGAMORPHIC) {
return VectorRawKeyedLoadStub(isolate).GetCode();
return KeyedLoadICStub(isolate).GetCode();
}
switch (initialization_state) {
case UNINITIALIZED:

View File

@ -296,8 +296,8 @@ static const Register LoadIC_TempRegister() { return a3; }
static void LoadIC_PushArgs(MacroAssembler* masm) {
Register receiver = LoadDescriptor::ReceiverRegister();
Register name = LoadDescriptor::NameRegister();
Register slot = VectorLoadICDescriptor::SlotRegister();
Register vector = VectorLoadICDescriptor::VectorRegister();
Register slot = LoadDescriptor::SlotRegister();
Register vector = LoadWithVectorDescriptor::VectorRegister();
__ Push(receiver, name, slot, vector);
}
@ -307,8 +307,8 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
// The return address is in ra.
Isolate* isolate = masm->isolate();
DCHECK(!AreAliased(t0, t1, VectorLoadICDescriptor::SlotRegister(),
VectorLoadICDescriptor::VectorRegister()));
DCHECK(!AreAliased(t0, t1, LoadWithVectorDescriptor::SlotRegister(),
LoadWithVectorDescriptor::VectorRegister()));
__ IncrementCounter(isolate->counters()->load_miss(), 1, t0, t1);
LoadIC_PushArgs(masm);
@ -445,8 +445,8 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
// The return address is in ra.
Isolate* isolate = masm->isolate();
DCHECK(!AreAliased(t0, t1, VectorLoadICDescriptor::SlotRegister(),
VectorLoadICDescriptor::VectorRegister()));
DCHECK(!AreAliased(t0, t1, LoadWithVectorDescriptor::SlotRegister(),
LoadWithVectorDescriptor::VectorRegister()));
__ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, t0, t1);
LoadIC_PushArgs(masm);
@ -532,8 +532,8 @@ void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm) {
// The handlers in the stub cache expect a vector and slot. Since we won't
// change the IC from any downstream misses, a dummy vector can be used.
Register vector = VectorLoadICDescriptor::VectorRegister();
Register slot = VectorLoadICDescriptor::SlotRegister();
Register vector = LoadWithVectorDescriptor::VectorRegister();
Register slot = LoadWithVectorDescriptor::SlotRegister();
DCHECK(!AreAliased(vector, slot, t0, t1, t2, t5));
Handle<TypeFeedbackVector> dummy_vector = Handle<TypeFeedbackVector>::cast(
masm->isolate()->factory()->keyed_load_dummy_vector());

View File

@ -121,8 +121,8 @@ void StubCache::GenerateProbe(MacroAssembler* masm, Code::Kind ic_kind,
// extra3 don't conflict with the vector and slot registers, which need
// to be preserved for a handler call or miss.
if (IC::ICUseVector(ic_kind)) {
Register vector = VectorLoadICDescriptor::VectorRegister();
Register slot = VectorLoadICDescriptor::SlotRegister();
Register vector = LoadWithVectorDescriptor::VectorRegister();
Register slot = LoadWithVectorDescriptor::SlotRegister();
DCHECK(!AreAliased(vector, slot, scratch, extra, extra2, extra3));
}
#endif

View File

@ -294,8 +294,8 @@ static const Register LoadIC_TempRegister() { return a3; }
static void LoadIC_PushArgs(MacroAssembler* masm) {
Register receiver = LoadDescriptor::ReceiverRegister();
Register name = LoadDescriptor::NameRegister();
Register slot = VectorLoadICDescriptor::SlotRegister();
Register vector = VectorLoadICDescriptor::VectorRegister();
Register slot = LoadDescriptor::SlotRegister();
Register vector = LoadWithVectorDescriptor::VectorRegister();
__ Push(receiver, name, slot, vector);
}
@ -305,8 +305,8 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
// The return address is on the stack.
Isolate* isolate = masm->isolate();
DCHECK(!AreAliased(a4, a5, VectorLoadICDescriptor::SlotRegister(),
VectorLoadICDescriptor::VectorRegister()));
DCHECK(!AreAliased(a4, a5, LoadWithVectorDescriptor::SlotRegister(),
LoadWithVectorDescriptor::VectorRegister()));
__ IncrementCounter(isolate->counters()->load_miss(), 1, a4, a5);
LoadIC_PushArgs(masm);
@ -443,8 +443,8 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
// The return address is in ra.
Isolate* isolate = masm->isolate();
DCHECK(!AreAliased(a4, a5, VectorLoadICDescriptor::SlotRegister(),
VectorLoadICDescriptor::VectorRegister()));
DCHECK(!AreAliased(a4, a5, LoadWithVectorDescriptor::SlotRegister(),
LoadWithVectorDescriptor::VectorRegister()));
__ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a4, a5);
LoadIC_PushArgs(masm);
@ -530,8 +530,8 @@ void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm) {
// The handlers in the stub cache expect a vector and slot. Since we won't
// change the IC from any downstream misses, a dummy vector can be used.
Register vector = VectorLoadICDescriptor::VectorRegister();
Register slot = VectorLoadICDescriptor::SlotRegister();
Register vector = LoadWithVectorDescriptor::VectorRegister();
Register slot = LoadWithVectorDescriptor::SlotRegister();
DCHECK(!AreAliased(vector, slot, a4, a5, a6, t1));
Handle<TypeFeedbackVector> dummy_vector = Handle<TypeFeedbackVector>::cast(
masm->isolate()->factory()->keyed_load_dummy_vector());

View File

@ -122,8 +122,8 @@ void StubCache::GenerateProbe(MacroAssembler* masm, Code::Kind ic_kind,
// extra3 don't conflict with the vector and slot registers, which need
// to be preserved for a handler call or miss.
if (IC::ICUseVector(ic_kind)) {
Register vector = VectorLoadICDescriptor::VectorRegister();
Register slot = VectorLoadICDescriptor::SlotRegister();
Register vector = LoadWithVectorDescriptor::VectorRegister();
Register slot = LoadWithVectorDescriptor::SlotRegister();
DCHECK(!AreAliased(vector, slot, scratch, extra, extra2, extra3));
}
#endif

View File

@ -335,8 +335,8 @@ void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm) {
Register megamorphic_scratch = rdi;
// The handlers in the stub cache expect a vector and slot. Since we won't
// change the IC from any downstream misses, a dummy vector can be used.
Register vector = VectorLoadICDescriptor::VectorRegister();
Register slot = VectorLoadICDescriptor::SlotRegister();
Register vector = LoadWithVectorDescriptor::VectorRegister();
Register slot = LoadDescriptor::SlotRegister();
DCHECK(!AreAliased(megamorphic_scratch, vector, slot));
Handle<TypeFeedbackVector> dummy_vector = Handle<TypeFeedbackVector>::cast(
masm->isolate()->factory()->keyed_load_dummy_vector());
@ -734,8 +734,8 @@ void LoadIC::GenerateNormal(MacroAssembler* masm) {
static void LoadIC_PushArgs(MacroAssembler* masm) {
Register receiver = LoadDescriptor::ReceiverRegister();
Register name = LoadDescriptor::NameRegister();
Register slot = VectorLoadICDescriptor::SlotRegister();
Register vector = VectorLoadICDescriptor::VectorRegister();
Register slot = LoadDescriptor::SlotRegister();
Register vector = LoadWithVectorDescriptor::VectorRegister();
DCHECK(!rdi.is(receiver) && !rdi.is(name) && !rdi.is(slot) &&
!rdi.is(vector));

View File

@ -115,8 +115,8 @@ void StubCache::GenerateProbe(MacroAssembler* masm, Code::Kind ic_kind,
// the vector and slot registers, which need to be preserved for a handler
// call or miss.
if (IC::ICUseVector(ic_kind)) {
Register vector = VectorLoadICDescriptor::VectorRegister();
Register slot = VectorLoadICDescriptor::SlotRegister();
Register vector = LoadWithVectorDescriptor::VectorRegister();
Register slot = LoadDescriptor::SlotRegister();
DCHECK(!AreAliased(vector, slot, scratch));
}
#endif

View File

@ -61,9 +61,12 @@ const char* CallInterfaceDescriptor::DebugName(Isolate* isolate) const {
void LoadDescriptor::Initialize(CallInterfaceDescriptorData* data) {
Register registers[] = {ContextRegister(), ReceiverRegister(),
NameRegister()};
data->Initialize(arraysize(registers), registers, NULL);
Register registers[] = {ContextRegister(), ReceiverRegister(), NameRegister(),
SlotRegister()};
Representation representations[] = {
Representation::Tagged(), Representation::Tagged(),
Representation::Tagged(), Representation::Smi()};
data->Initialize(arraysize(registers), registers, representations);
}
@ -107,15 +110,7 @@ void MathPowIntegerDescriptor::Initialize(CallInterfaceDescriptorData* data) {
}
void VectorLoadICTrampolineDescriptor::Initialize(
CallInterfaceDescriptorData* data) {
Register registers[] = {ContextRegister(), ReceiverRegister(), NameRegister(),
SlotRegister()};
data->Initialize(arraysize(registers), registers, NULL);
}
void VectorLoadICDescriptor::Initialize(CallInterfaceDescriptorData* data) {
void LoadWithVectorDescriptor::Initialize(CallInterfaceDescriptorData* data) {
Register registers[] = {ContextRegister(), ReceiverRegister(), NameRegister(),
SlotRegister(), VectorRegister()};
Representation representations[] = {

View File

@ -19,8 +19,7 @@ class PlatformInterfaceDescriptor;
V(StoreTransition) \
V(ElementTransitionAndStore) \
V(Instanceof) \
V(VectorLoadICTrampoline) \
V(VectorLoadIC) \
V(LoadWithVector) \
V(FastNewClosure) \
V(FastNewContext) \
V(ToNumber) \
@ -200,9 +199,10 @@ class LoadDescriptor : public CallInterfaceDescriptor {
public:
DECLARE_DESCRIPTOR(LoadDescriptor, CallInterfaceDescriptor)
enum ParameterIndices { kReceiverIndex, kNameIndex };
enum ParameterIndices { kReceiverIndex, kNameIndex, kSlotIndex };
static const Register ReceiverRegister();
static const Register NameRegister();
static const Register SlotRegister();
};
@ -256,19 +256,9 @@ class InstanceofDescriptor : public CallInterfaceDescriptor {
};
class VectorLoadICTrampolineDescriptor : public LoadDescriptor {
class LoadWithVectorDescriptor : public LoadDescriptor {
public:
DECLARE_DESCRIPTOR(VectorLoadICTrampolineDescriptor, LoadDescriptor)
enum ParameterIndices { kReceiverIndex, kNameIndex, kSlotIndex };
static const Register SlotRegister();
};
class VectorLoadICDescriptor : public VectorLoadICTrampolineDescriptor {
public:
DECLARE_DESCRIPTOR(VectorLoadICDescriptor, VectorLoadICTrampolineDescriptor)
DECLARE_DESCRIPTOR(LoadWithVectorDescriptor, LoadDescriptor)
enum ParameterIndices {
kReceiverIndex,

View File

@ -1386,7 +1386,7 @@ void LoadIndexedStringStub::Generate(MacroAssembler* masm) {
Register scratch = t1;
Register result = v0;
DCHECK(!scratch.is(receiver) && !scratch.is(index));
DCHECK(!scratch.is(VectorLoadICDescriptor::VectorRegister()));
DCHECK(!scratch.is(LoadWithVectorDescriptor::VectorRegister()));
StringCharAtGenerator char_at_generator(receiver, index, scratch, result,
&miss, // When not a string.
@ -1610,8 +1610,8 @@ void FunctionPrototypeStub::Generate(MacroAssembler* masm) {
Register receiver = LoadDescriptor::ReceiverRegister();
// Ensure that the vector and slot registers won't be clobbered before
// calling the miss handler.
DCHECK(!AreAliased(t0, t1, VectorLoadICDescriptor::VectorRegister(),
VectorLoadICDescriptor::SlotRegister()));
DCHECK(!AreAliased(t0, t1, LoadWithVectorDescriptor::VectorRegister(),
LoadWithVectorDescriptor::SlotRegister()));
NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, t0,
t1, &miss);
@ -3091,8 +3091,8 @@ void StringCharCodeAtGenerator::GenerateSlow(
call_helper.BeforeCall(masm);
// Consumed by runtime conversion function:
if (embed_mode == PART_OF_IC_HANDLER) {
__ Push(VectorLoadICDescriptor::VectorRegister(),
VectorLoadICDescriptor::SlotRegister(), object_, index_);
__ Push(LoadWithVectorDescriptor::VectorRegister(),
LoadWithVectorDescriptor::SlotRegister(), object_, index_);
} else {
__ Push(object_, index_);
}
@ -3108,8 +3108,8 @@ void StringCharCodeAtGenerator::GenerateSlow(
// have a chance to overwrite it.
__ Move(index_, v0);
if (embed_mode == PART_OF_IC_HANDLER) {
__ Pop(VectorLoadICDescriptor::VectorRegister(),
VectorLoadICDescriptor::SlotRegister(), object_);
__ Pop(LoadWithVectorDescriptor::VectorRegister(),
LoadWithVectorDescriptor::SlotRegister(), object_);
} else {
__ pop(object_);
}
@ -4582,15 +4582,15 @@ void StubFailureTrampolineStub::Generate(MacroAssembler* masm) {
void LoadICTrampolineStub::Generate(MacroAssembler* masm) {
EmitLoadTypeFeedbackVector(masm, VectorLoadICDescriptor::VectorRegister());
VectorRawLoadStub stub(isolate(), state());
EmitLoadTypeFeedbackVector(masm, LoadWithVectorDescriptor::VectorRegister());
LoadICStub stub(isolate(), state());
stub.GenerateForTrampoline(masm);
}
void KeyedLoadICTrampolineStub::Generate(MacroAssembler* masm) {
EmitLoadTypeFeedbackVector(masm, VectorLoadICDescriptor::VectorRegister());
VectorRawKeyedLoadStub stub(isolate());
EmitLoadTypeFeedbackVector(masm, LoadWithVectorDescriptor::VectorRegister());
KeyedLoadICStub stub(isolate());
stub.GenerateForTrampoline(masm);
}
@ -4609,12 +4609,10 @@ void CallIC_ArrayTrampolineStub::Generate(MacroAssembler* masm) {
}
void VectorRawLoadStub::Generate(MacroAssembler* masm) {
GenerateImpl(masm, false);
}
void LoadICStub::Generate(MacroAssembler* masm) { GenerateImpl(masm, false); }
void VectorRawLoadStub::GenerateForTrampoline(MacroAssembler* masm) {
void LoadICStub::GenerateForTrampoline(MacroAssembler* masm) {
GenerateImpl(masm, true);
}
@ -4709,11 +4707,11 @@ static void HandleMonomorphicCase(MacroAssembler* masm, Register receiver,
}
void VectorRawLoadStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
Register receiver = VectorLoadICDescriptor::ReceiverRegister(); // a1
Register name = VectorLoadICDescriptor::NameRegister(); // a2
Register vector = VectorLoadICDescriptor::VectorRegister(); // a3
Register slot = VectorLoadICDescriptor::SlotRegister(); // a0
void LoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
Register receiver = LoadWithVectorDescriptor::ReceiverRegister(); // a1
Register name = LoadWithVectorDescriptor::NameRegister(); // a2
Register vector = LoadWithVectorDescriptor::VectorRegister(); // a3
Register slot = LoadWithVectorDescriptor::SlotRegister(); // a0
Register feedback = t0;
Register receiver_map = t1;
Register scratch1 = t4;
@ -4756,21 +4754,21 @@ void VectorRawLoadStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
}
void VectorRawKeyedLoadStub::Generate(MacroAssembler* masm) {
void KeyedLoadICStub::Generate(MacroAssembler* masm) {
GenerateImpl(masm, false);
}
void VectorRawKeyedLoadStub::GenerateForTrampoline(MacroAssembler* masm) {
void KeyedLoadICStub::GenerateForTrampoline(MacroAssembler* masm) {
GenerateImpl(masm, true);
}
void VectorRawKeyedLoadStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
Register receiver = VectorLoadICDescriptor::ReceiverRegister(); // a1
Register key = VectorLoadICDescriptor::NameRegister(); // a2
Register vector = VectorLoadICDescriptor::VectorRegister(); // a3
Register slot = VectorLoadICDescriptor::SlotRegister(); // a0
void KeyedLoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
Register receiver = LoadWithVectorDescriptor::ReceiverRegister(); // a1
Register key = LoadWithVectorDescriptor::NameRegister(); // a2
Register vector = LoadWithVectorDescriptor::VectorRegister(); // a3
Register slot = LoadWithVectorDescriptor::SlotRegister(); // a0
Register feedback = t0;
Register receiver_map = t1;
Register scratch1 = t4;

View File

@ -153,8 +153,8 @@ void DebugCodegen::GenerateCallICStubDebugBreak(MacroAssembler* masm) {
void DebugCodegen::GenerateLoadICDebugBreak(MacroAssembler* masm) {
Register receiver = LoadDescriptor::ReceiverRegister();
Register name = LoadDescriptor::NameRegister();
RegList regs = receiver.bit() | name.bit() |
VectorLoadICTrampolineDescriptor::SlotRegister().bit();
Register slot = LoadDescriptor::SlotRegister();
RegList regs = receiver.bit() | name.bit() | slot.bit();
Generate_DebugBreakCallHelper(masm, regs, 0);
}

View File

@ -1322,7 +1322,7 @@ void FullCodeGenerator::EmitLoadHomeObject(SuperReference* expr) {
Handle<Symbol> home_object_symbol(isolate()->heap()->home_object_symbol());
__ li(LoadDescriptor::NameRegister(), home_object_symbol);
__ li(VectorLoadICDescriptor::SlotRegister(),
__ li(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(expr->HomeObjectFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL);
@ -1393,7 +1393,7 @@ void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy,
__ lw(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
__ li(LoadDescriptor::NameRegister(), Operand(proxy->var()->name()));
__ li(VectorLoadICDescriptor::SlotRegister(),
__ li(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(proxy->VariableFeedbackSlot())));
ContextualMode mode = (typeof_state == INSIDE_TYPEOF)
@ -1481,7 +1481,7 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
Comment cmnt(masm_, "[ Global variable");
__ lw(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
__ li(LoadDescriptor::NameRegister(), Operand(var->name()));
__ li(VectorLoadICDescriptor::SlotRegister(),
__ li(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(proxy->VariableFeedbackSlot())));
CallGlobalLoadIC(var->name());
context()->Plug(v0);
@ -2179,7 +2179,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ bind(&l_call);
__ lw(load_receiver, MemOperand(sp, kPointerSize));
__ lw(load_name, MemOperand(sp, 2 * kPointerSize));
__ li(VectorLoadICDescriptor::SlotRegister(),
__ li(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(expr->KeyedLoadFeedbackSlot())));
Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code();
CallIC(ic, TypeFeedbackId::None());
@ -2197,7 +2197,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ push(load_receiver); // save result
__ LoadRoot(load_name, Heap::kdone_stringRootIndex); // "done"
__ li(VectorLoadICDescriptor::SlotRegister(),
__ li(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(expr->DoneFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL); // v0=result.done
__ mov(a0, v0);
@ -2208,7 +2208,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
// result.value
__ pop(load_receiver); // result
__ LoadRoot(load_name, Heap::kvalue_stringRootIndex); // "value"
__ li(VectorLoadICDescriptor::SlotRegister(),
__ li(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(expr->ValueFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL); // v0=result.value
context()->DropAndPlug(2, v0); // drop iter and g
@ -2350,7 +2350,7 @@ void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
DCHECK(!prop->IsSuperAccess());
__ li(LoadDescriptor::NameRegister(), Operand(key->value()));
__ li(VectorLoadICDescriptor::SlotRegister(),
__ li(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(prop->PropertyFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL);
}
@ -2371,7 +2371,7 @@ void FullCodeGenerator::EmitNamedSuperPropertyLoad(Property* prop) {
void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
SetSourcePosition(prop->position());
Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code();
__ li(VectorLoadICDescriptor::SlotRegister(),
__ li(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(prop->PropertyFeedbackSlot())));
CallIC(ic);
}
@ -4614,7 +4614,7 @@ void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) {
// Load the function from the receiver.
__ li(LoadDescriptor::NameRegister(), Operand(expr->name()));
__ li(VectorLoadICDescriptor::SlotRegister(),
__ li(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(expr->CallRuntimeFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL);
}
@ -5051,7 +5051,7 @@ void FullCodeGenerator::VisitForTypeofValue(Expression* expr) {
Comment cmnt(masm_, "[ Global variable");
__ lw(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
__ li(LoadDescriptor::NameRegister(), Operand(proxy->name()));
__ li(VectorLoadICDescriptor::SlotRegister(),
__ li(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(proxy->VariableFeedbackSlot())));
// Use a regular load, not a contextual load, to avoid a reference
// error.

View File

@ -16,12 +16,10 @@ const Register CallInterfaceDescriptor::ContextRegister() { return cp; }
const Register LoadDescriptor::ReceiverRegister() { return a1; }
const Register LoadDescriptor::NameRegister() { return a2; }
const Register LoadDescriptor::SlotRegister() { return a0; }
const Register VectorLoadICTrampolineDescriptor::SlotRegister() { return a0; }
const Register VectorLoadICDescriptor::VectorRegister() { return a3; }
const Register LoadWithVectorDescriptor::VectorRegister() { return a3; }
const Register StoreDescriptor::ReceiverRegister() { return a1; }

View File

@ -2909,8 +2909,8 @@ void LCodeGen::DoReturn(LReturn* instr) {
template <class T>
void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
Register vector_register = ToRegister(instr->temp_vector());
Register slot_register = VectorLoadICDescriptor::SlotRegister();
DCHECK(vector_register.is(VectorLoadICDescriptor::VectorRegister()));
Register slot_register = LoadWithVectorDescriptor::SlotRegister();
DCHECK(vector_register.is(LoadWithVectorDescriptor::VectorRegister()));
DCHECK(slot_register.is(a0));
AllowDeferredHandleDereference vector_structure_check;

View File

@ -2081,7 +2081,7 @@ LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister());
LOperand* vector = NULL;
if (instr->HasVectorAndSlot()) {
vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
}
LLoadGlobalGeneric* result =
new(zone()) LLoadGlobalGeneric(context, global_object, vector);
@ -2130,7 +2130,7 @@ LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
UseFixed(instr->object(), LoadDescriptor::ReceiverRegister());
LOperand* vector = NULL;
if (instr->HasVectorAndSlot()) {
vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
}
LInstruction* result =
@ -2204,7 +2204,7 @@ LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister());
LOperand* vector = NULL;
if (instr->HasVectorAndSlot()) {
vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
}
LInstruction* result =

View File

@ -1386,7 +1386,7 @@ void LoadIndexedStringStub::Generate(MacroAssembler* masm) {
Register scratch = a5;
Register result = v0;
DCHECK(!scratch.is(receiver) && !scratch.is(index));
DCHECK(!scratch.is(VectorLoadICDescriptor::VectorRegister()));
DCHECK(!scratch.is(LoadWithVectorDescriptor::VectorRegister()));
StringCharAtGenerator char_at_generator(receiver, index, scratch, result,
&miss, // When not a string.
@ -1610,8 +1610,8 @@ void FunctionPrototypeStub::Generate(MacroAssembler* masm) {
Register receiver = LoadDescriptor::ReceiverRegister();
// Ensure that the vector and slot registers won't be clobbered before
// calling the miss handler.
DCHECK(!AreAliased(a4, a5, VectorLoadICDescriptor::VectorRegister(),
VectorLoadICDescriptor::SlotRegister()));
DCHECK(!AreAliased(a4, a5, LoadWithVectorDescriptor::VectorRegister(),
LoadWithVectorDescriptor::SlotRegister()));
NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, a4,
a5, &miss);
@ -3130,8 +3130,8 @@ void StringCharCodeAtGenerator::GenerateSlow(
call_helper.BeforeCall(masm);
// Consumed by runtime conversion function:
if (embed_mode == PART_OF_IC_HANDLER) {
__ Push(VectorLoadICDescriptor::VectorRegister(),
VectorLoadICDescriptor::SlotRegister(), object_, index_);
__ Push(LoadWithVectorDescriptor::VectorRegister(),
LoadWithVectorDescriptor::SlotRegister(), object_, index_);
} else {
__ Push(object_, index_);
}
@ -3148,8 +3148,8 @@ void StringCharCodeAtGenerator::GenerateSlow(
__ Move(index_, v0);
if (embed_mode == PART_OF_IC_HANDLER) {
__ Pop(VectorLoadICDescriptor::VectorRegister(),
VectorLoadICDescriptor::SlotRegister(), object_);
__ Pop(LoadWithVectorDescriptor::VectorRegister(),
LoadWithVectorDescriptor::SlotRegister(), object_);
} else {
__ pop(object_);
}
@ -4626,15 +4626,15 @@ void StubFailureTrampolineStub::Generate(MacroAssembler* masm) {
void LoadICTrampolineStub::Generate(MacroAssembler* masm) {
EmitLoadTypeFeedbackVector(masm, VectorLoadICDescriptor::VectorRegister());
VectorRawLoadStub stub(isolate(), state());
EmitLoadTypeFeedbackVector(masm, LoadWithVectorDescriptor::VectorRegister());
LoadICStub stub(isolate(), state());
stub.GenerateForTrampoline(masm);
}
void KeyedLoadICTrampolineStub::Generate(MacroAssembler* masm) {
EmitLoadTypeFeedbackVector(masm, VectorLoadICDescriptor::VectorRegister());
VectorRawKeyedLoadStub stub(isolate());
EmitLoadTypeFeedbackVector(masm, LoadWithVectorDescriptor::VectorRegister());
KeyedLoadICStub stub(isolate());
stub.GenerateForTrampoline(masm);
}
@ -4653,12 +4653,10 @@ void CallIC_ArrayTrampolineStub::Generate(MacroAssembler* masm) {
}
void VectorRawLoadStub::Generate(MacroAssembler* masm) {
GenerateImpl(masm, false);
}
void LoadICStub::Generate(MacroAssembler* masm) { GenerateImpl(masm, false); }
void VectorRawLoadStub::GenerateForTrampoline(MacroAssembler* masm) {
void LoadICStub::GenerateForTrampoline(MacroAssembler* masm) {
GenerateImpl(masm, true);
}
@ -4751,11 +4749,11 @@ static void HandleMonomorphicCase(MacroAssembler* masm, Register receiver,
}
void VectorRawLoadStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
Register receiver = VectorLoadICDescriptor::ReceiverRegister(); // a1
Register name = VectorLoadICDescriptor::NameRegister(); // a2
Register vector = VectorLoadICDescriptor::VectorRegister(); // a3
Register slot = VectorLoadICDescriptor::SlotRegister(); // a0
void LoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
Register receiver = LoadWithVectorDescriptor::ReceiverRegister(); // a1
Register name = LoadWithVectorDescriptor::NameRegister(); // a2
Register vector = LoadWithVectorDescriptor::VectorRegister(); // a3
Register slot = LoadWithVectorDescriptor::SlotRegister(); // a0
Register feedback = a4;
Register receiver_map = a5;
Register scratch1 = a6;
@ -4798,21 +4796,21 @@ void VectorRawLoadStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
}
void VectorRawKeyedLoadStub::Generate(MacroAssembler* masm) {
void KeyedLoadICStub::Generate(MacroAssembler* masm) {
GenerateImpl(masm, false);
}
void VectorRawKeyedLoadStub::GenerateForTrampoline(MacroAssembler* masm) {
void KeyedLoadICStub::GenerateForTrampoline(MacroAssembler* masm) {
GenerateImpl(masm, true);
}
void VectorRawKeyedLoadStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
Register receiver = VectorLoadICDescriptor::ReceiverRegister(); // a1
Register key = VectorLoadICDescriptor::NameRegister(); // a2
Register vector = VectorLoadICDescriptor::VectorRegister(); // a3
Register slot = VectorLoadICDescriptor::SlotRegister(); // a0
void KeyedLoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
Register receiver = LoadWithVectorDescriptor::ReceiverRegister(); // a1
Register key = LoadWithVectorDescriptor::NameRegister(); // a2
Register vector = LoadWithVectorDescriptor::VectorRegister(); // a3
Register slot = LoadWithVectorDescriptor::SlotRegister(); // a0
Register feedback = a4;
Register receiver_map = a5;
Register scratch1 = a6;

View File

@ -156,8 +156,8 @@ void DebugCodegen::GenerateCallICStubDebugBreak(MacroAssembler* masm) {
void DebugCodegen::GenerateLoadICDebugBreak(MacroAssembler* masm) {
Register receiver = LoadDescriptor::ReceiverRegister();
Register name = LoadDescriptor::NameRegister();
RegList regs = receiver.bit() | name.bit() |
VectorLoadICTrampolineDescriptor::SlotRegister().bit();
Register slot = LoadDescriptor::SlotRegister();
RegList regs = receiver.bit() | name.bit() | slot.bit();
Generate_DebugBreakCallHelper(masm, regs, 0);
}

View File

@ -1319,7 +1319,7 @@ void FullCodeGenerator::EmitLoadHomeObject(SuperReference* expr) {
Handle<Symbol> home_object_symbol(isolate()->heap()->home_object_symbol());
__ li(LoadDescriptor::NameRegister(), home_object_symbol);
__ li(VectorLoadICDescriptor::SlotRegister(),
__ li(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(expr->HomeObjectFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL);
@ -1390,7 +1390,7 @@ void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy,
__ ld(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
__ li(LoadDescriptor::NameRegister(), Operand(proxy->var()->name()));
__ li(VectorLoadICDescriptor::SlotRegister(),
__ li(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(proxy->VariableFeedbackSlot())));
ContextualMode mode = (typeof_state == INSIDE_TYPEOF)
@ -1480,7 +1480,7 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
// object (receiver) in a0.
__ ld(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
__ li(LoadDescriptor::NameRegister(), Operand(var->name()));
__ li(VectorLoadICDescriptor::SlotRegister(),
__ li(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(proxy->VariableFeedbackSlot())));
CallGlobalLoadIC(var->name());
context()->Plug(v0);
@ -2176,7 +2176,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ bind(&l_call);
__ ld(load_receiver, MemOperand(sp, kPointerSize));
__ ld(load_name, MemOperand(sp, 2 * kPointerSize));
__ li(VectorLoadICDescriptor::SlotRegister(),
__ li(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(expr->KeyedLoadFeedbackSlot())));
Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code();
CallIC(ic, TypeFeedbackId::None());
@ -2194,7 +2194,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ push(load_receiver); // save result
__ LoadRoot(load_name, Heap::kdone_stringRootIndex); // "done"
__ li(VectorLoadICDescriptor::SlotRegister(),
__ li(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(expr->DoneFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL); // v0=result.done
__ mov(a0, v0);
@ -2205,7 +2205,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
// result.value
__ pop(load_receiver); // result
__ LoadRoot(load_name, Heap::kvalue_stringRootIndex); // "value"
__ li(VectorLoadICDescriptor::SlotRegister(),
__ li(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(expr->ValueFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL); // v0=result.value
context()->DropAndPlug(2, v0); // drop iter and g
@ -2349,7 +2349,7 @@ void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
DCHECK(!prop->IsSuperAccess());
__ li(LoadDescriptor::NameRegister(), Operand(key->value()));
__ li(VectorLoadICDescriptor::SlotRegister(),
__ li(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(prop->PropertyFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL);
}
@ -2371,7 +2371,7 @@ void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
SetSourcePosition(prop->position());
// Call keyed load IC. It has register arguments receiver and key.
Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code();
__ li(VectorLoadICDescriptor::SlotRegister(),
__ li(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(prop->PropertyFeedbackSlot())));
CallIC(ic);
}
@ -4618,7 +4618,7 @@ void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) {
// Load the function from the receiver.
__ li(LoadDescriptor::NameRegister(), Operand(expr->name()));
__ li(VectorLoadICDescriptor::SlotRegister(),
__ li(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(expr->CallRuntimeFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL);
}
@ -5054,7 +5054,7 @@ void FullCodeGenerator::VisitForTypeofValue(Expression* expr) {
Comment cmnt(masm_, "[ Global variable");
__ ld(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
__ li(LoadDescriptor::NameRegister(), Operand(proxy->name()));
__ li(VectorLoadICDescriptor::SlotRegister(),
__ li(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(proxy->VariableFeedbackSlot())));
// Use a regular load, not a contextual load, to avoid a reference
// error.

View File

@ -16,12 +16,10 @@ const Register CallInterfaceDescriptor::ContextRegister() { return cp; }
const Register LoadDescriptor::ReceiverRegister() { return a1; }
const Register LoadDescriptor::NameRegister() { return a2; }
const Register LoadDescriptor::SlotRegister() { return a0; }
const Register VectorLoadICTrampolineDescriptor::SlotRegister() { return a0; }
const Register VectorLoadICDescriptor::VectorRegister() { return a3; }
const Register LoadWithVectorDescriptor::VectorRegister() { return a3; }
const Register StoreDescriptor::ReceiverRegister() { return a1; }

View File

@ -2908,8 +2908,8 @@ void LCodeGen::DoReturn(LReturn* instr) {
template <class T>
void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
Register vector_register = ToRegister(instr->temp_vector());
Register slot_register = VectorLoadICDescriptor::SlotRegister();
DCHECK(vector_register.is(VectorLoadICDescriptor::VectorRegister()));
Register slot_register = LoadWithVectorDescriptor::SlotRegister();
DCHECK(vector_register.is(LoadWithVectorDescriptor::VectorRegister()));
DCHECK(slot_register.is(a0));
AllowDeferredHandleDereference vector_structure_check;

View File

@ -2079,7 +2079,7 @@ LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister());
LOperand* vector = NULL;
if (instr->HasVectorAndSlot()) {
vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
}
LLoadGlobalGeneric* result =
new(zone()) LLoadGlobalGeneric(context, global_object, vector);
@ -2128,7 +2128,7 @@ LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
UseFixed(instr->object(), LoadDescriptor::ReceiverRegister());
LOperand* vector = NULL;
if (instr->HasVectorAndSlot()) {
vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
}
LInstruction* result =
@ -2203,7 +2203,7 @@ LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister());
LOperand* vector = NULL;
if (instr->HasVectorAndSlot()) {
vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
}
LInstruction* result =

View File

@ -760,7 +760,9 @@ TO_NAME = function TO_NAME() {
-----------------------------------------------
*/
StringLengthTF_STUB = function StringLengthTF_STUB(receiver, name) {
StringLengthTF_STUB = function StringLengthTF_STUB(receiver, name, i, v) {
// i and v are dummy parameters mandated by the InterfaceDescriptor,
// (LoadWithVectorDescriptor).
return %_StringGetLength(%_JSValueGetValue(receiver));
}

View File

@ -527,8 +527,8 @@ void FunctionPrototypeStub::Generate(MacroAssembler* masm) {
Register receiver = LoadDescriptor::ReceiverRegister();
// Ensure that the vector and slot registers won't be clobbered before
// calling the miss handler.
DCHECK(!AreAliased(r8, r9, VectorLoadICDescriptor::VectorRegister(),
VectorLoadICDescriptor::SlotRegister()));
DCHECK(!AreAliased(r8, r9, LoadWithVectorDescriptor::VectorRegister(),
LoadDescriptor::SlotRegister()));
NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, r8,
r9, &miss);
@ -912,8 +912,8 @@ void LoadIndexedStringStub::Generate(MacroAssembler* masm) {
Register scratch = rdi;
Register result = rax;
DCHECK(!scratch.is(receiver) && !scratch.is(index));
DCHECK(!scratch.is(VectorLoadICDescriptor::VectorRegister()) &&
result.is(VectorLoadICDescriptor::SlotRegister()));
DCHECK(!scratch.is(LoadWithVectorDescriptor::VectorRegister()) &&
result.is(LoadDescriptor::SlotRegister()));
// StringCharAtGenerator doesn't use the result register until it's passed
// the different miss possibilities. If it did, we would have a conflict
@ -2940,8 +2940,8 @@ void StringCharCodeAtGenerator::GenerateSlow(
DONT_DO_SMI_CHECK);
call_helper.BeforeCall(masm);
if (embed_mode == PART_OF_IC_HANDLER) {
__ Push(VectorLoadICDescriptor::VectorRegister());
__ Push(VectorLoadICDescriptor::SlotRegister());
__ Push(LoadWithVectorDescriptor::VectorRegister());
__ Push(LoadDescriptor::SlotRegister());
}
__ Push(object_);
__ Push(index_); // Consumed by runtime conversion function.
@ -2959,8 +2959,8 @@ void StringCharCodeAtGenerator::GenerateSlow(
}
__ Pop(object_);
if (embed_mode == PART_OF_IC_HANDLER) {
__ Pop(VectorLoadICDescriptor::SlotRegister());
__ Pop(VectorLoadICDescriptor::VectorRegister());
__ Pop(LoadDescriptor::SlotRegister());
__ Pop(LoadWithVectorDescriptor::VectorRegister());
}
// Reload the instance type.
__ movp(result_, FieldOperand(object_, HeapObject::kMapOffset));
@ -4365,15 +4365,15 @@ void StubFailureTrampolineStub::Generate(MacroAssembler* masm) {
void LoadICTrampolineStub::Generate(MacroAssembler* masm) {
EmitLoadTypeFeedbackVector(masm, VectorLoadICDescriptor::VectorRegister());
VectorRawLoadStub stub(isolate(), state());
EmitLoadTypeFeedbackVector(masm, LoadWithVectorDescriptor::VectorRegister());
LoadICStub stub(isolate(), state());
stub.GenerateForTrampoline(masm);
}
void KeyedLoadICTrampolineStub::Generate(MacroAssembler* masm) {
EmitLoadTypeFeedbackVector(masm, VectorLoadICDescriptor::VectorRegister());
VectorRawKeyedLoadStub stub(isolate());
EmitLoadTypeFeedbackVector(masm, LoadWithVectorDescriptor::VectorRegister());
KeyedLoadICStub stub(isolate());
stub.GenerateForTrampoline(masm);
}
@ -4452,21 +4452,19 @@ static void HandleMonomorphicCase(MacroAssembler* masm, Register receiver,
}
void VectorRawLoadStub::Generate(MacroAssembler* masm) {
GenerateImpl(masm, false);
}
void LoadICStub::Generate(MacroAssembler* masm) { GenerateImpl(masm, false); }
void VectorRawLoadStub::GenerateForTrampoline(MacroAssembler* masm) {
void LoadICStub::GenerateForTrampoline(MacroAssembler* masm) {
GenerateImpl(masm, true);
}
void VectorRawLoadStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
Register receiver = VectorLoadICDescriptor::ReceiverRegister(); // rdx
Register name = VectorLoadICDescriptor::NameRegister(); // rcx
Register vector = VectorLoadICDescriptor::VectorRegister(); // rbx
Register slot = VectorLoadICDescriptor::SlotRegister(); // rax
void LoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
Register receiver = LoadWithVectorDescriptor::ReceiverRegister(); // rdx
Register name = LoadWithVectorDescriptor::NameRegister(); // rcx
Register vector = LoadWithVectorDescriptor::VectorRegister(); // rbx
Register slot = LoadWithVectorDescriptor::SlotRegister(); // rax
Register feedback = rdi;
Register integer_slot = r8;
Register receiver_map = r9;
@ -4507,21 +4505,21 @@ void VectorRawLoadStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
}
void VectorRawKeyedLoadStub::Generate(MacroAssembler* masm) {
void KeyedLoadICStub::Generate(MacroAssembler* masm) {
GenerateImpl(masm, false);
}
void VectorRawKeyedLoadStub::GenerateForTrampoline(MacroAssembler* masm) {
void KeyedLoadICStub::GenerateForTrampoline(MacroAssembler* masm) {
GenerateImpl(masm, true);
}
void VectorRawKeyedLoadStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
Register receiver = VectorLoadICDescriptor::ReceiverRegister(); // rdx
Register key = VectorLoadICDescriptor::NameRegister(); // rcx
Register vector = VectorLoadICDescriptor::VectorRegister(); // rbx
Register slot = VectorLoadICDescriptor::SlotRegister(); // rax
void KeyedLoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
Register receiver = LoadWithVectorDescriptor::ReceiverRegister(); // rdx
Register key = LoadWithVectorDescriptor::NameRegister(); // rcx
Register vector = LoadWithVectorDescriptor::VectorRegister(); // rbx
Register slot = LoadWithVectorDescriptor::SlotRegister(); // rax
Register feedback = rdi;
Register integer_slot = r8;
Register receiver_map = r9;

View File

@ -163,8 +163,8 @@ void DebugCodegen::GenerateLoadICDebugBreak(MacroAssembler* masm) {
// Register state for IC load call (from ic-x64.cc).
Register receiver = LoadDescriptor::ReceiverRegister();
Register name = LoadDescriptor::NameRegister();
RegList regs = receiver.bit() | name.bit() |
VectorLoadICTrampolineDescriptor::SlotRegister().bit();
Register slot = LoadDescriptor::SlotRegister();
RegList regs = receiver.bit() | name.bit() | slot.bit();
Generate_DebugBreakCallHelper(masm, regs, 0, false);
}

View File

@ -1294,7 +1294,7 @@ void FullCodeGenerator::EmitLoadHomeObject(SuperReference* expr) {
Handle<Symbol> home_object_symbol(isolate()->heap()->home_object_symbol());
__ Move(LoadDescriptor::NameRegister(), home_object_symbol);
__ Move(VectorLoadICDescriptor::SlotRegister(),
__ Move(LoadDescriptor::SlotRegister(),
SmiFromSlot(expr->HomeObjectFeedbackSlot()));
CallLoadIC(NOT_CONTEXTUAL);
@ -1372,7 +1372,7 @@ void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy,
// load IC call.
__ movp(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
__ Move(LoadDescriptor::NameRegister(), proxy->var()->name());
__ Move(VectorLoadICDescriptor::SlotRegister(),
__ Move(LoadDescriptor::SlotRegister(),
SmiFromSlot(proxy->VariableFeedbackSlot()));
ContextualMode mode = (typeof_state == INSIDE_TYPEOF)
@ -1457,7 +1457,7 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
Comment cmnt(masm_, "[ Global variable");
__ Move(LoadDescriptor::NameRegister(), var->name());
__ movp(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
__ Move(VectorLoadICDescriptor::SlotRegister(),
__ Move(LoadDescriptor::SlotRegister(),
SmiFromSlot(proxy->VariableFeedbackSlot()));
CallGlobalLoadIC(var->name());
context()->Plug(rax);
@ -2150,7 +2150,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
// result = receiver[f](arg);
__ bind(&l_call);
__ movp(load_receiver, Operand(rsp, kPointerSize));
__ Move(VectorLoadICDescriptor::SlotRegister(),
__ Move(LoadDescriptor::SlotRegister(),
SmiFromSlot(expr->KeyedLoadFeedbackSlot()));
Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code();
CallIC(ic, TypeFeedbackId::None());
@ -2167,7 +2167,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ Move(load_receiver, rax);
__ Push(load_receiver); // save result
__ LoadRoot(load_name, Heap::kdone_stringRootIndex); // "done"
__ Move(VectorLoadICDescriptor::SlotRegister(),
__ Move(LoadDescriptor::SlotRegister(),
SmiFromSlot(expr->DoneFeedbackSlot()));
CallLoadIC(NOT_CONTEXTUAL); // rax=result.done
Handle<Code> bool_ic = ToBooleanStub::GetUninitialized(isolate());
@ -2178,7 +2178,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
// result.value
__ Pop(load_receiver); // result
__ LoadRoot(load_name, Heap::kvalue_stringRootIndex); // "value"
__ Move(VectorLoadICDescriptor::SlotRegister(),
__ Move(LoadDescriptor::SlotRegister(),
SmiFromSlot(expr->ValueFeedbackSlot()));
CallLoadIC(NOT_CONTEXTUAL); // result.value in rax
context()->DropAndPlug(2, rax); // drop iter and g
@ -2318,7 +2318,7 @@ void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
DCHECK(!prop->IsSuperAccess());
__ Move(LoadDescriptor::NameRegister(), key->value());
__ Move(VectorLoadICDescriptor::SlotRegister(),
__ Move(LoadDescriptor::SlotRegister(),
SmiFromSlot(prop->PropertyFeedbackSlot()));
CallLoadIC(NOT_CONTEXTUAL);
}
@ -2339,7 +2339,7 @@ void FullCodeGenerator::EmitNamedSuperPropertyLoad(Property* prop) {
void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
SetSourcePosition(prop->position());
Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code();
__ Move(VectorLoadICDescriptor::SlotRegister(),
__ Move(LoadDescriptor::SlotRegister(),
SmiFromSlot(prop->PropertyFeedbackSlot()));
CallIC(ic);
}
@ -4554,7 +4554,7 @@ void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) {
// Load the function from the receiver.
__ movp(LoadDescriptor::ReceiverRegister(), Operand(rsp, 0));
__ Move(LoadDescriptor::NameRegister(), expr->name());
__ Move(VectorLoadICDescriptor::SlotRegister(),
__ Move(LoadDescriptor::SlotRegister(),
SmiFromSlot(expr->CallRuntimeFeedbackSlot()));
CallLoadIC(NOT_CONTEXTUAL);
}
@ -4991,7 +4991,7 @@ void FullCodeGenerator::VisitForTypeofValue(Expression* expr) {
Comment cmnt(masm_, "[ Global variable");
__ Move(LoadDescriptor::NameRegister(), proxy->name());
__ movp(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
__ Move(VectorLoadICDescriptor::SlotRegister(),
__ Move(LoadDescriptor::SlotRegister(),
SmiFromSlot(proxy->VariableFeedbackSlot()));
// Use a regular load, not a contextual load, to avoid a reference
// error.

View File

@ -16,12 +16,10 @@ const Register CallInterfaceDescriptor::ContextRegister() { return rsi; }
const Register LoadDescriptor::ReceiverRegister() { return rdx; }
const Register LoadDescriptor::NameRegister() { return rcx; }
const Register LoadDescriptor::SlotRegister() { return rax; }
const Register VectorLoadICTrampolineDescriptor::SlotRegister() { return rax; }
const Register VectorLoadICDescriptor::VectorRegister() { return rbx; }
const Register LoadWithVectorDescriptor::VectorRegister() { return rbx; }
const Register StoreDescriptor::ReceiverRegister() { return rdx; }

View File

@ -2891,8 +2891,8 @@ void LCodeGen::DoReturn(LReturn* instr) {
template <class T>
void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
Register vector_register = ToRegister(instr->temp_vector());
Register slot_register = VectorLoadICDescriptor::SlotRegister();
DCHECK(vector_register.is(VectorLoadICDescriptor::VectorRegister()));
Register slot_register = LoadWithVectorDescriptor::SlotRegister();
DCHECK(vector_register.is(LoadWithVectorDescriptor::VectorRegister()));
DCHECK(slot_register.is(rax));
AllowDeferredHandleDereference vector_structure_check;

View File

@ -2077,7 +2077,7 @@ LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister());
LOperand* vector = NULL;
if (instr->HasVectorAndSlot()) {
vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
}
LLoadGlobalGeneric* result =
@ -2140,7 +2140,7 @@ LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
UseFixed(instr->object(), LoadDescriptor::ReceiverRegister());
LOperand* vector = NULL;
if (instr->HasVectorAndSlot()) {
vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
}
LLoadNamedGeneric* result = new(zone()) LLoadNamedGeneric(
context, object, vector);
@ -2240,7 +2240,7 @@ LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister());
LOperand* vector = NULL;
if (instr->HasVectorAndSlot()) {
vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
}
LLoadKeyedGeneric* result =

View File

@ -39,9 +39,11 @@ class FunctionTester : public InitializedHandleScope {
CHECK_EQ(0u, flags_ & ~supported_flags);
}
// TODO(turbofan): generalize FunctionTester to work with N arguments. Now, it
// can handle up to four.
explicit FunctionTester(Graph* graph)
: isolate(main_isolate()),
function(NewFunction("(function(a,b){})")),
function(NewFunction("(function(a,b,c,d){})")),
flags_(0) {
CompileGraph(graph);
}
@ -54,6 +56,12 @@ class FunctionTester : public InitializedHandleScope {
return Execution::Call(isolate, function, undefined(), 2, args, false);
}
MaybeHandle<Object> Call(Handle<Object> a, Handle<Object> b, Handle<Object> c,
Handle<Object> d) {
Handle<Object> args[] = {a, b, c, d};
return Execution::Call(isolate, function, undefined(), 4, args, false);
}
void CheckThrows(Handle<Object> a, Handle<Object> b) {
TryCatch try_catch;
MaybeHandle<Object> no_result = Call(a, b);

View File

@ -75,16 +75,19 @@ TEST(RunStringLengthTFStub) {
// Create a function to call the code using the descriptor.
Graph graph(zone);
CommonOperatorBuilder common(zone);
// FunctionTester (ab)uses a 2-argument function
Node* start = graph.NewNode(common.Start(2));
// FunctionTester (ab)uses a 4-argument function
Node* start = graph.NewNode(common.Start(4));
// Parameter 0 is the receiver
Node* receiverParam = graph.NewNode(common.Parameter(1), start);
Node* nameParam = graph.NewNode(common.Parameter(2), start);
Node* slotParam = graph.NewNode(common.Parameter(3), start);
Node* vectorParam = graph.NewNode(common.Parameter(4), start);
Unique<HeapObject> u = Unique<HeapObject>::CreateImmovable(code);
Node* theCode = graph.NewNode(common.HeapConstant(u));
Node* dummyContext = graph.NewNode(common.NumberConstant(0.0));
Node* call = graph.NewNode(common.Call(descriptor), theCode, receiverParam,
nameParam, dummyContext, start, start);
Node* call =
graph.NewNode(common.Call(descriptor), theCode, receiverParam, nameParam,
slotParam, vectorParam, dummyContext, start, start);
Node* ret = graph.NewNode(common.Return(), call, call, start);
Node* end = graph.NewNode(common.End(), ret);
graph.SetStart(start);
@ -96,7 +99,10 @@ TEST(RunStringLengthTFStub) {
Handle<JSReceiver> receiverArg =
Object::ToObject(isolate, ft.Val(testString)).ToHandleChecked();
Handle<String> nameArg = ft.Val("length");
Handle<Object> result = ft.Call(receiverArg, nameArg).ToHandleChecked();
Handle<Object> slot = ft.Val(0.0);
Handle<Object> vector = ft.Val(0.0);
Handle<Object> result =
ft.Call(receiverArg, nameArg, slot, vector).ToHandleChecked();
CHECK_EQ(static_cast<int>(strlen(testString)), Smi::cast(*result)->value());
}