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);
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
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_);
// 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_);
}
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);
}
}
-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(); // 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;
}
-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;
// 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);
}
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);
__ 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)
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);
__ 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());
__ 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());
// 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
DCHECK(!prop->IsSuperAccess());
__ mov(LoadDescriptor::NameRegister(), Operand(key->value()));
- __ mov(VectorLoadICDescriptor::SlotRegister(),
+ __ mov(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(prop->PropertyFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL);
}
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);
}
// 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);
}
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.
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; }
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);
UseFixed(instr->object(), LoadDescriptor::ReceiverRegister());
LOperand* vector = NULL;
if (instr->HasVectorAndSlot()) {
- vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
+ vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
}
LInstruction* result =
LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister());
LOperand* vector = NULL;
if (instr->HasVectorAndSlot()) {
- vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
+ vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
}
LInstruction* result =
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;
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);
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
__ 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_);
// 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_);
}
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);
}
}
-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(); // 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;
}
-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;
// 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);
}
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);
__ 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
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);
DCHECK(!prop->IsSuperAccess());
__ Mov(LoadDescriptor::NameRegister(), Operand(key->value()));
- __ Mov(VectorLoadICDescriptor::SlotRegister(),
+ __ Mov(LoadDescriptor::SlotRegister(),
SmiFromSlot(prop->PropertyFeedbackSlot()));
CallLoadIC(NOT_CONTEXTUAL);
}
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);
}
// 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);
}
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.
__ 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());
__ 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.
// 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
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; }
UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister());
LOperand* vector = NULL;
if (instr->HasVectorAndSlot()) {
- vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
+ vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
}
LLoadGlobalGeneric* result =
LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister());
LOperand* vector = NULL;
if (instr->HasVectorAndSlot()) {
- vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
+ vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
}
LInstruction* result =
UseFixed(instr->object(), LoadDescriptor::ReceiverRegister());
LOperand* vector = NULL;
if (instr->HasVectorAndSlot()) {
- vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
+ vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
}
LInstruction* result =
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;
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));
}
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));
}
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());
V(StringAdd) \
V(ToBoolean) \
V(TransitionElementsKind) \
- V(VectorRawKeyedLoad) \
- V(VectorRawLoad) \
+ V(KeyedLoadIC) \
+ V(LoadIC) \
/* TurboFanCodeStubs */ \
V(StringLengthTF) \
V(MathFloor) \
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; }
// 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);
: HydrogenCodeStub(isolate) {}
CallInterfaceDescriptor GetCallInterfaceDescriptor() override {
- return VectorLoadICDescriptor(isolate());
+ return LoadWithVectorDescriptor(isolate());
}
DEFINE_HYDROGEN_CODE_STUB(LoadDictionaryElement, 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);
return LoadICState(static_cast<ExtraICState>(minor_key_));
}
- DEFINE_CALL_INTERFACE_DESCRIPTOR(VectorLoadICTrampoline);
+ DEFINE_CALL_INTERFACE_DESCRIPTOR(Load);
DEFINE_PLATFORM_CODE_STUB(LoadICTrampoline, PlatformCodeStub);
};
};
-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();
}
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);
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);
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
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.
}
__ 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));
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);
}
}
-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));
}
-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));
// 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);
}
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);
// 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)
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);
// 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());
__ 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());
__ 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
DCHECK(!prop->IsSuperAccess());
__ mov(LoadDescriptor::NameRegister(), Immediate(key->value()));
- __ mov(VectorLoadICDescriptor::SlotRegister(),
+ __ mov(LoadDescriptor::SlotRegister(),
Immediate(SmiFromSlot(prop->PropertyFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL);
}
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);
}
// 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);
}
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.
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; }
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;
UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister());
LOperand* vector = NULL;
if (instr->HasVectorAndSlot()) {
- vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
+ vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
}
LLoadGlobalGeneric* result =
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);
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);
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]; }
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);
}
// 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);
// 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);
// 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());
// 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
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);
// 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 =
// 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());
// 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
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);
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));
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();
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);
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();
}
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:
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);
}
// 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);
// 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);
// 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());
// 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
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);
}
// 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);
// 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);
// 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());
// 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
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());
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));
// 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
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);
}
}
-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[] = {
V(StoreTransition) \
V(ElementTransitionAndStore) \
V(Instanceof) \
- V(VectorLoadICTrampoline) \
- V(VectorLoadIC) \
+ V(LoadWithVector) \
V(FastNewClosure) \
V(FastNewContext) \
V(ToNumber) \
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();
};
};
-class VectorLoadICTrampolineDescriptor : public LoadDescriptor {
- public:
- DECLARE_DESCRIPTOR(VectorLoadICTrampolineDescriptor, LoadDescriptor)
-
- enum ParameterIndices { kReceiverIndex, kNameIndex, kSlotIndex };
-
- static const Register SlotRegister();
-};
-
-
-class VectorLoadICDescriptor : public VectorLoadICTrampolineDescriptor {
+class LoadWithVectorDescriptor : public LoadDescriptor {
public:
- DECLARE_DESCRIPTOR(VectorLoadICDescriptor, VectorLoadICTrampolineDescriptor)
+ DECLARE_DESCRIPTOR(LoadWithVectorDescriptor, LoadDescriptor)
enum ParameterIndices {
kReceiverIndex,
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.
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);
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_);
}
// 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_);
}
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);
}
}
-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(); // 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;
}
-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;
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);
}
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);
__ 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)
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);
__ 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());
__ 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);
// 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
DCHECK(!prop->IsSuperAccess());
__ li(LoadDescriptor::NameRegister(), Operand(key->value()));
- __ li(VectorLoadICDescriptor::SlotRegister(),
+ __ li(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(prop->PropertyFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL);
}
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);
}
// 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);
}
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.
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; }
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;
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);
UseFixed(instr->object(), LoadDescriptor::ReceiverRegister());
LOperand* vector = NULL;
if (instr->HasVectorAndSlot()) {
- vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
+ vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
}
LInstruction* result =
LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister());
LOperand* vector = NULL;
if (instr->HasVectorAndSlot()) {
- vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
+ vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
}
LInstruction* result =
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.
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);
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_);
}
__ 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_);
}
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);
}
}
-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(); // 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;
}
-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;
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);
}
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);
__ 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)
// 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);
__ 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());
__ 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);
// 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
DCHECK(!prop->IsSuperAccess());
__ li(LoadDescriptor::NameRegister(), Operand(key->value()));
- __ li(VectorLoadICDescriptor::SlotRegister(),
+ __ li(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(prop->PropertyFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL);
}
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);
}
// 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);
}
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.
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; }
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;
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);
UseFixed(instr->object(), LoadDescriptor::ReceiverRegister());
LOperand* vector = NULL;
if (instr->HasVectorAndSlot()) {
- vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
+ vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
}
LInstruction* result =
LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister());
LOperand* vector = NULL;
if (instr->HasVectorAndSlot()) {
- vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
+ vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
}
LInstruction* result =
-----------------------------------------------
*/
-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));
}
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);
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
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.
}
__ 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));
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);
}
}
-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;
}
-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;
// 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);
}
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);
// 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)
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);
// 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());
__ 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());
// 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
DCHECK(!prop->IsSuperAccess());
__ Move(LoadDescriptor::NameRegister(), key->value());
- __ Move(VectorLoadICDescriptor::SlotRegister(),
+ __ Move(LoadDescriptor::SlotRegister(),
SmiFromSlot(prop->PropertyFeedbackSlot()));
CallLoadIC(NOT_CONTEXTUAL);
}
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);
}
// 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);
}
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.
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; }
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;
UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister());
LOperand* vector = NULL;
if (instr->HasVectorAndSlot()) {
- vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
+ vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
}
LLoadGlobalGeneric* result =
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);
LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister());
LOperand* vector = NULL;
if (instr->HasVectorAndSlot()) {
- vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
+ vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
}
LLoadKeyedGeneric* result =
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);
}
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);
// 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);
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());
}