Move register conventions out of the IC classes.
A change to a convention shouldn't require recompilation of ic.h/.cc. R=verwaest@chromium.org Review URL: https://codereview.chromium.org/486213003 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23391 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
6ef5474c49
commit
295448a4ea
5
BUILD.gn
5
BUILD.gn
@ -725,6 +725,7 @@ source_set("v8_base") {
|
||||
"src/ic/ic.h",
|
||||
"src/ic/ic-compiler.cc",
|
||||
"src/ic/ic-compiler.h",
|
||||
"src/ic/ic-conventions.h",
|
||||
"src/ic/stub-cache.cc",
|
||||
"src/ic/stub-cache.h",
|
||||
"src/interface.cc",
|
||||
@ -901,6 +902,7 @@ source_set("v8_base") {
|
||||
"src/compiler/ia32/instruction-selector-ia32.cc",
|
||||
"src/compiler/ia32/linkage-ia32.cc",
|
||||
"src/ic/ia32/ic-ia32.cc",
|
||||
"src/ic/ia32/ic-conventions-ia32.cc",
|
||||
"src/ic/ia32/handler-ia32.cc",
|
||||
"src/ic/ia32/stub-cache-ia32.cc",
|
||||
]
|
||||
@ -939,6 +941,7 @@ source_set("v8_base") {
|
||||
"src/ic/x64/handler-compiler-x64.cc",
|
||||
"src/ic/x64/ic-x64.cc",
|
||||
"src/ic/x64/ic-compiler-x64.cc",
|
||||
"src/ic/x64/ic-conventions-x64.cc",
|
||||
"src/ic/x64/stub-cache-x64.cc",
|
||||
]
|
||||
} else if (v8_target_arch == "arm") {
|
||||
@ -979,6 +982,7 @@ source_set("v8_base") {
|
||||
"src/ic/arm/handler-compiler-arm.cc",
|
||||
"src/ic/arm/ic-arm.cc",
|
||||
"src/ic/arm/ic-compiler-arm.cc",
|
||||
"src/ic/arm/ic-conventions-arm.cc",
|
||||
"src/ic/arm/stub-cache-arm.cc",
|
||||
]
|
||||
} else if (v8_target_arch == "arm64") {
|
||||
@ -1030,6 +1034,7 @@ source_set("v8_base") {
|
||||
"src/ic/arm64/handler-compiler-arm64.cc",
|
||||
"src/ic/arm64/ic-arm64.cc",
|
||||
"src/ic/arm64/ic-compiler-arm64.cc",
|
||||
"src/ic/arm64/ic-conventions-arm64.cc",
|
||||
"src/ic/arm64/stub-cache-arm64.cc",
|
||||
]
|
||||
} else if (v8_target_arch == "mipsel") {
|
||||
|
@ -1875,7 +1875,7 @@ void InstanceofStub::Generate(MacroAssembler* masm) {
|
||||
|
||||
void FunctionPrototypeStub::Generate(MacroAssembler* masm) {
|
||||
Label miss;
|
||||
Register receiver = LoadIC::ReceiverRegister();
|
||||
Register receiver = LoadConvention::ReceiverRegister();
|
||||
|
||||
NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, r3,
|
||||
r4, &miss);
|
||||
|
@ -176,17 +176,17 @@ void DebugCodegen::GenerateCallICStubDebugBreak(MacroAssembler* masm) {
|
||||
|
||||
void DebugCodegen::GenerateLoadICDebugBreak(MacroAssembler* masm) {
|
||||
// Calling convention for IC load (from ic-arm.cc).
|
||||
Register receiver = LoadIC::ReceiverRegister();
|
||||
Register name = LoadIC::NameRegister();
|
||||
Register receiver = LoadConvention::ReceiverRegister();
|
||||
Register name = LoadConvention::NameRegister();
|
||||
Generate_DebugBreakCallHelper(masm, receiver.bit() | name.bit(), 0);
|
||||
}
|
||||
|
||||
|
||||
void DebugCodegen::GenerateStoreICDebugBreak(MacroAssembler* masm) {
|
||||
// Calling convention for IC store (from ic-arm.cc).
|
||||
Register receiver = StoreIC::ReceiverRegister();
|
||||
Register name = StoreIC::NameRegister();
|
||||
Register value = StoreIC::ValueRegister();
|
||||
Register receiver = StoreConvention::ReceiverRegister();
|
||||
Register name = StoreConvention::NameRegister();
|
||||
Register value = StoreConvention::ValueRegister();
|
||||
Generate_DebugBreakCallHelper(
|
||||
masm, receiver.bit() | name.bit() | value.bit(), 0);
|
||||
}
|
||||
@ -200,9 +200,9 @@ void DebugCodegen::GenerateKeyedLoadICDebugBreak(MacroAssembler* masm) {
|
||||
|
||||
void DebugCodegen::GenerateKeyedStoreICDebugBreak(MacroAssembler* masm) {
|
||||
// Calling convention for IC keyed store call (from ic-arm.cc).
|
||||
Register receiver = KeyedStoreIC::ReceiverRegister();
|
||||
Register name = KeyedStoreIC::NameRegister();
|
||||
Register value = KeyedStoreIC::ValueRegister();
|
||||
Register receiver = StoreConvention::ReceiverRegister();
|
||||
Register name = StoreConvention::NameRegister();
|
||||
Register value = StoreConvention::ValueRegister();
|
||||
Generate_DebugBreakCallHelper(
|
||||
masm, receiver.bit() | name.bit() | value.bit(), 0);
|
||||
}
|
||||
|
@ -1402,10 +1402,10 @@ void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy,
|
||||
__ bind(&fast);
|
||||
}
|
||||
|
||||
__ ldr(LoadIC::ReceiverRegister(), GlobalObjectOperand());
|
||||
__ mov(LoadIC::NameRegister(), Operand(proxy->var()->name()));
|
||||
__ ldr(LoadConvention::ReceiverRegister(), GlobalObjectOperand());
|
||||
__ mov(LoadConvention::NameRegister(), Operand(proxy->var()->name()));
|
||||
if (FLAG_vector_ics) {
|
||||
__ mov(LoadIC::SlotRegister(),
|
||||
__ mov(VectorLoadConvention::SlotRegister(),
|
||||
Operand(Smi::FromInt(proxy->VariableFeedbackSlot())));
|
||||
}
|
||||
|
||||
@ -1491,10 +1491,10 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
|
||||
switch (var->location()) {
|
||||
case Variable::UNALLOCATED: {
|
||||
Comment cmnt(masm_, "[ Global variable");
|
||||
__ ldr(LoadIC::ReceiverRegister(), GlobalObjectOperand());
|
||||
__ mov(LoadIC::NameRegister(), Operand(var->name()));
|
||||
__ ldr(LoadConvention::ReceiverRegister(), GlobalObjectOperand());
|
||||
__ mov(LoadConvention::NameRegister(), Operand(var->name()));
|
||||
if (FLAG_vector_ics) {
|
||||
__ mov(LoadIC::SlotRegister(),
|
||||
__ mov(VectorLoadConvention::SlotRegister(),
|
||||
Operand(Smi::FromInt(proxy->VariableFeedbackSlot())));
|
||||
}
|
||||
CallLoadIC(CONTEXTUAL);
|
||||
@ -1702,9 +1702,9 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
|
||||
if (key->value()->IsInternalizedString()) {
|
||||
if (property->emit_store()) {
|
||||
VisitForAccumulatorValue(value);
|
||||
DCHECK(StoreIC::ValueRegister().is(r0));
|
||||
__ mov(StoreIC::NameRegister(), Operand(key->value()));
|
||||
__ ldr(StoreIC::ReceiverRegister(), MemOperand(sp));
|
||||
DCHECK(StoreConvention::ValueRegister().is(r0));
|
||||
__ mov(StoreConvention::NameRegister(), Operand(key->value()));
|
||||
__ ldr(StoreConvention::ReceiverRegister(), MemOperand(sp));
|
||||
CallStoreIC(key->LiteralFeedbackId());
|
||||
PrepareForBailoutForId(key->id(), NO_REGISTERS);
|
||||
} else {
|
||||
@ -1883,7 +1883,7 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) {
|
||||
if (expr->is_compound()) {
|
||||
// We need the receiver both on the stack and in the register.
|
||||
VisitForStackValue(property->obj());
|
||||
__ ldr(LoadIC::ReceiverRegister(), MemOperand(sp, 0));
|
||||
__ ldr(LoadConvention::ReceiverRegister(), MemOperand(sp, 0));
|
||||
} else {
|
||||
VisitForStackValue(property->obj());
|
||||
}
|
||||
@ -1892,8 +1892,9 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) {
|
||||
if (expr->is_compound()) {
|
||||
VisitForStackValue(property->obj());
|
||||
VisitForStackValue(property->key());
|
||||
__ ldr(LoadIC::ReceiverRegister(), MemOperand(sp, 1 * kPointerSize));
|
||||
__ ldr(LoadIC::NameRegister(), MemOperand(sp, 0));
|
||||
__ ldr(LoadConvention::ReceiverRegister(),
|
||||
MemOperand(sp, 1 * kPointerSize));
|
||||
__ ldr(LoadConvention::NameRegister(), MemOperand(sp, 0));
|
||||
} else {
|
||||
VisitForStackValue(property->obj());
|
||||
VisitForStackValue(property->key());
|
||||
@ -2032,8 +2033,8 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
|
||||
|
||||
Label l_catch, l_try, l_suspend, l_continuation, l_resume;
|
||||
Label l_next, l_call, l_loop;
|
||||
Register load_receiver = LoadIC::ReceiverRegister();
|
||||
Register load_name = LoadIC::NameRegister();
|
||||
Register load_receiver = LoadConvention::ReceiverRegister();
|
||||
Register load_name = LoadConvention::NameRegister();
|
||||
|
||||
// Initial send value is undefined.
|
||||
__ LoadRoot(r0, Heap::kUndefinedValueRootIndex);
|
||||
@ -2088,7 +2089,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
|
||||
__ ldr(load_receiver, MemOperand(sp, kPointerSize));
|
||||
__ ldr(load_name, MemOperand(sp, 2 * kPointerSize));
|
||||
if (FLAG_vector_ics) {
|
||||
__ mov(LoadIC::SlotRegister(),
|
||||
__ mov(VectorLoadConvention::SlotRegister(),
|
||||
Operand(Smi::FromInt(expr->KeyedLoadFeedbackSlot())));
|
||||
}
|
||||
Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
|
||||
@ -2108,7 +2109,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
|
||||
__ push(load_receiver); // save result
|
||||
__ LoadRoot(load_name, Heap::kdone_stringRootIndex); // "done"
|
||||
if (FLAG_vector_ics) {
|
||||
__ mov(LoadIC::SlotRegister(),
|
||||
__ mov(VectorLoadConvention::SlotRegister(),
|
||||
Operand(Smi::FromInt(expr->DoneFeedbackSlot())));
|
||||
}
|
||||
CallLoadIC(NOT_CONTEXTUAL); // r0=result.done
|
||||
@ -2121,7 +2122,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
|
||||
__ pop(load_receiver); // result
|
||||
__ LoadRoot(load_name, Heap::kvalue_stringRootIndex); // "value"
|
||||
if (FLAG_vector_ics) {
|
||||
__ mov(LoadIC::SlotRegister(),
|
||||
__ mov(VectorLoadConvention::SlotRegister(),
|
||||
Operand(Smi::FromInt(expr->ValueFeedbackSlot())));
|
||||
}
|
||||
CallLoadIC(NOT_CONTEXTUAL); // r0=result.value
|
||||
@ -2298,9 +2299,9 @@ void FullCodeGenerator::EmitCreateIteratorResult(bool done) {
|
||||
void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
|
||||
SetSourcePosition(prop->position());
|
||||
Literal* key = prop->key()->AsLiteral();
|
||||
__ mov(LoadIC::NameRegister(), Operand(key->value()));
|
||||
__ mov(LoadConvention::NameRegister(), Operand(key->value()));
|
||||
if (FLAG_vector_ics) {
|
||||
__ mov(LoadIC::SlotRegister(),
|
||||
__ mov(VectorLoadConvention::SlotRegister(),
|
||||
Operand(Smi::FromInt(prop->PropertyFeedbackSlot())));
|
||||
CallLoadIC(NOT_CONTEXTUAL);
|
||||
} else {
|
||||
@ -2313,7 +2314,7 @@ void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
|
||||
SetSourcePosition(prop->position());
|
||||
Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
|
||||
if (FLAG_vector_ics) {
|
||||
__ mov(LoadIC::SlotRegister(),
|
||||
__ mov(VectorLoadConvention::SlotRegister(),
|
||||
Operand(Smi::FromInt(prop->PropertyFeedbackSlot())));
|
||||
CallIC(ic);
|
||||
} else {
|
||||
@ -2452,9 +2453,9 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) {
|
||||
case NAMED_PROPERTY: {
|
||||
__ push(r0); // Preserve value.
|
||||
VisitForAccumulatorValue(prop->obj());
|
||||
__ Move(StoreIC::ReceiverRegister(), r0);
|
||||
__ pop(StoreIC::ValueRegister()); // Restore value.
|
||||
__ mov(StoreIC::NameRegister(),
|
||||
__ Move(StoreConvention::ReceiverRegister(), r0);
|
||||
__ pop(StoreConvention::ValueRegister()); // Restore value.
|
||||
__ mov(StoreConvention::NameRegister(),
|
||||
Operand(prop->key()->AsLiteral()->value()));
|
||||
CallStoreIC();
|
||||
break;
|
||||
@ -2463,8 +2464,9 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) {
|
||||
__ push(r0); // Preserve value.
|
||||
VisitForStackValue(prop->obj());
|
||||
VisitForAccumulatorValue(prop->key());
|
||||
__ Move(KeyedStoreIC::NameRegister(), r0);
|
||||
__ Pop(KeyedStoreIC::ValueRegister(), KeyedStoreIC::ReceiverRegister());
|
||||
__ Move(StoreConvention::NameRegister(), r0);
|
||||
__ Pop(StoreConvention::ValueRegister(),
|
||||
StoreConvention::ReceiverRegister());
|
||||
Handle<Code> ic = strict_mode() == SLOPPY
|
||||
? isolate()->builtins()->KeyedStoreIC_Initialize()
|
||||
: isolate()->builtins()->KeyedStoreIC_Initialize_Strict();
|
||||
@ -2492,8 +2494,8 @@ void FullCodeGenerator::EmitStoreToStackLocalOrContextSlot(
|
||||
void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op) {
|
||||
if (var->IsUnallocated()) {
|
||||
// Global var, const, or let.
|
||||
__ mov(StoreIC::NameRegister(), Operand(var->name()));
|
||||
__ ldr(StoreIC::ReceiverRegister(), GlobalObjectOperand());
|
||||
__ mov(StoreConvention::NameRegister(), Operand(var->name()));
|
||||
__ ldr(StoreConvention::ReceiverRegister(), GlobalObjectOperand());
|
||||
CallStoreIC();
|
||||
|
||||
} else if (op == Token::INIT_CONST_LEGACY) {
|
||||
@ -2565,8 +2567,9 @@ void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) {
|
||||
|
||||
// Record source code position before IC call.
|
||||
SetSourcePosition(expr->position());
|
||||
__ mov(StoreIC::NameRegister(), Operand(prop->key()->AsLiteral()->value()));
|
||||
__ pop(StoreIC::ReceiverRegister());
|
||||
__ mov(StoreConvention::NameRegister(),
|
||||
Operand(prop->key()->AsLiteral()->value()));
|
||||
__ pop(StoreConvention::ReceiverRegister());
|
||||
CallStoreIC(expr->AssignmentFeedbackId());
|
||||
|
||||
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG);
|
||||
@ -2579,8 +2582,8 @@ void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) {
|
||||
|
||||
// Record source code position before IC call.
|
||||
SetSourcePosition(expr->position());
|
||||
__ Pop(KeyedStoreIC::ReceiverRegister(), KeyedStoreIC::NameRegister());
|
||||
DCHECK(KeyedStoreIC::ValueRegister().is(r0));
|
||||
__ Pop(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister());
|
||||
DCHECK(StoreConvention::ValueRegister().is(r0));
|
||||
|
||||
Handle<Code> ic = strict_mode() == SLOPPY
|
||||
? isolate()->builtins()->KeyedStoreIC_Initialize()
|
||||
@ -2598,15 +2601,15 @@ void FullCodeGenerator::VisitProperty(Property* expr) {
|
||||
|
||||
if (key->IsPropertyName()) {
|
||||
VisitForAccumulatorValue(expr->obj());
|
||||
__ Move(LoadIC::ReceiverRegister(), r0);
|
||||
__ Move(LoadConvention::ReceiverRegister(), r0);
|
||||
EmitNamedPropertyLoad(expr);
|
||||
PrepareForBailoutForId(expr->LoadId(), TOS_REG);
|
||||
context()->Plug(r0);
|
||||
} else {
|
||||
VisitForStackValue(expr->obj());
|
||||
VisitForAccumulatorValue(expr->key());
|
||||
__ Move(LoadIC::NameRegister(), r0);
|
||||
__ pop(LoadIC::ReceiverRegister());
|
||||
__ Move(LoadConvention::NameRegister(), r0);
|
||||
__ pop(LoadConvention::ReceiverRegister());
|
||||
EmitKeyedPropertyLoad(expr);
|
||||
context()->Plug(r0);
|
||||
}
|
||||
@ -2643,7 +2646,7 @@ void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) {
|
||||
} else {
|
||||
// Load the function from the receiver.
|
||||
DCHECK(callee->IsProperty());
|
||||
__ ldr(LoadIC::ReceiverRegister(), MemOperand(sp, 0));
|
||||
__ ldr(LoadConvention::ReceiverRegister(), MemOperand(sp, 0));
|
||||
EmitNamedPropertyLoad(callee->AsProperty());
|
||||
PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG);
|
||||
// Push the target function under the receiver.
|
||||
@ -2666,8 +2669,8 @@ void FullCodeGenerator::EmitKeyedCallWithLoadIC(Call* expr,
|
||||
|
||||
// Load the function from the receiver.
|
||||
DCHECK(callee->IsProperty());
|
||||
__ ldr(LoadIC::ReceiverRegister(), MemOperand(sp, 0));
|
||||
__ Move(LoadIC::NameRegister(), r0);
|
||||
__ ldr(LoadConvention::ReceiverRegister(), MemOperand(sp, 0));
|
||||
__ Move(LoadConvention::NameRegister(), r0);
|
||||
EmitKeyedPropertyLoad(callee->AsProperty());
|
||||
PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG);
|
||||
|
||||
@ -4080,15 +4083,15 @@ void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) {
|
||||
|
||||
if (expr->is_jsruntime()) {
|
||||
// Push the builtins object as the receiver.
|
||||
Register receiver = LoadIC::ReceiverRegister();
|
||||
Register receiver = LoadConvention::ReceiverRegister();
|
||||
__ ldr(receiver, GlobalObjectOperand());
|
||||
__ ldr(receiver, FieldMemOperand(receiver, GlobalObject::kBuiltinsOffset));
|
||||
__ push(receiver);
|
||||
|
||||
// Load the function from the receiver.
|
||||
__ mov(LoadIC::NameRegister(), Operand(expr->name()));
|
||||
__ mov(LoadConvention::NameRegister(), Operand(expr->name()));
|
||||
if (FLAG_vector_ics) {
|
||||
__ mov(LoadIC::SlotRegister(),
|
||||
__ mov(VectorLoadConvention::SlotRegister(),
|
||||
Operand(Smi::FromInt(expr->CallRuntimeFeedbackSlot())));
|
||||
CallLoadIC(NOT_CONTEXTUAL);
|
||||
} else {
|
||||
@ -4271,13 +4274,14 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
|
||||
if (assign_type == NAMED_PROPERTY) {
|
||||
// Put the object both on the stack and in the register.
|
||||
VisitForStackValue(prop->obj());
|
||||
__ ldr(LoadIC::ReceiverRegister(), MemOperand(sp, 0));
|
||||
__ ldr(LoadConvention::ReceiverRegister(), MemOperand(sp, 0));
|
||||
EmitNamedPropertyLoad(prop);
|
||||
} else {
|
||||
VisitForStackValue(prop->obj());
|
||||
VisitForStackValue(prop->key());
|
||||
__ ldr(LoadIC::ReceiverRegister(), MemOperand(sp, 1 * kPointerSize));
|
||||
__ ldr(LoadIC::NameRegister(), MemOperand(sp, 0));
|
||||
__ ldr(LoadConvention::ReceiverRegister(),
|
||||
MemOperand(sp, 1 * kPointerSize));
|
||||
__ ldr(LoadConvention::NameRegister(), MemOperand(sp, 0));
|
||||
EmitKeyedPropertyLoad(prop);
|
||||
}
|
||||
}
|
||||
@ -4385,9 +4389,9 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
|
||||
}
|
||||
break;
|
||||
case NAMED_PROPERTY: {
|
||||
__ mov(StoreIC::NameRegister(),
|
||||
__ mov(StoreConvention::NameRegister(),
|
||||
Operand(prop->key()->AsLiteral()->value()));
|
||||
__ pop(StoreIC::ReceiverRegister());
|
||||
__ pop(StoreConvention::ReceiverRegister());
|
||||
CallStoreIC(expr->CountStoreFeedbackId());
|
||||
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG);
|
||||
if (expr->is_postfix()) {
|
||||
@ -4400,7 +4404,8 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
|
||||
break;
|
||||
}
|
||||
case KEYED_PROPERTY: {
|
||||
__ Pop(KeyedStoreIC::ReceiverRegister(), KeyedStoreIC::NameRegister());
|
||||
__ Pop(StoreConvention::ReceiverRegister(),
|
||||
StoreConvention::NameRegister());
|
||||
Handle<Code> ic = strict_mode() == SLOPPY
|
||||
? isolate()->builtins()->KeyedStoreIC_Initialize()
|
||||
: isolate()->builtins()->KeyedStoreIC_Initialize_Strict();
|
||||
@ -4425,10 +4430,10 @@ void FullCodeGenerator::VisitForTypeofValue(Expression* expr) {
|
||||
VariableProxy* proxy = expr->AsVariableProxy();
|
||||
if (proxy != NULL && proxy->var()->IsUnallocated()) {
|
||||
Comment cmnt(masm_, "[ Global variable");
|
||||
__ ldr(LoadIC::ReceiverRegister(), GlobalObjectOperand());
|
||||
__ mov(LoadIC::NameRegister(), Operand(proxy->name()));
|
||||
__ ldr(LoadConvention::ReceiverRegister(), GlobalObjectOperand());
|
||||
__ mov(LoadConvention::NameRegister(), Operand(proxy->name()));
|
||||
if (FLAG_vector_ics) {
|
||||
__ mov(LoadIC::SlotRegister(),
|
||||
__ mov(VectorLoadConvention::SlotRegister(),
|
||||
Operand(Smi::FromInt(proxy->VariableFeedbackSlot())));
|
||||
}
|
||||
// Use a regular load, not a contextual load, to avoid a reference
|
||||
|
@ -2102,11 +2102,11 @@ LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) {
|
||||
|
||||
LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), cp);
|
||||
LOperand* global_object = UseFixed(instr->global_object(),
|
||||
LoadIC::ReceiverRegister());
|
||||
LOperand* global_object =
|
||||
UseFixed(instr->global_object(), LoadConvention::ReceiverRegister());
|
||||
LOperand* vector = NULL;
|
||||
if (FLAG_vector_ics) {
|
||||
vector = FixedTemp(LoadIC::VectorRegister());
|
||||
vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
|
||||
}
|
||||
LLoadGlobalGeneric* result =
|
||||
new(zone()) LLoadGlobalGeneric(context, global_object, vector);
|
||||
@ -2161,10 +2161,11 @@ LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) {
|
||||
|
||||
LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), cp);
|
||||
LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister());
|
||||
LOperand* object =
|
||||
UseFixed(instr->object(), LoadConvention::ReceiverRegister());
|
||||
LOperand* vector = NULL;
|
||||
if (FLAG_vector_ics) {
|
||||
vector = FixedTemp(LoadIC::VectorRegister());
|
||||
vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
|
||||
}
|
||||
|
||||
LInstruction* result =
|
||||
@ -2226,11 +2227,12 @@ LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) {
|
||||
|
||||
LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), cp);
|
||||
LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister());
|
||||
LOperand* key = UseFixed(instr->key(), LoadIC::NameRegister());
|
||||
LOperand* object =
|
||||
UseFixed(instr->object(), LoadConvention::ReceiverRegister());
|
||||
LOperand* key = UseFixed(instr->key(), LoadConvention::NameRegister());
|
||||
LOperand* vector = NULL;
|
||||
if (FLAG_vector_ics) {
|
||||
vector = FixedTemp(LoadIC::VectorRegister());
|
||||
vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
|
||||
}
|
||||
|
||||
LInstruction* result =
|
||||
@ -2286,9 +2288,10 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
|
||||
|
||||
LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), cp);
|
||||
LOperand* obj = UseFixed(instr->object(), KeyedStoreIC::ReceiverRegister());
|
||||
LOperand* key = UseFixed(instr->key(), KeyedStoreIC::NameRegister());
|
||||
LOperand* val = UseFixed(instr->value(), KeyedStoreIC::ValueRegister());
|
||||
LOperand* obj =
|
||||
UseFixed(instr->object(), StoreConvention::ReceiverRegister());
|
||||
LOperand* key = UseFixed(instr->key(), StoreConvention::NameRegister());
|
||||
LOperand* val = UseFixed(instr->value(), StoreConvention::ValueRegister());
|
||||
|
||||
DCHECK(instr->object()->representation().IsTagged());
|
||||
DCHECK(instr->key()->representation().IsTagged());
|
||||
@ -2362,8 +2365,9 @@ LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
|
||||
|
||||
LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), cp);
|
||||
LOperand* obj = UseFixed(instr->object(), StoreIC::ReceiverRegister());
|
||||
LOperand* val = UseFixed(instr->value(), StoreIC::ValueRegister());
|
||||
LOperand* obj =
|
||||
UseFixed(instr->object(), StoreConvention::ReceiverRegister());
|
||||
LOperand* val = UseFixed(instr->value(), StoreConvention::ValueRegister());
|
||||
|
||||
LInstruction* result = new(zone()) LStoreNamedGeneric(context, obj, val);
|
||||
return MarkAsCall(result, instr);
|
||||
|
@ -2994,21 +2994,22 @@ template <class T>
|
||||
void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
|
||||
DCHECK(FLAG_vector_ics);
|
||||
Register vector = ToRegister(instr->temp_vector());
|
||||
DCHECK(vector.is(LoadIC::VectorRegister()));
|
||||
DCHECK(vector.is(FullVectorLoadConvention::VectorRegister()));
|
||||
__ Move(vector, instr->hydrogen()->feedback_vector());
|
||||
// No need to allocate this register.
|
||||
DCHECK(LoadIC::SlotRegister().is(r0));
|
||||
__ mov(LoadIC::SlotRegister(),
|
||||
DCHECK(FullVectorLoadConvention::SlotRegister().is(r0));
|
||||
__ mov(FullVectorLoadConvention::SlotRegister(),
|
||||
Operand(Smi::FromInt(instr->hydrogen()->slot())));
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(cp));
|
||||
DCHECK(ToRegister(instr->global_object()).is(LoadIC::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->global_object())
|
||||
.is(LoadConvention::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->result()).is(r0));
|
||||
|
||||
__ mov(LoadIC::NameRegister(), Operand(instr->name()));
|
||||
__ mov(LoadConvention::NameRegister(), Operand(instr->name()));
|
||||
if (FLAG_vector_ics) {
|
||||
EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
|
||||
}
|
||||
@ -3127,11 +3128,11 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
|
||||
|
||||
void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(cp));
|
||||
DCHECK(ToRegister(instr->object()).is(LoadIC::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->object()).is(LoadConvention::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->result()).is(r0));
|
||||
|
||||
// Name is always in r2.
|
||||
__ mov(LoadIC::NameRegister(), Operand(instr->name()));
|
||||
__ mov(LoadConvention::NameRegister(), Operand(instr->name()));
|
||||
if (FLAG_vector_ics) {
|
||||
EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
|
||||
}
|
||||
@ -3419,8 +3420,8 @@ MemOperand LCodeGen::PrepareKeyedOperand(Register key,
|
||||
|
||||
void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(cp));
|
||||
DCHECK(ToRegister(instr->object()).is(LoadIC::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->key()).is(LoadIC::NameRegister()));
|
||||
DCHECK(ToRegister(instr->object()).is(LoadConvention::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->key()).is(LoadConvention::NameRegister()));
|
||||
|
||||
if (FLAG_vector_ics) {
|
||||
EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
|
||||
@ -4198,10 +4199,10 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
|
||||
|
||||
void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(cp));
|
||||
DCHECK(ToRegister(instr->object()).is(StoreIC::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->value()).is(StoreIC::ValueRegister()));
|
||||
DCHECK(ToRegister(instr->object()).is(StoreConvention::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->value()).is(StoreConvention::ValueRegister()));
|
||||
|
||||
__ mov(StoreIC::NameRegister(), Operand(instr->name()));
|
||||
__ mov(StoreConvention::NameRegister(), Operand(instr->name()));
|
||||
Handle<Code> ic = StoreIC::initialize_stub(isolate(), instr->strict_mode());
|
||||
CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS);
|
||||
}
|
||||
@ -4419,9 +4420,9 @@ void LCodeGen::DoStoreKeyed(LStoreKeyed* instr) {
|
||||
|
||||
void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(cp));
|
||||
DCHECK(ToRegister(instr->object()).is(KeyedStoreIC::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->key()).is(KeyedStoreIC::NameRegister()));
|
||||
DCHECK(ToRegister(instr->value()).is(KeyedStoreIC::ValueRegister()));
|
||||
DCHECK(ToRegister(instr->object()).is(StoreConvention::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->key()).is(StoreConvention::NameRegister()));
|
||||
DCHECK(ToRegister(instr->value()).is(StoreConvention::ValueRegister()));
|
||||
|
||||
Handle<Code> ic = instr->strict_mode() == STRICT
|
||||
? isolate()->builtins()->KeyedStoreIC_Initialize_Strict()
|
||||
|
@ -1715,7 +1715,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
|
||||
|
||||
void FunctionPrototypeStub::Generate(MacroAssembler* masm) {
|
||||
Label miss;
|
||||
Register receiver = LoadIC::ReceiverRegister();
|
||||
Register receiver = LoadConvention::ReceiverRegister();
|
||||
|
||||
NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, x10,
|
||||
x11, &miss);
|
||||
|
@ -236,17 +236,17 @@ void DebugCodegen::GenerateCallICStubDebugBreak(MacroAssembler* masm) {
|
||||
|
||||
void DebugCodegen::GenerateLoadICDebugBreak(MacroAssembler* masm) {
|
||||
// Calling convention for IC load (from ic-arm.cc).
|
||||
Register receiver = LoadIC::ReceiverRegister();
|
||||
Register name = LoadIC::NameRegister();
|
||||
Register receiver = LoadConvention::ReceiverRegister();
|
||||
Register name = LoadConvention::NameRegister();
|
||||
Generate_DebugBreakCallHelper(masm, receiver.Bit() | name.Bit(), 0, x10);
|
||||
}
|
||||
|
||||
|
||||
void DebugCodegen::GenerateStoreICDebugBreak(MacroAssembler* masm) {
|
||||
// Calling convention for IC store (from ic-arm64.cc).
|
||||
Register receiver = StoreIC::ReceiverRegister();
|
||||
Register name = StoreIC::NameRegister();
|
||||
Register value = StoreIC::ValueRegister();
|
||||
Register receiver = StoreConvention::ReceiverRegister();
|
||||
Register name = StoreConvention::NameRegister();
|
||||
Register value = StoreConvention::ValueRegister();
|
||||
Generate_DebugBreakCallHelper(
|
||||
masm, receiver.Bit() | name.Bit() | value.Bit(), 0, x10);
|
||||
}
|
||||
@ -260,9 +260,9 @@ void DebugCodegen::GenerateKeyedLoadICDebugBreak(MacroAssembler* masm) {
|
||||
|
||||
void DebugCodegen::GenerateKeyedStoreICDebugBreak(MacroAssembler* masm) {
|
||||
// Calling convention for IC keyed store call (from ic-arm64.cc).
|
||||
Register receiver = KeyedStoreIC::ReceiverRegister();
|
||||
Register name = KeyedStoreIC::NameRegister();
|
||||
Register value = KeyedStoreIC::ValueRegister();
|
||||
Register receiver = StoreConvention::ReceiverRegister();
|
||||
Register name = StoreConvention::NameRegister();
|
||||
Register value = StoreConvention::ValueRegister();
|
||||
Generate_DebugBreakCallHelper(
|
||||
masm, receiver.Bit() | name.Bit() | value.Bit(), 0, x10);
|
||||
}
|
||||
|
@ -1383,10 +1383,10 @@ void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy,
|
||||
__ Bind(&fast);
|
||||
}
|
||||
|
||||
__ Ldr(LoadIC::ReceiverRegister(), GlobalObjectMemOperand());
|
||||
__ Mov(LoadIC::NameRegister(), Operand(proxy->var()->name()));
|
||||
__ Ldr(LoadConvention::ReceiverRegister(), GlobalObjectMemOperand());
|
||||
__ Mov(LoadConvention::NameRegister(), Operand(proxy->var()->name()));
|
||||
if (FLAG_vector_ics) {
|
||||
__ Mov(LoadIC::SlotRegister(),
|
||||
__ Mov(VectorLoadConvention::SlotRegister(),
|
||||
Smi::FromInt(proxy->VariableFeedbackSlot()));
|
||||
}
|
||||
|
||||
@ -1468,10 +1468,10 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
|
||||
switch (var->location()) {
|
||||
case Variable::UNALLOCATED: {
|
||||
Comment cmnt(masm_, "Global variable");
|
||||
__ Ldr(LoadIC::ReceiverRegister(), GlobalObjectMemOperand());
|
||||
__ Mov(LoadIC::NameRegister(), Operand(var->name()));
|
||||
__ Ldr(LoadConvention::ReceiverRegister(), GlobalObjectMemOperand());
|
||||
__ Mov(LoadConvention::NameRegister(), Operand(var->name()));
|
||||
if (FLAG_vector_ics) {
|
||||
__ Mov(LoadIC::SlotRegister(),
|
||||
__ Mov(VectorLoadConvention::SlotRegister(),
|
||||
Smi::FromInt(proxy->VariableFeedbackSlot()));
|
||||
}
|
||||
CallLoadIC(CONTEXTUAL);
|
||||
@ -1681,9 +1681,9 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
|
||||
if (key->value()->IsInternalizedString()) {
|
||||
if (property->emit_store()) {
|
||||
VisitForAccumulatorValue(value);
|
||||
DCHECK(StoreIC::ValueRegister().is(x0));
|
||||
__ Mov(StoreIC::NameRegister(), Operand(key->value()));
|
||||
__ Peek(StoreIC::ReceiverRegister(), 0);
|
||||
DCHECK(StoreConvention::ValueRegister().is(x0));
|
||||
__ Mov(StoreConvention::NameRegister(), Operand(key->value()));
|
||||
__ Peek(StoreConvention::ReceiverRegister(), 0);
|
||||
CallStoreIC(key->LiteralFeedbackId());
|
||||
PrepareForBailoutForId(key->id(), NO_REGISTERS);
|
||||
} else {
|
||||
@ -1861,7 +1861,7 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) {
|
||||
if (expr->is_compound()) {
|
||||
// We need the receiver both on the stack and in the register.
|
||||
VisitForStackValue(property->obj());
|
||||
__ Peek(LoadIC::ReceiverRegister(), 0);
|
||||
__ Peek(LoadConvention::ReceiverRegister(), 0);
|
||||
} else {
|
||||
VisitForStackValue(property->obj());
|
||||
}
|
||||
@ -1870,8 +1870,8 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) {
|
||||
if (expr->is_compound()) {
|
||||
VisitForStackValue(property->obj());
|
||||
VisitForStackValue(property->key());
|
||||
__ Peek(LoadIC::ReceiverRegister(), 1 * kPointerSize);
|
||||
__ Peek(LoadIC::NameRegister(), 0);
|
||||
__ Peek(LoadConvention::ReceiverRegister(), 1 * kPointerSize);
|
||||
__ Peek(LoadConvention::NameRegister(), 0);
|
||||
} else {
|
||||
VisitForStackValue(property->obj());
|
||||
VisitForStackValue(property->key());
|
||||
@ -1948,9 +1948,9 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) {
|
||||
void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
|
||||
SetSourcePosition(prop->position());
|
||||
Literal* key = prop->key()->AsLiteral();
|
||||
__ Mov(LoadIC::NameRegister(), Operand(key->value()));
|
||||
__ Mov(LoadConvention::NameRegister(), Operand(key->value()));
|
||||
if (FLAG_vector_ics) {
|
||||
__ Mov(LoadIC::SlotRegister(),
|
||||
__ Mov(VectorLoadConvention::SlotRegister(),
|
||||
Smi::FromInt(prop->PropertyFeedbackSlot()));
|
||||
CallLoadIC(NOT_CONTEXTUAL);
|
||||
} else {
|
||||
@ -1964,7 +1964,7 @@ void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
|
||||
// Call keyed load IC. It has arguments key and receiver in r0 and r1.
|
||||
Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
|
||||
if (FLAG_vector_ics) {
|
||||
__ Mov(LoadIC::SlotRegister(),
|
||||
__ Mov(VectorLoadConvention::SlotRegister(),
|
||||
Smi::FromInt(prop->PropertyFeedbackSlot()));
|
||||
CallIC(ic);
|
||||
} else {
|
||||
@ -2113,9 +2113,9 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) {
|
||||
VisitForAccumulatorValue(prop->obj());
|
||||
// TODO(all): We could introduce a VisitForRegValue(reg, expr) to avoid
|
||||
// this copy.
|
||||
__ Mov(StoreIC::ReceiverRegister(), x0);
|
||||
__ Pop(StoreIC::ValueRegister()); // Restore value.
|
||||
__ Mov(StoreIC::NameRegister(),
|
||||
__ Mov(StoreConvention::ReceiverRegister(), x0);
|
||||
__ Pop(StoreConvention::ValueRegister()); // Restore value.
|
||||
__ Mov(StoreConvention::NameRegister(),
|
||||
Operand(prop->key()->AsLiteral()->value()));
|
||||
CallStoreIC();
|
||||
break;
|
||||
@ -2124,8 +2124,9 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) {
|
||||
__ Push(x0); // Preserve value.
|
||||
VisitForStackValue(prop->obj());
|
||||
VisitForAccumulatorValue(prop->key());
|
||||
__ Mov(KeyedStoreIC::NameRegister(), x0);
|
||||
__ Pop(KeyedStoreIC::ReceiverRegister(), KeyedStoreIC::ValueRegister());
|
||||
__ Mov(StoreConvention::NameRegister(), x0);
|
||||
__ Pop(StoreConvention::ReceiverRegister(),
|
||||
StoreConvention::ValueRegister());
|
||||
Handle<Code> ic = strict_mode() == SLOPPY
|
||||
? isolate()->builtins()->KeyedStoreIC_Initialize()
|
||||
: isolate()->builtins()->KeyedStoreIC_Initialize_Strict();
|
||||
@ -2155,8 +2156,8 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var,
|
||||
ASM_LOCATION("FullCodeGenerator::EmitVariableAssignment");
|
||||
if (var->IsUnallocated()) {
|
||||
// Global var, const, or let.
|
||||
__ Mov(StoreIC::NameRegister(), Operand(var->name()));
|
||||
__ Ldr(StoreIC::ReceiverRegister(), GlobalObjectMemOperand());
|
||||
__ Mov(StoreConvention::NameRegister(), Operand(var->name()));
|
||||
__ Ldr(StoreConvention::ReceiverRegister(), GlobalObjectMemOperand());
|
||||
CallStoreIC();
|
||||
|
||||
} else if (op == Token::INIT_CONST_LEGACY) {
|
||||
@ -2228,8 +2229,9 @@ void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) {
|
||||
|
||||
// Record source code position before IC call.
|
||||
SetSourcePosition(expr->position());
|
||||
__ Mov(StoreIC::NameRegister(), Operand(prop->key()->AsLiteral()->value()));
|
||||
__ Pop(StoreIC::ReceiverRegister());
|
||||
__ Mov(StoreConvention::NameRegister(),
|
||||
Operand(prop->key()->AsLiteral()->value()));
|
||||
__ Pop(StoreConvention::ReceiverRegister());
|
||||
CallStoreIC(expr->AssignmentFeedbackId());
|
||||
|
||||
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG);
|
||||
@ -2244,8 +2246,8 @@ void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) {
|
||||
// Record source code position before IC call.
|
||||
SetSourcePosition(expr->position());
|
||||
// TODO(all): Could we pass this in registers rather than on the stack?
|
||||
__ Pop(KeyedStoreIC::NameRegister(), KeyedStoreIC::ReceiverRegister());
|
||||
DCHECK(KeyedStoreIC::ValueRegister().is(x0));
|
||||
__ Pop(StoreConvention::NameRegister(), StoreConvention::ReceiverRegister());
|
||||
DCHECK(StoreConvention::ValueRegister().is(x0));
|
||||
|
||||
Handle<Code> ic = strict_mode() == SLOPPY
|
||||
? isolate()->builtins()->KeyedStoreIC_Initialize()
|
||||
@ -2263,15 +2265,15 @@ void FullCodeGenerator::VisitProperty(Property* expr) {
|
||||
|
||||
if (key->IsPropertyName()) {
|
||||
VisitForAccumulatorValue(expr->obj());
|
||||
__ Move(LoadIC::ReceiverRegister(), x0);
|
||||
__ Move(LoadConvention::ReceiverRegister(), x0);
|
||||
EmitNamedPropertyLoad(expr);
|
||||
PrepareForBailoutForId(expr->LoadId(), TOS_REG);
|
||||
context()->Plug(x0);
|
||||
} else {
|
||||
VisitForStackValue(expr->obj());
|
||||
VisitForAccumulatorValue(expr->key());
|
||||
__ Move(LoadIC::NameRegister(), x0);
|
||||
__ Pop(LoadIC::ReceiverRegister());
|
||||
__ Move(LoadConvention::NameRegister(), x0);
|
||||
__ Pop(LoadConvention::ReceiverRegister());
|
||||
EmitKeyedPropertyLoad(expr);
|
||||
context()->Plug(x0);
|
||||
}
|
||||
@ -2307,7 +2309,7 @@ void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) {
|
||||
} else {
|
||||
// Load the function from the receiver.
|
||||
DCHECK(callee->IsProperty());
|
||||
__ Peek(LoadIC::ReceiverRegister(), 0);
|
||||
__ Peek(LoadConvention::ReceiverRegister(), 0);
|
||||
EmitNamedPropertyLoad(callee->AsProperty());
|
||||
PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG);
|
||||
// Push the target function under the receiver.
|
||||
@ -2329,8 +2331,8 @@ void FullCodeGenerator::EmitKeyedCallWithLoadIC(Call* expr,
|
||||
|
||||
// Load the function from the receiver.
|
||||
DCHECK(callee->IsProperty());
|
||||
__ Peek(LoadIC::ReceiverRegister(), 0);
|
||||
__ Move(LoadIC::NameRegister(), x0);
|
||||
__ Peek(LoadConvention::ReceiverRegister(), 0);
|
||||
__ Move(LoadConvention::NameRegister(), x0);
|
||||
EmitKeyedPropertyLoad(callee->AsProperty());
|
||||
PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG);
|
||||
|
||||
@ -3746,15 +3748,15 @@ void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) {
|
||||
if (expr->is_jsruntime()) {
|
||||
// Push the builtins object as the receiver.
|
||||
__ Ldr(x10, GlobalObjectMemOperand());
|
||||
__ Ldr(LoadIC::ReceiverRegister(),
|
||||
__ Ldr(LoadConvention::ReceiverRegister(),
|
||||
FieldMemOperand(x10, GlobalObject::kBuiltinsOffset));
|
||||
__ Push(LoadIC::ReceiverRegister());
|
||||
__ Push(LoadConvention::ReceiverRegister());
|
||||
|
||||
// Load the function from the receiver.
|
||||
Handle<String> name = expr->name();
|
||||
__ Mov(LoadIC::NameRegister(), Operand(name));
|
||||
__ Mov(LoadConvention::NameRegister(), Operand(name));
|
||||
if (FLAG_vector_ics) {
|
||||
__ Mov(LoadIC::SlotRegister(),
|
||||
__ Mov(VectorLoadConvention::SlotRegister(),
|
||||
Smi::FromInt(expr->CallRuntimeFeedbackSlot()));
|
||||
CallLoadIC(NOT_CONTEXTUAL);
|
||||
} else {
|
||||
@ -3934,14 +3936,14 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
|
||||
if (assign_type == NAMED_PROPERTY) {
|
||||
// Put the object both on the stack and in the register.
|
||||
VisitForStackValue(prop->obj());
|
||||
__ Peek(LoadIC::ReceiverRegister(), 0);
|
||||
__ Peek(LoadConvention::ReceiverRegister(), 0);
|
||||
EmitNamedPropertyLoad(prop);
|
||||
} else {
|
||||
// KEYED_PROPERTY
|
||||
VisitForStackValue(prop->obj());
|
||||
VisitForStackValue(prop->key());
|
||||
__ Peek(LoadIC::ReceiverRegister(), 1 * kPointerSize);
|
||||
__ Peek(LoadIC::NameRegister(), 0);
|
||||
__ Peek(LoadConvention::ReceiverRegister(), 1 * kPointerSize);
|
||||
__ Peek(LoadConvention::NameRegister(), 0);
|
||||
EmitKeyedPropertyLoad(prop);
|
||||
}
|
||||
}
|
||||
@ -4051,9 +4053,9 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
|
||||
}
|
||||
break;
|
||||
case NAMED_PROPERTY: {
|
||||
__ Mov(StoreIC::NameRegister(),
|
||||
__ Mov(StoreConvention::NameRegister(),
|
||||
Operand(prop->key()->AsLiteral()->value()));
|
||||
__ Pop(StoreIC::ReceiverRegister());
|
||||
__ Pop(StoreConvention::ReceiverRegister());
|
||||
CallStoreIC(expr->CountStoreFeedbackId());
|
||||
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG);
|
||||
if (expr->is_postfix()) {
|
||||
@ -4066,8 +4068,8 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
|
||||
break;
|
||||
}
|
||||
case KEYED_PROPERTY: {
|
||||
__ Pop(KeyedStoreIC::NameRegister());
|
||||
__ Pop(KeyedStoreIC::ReceiverRegister());
|
||||
__ Pop(StoreConvention::NameRegister());
|
||||
__ Pop(StoreConvention::ReceiverRegister());
|
||||
Handle<Code> ic = strict_mode() == SLOPPY
|
||||
? isolate()->builtins()->KeyedStoreIC_Initialize()
|
||||
: isolate()->builtins()->KeyedStoreIC_Initialize_Strict();
|
||||
@ -4092,10 +4094,10 @@ void FullCodeGenerator::VisitForTypeofValue(Expression* expr) {
|
||||
VariableProxy* proxy = expr->AsVariableProxy();
|
||||
if (proxy != NULL && proxy->var()->IsUnallocated()) {
|
||||
Comment cmnt(masm_, "Global variable");
|
||||
__ Ldr(LoadIC::ReceiverRegister(), GlobalObjectMemOperand());
|
||||
__ Mov(LoadIC::NameRegister(), Operand(proxy->name()));
|
||||
__ Ldr(LoadConvention::ReceiverRegister(), GlobalObjectMemOperand());
|
||||
__ Mov(LoadConvention::NameRegister(), Operand(proxy->name()));
|
||||
if (FLAG_vector_ics) {
|
||||
__ Mov(LoadIC::SlotRegister(),
|
||||
__ Mov(VectorLoadConvention::SlotRegister(),
|
||||
Smi::FromInt(proxy->VariableFeedbackSlot()));
|
||||
}
|
||||
// Use a regular load, not a contextual load, to avoid a reference
|
||||
@ -4390,8 +4392,8 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
|
||||
|
||||
Label l_catch, l_try, l_suspend, l_continuation, l_resume;
|
||||
Label l_next, l_call, l_loop;
|
||||
Register load_receiver = LoadIC::ReceiverRegister();
|
||||
Register load_name = LoadIC::NameRegister();
|
||||
Register load_receiver = LoadConvention::ReceiverRegister();
|
||||
Register load_name = LoadConvention::NameRegister();
|
||||
|
||||
// Initial send value is undefined.
|
||||
__ LoadRoot(x0, Heap::kUndefinedValueRootIndex);
|
||||
@ -4451,7 +4453,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
|
||||
__ Peek(load_receiver, 1 * kPointerSize);
|
||||
__ Peek(load_name, 2 * kPointerSize);
|
||||
if (FLAG_vector_ics) {
|
||||
__ Mov(LoadIC::SlotRegister(),
|
||||
__ Mov(VectorLoadConvention::SlotRegister(),
|
||||
Smi::FromInt(expr->KeyedLoadFeedbackSlot()));
|
||||
}
|
||||
Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
|
||||
@ -4471,7 +4473,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
|
||||
__ Push(load_receiver); // save result
|
||||
__ LoadRoot(load_name, Heap::kdone_stringRootIndex); // "done"
|
||||
if (FLAG_vector_ics) {
|
||||
__ Mov(LoadIC::SlotRegister(),
|
||||
__ Mov(VectorLoadConvention::SlotRegister(),
|
||||
Smi::FromInt(expr->DoneFeedbackSlot()));
|
||||
}
|
||||
CallLoadIC(NOT_CONTEXTUAL); // x0=result.done
|
||||
@ -4484,7 +4486,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
|
||||
__ Pop(load_receiver); // result
|
||||
__ LoadRoot(load_name, Heap::kvalue_stringRootIndex); // "value"
|
||||
if (FLAG_vector_ics) {
|
||||
__ Mov(LoadIC::SlotRegister(),
|
||||
__ Mov(VectorLoadConvention::SlotRegister(),
|
||||
Smi::FromInt(expr->ValueFeedbackSlot()));
|
||||
}
|
||||
CallLoadIC(NOT_CONTEXTUAL); // x0=result.value
|
||||
|
@ -1663,11 +1663,11 @@ LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) {
|
||||
|
||||
LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), cp);
|
||||
LOperand* global_object = UseFixed(instr->global_object(),
|
||||
LoadIC::ReceiverRegister());
|
||||
LOperand* global_object =
|
||||
UseFixed(instr->global_object(), LoadConvention::ReceiverRegister());
|
||||
LOperand* vector = NULL;
|
||||
if (FLAG_vector_ics) {
|
||||
vector = FixedTemp(LoadIC::VectorRegister());
|
||||
vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
|
||||
}
|
||||
|
||||
LLoadGlobalGeneric* result =
|
||||
@ -1725,11 +1725,12 @@ LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) {
|
||||
|
||||
LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), cp);
|
||||
LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister());
|
||||
LOperand* key = UseFixed(instr->key(), LoadIC::NameRegister());
|
||||
LOperand* object =
|
||||
UseFixed(instr->object(), LoadConvention::ReceiverRegister());
|
||||
LOperand* key = UseFixed(instr->key(), LoadConvention::NameRegister());
|
||||
LOperand* vector = NULL;
|
||||
if (FLAG_vector_ics) {
|
||||
vector = FixedTemp(LoadIC::VectorRegister());
|
||||
vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
|
||||
}
|
||||
|
||||
LInstruction* result =
|
||||
@ -1747,10 +1748,11 @@ LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) {
|
||||
|
||||
LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), cp);
|
||||
LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister());
|
||||
LOperand* object =
|
||||
UseFixed(instr->object(), LoadConvention::ReceiverRegister());
|
||||
LOperand* vector = NULL;
|
||||
if (FLAG_vector_ics) {
|
||||
vector = FixedTemp(LoadIC::VectorRegister());
|
||||
vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
|
||||
}
|
||||
|
||||
LInstruction* result =
|
||||
@ -2366,10 +2368,10 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
|
||||
|
||||
LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), cp);
|
||||
LOperand* object = UseFixed(instr->object(),
|
||||
KeyedStoreIC::ReceiverRegister());
|
||||
LOperand* key = UseFixed(instr->key(), KeyedStoreIC::NameRegister());
|
||||
LOperand* value = UseFixed(instr->value(), KeyedStoreIC::ValueRegister());
|
||||
LOperand* object =
|
||||
UseFixed(instr->object(), StoreConvention::ReceiverRegister());
|
||||
LOperand* key = UseFixed(instr->key(), StoreConvention::NameRegister());
|
||||
LOperand* value = UseFixed(instr->value(), StoreConvention::ValueRegister());
|
||||
|
||||
DCHECK(instr->object()->representation().IsTagged());
|
||||
DCHECK(instr->key()->representation().IsTagged());
|
||||
@ -2411,8 +2413,9 @@ LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
|
||||
|
||||
LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), cp);
|
||||
LOperand* object = UseFixed(instr->object(), StoreIC::ReceiverRegister());
|
||||
LOperand* value = UseFixed(instr->value(), StoreIC::ValueRegister());
|
||||
LOperand* object =
|
||||
UseFixed(instr->object(), StoreConvention::ReceiverRegister());
|
||||
LOperand* value = UseFixed(instr->value(), StoreConvention::ValueRegister());
|
||||
|
||||
LInstruction* result = new(zone()) LStoreNamedGeneric(context, object, value);
|
||||
return MarkAsCall(result, instr);
|
||||
|
@ -3348,19 +3348,21 @@ template <class T>
|
||||
void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
|
||||
DCHECK(FLAG_vector_ics);
|
||||
Register vector = ToRegister(instr->temp_vector());
|
||||
DCHECK(vector.is(LoadIC::VectorRegister()));
|
||||
DCHECK(vector.is(FullVectorLoadConvention::VectorRegister()));
|
||||
__ Mov(vector, instr->hydrogen()->feedback_vector());
|
||||
// No need to allocate this register.
|
||||
DCHECK(LoadIC::SlotRegister().is(x0));
|
||||
__ Mov(LoadIC::SlotRegister(), Smi::FromInt(instr->hydrogen()->slot()));
|
||||
DCHECK(FullVectorLoadConvention::SlotRegister().is(x0));
|
||||
__ Mov(FullVectorLoadConvention::SlotRegister(),
|
||||
Smi::FromInt(instr->hydrogen()->slot()));
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(cp));
|
||||
DCHECK(ToRegister(instr->global_object()).is(LoadIC::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->global_object())
|
||||
.is(LoadConvention::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->result()).Is(x0));
|
||||
__ Mov(LoadIC::NameRegister(), Operand(instr->name()));
|
||||
__ Mov(LoadConvention::NameRegister(), Operand(instr->name()));
|
||||
if (FLAG_vector_ics) {
|
||||
EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
|
||||
}
|
||||
@ -3614,8 +3616,8 @@ void LCodeGen::DoLoadKeyedFixed(LLoadKeyedFixed* instr) {
|
||||
|
||||
void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(cp));
|
||||
DCHECK(ToRegister(instr->object()).is(LoadIC::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->key()).is(LoadIC::NameRegister()));
|
||||
DCHECK(ToRegister(instr->object()).is(LoadConvention::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->key()).is(LoadConvention::NameRegister()));
|
||||
if (FLAG_vector_ics) {
|
||||
EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
|
||||
}
|
||||
@ -3670,8 +3672,8 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
|
||||
void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(cp));
|
||||
// LoadIC expects name and receiver in registers.
|
||||
DCHECK(ToRegister(instr->object()).is(LoadIC::ReceiverRegister()));
|
||||
__ Mov(LoadIC::NameRegister(), Operand(instr->name()));
|
||||
DCHECK(ToRegister(instr->object()).is(LoadConvention::ReceiverRegister()));
|
||||
__ Mov(LoadConvention::NameRegister(), Operand(instr->name()));
|
||||
if (FLAG_vector_ics) {
|
||||
EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
|
||||
}
|
||||
@ -5307,9 +5309,9 @@ void LCodeGen::DoStoreKeyedFixed(LStoreKeyedFixed* instr) {
|
||||
|
||||
void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(cp));
|
||||
DCHECK(ToRegister(instr->object()).is(KeyedStoreIC::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->key()).is(KeyedStoreIC::NameRegister()));
|
||||
DCHECK(ToRegister(instr->value()).is(KeyedStoreIC::ValueRegister()));
|
||||
DCHECK(ToRegister(instr->object()).is(StoreConvention::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->key()).is(StoreConvention::NameRegister()));
|
||||
DCHECK(ToRegister(instr->value()).is(StoreConvention::ValueRegister()));
|
||||
|
||||
Handle<Code> ic = instr->strict_mode() == STRICT
|
||||
? isolate()->builtins()->KeyedStoreIC_Initialize_Strict()
|
||||
@ -5414,10 +5416,10 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
|
||||
|
||||
void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(cp));
|
||||
DCHECK(ToRegister(instr->object()).is(StoreIC::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->value()).is(StoreIC::ValueRegister()));
|
||||
DCHECK(ToRegister(instr->object()).is(StoreConvention::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->value()).is(StoreConvention::ValueRegister()));
|
||||
|
||||
__ Mov(StoreIC::NameRegister(), Operand(instr->name()));
|
||||
__ Mov(StoreConvention::NameRegister(), Operand(instr->name()));
|
||||
Handle<Code> ic = StoreIC::initialize_stub(isolate(), instr->strict_mode());
|
||||
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
||||
}
|
||||
|
@ -542,14 +542,10 @@ Handle<Code> CreateAllocationSiteStub::GenerateCode() {
|
||||
template <>
|
||||
HValue* CodeStubGraphBuilder<LoadFastElementStub>::BuildCodeStub() {
|
||||
HInstruction* load = BuildUncheckedMonomorphicElementAccess(
|
||||
GetParameter(KeyedLoadIC::kReceiverIndex),
|
||||
GetParameter(KeyedLoadIC::kNameIndex),
|
||||
NULL,
|
||||
casted_stub()->is_js_array(),
|
||||
casted_stub()->elements_kind(),
|
||||
LOAD,
|
||||
NEVER_RETURN_HOLE,
|
||||
STANDARD_STORE);
|
||||
GetParameter(LoadConvention::kReceiverIndex),
|
||||
GetParameter(LoadConvention::kNameIndex), NULL,
|
||||
casted_stub()->is_js_array(), casted_stub()->elements_kind(), LOAD,
|
||||
NEVER_RETURN_HOLE, STANDARD_STORE);
|
||||
return load;
|
||||
}
|
||||
|
||||
@ -661,11 +657,11 @@ Handle<Code> StringLengthStub::GenerateCode() {
|
||||
template <>
|
||||
HValue* CodeStubGraphBuilder<StoreFastElementStub>::BuildCodeStub() {
|
||||
BuildUncheckedMonomorphicElementAccess(
|
||||
GetParameter(StoreIC::kReceiverIndex),
|
||||
GetParameter(StoreIC::kNameIndex),
|
||||
GetParameter(StoreIC::kValueIndex),
|
||||
casted_stub()->is_js_array(), casted_stub()->elements_kind(),
|
||||
STORE, NEVER_RETURN_HOLE, casted_stub()->store_mode());
|
||||
GetParameter(StoreConvention::kReceiverIndex),
|
||||
GetParameter(StoreConvention::kNameIndex),
|
||||
GetParameter(StoreConvention::kValueIndex), casted_stub()->is_js_array(),
|
||||
casted_stub()->elements_kind(), STORE, NEVER_RETURN_HOLE,
|
||||
casted_stub()->store_mode());
|
||||
|
||||
return GetParameter(2);
|
||||
}
|
||||
@ -1105,7 +1101,7 @@ HValue* CodeStubGraphBuilder<StoreGlobalStub>::BuildCodeInitializedStub() {
|
||||
Handle<PropertyCell> placeholder_cell =
|
||||
isolate()->factory()->NewPropertyCell(placeholer_value);
|
||||
|
||||
HParameter* value = GetParameter(StoreIC::kValueIndex);
|
||||
HParameter* value = GetParameter(StoreConvention::kValueIndex);
|
||||
|
||||
if (stub->check_global()) {
|
||||
// Check that the map of the global has not changed: use a placeholder map
|
||||
@ -1451,8 +1447,8 @@ Handle<Code> FastNewContextStub::GenerateCode() {
|
||||
|
||||
template <>
|
||||
HValue* CodeStubGraphBuilder<LoadDictionaryElementStub>::BuildCodeStub() {
|
||||
HValue* receiver = GetParameter(KeyedLoadIC::kReceiverIndex);
|
||||
HValue* key = GetParameter(KeyedLoadIC::kNameIndex);
|
||||
HValue* receiver = GetParameter(LoadConvention::kReceiverIndex);
|
||||
HValue* key = GetParameter(LoadConvention::kNameIndex);
|
||||
|
||||
Add<HCheckSmi>(key);
|
||||
|
||||
@ -1572,8 +1568,8 @@ void CodeStubGraphBuilder<KeyedLoadGenericStub>::BuildExternalElementLoad(
|
||||
|
||||
|
||||
HValue* CodeStubGraphBuilder<KeyedLoadGenericStub>::BuildCodeStub() {
|
||||
HValue* receiver = GetParameter(KeyedLoadIC::kReceiverIndex);
|
||||
HValue* key = GetParameter(KeyedLoadIC::kNameIndex);
|
||||
HValue* receiver = GetParameter(LoadConvention::kReceiverIndex);
|
||||
HValue* key = GetParameter(LoadConvention::kNameIndex);
|
||||
|
||||
// Split into a smi/integer case and unique string case.
|
||||
HIfContinuation index_name_split_continuation(graph()->CreateBasicBlock(),
|
||||
|
@ -581,10 +581,10 @@ void JSEntryStub::FinishCode(Handle<Code> code) {
|
||||
|
||||
void LoadFastElementStub::InitializeInterfaceDescriptor(
|
||||
CodeStubInterfaceDescriptor* descriptor) {
|
||||
Register registers[] = { InterfaceDescriptor::ContextRegister(),
|
||||
LoadIC::ReceiverRegister(),
|
||||
LoadIC::NameRegister() };
|
||||
STATIC_ASSERT(LoadIC::kParameterCount == 2);
|
||||
Register registers[] = {InterfaceDescriptor::ContextRegister(),
|
||||
LoadConvention::ReceiverRegister(),
|
||||
LoadConvention::NameRegister()};
|
||||
STATIC_ASSERT(LoadConvention::kParameterCount == 2);
|
||||
descriptor->Initialize(MajorKey(), arraysize(registers), registers,
|
||||
FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure));
|
||||
}
|
||||
@ -592,10 +592,10 @@ void LoadFastElementStub::InitializeInterfaceDescriptor(
|
||||
|
||||
void LoadDictionaryElementStub::InitializeInterfaceDescriptor(
|
||||
CodeStubInterfaceDescriptor* descriptor) {
|
||||
Register registers[] = { InterfaceDescriptor::ContextRegister(),
|
||||
LoadIC::ReceiverRegister(),
|
||||
LoadIC::NameRegister() };
|
||||
STATIC_ASSERT(LoadIC::kParameterCount == 2);
|
||||
Register registers[] = {InterfaceDescriptor::ContextRegister(),
|
||||
LoadConvention::ReceiverRegister(),
|
||||
LoadConvention::NameRegister()};
|
||||
STATIC_ASSERT(LoadConvention::kParameterCount == 2);
|
||||
descriptor->Initialize(MajorKey(), arraysize(registers), registers,
|
||||
FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure));
|
||||
}
|
||||
@ -603,10 +603,10 @@ void LoadDictionaryElementStub::InitializeInterfaceDescriptor(
|
||||
|
||||
void KeyedLoadGenericStub::InitializeInterfaceDescriptor(
|
||||
CodeStubInterfaceDescriptor* descriptor) {
|
||||
Register registers[] = { InterfaceDescriptor::ContextRegister(),
|
||||
LoadIC::ReceiverRegister(),
|
||||
LoadIC::NameRegister() };
|
||||
STATIC_ASSERT(LoadIC::kParameterCount == 2);
|
||||
Register registers[] = {InterfaceDescriptor::ContextRegister(),
|
||||
LoadConvention::ReceiverRegister(),
|
||||
LoadConvention::NameRegister()};
|
||||
STATIC_ASSERT(LoadConvention::kParameterCount == 2);
|
||||
descriptor->Initialize(
|
||||
MajorKey(), arraysize(registers), registers,
|
||||
Runtime::FunctionForId(Runtime::kKeyedGetProperty)->entry);
|
||||
@ -617,13 +617,15 @@ void HandlerStub::InitializeInterfaceDescriptor(
|
||||
CodeStubInterfaceDescriptor* descriptor) {
|
||||
if (kind() == Code::LOAD_IC) {
|
||||
Register registers[] = {InterfaceDescriptor::ContextRegister(),
|
||||
LoadIC::ReceiverRegister(), LoadIC::NameRegister()};
|
||||
LoadConvention::ReceiverRegister(),
|
||||
LoadConvention::NameRegister()};
|
||||
descriptor->Initialize(MajorKey(), arraysize(registers), registers);
|
||||
} else {
|
||||
DCHECK_EQ(Code::STORE_IC, kind());
|
||||
Register registers[] = {InterfaceDescriptor::ContextRegister(),
|
||||
StoreIC::ReceiverRegister(),
|
||||
StoreIC::NameRegister(), StoreIC::ValueRegister()};
|
||||
StoreConvention::ReceiverRegister(),
|
||||
StoreConvention::NameRegister(),
|
||||
StoreConvention::ValueRegister()};
|
||||
descriptor->Initialize(MajorKey(), arraysize(registers), registers,
|
||||
FUNCTION_ADDR(StoreIC_MissFromStubFailure));
|
||||
}
|
||||
@ -632,10 +634,10 @@ void HandlerStub::InitializeInterfaceDescriptor(
|
||||
|
||||
void StoreFastElementStub::InitializeInterfaceDescriptor(
|
||||
CodeStubInterfaceDescriptor* descriptor) {
|
||||
Register registers[] = { InterfaceDescriptor::ContextRegister(),
|
||||
KeyedStoreIC::ReceiverRegister(),
|
||||
KeyedStoreIC::NameRegister(),
|
||||
KeyedStoreIC::ValueRegister() };
|
||||
Register registers[] = {InterfaceDescriptor::ContextRegister(),
|
||||
StoreConvention::ReceiverRegister(),
|
||||
StoreConvention::NameRegister(),
|
||||
StoreConvention::ValueRegister()};
|
||||
descriptor->Initialize(MajorKey(), arraysize(registers), registers,
|
||||
FUNCTION_ADDR(KeyedStoreIC_MissFromStubFailure));
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "src/codegen.h"
|
||||
#include "src/globals.h"
|
||||
#include "src/ic/ic.h"
|
||||
#include "src/ic/ic-conventions.h"
|
||||
#include "src/macro-assembler.h"
|
||||
#include "src/ostreams.h"
|
||||
|
||||
@ -2442,12 +2443,14 @@ class ElementsTransitionAndStoreStub : public HydrogenCodeStub {
|
||||
};
|
||||
|
||||
static const Register ValueRegister() {
|
||||
return KeyedStoreIC::ValueRegister();
|
||||
return StoreConvention::ValueRegister();
|
||||
}
|
||||
static const Register MapRegister() { return StoreConvention::MapRegister(); }
|
||||
static const Register KeyRegister() {
|
||||
return StoreConvention::NameRegister();
|
||||
}
|
||||
static const Register MapRegister() { return KeyedStoreIC::MapRegister(); }
|
||||
static const Register KeyRegister() { return KeyedStoreIC::NameRegister(); }
|
||||
static const Register ObjectRegister() {
|
||||
return KeyedStoreIC::ReceiverRegister();
|
||||
return StoreConvention::ReceiverRegister();
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -46,9 +46,9 @@ class LoadICStubShim : public HydrogenCodeStub {
|
||||
|
||||
virtual void InitializeInterfaceDescriptor(
|
||||
CodeStubInterfaceDescriptor* descriptor) V8_OVERRIDE {
|
||||
Register registers[] = { InterfaceDescriptor::ContextRegister(),
|
||||
LoadIC::ReceiverRegister(),
|
||||
LoadIC::NameRegister() };
|
||||
Register registers[] = {InterfaceDescriptor::ContextRegister(),
|
||||
LoadConvention::ReceiverRegister(),
|
||||
LoadConvention::NameRegister()};
|
||||
descriptor->Initialize(MajorKey(), arraysize(registers), registers);
|
||||
}
|
||||
|
||||
@ -76,9 +76,9 @@ class KeyedLoadICStubShim : public HydrogenCodeStub {
|
||||
|
||||
virtual void InitializeInterfaceDescriptor(
|
||||
CodeStubInterfaceDescriptor* descriptor) V8_OVERRIDE {
|
||||
Register registers[] = { InterfaceDescriptor::ContextRegister(),
|
||||
KeyedLoadIC::ReceiverRegister(),
|
||||
KeyedLoadIC::NameRegister() };
|
||||
Register registers[] = {InterfaceDescriptor::ContextRegister(),
|
||||
LoadConvention::ReceiverRegister(),
|
||||
LoadConvention::NameRegister()};
|
||||
descriptor->Initialize(MajorKey(), arraysize(registers), registers);
|
||||
}
|
||||
|
||||
@ -105,10 +105,10 @@ class StoreICStubShim : public HydrogenCodeStub {
|
||||
|
||||
virtual void InitializeInterfaceDescriptor(
|
||||
CodeStubInterfaceDescriptor* descriptor) V8_OVERRIDE {
|
||||
Register registers[] = { InterfaceDescriptor::ContextRegister(),
|
||||
StoreIC::ReceiverRegister(),
|
||||
StoreIC::NameRegister(),
|
||||
StoreIC::ValueRegister() };
|
||||
Register registers[] = {InterfaceDescriptor::ContextRegister(),
|
||||
StoreConvention::ReceiverRegister(),
|
||||
StoreConvention::NameRegister(),
|
||||
StoreConvention::ValueRegister()};
|
||||
descriptor->Initialize(MajorKey(), arraysize(registers), registers);
|
||||
}
|
||||
|
||||
@ -139,10 +139,10 @@ class KeyedStoreICStubShim : public HydrogenCodeStub {
|
||||
|
||||
virtual void InitializeInterfaceDescriptor(
|
||||
CodeStubInterfaceDescriptor* descriptor) V8_OVERRIDE {
|
||||
Register registers[] = { InterfaceDescriptor::ContextRegister(),
|
||||
KeyedStoreIC::ReceiverRegister(),
|
||||
KeyedStoreIC::NameRegister(),
|
||||
KeyedStoreIC::ValueRegister() };
|
||||
Register registers[] = {InterfaceDescriptor::ContextRegister(),
|
||||
StoreConvention::ReceiverRegister(),
|
||||
StoreConvention::NameRegister(),
|
||||
StoreConvention::ValueRegister()};
|
||||
descriptor->Initialize(MajorKey(), arraysize(registers), registers);
|
||||
}
|
||||
|
||||
|
@ -994,8 +994,8 @@ void Builtins::Generate_FunctionApply(MacroAssembler* masm) {
|
||||
|
||||
// Copy all arguments from the array to the stack.
|
||||
Label entry, loop;
|
||||
Register receiver = LoadIC::ReceiverRegister();
|
||||
Register key = LoadIC::NameRegister();
|
||||
Register receiver = LoadConvention::ReceiverRegister();
|
||||
Register key = LoadConvention::NameRegister();
|
||||
__ mov(key, Operand(ebp, kIndexOffset));
|
||||
__ jmp(&entry);
|
||||
__ bind(&loop);
|
||||
@ -1003,7 +1003,7 @@ void Builtins::Generate_FunctionApply(MacroAssembler* masm) {
|
||||
|
||||
// Use inline caching to speed up access to arguments.
|
||||
if (FLAG_vector_ics) {
|
||||
__ mov(LoadIC::SlotRegister(), Immediate(Smi::FromInt(0)));
|
||||
__ mov(VectorLoadConvention::SlotRegister(), Immediate(Smi::FromInt(0)));
|
||||
}
|
||||
Handle<Code> ic = masm->isolate()->builtins()->KeyedLoadIC_Initialize();
|
||||
__ call(ic, RelocInfo::CODE_TARGET);
|
||||
|
@ -895,7 +895,7 @@ void MathPowStub::Generate(MacroAssembler* masm) {
|
||||
|
||||
void FunctionPrototypeStub::Generate(MacroAssembler* masm) {
|
||||
Label miss;
|
||||
Register receiver = LoadIC::ReceiverRegister();
|
||||
Register receiver = LoadConvention::ReceiverRegister();
|
||||
|
||||
NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, eax,
|
||||
ebx, &miss);
|
||||
|
@ -180,17 +180,17 @@ void DebugCodegen::GenerateCallICStubDebugBreak(MacroAssembler* masm) {
|
||||
|
||||
void DebugCodegen::GenerateLoadICDebugBreak(MacroAssembler* masm) {
|
||||
// Register state for IC load call (from ic-ia32.cc).
|
||||
Register receiver = LoadIC::ReceiverRegister();
|
||||
Register name = LoadIC::NameRegister();
|
||||
Register receiver = LoadConvention::ReceiverRegister();
|
||||
Register name = LoadConvention::NameRegister();
|
||||
Generate_DebugBreakCallHelper(masm, receiver.bit() | name.bit(), 0, false);
|
||||
}
|
||||
|
||||
|
||||
void DebugCodegen::GenerateStoreICDebugBreak(MacroAssembler* masm) {
|
||||
// Register state for IC store call (from ic-ia32.cc).
|
||||
Register receiver = StoreIC::ReceiverRegister();
|
||||
Register name = StoreIC::NameRegister();
|
||||
Register value = StoreIC::ValueRegister();
|
||||
Register receiver = StoreConvention::ReceiverRegister();
|
||||
Register name = StoreConvention::NameRegister();
|
||||
Register value = StoreConvention::ValueRegister();
|
||||
Generate_DebugBreakCallHelper(
|
||||
masm, receiver.bit() | name.bit() | value.bit(), 0, false);
|
||||
}
|
||||
@ -204,9 +204,9 @@ void DebugCodegen::GenerateKeyedLoadICDebugBreak(MacroAssembler* masm) {
|
||||
|
||||
void DebugCodegen::GenerateKeyedStoreICDebugBreak(MacroAssembler* masm) {
|
||||
// Register state for keyed IC store call (from ic-ia32.cc).
|
||||
Register receiver = KeyedStoreIC::ReceiverRegister();
|
||||
Register name = KeyedStoreIC::NameRegister();
|
||||
Register value = KeyedStoreIC::ValueRegister();
|
||||
Register receiver = StoreConvention::ReceiverRegister();
|
||||
Register name = StoreConvention::NameRegister();
|
||||
Register value = StoreConvention::ValueRegister();
|
||||
Generate_DebugBreakCallHelper(
|
||||
masm, receiver.bit() | name.bit() | value.bit(), 0, false);
|
||||
}
|
||||
|
@ -1327,10 +1327,10 @@ void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy,
|
||||
|
||||
// All extension objects were empty and it is safe to use a global
|
||||
// load IC call.
|
||||
__ mov(LoadIC::ReceiverRegister(), GlobalObjectOperand());
|
||||
__ mov(LoadIC::NameRegister(), proxy->var()->name());
|
||||
__ mov(LoadConvention::ReceiverRegister(), GlobalObjectOperand());
|
||||
__ mov(LoadConvention::NameRegister(), proxy->var()->name());
|
||||
if (FLAG_vector_ics) {
|
||||
__ mov(LoadIC::SlotRegister(),
|
||||
__ mov(VectorLoadConvention::SlotRegister(),
|
||||
Immediate(Smi::FromInt(proxy->VariableFeedbackSlot())));
|
||||
}
|
||||
|
||||
@ -1414,10 +1414,10 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
|
||||
switch (var->location()) {
|
||||
case Variable::UNALLOCATED: {
|
||||
Comment cmnt(masm_, "[ Global variable");
|
||||
__ mov(LoadIC::ReceiverRegister(), GlobalObjectOperand());
|
||||
__ mov(LoadIC::NameRegister(), var->name());
|
||||
__ mov(LoadConvention::ReceiverRegister(), GlobalObjectOperand());
|
||||
__ mov(LoadConvention::NameRegister(), var->name());
|
||||
if (FLAG_vector_ics) {
|
||||
__ mov(LoadIC::SlotRegister(),
|
||||
__ mov(VectorLoadConvention::SlotRegister(),
|
||||
Immediate(Smi::FromInt(proxy->VariableFeedbackSlot())));
|
||||
}
|
||||
CallLoadIC(CONTEXTUAL);
|
||||
@ -1633,9 +1633,9 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
|
||||
if (key->value()->IsInternalizedString()) {
|
||||
if (property->emit_store()) {
|
||||
VisitForAccumulatorValue(value);
|
||||
DCHECK(StoreIC::ValueRegister().is(eax));
|
||||
__ mov(StoreIC::NameRegister(), Immediate(key->value()));
|
||||
__ mov(StoreIC::ReceiverRegister(), Operand(esp, 0));
|
||||
DCHECK(StoreConvention::ValueRegister().is(eax));
|
||||
__ mov(StoreConvention::NameRegister(), Immediate(key->value()));
|
||||
__ mov(StoreConvention::ReceiverRegister(), Operand(esp, 0));
|
||||
CallStoreIC(key->LiteralFeedbackId());
|
||||
PrepareForBailoutForId(key->id(), NO_REGISTERS);
|
||||
} else {
|
||||
@ -1814,7 +1814,7 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) {
|
||||
if (expr->is_compound()) {
|
||||
// We need the receiver both on the stack and in the register.
|
||||
VisitForStackValue(property->obj());
|
||||
__ mov(LoadIC::ReceiverRegister(), Operand(esp, 0));
|
||||
__ mov(LoadConvention::ReceiverRegister(), Operand(esp, 0));
|
||||
} else {
|
||||
VisitForStackValue(property->obj());
|
||||
}
|
||||
@ -1823,8 +1823,8 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) {
|
||||
if (expr->is_compound()) {
|
||||
VisitForStackValue(property->obj());
|
||||
VisitForStackValue(property->key());
|
||||
__ mov(LoadIC::ReceiverRegister(), Operand(esp, kPointerSize));
|
||||
__ mov(LoadIC::NameRegister(), Operand(esp, 0));
|
||||
__ mov(LoadConvention::ReceiverRegister(), Operand(esp, kPointerSize));
|
||||
__ mov(LoadConvention::NameRegister(), Operand(esp, 0));
|
||||
} else {
|
||||
VisitForStackValue(property->obj());
|
||||
VisitForStackValue(property->key());
|
||||
@ -1965,8 +1965,8 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
|
||||
|
||||
Label l_catch, l_try, l_suspend, l_continuation, l_resume;
|
||||
Label l_next, l_call, l_loop;
|
||||
Register load_receiver = LoadIC::ReceiverRegister();
|
||||
Register load_name = LoadIC::NameRegister();
|
||||
Register load_receiver = LoadConvention::ReceiverRegister();
|
||||
Register load_name = LoadConvention::NameRegister();
|
||||
|
||||
// Initial send value is undefined.
|
||||
__ mov(eax, isolate()->factory()->undefined_value());
|
||||
@ -2023,7 +2023,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
|
||||
__ bind(&l_call);
|
||||
__ mov(load_receiver, Operand(esp, kPointerSize));
|
||||
if (FLAG_vector_ics) {
|
||||
__ mov(LoadIC::SlotRegister(),
|
||||
__ mov(VectorLoadConvention::SlotRegister(),
|
||||
Immediate(Smi::FromInt(expr->KeyedLoadFeedbackSlot())));
|
||||
}
|
||||
Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
|
||||
@ -2043,7 +2043,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
|
||||
__ mov(load_name,
|
||||
isolate()->factory()->done_string()); // "done"
|
||||
if (FLAG_vector_ics) {
|
||||
__ mov(LoadIC::SlotRegister(),
|
||||
__ mov(VectorLoadConvention::SlotRegister(),
|
||||
Immediate(Smi::FromInt(expr->DoneFeedbackSlot())));
|
||||
}
|
||||
CallLoadIC(NOT_CONTEXTUAL); // result.done in eax
|
||||
@ -2057,7 +2057,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
|
||||
__ mov(load_name,
|
||||
isolate()->factory()->value_string()); // "value"
|
||||
if (FLAG_vector_ics) {
|
||||
__ mov(LoadIC::SlotRegister(),
|
||||
__ mov(VectorLoadConvention::SlotRegister(),
|
||||
Immediate(Smi::FromInt(expr->ValueFeedbackSlot())));
|
||||
}
|
||||
CallLoadIC(NOT_CONTEXTUAL); // result.value in eax
|
||||
@ -2219,9 +2219,9 @@ void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
|
||||
SetSourcePosition(prop->position());
|
||||
Literal* key = prop->key()->AsLiteral();
|
||||
DCHECK(!key->value()->IsSmi());
|
||||
__ mov(LoadIC::NameRegister(), Immediate(key->value()));
|
||||
__ mov(LoadConvention::NameRegister(), Immediate(key->value()));
|
||||
if (FLAG_vector_ics) {
|
||||
__ mov(LoadIC::SlotRegister(),
|
||||
__ mov(VectorLoadConvention::SlotRegister(),
|
||||
Immediate(Smi::FromInt(prop->PropertyFeedbackSlot())));
|
||||
CallLoadIC(NOT_CONTEXTUAL);
|
||||
} else {
|
||||
@ -2234,7 +2234,7 @@ void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
|
||||
SetSourcePosition(prop->position());
|
||||
Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
|
||||
if (FLAG_vector_ics) {
|
||||
__ mov(LoadIC::SlotRegister(),
|
||||
__ mov(VectorLoadConvention::SlotRegister(),
|
||||
Immediate(Smi::FromInt(prop->PropertyFeedbackSlot())));
|
||||
CallIC(ic);
|
||||
} else {
|
||||
@ -2374,9 +2374,10 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) {
|
||||
case NAMED_PROPERTY: {
|
||||
__ push(eax); // Preserve value.
|
||||
VisitForAccumulatorValue(prop->obj());
|
||||
__ Move(StoreIC::ReceiverRegister(), eax);
|
||||
__ pop(StoreIC::ValueRegister()); // Restore value.
|
||||
__ mov(StoreIC::NameRegister(), prop->key()->AsLiteral()->value());
|
||||
__ Move(StoreConvention::ReceiverRegister(), eax);
|
||||
__ pop(StoreConvention::ValueRegister()); // Restore value.
|
||||
__ mov(StoreConvention::NameRegister(),
|
||||
prop->key()->AsLiteral()->value());
|
||||
CallStoreIC();
|
||||
break;
|
||||
}
|
||||
@ -2384,9 +2385,9 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) {
|
||||
__ push(eax); // Preserve value.
|
||||
VisitForStackValue(prop->obj());
|
||||
VisitForAccumulatorValue(prop->key());
|
||||
__ Move(KeyedStoreIC::NameRegister(), eax);
|
||||
__ pop(KeyedStoreIC::ReceiverRegister()); // Receiver.
|
||||
__ pop(KeyedStoreIC::ValueRegister()); // Restore value.
|
||||
__ Move(StoreConvention::NameRegister(), eax);
|
||||
__ pop(StoreConvention::ReceiverRegister()); // Receiver.
|
||||
__ pop(StoreConvention::ValueRegister()); // Restore value.
|
||||
Handle<Code> ic = strict_mode() == SLOPPY
|
||||
? isolate()->builtins()->KeyedStoreIC_Initialize()
|
||||
: isolate()->builtins()->KeyedStoreIC_Initialize_Strict();
|
||||
@ -2413,8 +2414,8 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var,
|
||||
Token::Value op) {
|
||||
if (var->IsUnallocated()) {
|
||||
// Global var, const, or let.
|
||||
__ mov(StoreIC::NameRegister(), var->name());
|
||||
__ mov(StoreIC::ReceiverRegister(), GlobalObjectOperand());
|
||||
__ mov(StoreConvention::NameRegister(), var->name());
|
||||
__ mov(StoreConvention::ReceiverRegister(), GlobalObjectOperand());
|
||||
CallStoreIC();
|
||||
|
||||
} else if (op == Token::INIT_CONST_LEGACY) {
|
||||
@ -2487,8 +2488,8 @@ void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) {
|
||||
|
||||
// Record source code position before IC call.
|
||||
SetSourcePosition(expr->position());
|
||||
__ mov(StoreIC::NameRegister(), prop->key()->AsLiteral()->value());
|
||||
__ pop(StoreIC::ReceiverRegister());
|
||||
__ mov(StoreConvention::NameRegister(), prop->key()->AsLiteral()->value());
|
||||
__ pop(StoreConvention::ReceiverRegister());
|
||||
CallStoreIC(expr->AssignmentFeedbackId());
|
||||
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG);
|
||||
context()->Plug(eax);
|
||||
@ -2501,9 +2502,9 @@ void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) {
|
||||
// esp[0] : key
|
||||
// esp[kPointerSize] : receiver
|
||||
|
||||
__ pop(KeyedStoreIC::NameRegister()); // Key.
|
||||
__ pop(KeyedStoreIC::ReceiverRegister());
|
||||
DCHECK(KeyedStoreIC::ValueRegister().is(eax));
|
||||
__ pop(StoreConvention::NameRegister()); // Key.
|
||||
__ pop(StoreConvention::ReceiverRegister());
|
||||
DCHECK(StoreConvention::ValueRegister().is(eax));
|
||||
// Record source code position before IC call.
|
||||
SetSourcePosition(expr->position());
|
||||
Handle<Code> ic = strict_mode() == SLOPPY
|
||||
@ -2522,15 +2523,15 @@ void FullCodeGenerator::VisitProperty(Property* expr) {
|
||||
|
||||
if (key->IsPropertyName()) {
|
||||
VisitForAccumulatorValue(expr->obj());
|
||||
__ Move(LoadIC::ReceiverRegister(), result_register());
|
||||
__ Move(LoadConvention::ReceiverRegister(), result_register());
|
||||
EmitNamedPropertyLoad(expr);
|
||||
PrepareForBailoutForId(expr->LoadId(), TOS_REG);
|
||||
context()->Plug(eax);
|
||||
} else {
|
||||
VisitForStackValue(expr->obj());
|
||||
VisitForAccumulatorValue(expr->key());
|
||||
__ pop(LoadIC::ReceiverRegister()); // Object.
|
||||
__ Move(LoadIC::NameRegister(), result_register()); // Key.
|
||||
__ pop(LoadConvention::ReceiverRegister()); // Object.
|
||||
__ Move(LoadConvention::NameRegister(), result_register()); // Key.
|
||||
EmitKeyedPropertyLoad(expr);
|
||||
context()->Plug(eax);
|
||||
}
|
||||
@ -2563,7 +2564,7 @@ void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) {
|
||||
} else {
|
||||
// Load the function from the receiver.
|
||||
DCHECK(callee->IsProperty());
|
||||
__ mov(LoadIC::ReceiverRegister(), Operand(esp, 0));
|
||||
__ mov(LoadConvention::ReceiverRegister(), Operand(esp, 0));
|
||||
EmitNamedPropertyLoad(callee->AsProperty());
|
||||
PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG);
|
||||
// Push the target function under the receiver.
|
||||
@ -2585,8 +2586,8 @@ void FullCodeGenerator::EmitKeyedCallWithLoadIC(Call* expr,
|
||||
|
||||
// Load the function from the receiver.
|
||||
DCHECK(callee->IsProperty());
|
||||
__ mov(LoadIC::ReceiverRegister(), Operand(esp, 0));
|
||||
__ mov(LoadIC::NameRegister(), eax);
|
||||
__ mov(LoadConvention::ReceiverRegister(), Operand(esp, 0));
|
||||
__ mov(LoadConvention::NameRegister(), eax);
|
||||
EmitKeyedPropertyLoad(callee->AsProperty());
|
||||
PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG);
|
||||
|
||||
@ -4044,10 +4045,10 @@ void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) {
|
||||
__ push(FieldOperand(eax, GlobalObject::kBuiltinsOffset));
|
||||
|
||||
// Load the function from the receiver.
|
||||
__ mov(LoadIC::ReceiverRegister(), Operand(esp, 0));
|
||||
__ mov(LoadIC::NameRegister(), Immediate(expr->name()));
|
||||
__ mov(LoadConvention::ReceiverRegister(), Operand(esp, 0));
|
||||
__ mov(LoadConvention::NameRegister(), Immediate(expr->name()));
|
||||
if (FLAG_vector_ics) {
|
||||
__ mov(LoadIC::SlotRegister(),
|
||||
__ mov(VectorLoadConvention::SlotRegister(),
|
||||
Immediate(Smi::FromInt(expr->CallRuntimeFeedbackSlot())));
|
||||
CallLoadIC(NOT_CONTEXTUAL);
|
||||
} else {
|
||||
@ -4234,14 +4235,14 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
|
||||
if (assign_type == NAMED_PROPERTY) {
|
||||
// Put the object both on the stack and in the register.
|
||||
VisitForStackValue(prop->obj());
|
||||
__ mov(LoadIC::ReceiverRegister(), Operand(esp, 0));
|
||||
__ mov(LoadConvention::ReceiverRegister(), Operand(esp, 0));
|
||||
EmitNamedPropertyLoad(prop);
|
||||
} else {
|
||||
VisitForStackValue(prop->obj());
|
||||
VisitForStackValue(prop->key());
|
||||
__ mov(LoadIC::ReceiverRegister(),
|
||||
Operand(esp, kPointerSize)); // Object.
|
||||
__ mov(LoadIC::NameRegister(), Operand(esp, 0)); // Key.
|
||||
__ mov(LoadConvention::ReceiverRegister(),
|
||||
Operand(esp, kPointerSize)); // Object.
|
||||
__ mov(LoadConvention::NameRegister(), Operand(esp, 0)); // Key.
|
||||
EmitKeyedPropertyLoad(prop);
|
||||
}
|
||||
}
|
||||
@ -4356,8 +4357,9 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
|
||||
}
|
||||
break;
|
||||
case NAMED_PROPERTY: {
|
||||
__ mov(StoreIC::NameRegister(), prop->key()->AsLiteral()->value());
|
||||
__ pop(StoreIC::ReceiverRegister());
|
||||
__ mov(StoreConvention::NameRegister(),
|
||||
prop->key()->AsLiteral()->value());
|
||||
__ pop(StoreConvention::ReceiverRegister());
|
||||
CallStoreIC(expr->CountStoreFeedbackId());
|
||||
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG);
|
||||
if (expr->is_postfix()) {
|
||||
@ -4370,8 +4372,8 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
|
||||
break;
|
||||
}
|
||||
case KEYED_PROPERTY: {
|
||||
__ pop(KeyedStoreIC::NameRegister());
|
||||
__ pop(KeyedStoreIC::ReceiverRegister());
|
||||
__ pop(StoreConvention::NameRegister());
|
||||
__ pop(StoreConvention::ReceiverRegister());
|
||||
Handle<Code> ic = strict_mode() == SLOPPY
|
||||
? isolate()->builtins()->KeyedStoreIC_Initialize()
|
||||
: isolate()->builtins()->KeyedStoreIC_Initialize_Strict();
|
||||
@ -4398,10 +4400,10 @@ void FullCodeGenerator::VisitForTypeofValue(Expression* expr) {
|
||||
|
||||
if (proxy != NULL && proxy->var()->IsUnallocated()) {
|
||||
Comment cmnt(masm_, "[ Global variable");
|
||||
__ mov(LoadIC::ReceiverRegister(), GlobalObjectOperand());
|
||||
__ mov(LoadIC::NameRegister(), Immediate(proxy->name()));
|
||||
__ mov(LoadConvention::ReceiverRegister(), GlobalObjectOperand());
|
||||
__ mov(LoadConvention::NameRegister(), Immediate(proxy->name()));
|
||||
if (FLAG_vector_ics) {
|
||||
__ mov(LoadIC::SlotRegister(),
|
||||
__ mov(VectorLoadConvention::SlotRegister(),
|
||||
Immediate(Smi::FromInt(proxy->VariableFeedbackSlot())));
|
||||
}
|
||||
// Use a regular load, not a contextual load, to avoid a reference
|
||||
|
@ -2832,21 +2832,22 @@ template <class T>
|
||||
void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
|
||||
DCHECK(FLAG_vector_ics);
|
||||
Register vector = ToRegister(instr->temp_vector());
|
||||
DCHECK(vector.is(LoadIC::VectorRegister()));
|
||||
DCHECK(vector.is(FullVectorLoadConvention::VectorRegister()));
|
||||
__ mov(vector, instr->hydrogen()->feedback_vector());
|
||||
// No need to allocate this register.
|
||||
DCHECK(LoadIC::SlotRegister().is(eax));
|
||||
__ mov(LoadIC::SlotRegister(),
|
||||
DCHECK(FullVectorLoadConvention::SlotRegister().is(eax));
|
||||
__ mov(FullVectorLoadConvention::SlotRegister(),
|
||||
Immediate(Smi::FromInt(instr->hydrogen()->slot())));
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(esi));
|
||||
DCHECK(ToRegister(instr->global_object()).is(LoadIC::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->global_object())
|
||||
.is(LoadConvention::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->result()).is(eax));
|
||||
|
||||
__ mov(LoadIC::NameRegister(), instr->name());
|
||||
__ mov(LoadConvention::NameRegister(), instr->name());
|
||||
if (FLAG_vector_ics) {
|
||||
EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
|
||||
}
|
||||
@ -2980,10 +2981,10 @@ void LCodeGen::EmitPushTaggedOperand(LOperand* operand) {
|
||||
|
||||
void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(esi));
|
||||
DCHECK(ToRegister(instr->object()).is(LoadIC::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->object()).is(LoadConvention::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->result()).is(eax));
|
||||
|
||||
__ mov(LoadIC::NameRegister(), instr->name());
|
||||
__ mov(LoadConvention::NameRegister(), instr->name());
|
||||
if (FLAG_vector_ics) {
|
||||
EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
|
||||
}
|
||||
@ -3208,8 +3209,8 @@ Operand LCodeGen::BuildFastArrayOperand(
|
||||
|
||||
void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(esi));
|
||||
DCHECK(ToRegister(instr->object()).is(LoadIC::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->key()).is(LoadIC::NameRegister()));
|
||||
DCHECK(ToRegister(instr->object()).is(LoadConvention::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->key()).is(LoadConvention::NameRegister()));
|
||||
|
||||
if (FLAG_vector_ics) {
|
||||
EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
|
||||
@ -4067,10 +4068,10 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
|
||||
|
||||
void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(esi));
|
||||
DCHECK(ToRegister(instr->object()).is(StoreIC::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->value()).is(StoreIC::ValueRegister()));
|
||||
DCHECK(ToRegister(instr->object()).is(StoreConvention::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->value()).is(StoreConvention::ValueRegister()));
|
||||
|
||||
__ mov(StoreIC::NameRegister(), instr->name());
|
||||
__ mov(StoreConvention::NameRegister(), instr->name());
|
||||
Handle<Code> ic = StoreIC::initialize_stub(isolate(), instr->strict_mode());
|
||||
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
||||
}
|
||||
@ -4249,9 +4250,9 @@ void LCodeGen::DoStoreKeyed(LStoreKeyed* instr) {
|
||||
|
||||
void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(esi));
|
||||
DCHECK(ToRegister(instr->object()).is(KeyedStoreIC::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->key()).is(KeyedStoreIC::NameRegister()));
|
||||
DCHECK(ToRegister(instr->value()).is(KeyedStoreIC::ValueRegister()));
|
||||
DCHECK(ToRegister(instr->object()).is(StoreConvention::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->key()).is(StoreConvention::NameRegister()));
|
||||
DCHECK(ToRegister(instr->value()).is(StoreConvention::ValueRegister()));
|
||||
|
||||
Handle<Code> ic = instr->strict_mode() == STRICT
|
||||
? isolate()->builtins()->KeyedStoreIC_Initialize_Strict()
|
||||
|
@ -2107,11 +2107,11 @@ LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) {
|
||||
|
||||
LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), esi);
|
||||
LOperand* global_object = UseFixed(instr->global_object(),
|
||||
LoadIC::ReceiverRegister());
|
||||
LOperand* global_object =
|
||||
UseFixed(instr->global_object(), LoadConvention::ReceiverRegister());
|
||||
LOperand* vector = NULL;
|
||||
if (FLAG_vector_ics) {
|
||||
vector = FixedTemp(LoadIC::VectorRegister());
|
||||
vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
|
||||
}
|
||||
|
||||
LLoadGlobalGeneric* result =
|
||||
@ -2168,10 +2168,11 @@ LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) {
|
||||
|
||||
LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), esi);
|
||||
LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister());
|
||||
LOperand* object =
|
||||
UseFixed(instr->object(), LoadConvention::ReceiverRegister());
|
||||
LOperand* vector = NULL;
|
||||
if (FLAG_vector_ics) {
|
||||
vector = FixedTemp(LoadIC::VectorRegister());
|
||||
vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
|
||||
}
|
||||
LLoadNamedGeneric* result = new(zone()) LLoadNamedGeneric(
|
||||
context, object, vector);
|
||||
@ -2231,11 +2232,12 @@ LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) {
|
||||
|
||||
LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), esi);
|
||||
LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister());
|
||||
LOperand* key = UseFixed(instr->key(), LoadIC::NameRegister());
|
||||
LOperand* object =
|
||||
UseFixed(instr->object(), LoadConvention::ReceiverRegister());
|
||||
LOperand* key = UseFixed(instr->key(), LoadConvention::NameRegister());
|
||||
LOperand* vector = NULL;
|
||||
if (FLAG_vector_ics) {
|
||||
vector = FixedTemp(LoadIC::VectorRegister());
|
||||
vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
|
||||
}
|
||||
LLoadKeyedGeneric* result =
|
||||
new(zone()) LLoadKeyedGeneric(context, object, key, vector);
|
||||
@ -2316,10 +2318,10 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
|
||||
|
||||
LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), esi);
|
||||
LOperand* object = UseFixed(instr->object(),
|
||||
KeyedStoreIC::ReceiverRegister());
|
||||
LOperand* key = UseFixed(instr->key(), KeyedStoreIC::NameRegister());
|
||||
LOperand* value = UseFixed(instr->value(), KeyedStoreIC::ValueRegister());
|
||||
LOperand* object =
|
||||
UseFixed(instr->object(), StoreConvention::ReceiverRegister());
|
||||
LOperand* key = UseFixed(instr->key(), StoreConvention::NameRegister());
|
||||
LOperand* value = UseFixed(instr->value(), StoreConvention::ValueRegister());
|
||||
|
||||
DCHECK(instr->object()->representation().IsTagged());
|
||||
DCHECK(instr->key()->representation().IsTagged());
|
||||
@ -2421,8 +2423,9 @@ LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
|
||||
|
||||
LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), esi);
|
||||
LOperand* object = UseFixed(instr->object(), StoreIC::ReceiverRegister());
|
||||
LOperand* value = UseFixed(instr->value(), StoreIC::ValueRegister());
|
||||
LOperand* object =
|
||||
UseFixed(instr->object(), StoreConvention::ReceiverRegister());
|
||||
LOperand* value = UseFixed(instr->value(), StoreConvention::ValueRegister());
|
||||
|
||||
LStoreNamedGeneric* result =
|
||||
new(zone()) LStoreNamedGeneric(context, object, value);
|
||||
|
@ -22,8 +22,8 @@ void PropertyAccessCompiler::GenerateTailCall(MacroAssembler* masm,
|
||||
|
||||
Register* PropertyAccessCompiler::load_calling_convention() {
|
||||
// receiver, name, scratch1, scratch2, scratch3, scratch4.
|
||||
Register receiver = LoadIC::ReceiverRegister();
|
||||
Register name = LoadIC::NameRegister();
|
||||
Register receiver = LoadConvention::ReceiverRegister();
|
||||
Register name = LoadConvention::NameRegister();
|
||||
static Register registers[] = {receiver, name, r3, r0, r4, r5};
|
||||
return registers;
|
||||
}
|
||||
@ -31,9 +31,9 @@ Register* PropertyAccessCompiler::load_calling_convention() {
|
||||
|
||||
Register* PropertyAccessCompiler::store_calling_convention() {
|
||||
// receiver, name, scratch1, scratch2, scratch3.
|
||||
Register receiver = StoreIC::ReceiverRegister();
|
||||
Register name = StoreIC::NameRegister();
|
||||
DCHECK(r3.is(KeyedStoreIC::MapRegister()));
|
||||
Register receiver = StoreConvention::ReceiverRegister();
|
||||
Register name = StoreConvention::NameRegister();
|
||||
DCHECK(r3.is(StoreConvention::MapRegister()));
|
||||
static Register registers[] = {receiver, name, r3, r4, r5};
|
||||
return registers;
|
||||
}
|
||||
|
@ -291,8 +291,8 @@ void ElementHandlerCompiler::GenerateLoadDictionaryElement(
|
||||
// The return address is in lr.
|
||||
Label slow, miss;
|
||||
|
||||
Register key = LoadIC::NameRegister();
|
||||
Register receiver = LoadIC::ReceiverRegister();
|
||||
Register key = LoadConvention::NameRegister();
|
||||
Register receiver = LoadConvention::ReceiverRegister();
|
||||
DCHECK(receiver.is(r1));
|
||||
DCHECK(key.is(r2));
|
||||
|
||||
@ -316,8 +316,8 @@ void ElementHandlerCompiler::GenerateLoadDictionaryElement(
|
||||
|
||||
void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
|
||||
// Push receiver, key and value for runtime call.
|
||||
__ Push(StoreIC::ReceiverRegister(), StoreIC::NameRegister(),
|
||||
StoreIC::ValueRegister());
|
||||
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
|
||||
StoreConvention::ValueRegister());
|
||||
|
||||
// The slow case calls into the runtime to complete the store without causing
|
||||
// an IC miss that would otherwise cause a transition to the generic stub.
|
||||
@ -329,8 +329,8 @@ void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
|
||||
|
||||
void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) {
|
||||
// Push receiver, key and value for runtime call.
|
||||
__ Push(StoreIC::ReceiverRegister(), StoreIC::NameRegister(),
|
||||
StoreIC::ValueRegister());
|
||||
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
|
||||
StoreConvention::ValueRegister());
|
||||
|
||||
// The slow case calls into the runtime to complete the store without causing
|
||||
// an IC miss that would otherwise cause a transition to the generic stub.
|
||||
@ -828,7 +828,9 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor(
|
||||
}
|
||||
|
||||
|
||||
Register NamedStoreHandlerCompiler::value() { return StoreIC::ValueRegister(); }
|
||||
Register NamedStoreHandlerCompiler::value() {
|
||||
return StoreConvention::ValueRegister();
|
||||
}
|
||||
|
||||
|
||||
Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal(
|
||||
@ -837,7 +839,7 @@ Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal(
|
||||
FrontendHeader(receiver(), name, &miss);
|
||||
|
||||
// Get the value from the cell.
|
||||
Register result = StoreIC::ValueRegister();
|
||||
Register result = StoreConvention::ValueRegister();
|
||||
__ mov(result, Operand(cell));
|
||||
__ ldr(result, FieldMemOperand(result, Cell::kValueOffset));
|
||||
|
||||
|
@ -244,8 +244,8 @@ static void GenerateKeyNameCheck(MacroAssembler* masm, Register key,
|
||||
|
||||
void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
|
||||
// The return address is in lr.
|
||||
Register receiver = ReceiverRegister();
|
||||
Register name = NameRegister();
|
||||
Register receiver = LoadConvention::ReceiverRegister();
|
||||
Register name = LoadConvention::NameRegister();
|
||||
DCHECK(receiver.is(r1));
|
||||
DCHECK(name.is(r2));
|
||||
|
||||
@ -262,14 +262,15 @@ void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
|
||||
|
||||
void LoadIC::GenerateNormal(MacroAssembler* masm) {
|
||||
Register dictionary = r0;
|
||||
DCHECK(!dictionary.is(ReceiverRegister()));
|
||||
DCHECK(!dictionary.is(NameRegister()));
|
||||
DCHECK(!dictionary.is(LoadConvention::ReceiverRegister()));
|
||||
DCHECK(!dictionary.is(LoadConvention::NameRegister()));
|
||||
|
||||
Label slow;
|
||||
|
||||
__ ldr(dictionary,
|
||||
FieldMemOperand(ReceiverRegister(), JSObject::kPropertiesOffset));
|
||||
GenerateDictionaryLoad(masm, &slow, dictionary, NameRegister(), r0, r3, r4);
|
||||
__ ldr(dictionary, FieldMemOperand(LoadConvention::ReceiverRegister(),
|
||||
JSObject::kPropertiesOffset));
|
||||
GenerateDictionaryLoad(masm, &slow, dictionary,
|
||||
LoadConvention::NameRegister(), r0, r3, r4);
|
||||
__ Ret();
|
||||
|
||||
// Dictionary load failed, go slow (but don't miss).
|
||||
@ -288,8 +289,8 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
|
||||
|
||||
__ IncrementCounter(isolate->counters()->load_miss(), 1, r3, r4);
|
||||
|
||||
__ mov(LoadIC_TempRegister(), ReceiverRegister());
|
||||
__ Push(LoadIC_TempRegister(), NameRegister());
|
||||
__ mov(LoadIC_TempRegister(), LoadConvention::ReceiverRegister());
|
||||
__ Push(LoadIC_TempRegister(), LoadConvention::NameRegister());
|
||||
|
||||
// Perform tail call to the entry.
|
||||
ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate);
|
||||
@ -300,8 +301,8 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
|
||||
void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
|
||||
// The return address is in lr.
|
||||
|
||||
__ mov(LoadIC_TempRegister(), ReceiverRegister());
|
||||
__ Push(LoadIC_TempRegister(), NameRegister());
|
||||
__ mov(LoadIC_TempRegister(), LoadConvention::ReceiverRegister());
|
||||
__ Push(LoadIC_TempRegister(), LoadConvention::NameRegister());
|
||||
|
||||
__ TailCallRuntime(Runtime::kGetProperty, 2, 1);
|
||||
}
|
||||
@ -388,8 +389,8 @@ static MemOperand GenerateUnmappedArgumentsLookup(MacroAssembler* masm,
|
||||
|
||||
void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
|
||||
// The return address is in lr.
|
||||
Register receiver = ReceiverRegister();
|
||||
Register key = NameRegister();
|
||||
Register receiver = LoadConvention::ReceiverRegister();
|
||||
Register key = LoadConvention::NameRegister();
|
||||
DCHECK(receiver.is(r1));
|
||||
DCHECK(key.is(r2));
|
||||
|
||||
@ -413,9 +414,9 @@ void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
|
||||
|
||||
|
||||
void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) {
|
||||
Register receiver = ReceiverRegister();
|
||||
Register key = NameRegister();
|
||||
Register value = ValueRegister();
|
||||
Register receiver = StoreConvention::ReceiverRegister();
|
||||
Register key = StoreConvention::NameRegister();
|
||||
Register value = StoreConvention::ValueRegister();
|
||||
DCHECK(receiver.is(r1));
|
||||
DCHECK(key.is(r2));
|
||||
DCHECK(value.is(r0));
|
||||
@ -448,7 +449,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
|
||||
|
||||
__ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, r3, r4);
|
||||
|
||||
__ Push(ReceiverRegister(), NameRegister());
|
||||
__ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister());
|
||||
|
||||
// Perform tail call to the entry.
|
||||
ExternalReference ref =
|
||||
@ -458,35 +459,10 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
|
||||
}
|
||||
|
||||
|
||||
// IC register specifications
|
||||
const Register LoadIC::ReceiverRegister() { return r1; }
|
||||
const Register LoadIC::NameRegister() { return r2; }
|
||||
|
||||
|
||||
const Register LoadIC::SlotRegister() {
|
||||
DCHECK(FLAG_vector_ics);
|
||||
return r0;
|
||||
}
|
||||
|
||||
|
||||
const Register LoadIC::VectorRegister() {
|
||||
DCHECK(FLAG_vector_ics);
|
||||
return r3;
|
||||
}
|
||||
|
||||
|
||||
const Register StoreIC::ReceiverRegister() { return r1; }
|
||||
const Register StoreIC::NameRegister() { return r2; }
|
||||
const Register StoreIC::ValueRegister() { return r0; }
|
||||
|
||||
|
||||
const Register KeyedStoreIC::MapRegister() { return r3; }
|
||||
|
||||
|
||||
void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
|
||||
// The return address is in lr.
|
||||
|
||||
__ Push(ReceiverRegister(), NameRegister());
|
||||
__ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister());
|
||||
|
||||
__ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1);
|
||||
}
|
||||
@ -497,8 +473,8 @@ void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) {
|
||||
Label slow, check_name, index_smi, index_name, property_array_property;
|
||||
Label probe_dictionary, check_number_dictionary;
|
||||
|
||||
Register key = NameRegister();
|
||||
Register receiver = ReceiverRegister();
|
||||
Register key = LoadConvention::NameRegister();
|
||||
Register receiver = LoadConvention::ReceiverRegister();
|
||||
DCHECK(key.is(r2));
|
||||
DCHECK(receiver.is(r1));
|
||||
|
||||
@ -659,8 +635,8 @@ void KeyedLoadIC::GenerateString(MacroAssembler* masm) {
|
||||
// Return address is in lr.
|
||||
Label miss;
|
||||
|
||||
Register receiver = ReceiverRegister();
|
||||
Register index = NameRegister();
|
||||
Register receiver = LoadConvention::ReceiverRegister();
|
||||
Register index = LoadConvention::NameRegister();
|
||||
Register scratch = r3;
|
||||
Register result = r0;
|
||||
DCHECK(!scratch.is(receiver) && !scratch.is(index));
|
||||
@ -685,8 +661,8 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) {
|
||||
// Return address is in lr.
|
||||
Label slow;
|
||||
|
||||
Register receiver = ReceiverRegister();
|
||||
Register key = NameRegister();
|
||||
Register receiver = LoadConvention::ReceiverRegister();
|
||||
Register key = LoadConvention::NameRegister();
|
||||
Register scratch1 = r3;
|
||||
Register scratch2 = r4;
|
||||
DCHECK(!scratch1.is(receiver) && !scratch1.is(key));
|
||||
@ -725,7 +701,8 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) {
|
||||
|
||||
void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
|
||||
// Push receiver, key and value for runtime call.
|
||||
__ Push(ReceiverRegister(), NameRegister(), ValueRegister());
|
||||
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
|
||||
StoreConvention::ValueRegister());
|
||||
|
||||
ExternalReference ref =
|
||||
ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate());
|
||||
@ -887,9 +864,9 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
|
||||
Label array, extra, check_if_double_array;
|
||||
|
||||
// Register usage.
|
||||
Register value = ValueRegister();
|
||||
Register key = NameRegister();
|
||||
Register receiver = ReceiverRegister();
|
||||
Register value = StoreConvention::ValueRegister();
|
||||
Register key = StoreConvention::NameRegister();
|
||||
Register receiver = StoreConvention::ReceiverRegister();
|
||||
DCHECK(receiver.is(r1));
|
||||
DCHECK(key.is(r2));
|
||||
DCHECK(value.is(r0));
|
||||
@ -976,11 +953,11 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
|
||||
|
||||
|
||||
void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
|
||||
Register receiver = ReceiverRegister();
|
||||
Register name = NameRegister();
|
||||
Register receiver = StoreConvention::ReceiverRegister();
|
||||
Register name = StoreConvention::NameRegister();
|
||||
DCHECK(receiver.is(r1));
|
||||
DCHECK(name.is(r2));
|
||||
DCHECK(ValueRegister().is(r0));
|
||||
DCHECK(StoreConvention::ValueRegister().is(r0));
|
||||
|
||||
// Get the receiver from the stack and probe the stub cache.
|
||||
Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
|
||||
@ -995,7 +972,8 @@ void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
|
||||
|
||||
|
||||
void StoreIC::GenerateMiss(MacroAssembler* masm) {
|
||||
__ Push(ReceiverRegister(), NameRegister(), ValueRegister());
|
||||
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
|
||||
StoreConvention::ValueRegister());
|
||||
|
||||
// Perform tail call to the entry.
|
||||
ExternalReference ref =
|
||||
@ -1006,9 +984,9 @@ void StoreIC::GenerateMiss(MacroAssembler* masm) {
|
||||
|
||||
void StoreIC::GenerateNormal(MacroAssembler* masm) {
|
||||
Label miss;
|
||||
Register receiver = ReceiverRegister();
|
||||
Register name = NameRegister();
|
||||
Register value = ValueRegister();
|
||||
Register receiver = StoreConvention::ReceiverRegister();
|
||||
Register name = StoreConvention::NameRegister();
|
||||
Register value = StoreConvention::ValueRegister();
|
||||
Register dictionary = r3;
|
||||
DCHECK(receiver.is(r1));
|
||||
DCHECK(name.is(r2));
|
||||
|
@ -16,8 +16,8 @@ namespace internal {
|
||||
|
||||
void PropertyICCompiler::GenerateRuntimeSetProperty(MacroAssembler* masm,
|
||||
StrictMode strict_mode) {
|
||||
__ Push(StoreIC::ReceiverRegister(), StoreIC::NameRegister(),
|
||||
StoreIC::ValueRegister());
|
||||
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
|
||||
StoreConvention::ValueRegister());
|
||||
|
||||
__ mov(r0, Operand(Smi::FromInt(strict_mode)));
|
||||
__ Push(r0);
|
||||
@ -57,7 +57,7 @@ Handle<Code> PropertyICCompiler::CompilePolymorphic(TypeHandleList* types,
|
||||
// Polymorphic keyed stores may use the map register
|
||||
Register map_reg = scratch1();
|
||||
DCHECK(kind() != Code::KEYED_STORE_IC ||
|
||||
map_reg.is(KeyedStoreIC::MapRegister()));
|
||||
map_reg.is(StoreConvention::MapRegister()));
|
||||
|
||||
int receiver_count = types->length();
|
||||
int number_of_handled_maps = 0;
|
||||
|
41
src/ic/arm/ic-conventions-arm.cc
Normal file
41
src/ic/arm/ic-conventions-arm.cc
Normal file
@ -0,0 +1,41 @@
|
||||
// Copyright 2012 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "src/v8.h"
|
||||
|
||||
#if V8_TARGET_ARCH_ARM
|
||||
|
||||
#include "src/codegen.h"
|
||||
#include "src/ic/ic-conventions.h"
|
||||
|
||||
namespace v8 {
|
||||
namespace internal {
|
||||
|
||||
// IC register specifications
|
||||
const Register LoadConvention::ReceiverRegister() { return r1; }
|
||||
const Register LoadConvention::NameRegister() { return r2; }
|
||||
|
||||
|
||||
const Register VectorLoadConvention::SlotRegister() {
|
||||
DCHECK(FLAG_vector_ics);
|
||||
return r0;
|
||||
}
|
||||
|
||||
|
||||
const Register FullVectorLoadConvention::VectorRegister() {
|
||||
DCHECK(FLAG_vector_ics);
|
||||
return r3;
|
||||
}
|
||||
|
||||
|
||||
const Register StoreConvention::ReceiverRegister() { return r1; }
|
||||
const Register StoreConvention::NameRegister() { return r2; }
|
||||
const Register StoreConvention::ValueRegister() { return r0; }
|
||||
|
||||
|
||||
const Register StoreConvention::MapRegister() { return r3; }
|
||||
}
|
||||
} // namespace v8::internal
|
||||
|
||||
#endif // V8_TARGET_ARCH_ARM
|
@ -29,8 +29,8 @@ void PropertyAccessCompiler::GenerateTailCall(MacroAssembler* masm,
|
||||
|
||||
Register* PropertyAccessCompiler::load_calling_convention() {
|
||||
// receiver, name, scratch1, scratch2, scratch3, scratch4.
|
||||
Register receiver = LoadIC::ReceiverRegister();
|
||||
Register name = LoadIC::NameRegister();
|
||||
Register receiver = LoadConvention::ReceiverRegister();
|
||||
Register name = LoadConvention::NameRegister();
|
||||
static Register registers[] = {receiver, name, x3, x0, x4, x5};
|
||||
return registers;
|
||||
}
|
||||
@ -38,9 +38,9 @@ Register* PropertyAccessCompiler::load_calling_convention() {
|
||||
|
||||
Register* PropertyAccessCompiler::store_calling_convention() {
|
||||
// receiver, value, scratch1, scratch2, scratch3.
|
||||
Register receiver = StoreIC::ReceiverRegister();
|
||||
Register name = StoreIC::NameRegister();
|
||||
DCHECK(x3.is(KeyedStoreIC::MapRegister()));
|
||||
Register receiver = StoreConvention::ReceiverRegister();
|
||||
Register name = StoreConvention::NameRegister();
|
||||
DCHECK(x3.is(StoreConvention::MapRegister()));
|
||||
static Register registers[] = {receiver, name, x3, x4, x5};
|
||||
return registers;
|
||||
}
|
||||
|
@ -285,8 +285,8 @@ void ElementHandlerCompiler::GenerateLoadDictionaryElement(
|
||||
Label slow, miss;
|
||||
|
||||
Register result = x0;
|
||||
Register key = LoadIC::NameRegister();
|
||||
Register receiver = LoadIC::ReceiverRegister();
|
||||
Register key = LoadConvention::NameRegister();
|
||||
Register receiver = LoadConvention::ReceiverRegister();
|
||||
DCHECK(receiver.is(x1));
|
||||
DCHECK(key.is(x2));
|
||||
|
||||
@ -308,8 +308,8 @@ void ElementHandlerCompiler::GenerateLoadDictionaryElement(
|
||||
|
||||
void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
|
||||
// Push receiver, name and value for runtime call.
|
||||
__ Push(StoreIC::ReceiverRegister(), StoreIC::NameRegister(),
|
||||
StoreIC::ValueRegister());
|
||||
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
|
||||
StoreConvention::ValueRegister());
|
||||
|
||||
// The slow case calls into the runtime to complete the store without causing
|
||||
// an IC miss that would otherwise cause a transition to the generic stub.
|
||||
@ -323,8 +323,8 @@ void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) {
|
||||
ASM_LOCATION("ElementHandlerCompiler::GenerateStoreSlow");
|
||||
|
||||
// Push receiver, key and value for runtime call.
|
||||
__ Push(StoreIC::ReceiverRegister(), StoreIC::NameRegister(),
|
||||
StoreIC::ValueRegister());
|
||||
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
|
||||
StoreConvention::ValueRegister());
|
||||
|
||||
// The slow case calls into the runtime to complete the store without causing
|
||||
// an IC miss that would otherwise cause a transition to the generic stub.
|
||||
@ -344,7 +344,7 @@ Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal(
|
||||
FrontendHeader(receiver(), name, &miss);
|
||||
|
||||
// Get the value from the cell.
|
||||
Register result = StoreIC::ValueRegister();
|
||||
Register result = StoreConvention::ValueRegister();
|
||||
__ Mov(result, Operand(cell));
|
||||
__ Ldr(result, FieldMemOperand(result, Cell::kValueOffset));
|
||||
|
||||
@ -382,7 +382,9 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor(
|
||||
}
|
||||
|
||||
|
||||
Register NamedStoreHandlerCompiler::value() { return StoreIC::ValueRegister(); }
|
||||
Register NamedStoreHandlerCompiler::value() {
|
||||
return StoreConvention::ValueRegister();
|
||||
}
|
||||
|
||||
|
||||
void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label,
|
||||
|
@ -333,8 +333,8 @@ static MemOperand GenerateUnmappedArgumentsLookup(MacroAssembler* masm,
|
||||
|
||||
void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
|
||||
// The return address is in lr.
|
||||
Register receiver = ReceiverRegister();
|
||||
Register name = NameRegister();
|
||||
Register receiver = LoadConvention::ReceiverRegister();
|
||||
Register name = LoadConvention::NameRegister();
|
||||
DCHECK(receiver.is(x1));
|
||||
DCHECK(name.is(x2));
|
||||
|
||||
@ -351,13 +351,14 @@ void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
|
||||
|
||||
void LoadIC::GenerateNormal(MacroAssembler* masm) {
|
||||
Register dictionary = x0;
|
||||
DCHECK(!dictionary.is(ReceiverRegister()));
|
||||
DCHECK(!dictionary.is(NameRegister()));
|
||||
DCHECK(!dictionary.is(LoadConvention::ReceiverRegister()));
|
||||
DCHECK(!dictionary.is(LoadConvention::NameRegister()));
|
||||
Label slow;
|
||||
|
||||
__ Ldr(dictionary,
|
||||
FieldMemOperand(ReceiverRegister(), JSObject::kPropertiesOffset));
|
||||
GenerateDictionaryLoad(masm, &slow, dictionary, NameRegister(), x0, x3, x4);
|
||||
__ Ldr(dictionary, FieldMemOperand(LoadConvention::ReceiverRegister(),
|
||||
JSObject::kPropertiesOffset));
|
||||
GenerateDictionaryLoad(masm, &slow, dictionary,
|
||||
LoadConvention::NameRegister(), x0, x3, x4);
|
||||
__ Ret();
|
||||
|
||||
// Dictionary load failed, go slow (but don't miss).
|
||||
@ -374,7 +375,7 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
|
||||
__ IncrementCounter(isolate->counters()->load_miss(), 1, x3, x4);
|
||||
|
||||
// Perform tail call to the entry.
|
||||
__ Push(ReceiverRegister(), NameRegister());
|
||||
__ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister());
|
||||
ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate);
|
||||
__ TailCallExternalReference(ref, 2, 1);
|
||||
}
|
||||
@ -382,7 +383,7 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
|
||||
|
||||
void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
|
||||
// The return address is in lr.
|
||||
__ Push(ReceiverRegister(), NameRegister());
|
||||
__ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister());
|
||||
__ TailCallRuntime(Runtime::kGetProperty, 2, 1);
|
||||
}
|
||||
|
||||
@ -390,8 +391,8 @@ void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
|
||||
void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
|
||||
// The return address is in lr.
|
||||
Register result = x0;
|
||||
Register receiver = ReceiverRegister();
|
||||
Register key = NameRegister();
|
||||
Register receiver = LoadConvention::ReceiverRegister();
|
||||
Register key = LoadConvention::NameRegister();
|
||||
DCHECK(receiver.is(x1));
|
||||
DCHECK(key.is(x2));
|
||||
|
||||
@ -419,9 +420,9 @@ void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
|
||||
void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) {
|
||||
ASM_LOCATION("KeyedStoreIC::GenerateSloppyArguments");
|
||||
Label slow, notin;
|
||||
Register value = ValueRegister();
|
||||
Register key = NameRegister();
|
||||
Register receiver = ReceiverRegister();
|
||||
Register value = StoreConvention::ValueRegister();
|
||||
Register key = StoreConvention::NameRegister();
|
||||
Register receiver = StoreConvention::ReceiverRegister();
|
||||
DCHECK(receiver.is(x1));
|
||||
DCHECK(key.is(x2));
|
||||
DCHECK(value.is(x0));
|
||||
@ -468,7 +469,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
|
||||
|
||||
__ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, x10, x11);
|
||||
|
||||
__ Push(ReceiverRegister(), NameRegister());
|
||||
__ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister());
|
||||
|
||||
// Perform tail call to the entry.
|
||||
ExternalReference ref =
|
||||
@ -478,33 +479,9 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
|
||||
}
|
||||
|
||||
|
||||
// IC register specifications
|
||||
const Register LoadIC::ReceiverRegister() { return x1; }
|
||||
const Register LoadIC::NameRegister() { return x2; }
|
||||
|
||||
const Register LoadIC::SlotRegister() {
|
||||
DCHECK(FLAG_vector_ics);
|
||||
return x0;
|
||||
}
|
||||
|
||||
|
||||
const Register LoadIC::VectorRegister() {
|
||||
DCHECK(FLAG_vector_ics);
|
||||
return x3;
|
||||
}
|
||||
|
||||
|
||||
const Register StoreIC::ReceiverRegister() { return x1; }
|
||||
const Register StoreIC::NameRegister() { return x2; }
|
||||
const Register StoreIC::ValueRegister() { return x0; }
|
||||
|
||||
|
||||
const Register KeyedStoreIC::MapRegister() { return x3; }
|
||||
|
||||
|
||||
void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
|
||||
// The return address is in lr.
|
||||
__ Push(ReceiverRegister(), NameRegister());
|
||||
__ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister());
|
||||
__ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1);
|
||||
}
|
||||
|
||||
@ -668,8 +645,8 @@ void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) {
|
||||
// The return address is in lr.
|
||||
Label slow, check_name, index_smi, index_name;
|
||||
|
||||
Register key = NameRegister();
|
||||
Register receiver = ReceiverRegister();
|
||||
Register key = LoadConvention::NameRegister();
|
||||
Register receiver = LoadConvention::ReceiverRegister();
|
||||
DCHECK(key.is(x2));
|
||||
DCHECK(receiver.is(x1));
|
||||
|
||||
@ -701,8 +678,8 @@ void KeyedLoadIC::GenerateString(MacroAssembler* masm) {
|
||||
// Return address is in lr.
|
||||
Label miss;
|
||||
|
||||
Register receiver = ReceiverRegister();
|
||||
Register index = NameRegister();
|
||||
Register receiver = LoadConvention::ReceiverRegister();
|
||||
Register index = LoadConvention::NameRegister();
|
||||
Register result = x0;
|
||||
Register scratch = x3;
|
||||
DCHECK(!scratch.is(receiver) && !scratch.is(index));
|
||||
@ -727,8 +704,8 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) {
|
||||
// Return address is in lr.
|
||||
Label slow;
|
||||
|
||||
Register receiver = ReceiverRegister();
|
||||
Register key = NameRegister();
|
||||
Register receiver = LoadConvention::ReceiverRegister();
|
||||
Register key = LoadConvention::NameRegister();
|
||||
Register scratch1 = x3;
|
||||
Register scratch2 = x4;
|
||||
DCHECK(!AreAliased(scratch1, scratch2, receiver, key));
|
||||
@ -767,7 +744,8 @@ void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
|
||||
ASM_LOCATION("KeyedStoreIC::GenerateMiss");
|
||||
|
||||
// Push receiver, key and value for runtime call.
|
||||
__ Push(ReceiverRegister(), NameRegister(), ValueRegister());
|
||||
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
|
||||
StoreConvention::ValueRegister());
|
||||
|
||||
ExternalReference ref =
|
||||
ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate());
|
||||
@ -918,9 +896,9 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
|
||||
Label fast_double_grow;
|
||||
Label fast_double;
|
||||
|
||||
Register value = ValueRegister();
|
||||
Register key = NameRegister();
|
||||
Register receiver = ReceiverRegister();
|
||||
Register value = StoreConvention::ValueRegister();
|
||||
Register key = StoreConvention::NameRegister();
|
||||
Register receiver = StoreConvention::ReceiverRegister();
|
||||
DCHECK(receiver.is(x1));
|
||||
DCHECK(key.is(x2));
|
||||
DCHECK(value.is(x0));
|
||||
@ -1008,9 +986,10 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
|
||||
|
||||
|
||||
void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
|
||||
Register receiver = ReceiverRegister();
|
||||
Register name = NameRegister();
|
||||
DCHECK(!AreAliased(receiver, name, ValueRegister(), x3, x4, x5, x6));
|
||||
Register receiver = StoreConvention::ReceiverRegister();
|
||||
Register name = StoreConvention::NameRegister();
|
||||
DCHECK(!AreAliased(receiver, name, StoreConvention::ValueRegister(), x3, x4,
|
||||
x5, x6));
|
||||
|
||||
// Probe the stub cache.
|
||||
Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
|
||||
@ -1024,7 +1003,8 @@ void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
|
||||
|
||||
|
||||
void StoreIC::GenerateMiss(MacroAssembler* masm) {
|
||||
__ Push(ReceiverRegister(), NameRegister(), ValueRegister());
|
||||
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
|
||||
StoreConvention::ValueRegister());
|
||||
|
||||
// Tail call to the entry.
|
||||
ExternalReference ref =
|
||||
@ -1035,9 +1015,9 @@ void StoreIC::GenerateMiss(MacroAssembler* masm) {
|
||||
|
||||
void StoreIC::GenerateNormal(MacroAssembler* masm) {
|
||||
Label miss;
|
||||
Register value = ValueRegister();
|
||||
Register receiver = ReceiverRegister();
|
||||
Register name = NameRegister();
|
||||
Register value = StoreConvention::ValueRegister();
|
||||
Register receiver = StoreConvention::ReceiverRegister();
|
||||
Register name = StoreConvention::NameRegister();
|
||||
Register dictionary = x3;
|
||||
DCHECK(!AreAliased(value, receiver, name, x3, x4, x5));
|
||||
|
||||
|
@ -17,8 +17,8 @@ void PropertyICCompiler::GenerateRuntimeSetProperty(MacroAssembler* masm,
|
||||
StrictMode strict_mode) {
|
||||
ASM_LOCATION("PropertyICCompiler::GenerateRuntimeSetProperty");
|
||||
|
||||
__ Push(StoreIC::ReceiverRegister(), StoreIC::NameRegister(),
|
||||
StoreIC::ValueRegister());
|
||||
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
|
||||
StoreConvention::ValueRegister());
|
||||
|
||||
__ Mov(x10, Smi::FromInt(strict_mode));
|
||||
__ Push(x10);
|
||||
@ -57,7 +57,7 @@ Handle<Code> PropertyICCompiler::CompilePolymorphic(TypeHandleList* types,
|
||||
// Polymorphic keyed stores may use the map register
|
||||
Register map_reg = scratch1();
|
||||
DCHECK(kind() != Code::KEYED_STORE_IC ||
|
||||
map_reg.is(KeyedStoreIC::MapRegister()));
|
||||
map_reg.is(StoreConvention::MapRegister()));
|
||||
__ Ldr(map_reg, FieldMemOperand(receiver(), HeapObject::kMapOffset));
|
||||
int receiver_count = types->length();
|
||||
int number_of_handled_maps = 0;
|
||||
|
40
src/ic/arm64/ic-conventions-arm64.cc
Normal file
40
src/ic/arm64/ic-conventions-arm64.cc
Normal file
@ -0,0 +1,40 @@
|
||||
// Copyright 2013 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "src/v8.h"
|
||||
|
||||
#if V8_TARGET_ARCH_ARM64
|
||||
|
||||
#include "src/codegen.h"
|
||||
#include "src/ic/ic-conventions.h"
|
||||
|
||||
namespace v8 {
|
||||
namespace internal {
|
||||
|
||||
// IC register specifications
|
||||
const Register LoadConvention::ReceiverRegister() { return x1; }
|
||||
const Register LoadConvention::NameRegister() { return x2; }
|
||||
|
||||
const Register VectorLoadConvention::SlotRegister() {
|
||||
DCHECK(FLAG_vector_ics);
|
||||
return x0;
|
||||
}
|
||||
|
||||
|
||||
const Register FullVectorLoadConvention::VectorRegister() {
|
||||
DCHECK(FLAG_vector_ics);
|
||||
return x3;
|
||||
}
|
||||
|
||||
|
||||
const Register StoreConvention::ReceiverRegister() { return x1; }
|
||||
const Register StoreConvention::NameRegister() { return x2; }
|
||||
const Register StoreConvention::ValueRegister() { return x0; }
|
||||
|
||||
|
||||
const Register StoreConvention::MapRegister() { return x3; }
|
||||
}
|
||||
} // namespace v8::internal
|
||||
|
||||
#endif // V8_TARGET_ARCH_ARM64
|
@ -21,8 +21,8 @@ void PropertyAccessCompiler::GenerateTailCall(MacroAssembler* masm,
|
||||
|
||||
Register* PropertyAccessCompiler::load_calling_convention() {
|
||||
// receiver, name, scratch1, scratch2, scratch3, scratch4.
|
||||
Register receiver = LoadIC::ReceiverRegister();
|
||||
Register name = LoadIC::NameRegister();
|
||||
Register receiver = LoadConvention::ReceiverRegister();
|
||||
Register name = LoadConvention::NameRegister();
|
||||
static Register registers[] = {receiver, name, ebx, eax, edi, no_reg};
|
||||
return registers;
|
||||
}
|
||||
@ -30,9 +30,9 @@ Register* PropertyAccessCompiler::load_calling_convention() {
|
||||
|
||||
Register* PropertyAccessCompiler::store_calling_convention() {
|
||||
// receiver, name, scratch1, scratch2, scratch3.
|
||||
Register receiver = StoreIC::ReceiverRegister();
|
||||
Register name = StoreIC::NameRegister();
|
||||
DCHECK(ebx.is(KeyedStoreIC::MapRegister()));
|
||||
Register receiver = StoreConvention::ReceiverRegister();
|
||||
Register name = StoreConvention::NameRegister();
|
||||
DCHECK(ebx.is(StoreConvention::MapRegister()));
|
||||
static Register registers[] = {receiver, name, ebx, edi, no_reg};
|
||||
return registers;
|
||||
}
|
||||
|
@ -22,8 +22,8 @@ void ElementHandlerCompiler::GenerateLoadDictionaryElement(
|
||||
// -- edx : receiver
|
||||
// -- esp[0] : return address
|
||||
// -----------------------------------
|
||||
DCHECK(edx.is(LoadIC::ReceiverRegister()));
|
||||
DCHECK(ecx.is(LoadIC::NameRegister()));
|
||||
DCHECK(edx.is(LoadConvention::ReceiverRegister()));
|
||||
DCHECK(ecx.is(LoadConvention::NameRegister()));
|
||||
Label slow, miss;
|
||||
|
||||
// This stub is meant to be tail-jumped to, the receiver must already
|
||||
@ -327,9 +327,9 @@ static void CompileCallLoadPropertyWithInterceptor(
|
||||
|
||||
|
||||
static void StoreIC_PushArgs(MacroAssembler* masm) {
|
||||
Register receiver = StoreIC::ReceiverRegister();
|
||||
Register name = StoreIC::NameRegister();
|
||||
Register value = StoreIC::ValueRegister();
|
||||
Register receiver = StoreConvention::ReceiverRegister();
|
||||
Register name = StoreConvention::NameRegister();
|
||||
Register value = StoreConvention::ValueRegister();
|
||||
|
||||
DCHECK(!ebx.is(receiver) && !ebx.is(name) && !ebx.is(value));
|
||||
|
||||
@ -852,7 +852,9 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor(
|
||||
}
|
||||
|
||||
|
||||
Register NamedStoreHandlerCompiler::value() { return StoreIC::ValueRegister(); }
|
||||
Register NamedStoreHandlerCompiler::value() {
|
||||
return StoreConvention::ValueRegister();
|
||||
}
|
||||
|
||||
|
||||
Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal(
|
||||
@ -861,7 +863,7 @@ Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal(
|
||||
|
||||
FrontendHeader(receiver(), name, &miss);
|
||||
// Get the value from the cell.
|
||||
Register result = StoreIC::ValueRegister();
|
||||
Register result = StoreConvention::ValueRegister();
|
||||
if (masm()->serializer_enabled()) {
|
||||
__ mov(result, Immediate(cell));
|
||||
__ mov(result, FieldOperand(result, PropertyCell::kValueOffset));
|
||||
|
@ -17,12 +17,13 @@ namespace internal {
|
||||
void PropertyICCompiler::GenerateRuntimeSetProperty(MacroAssembler* masm,
|
||||
StrictMode strict_mode) {
|
||||
// Return address is on the stack.
|
||||
DCHECK(!ebx.is(StoreIC::ReceiverRegister()) &&
|
||||
!ebx.is(StoreIC::NameRegister()) && !ebx.is(StoreIC::ValueRegister()));
|
||||
DCHECK(!ebx.is(StoreConvention::ReceiverRegister()) &&
|
||||
!ebx.is(StoreConvention::NameRegister()) &&
|
||||
!ebx.is(StoreConvention::ValueRegister()));
|
||||
__ pop(ebx);
|
||||
__ push(StoreIC::ReceiverRegister());
|
||||
__ push(StoreIC::NameRegister());
|
||||
__ push(StoreIC::ValueRegister());
|
||||
__ push(StoreConvention::ReceiverRegister());
|
||||
__ push(StoreConvention::NameRegister());
|
||||
__ push(StoreConvention::ValueRegister());
|
||||
__ push(Immediate(Smi::FromInt(strict_mode)));
|
||||
__ push(ebx); // return address
|
||||
|
||||
@ -60,7 +61,7 @@ Handle<Code> PropertyICCompiler::CompilePolymorphic(TypeHandleList* types,
|
||||
// Polymorphic keyed stores may use the map register
|
||||
Register map_reg = scratch1();
|
||||
DCHECK(kind() != Code::KEYED_STORE_IC ||
|
||||
map_reg.is(KeyedStoreIC::MapRegister()));
|
||||
map_reg.is(StoreConvention::MapRegister()));
|
||||
__ mov(map_reg, FieldOperand(receiver(), HeapObject::kMapOffset));
|
||||
int receiver_count = types->length();
|
||||
int number_of_handled_maps = 0;
|
||||
|
40
src/ic/ia32/ic-conventions-ia32.cc
Normal file
40
src/ic/ia32/ic-conventions-ia32.cc
Normal file
@ -0,0 +1,40 @@
|
||||
// Copyright 2014 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "src/v8.h"
|
||||
|
||||
#if V8_TARGET_ARCH_IA32
|
||||
|
||||
#include "src/codegen.h"
|
||||
#include "src/ic/ic-conventions.h"
|
||||
|
||||
namespace v8 {
|
||||
namespace internal {
|
||||
|
||||
// IC register specifications
|
||||
|
||||
const Register LoadConvention::ReceiverRegister() { return edx; }
|
||||
const Register LoadConvention::NameRegister() { return ecx; }
|
||||
|
||||
|
||||
const Register VectorLoadConvention::SlotRegister() {
|
||||
DCHECK(FLAG_vector_ics);
|
||||
return eax;
|
||||
}
|
||||
|
||||
|
||||
const Register FullVectorLoadConvention::VectorRegister() {
|
||||
DCHECK(FLAG_vector_ics);
|
||||
return ebx;
|
||||
}
|
||||
|
||||
|
||||
const Register StoreConvention::ReceiverRegister() { return edx; }
|
||||
const Register StoreConvention::NameRegister() { return ecx; }
|
||||
const Register StoreConvention::ValueRegister() { return eax; }
|
||||
const Register StoreConvention::MapRegister() { return ebx; }
|
||||
}
|
||||
} // namespace v8::internal
|
||||
|
||||
#endif // V8_TARGET_ARCH_IA32
|
@ -310,8 +310,8 @@ void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) {
|
||||
Label slow, check_name, index_smi, index_name, property_array_property;
|
||||
Label probe_dictionary, check_number_dictionary;
|
||||
|
||||
Register receiver = ReceiverRegister();
|
||||
Register key = NameRegister();
|
||||
Register receiver = LoadConvention::ReceiverRegister();
|
||||
Register key = LoadConvention::NameRegister();
|
||||
DCHECK(receiver.is(edx));
|
||||
DCHECK(key.is(ecx));
|
||||
|
||||
@ -480,8 +480,8 @@ void KeyedLoadIC::GenerateString(MacroAssembler* masm) {
|
||||
// Return address is on the stack.
|
||||
Label miss;
|
||||
|
||||
Register receiver = ReceiverRegister();
|
||||
Register index = NameRegister();
|
||||
Register receiver = LoadConvention::ReceiverRegister();
|
||||
Register index = LoadConvention::NameRegister();
|
||||
Register scratch = ebx;
|
||||
DCHECK(!scratch.is(receiver) && !scratch.is(index));
|
||||
Register result = eax;
|
||||
@ -507,8 +507,8 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) {
|
||||
// Return address is on the stack.
|
||||
Label slow;
|
||||
|
||||
Register receiver = ReceiverRegister();
|
||||
Register key = NameRegister();
|
||||
Register receiver = LoadConvention::ReceiverRegister();
|
||||
Register key = LoadConvention::NameRegister();
|
||||
Register scratch = eax;
|
||||
DCHECK(!scratch.is(receiver) && !scratch.is(key));
|
||||
|
||||
@ -547,8 +547,8 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) {
|
||||
|
||||
void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
|
||||
// The return address is on the stack.
|
||||
Register receiver = ReceiverRegister();
|
||||
Register key = NameRegister();
|
||||
Register receiver = LoadConvention::ReceiverRegister();
|
||||
Register key = LoadConvention::NameRegister();
|
||||
DCHECK(receiver.is(edx));
|
||||
DCHECK(key.is(ecx));
|
||||
|
||||
@ -574,9 +574,9 @@ void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
|
||||
void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) {
|
||||
// Return address is on the stack.
|
||||
Label slow, notin;
|
||||
Register receiver = ReceiverRegister();
|
||||
Register name = NameRegister();
|
||||
Register value = ValueRegister();
|
||||
Register receiver = StoreConvention::ReceiverRegister();
|
||||
Register name = StoreConvention::NameRegister();
|
||||
Register value = StoreConvention::ValueRegister();
|
||||
DCHECK(receiver.is(edx));
|
||||
DCHECK(name.is(ecx));
|
||||
DCHECK(value.is(eax));
|
||||
@ -608,9 +608,9 @@ static void KeyedStoreGenerateGenericHelper(
|
||||
Label transition_smi_elements;
|
||||
Label finish_object_store, non_double_value, transition_double_elements;
|
||||
Label fast_double_without_map_check;
|
||||
Register receiver = KeyedStoreIC::ReceiverRegister();
|
||||
Register key = KeyedStoreIC::NameRegister();
|
||||
Register value = KeyedStoreIC::ValueRegister();
|
||||
Register receiver = StoreConvention::ReceiverRegister();
|
||||
Register key = StoreConvention::NameRegister();
|
||||
Register value = StoreConvention::ValueRegister();
|
||||
DCHECK(receiver.is(edx));
|
||||
DCHECK(key.is(ecx));
|
||||
DCHECK(value.is(eax));
|
||||
@ -746,8 +746,8 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
|
||||
Label slow, fast_object, fast_object_grow;
|
||||
Label fast_double, fast_double_grow;
|
||||
Label array, extra, check_if_double_array;
|
||||
Register receiver = ReceiverRegister();
|
||||
Register key = NameRegister();
|
||||
Register receiver = StoreConvention::ReceiverRegister();
|
||||
Register key = StoreConvention::NameRegister();
|
||||
DCHECK(receiver.is(edx));
|
||||
DCHECK(key.is(ecx));
|
||||
|
||||
@ -826,8 +826,8 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
|
||||
|
||||
void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
|
||||
// The return address is on the stack.
|
||||
Register receiver = ReceiverRegister();
|
||||
Register name = NameRegister();
|
||||
Register receiver = LoadConvention::ReceiverRegister();
|
||||
Register name = LoadConvention::NameRegister();
|
||||
DCHECK(receiver.is(edx));
|
||||
DCHECK(name.is(ecx));
|
||||
|
||||
@ -844,15 +844,15 @@ void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
|
||||
|
||||
void LoadIC::GenerateNormal(MacroAssembler* masm) {
|
||||
Register dictionary = eax;
|
||||
DCHECK(!dictionary.is(ReceiverRegister()));
|
||||
DCHECK(!dictionary.is(NameRegister()));
|
||||
DCHECK(!dictionary.is(LoadConvention::ReceiverRegister()));
|
||||
DCHECK(!dictionary.is(LoadConvention::NameRegister()));
|
||||
|
||||
Label slow;
|
||||
|
||||
__ mov(dictionary,
|
||||
FieldOperand(ReceiverRegister(), JSObject::kPropertiesOffset));
|
||||
GenerateDictionaryLoad(masm, &slow, dictionary, NameRegister(), edi, ebx,
|
||||
eax);
|
||||
__ mov(dictionary, FieldOperand(LoadConvention::ReceiverRegister(),
|
||||
JSObject::kPropertiesOffset));
|
||||
GenerateDictionaryLoad(masm, &slow, dictionary,
|
||||
LoadConvention::NameRegister(), edi, ebx, eax);
|
||||
__ ret(0);
|
||||
|
||||
// Dictionary load failed, go slow (but don't miss).
|
||||
@ -862,8 +862,8 @@ void LoadIC::GenerateNormal(MacroAssembler* masm) {
|
||||
|
||||
|
||||
static void LoadIC_PushArgs(MacroAssembler* masm) {
|
||||
Register receiver = LoadIC::ReceiverRegister();
|
||||
Register name = LoadIC::NameRegister();
|
||||
Register receiver = LoadConvention::ReceiverRegister();
|
||||
Register name = LoadConvention::NameRegister();
|
||||
DCHECK(!ebx.is(receiver) && !ebx.is(name));
|
||||
|
||||
__ pop(ebx);
|
||||
@ -908,31 +908,6 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
|
||||
}
|
||||
|
||||
|
||||
// IC register specifications
|
||||
const Register LoadIC::ReceiverRegister() { return edx; }
|
||||
const Register LoadIC::NameRegister() { return ecx; }
|
||||
|
||||
|
||||
const Register LoadIC::SlotRegister() {
|
||||
DCHECK(FLAG_vector_ics);
|
||||
return eax;
|
||||
}
|
||||
|
||||
|
||||
const Register LoadIC::VectorRegister() {
|
||||
DCHECK(FLAG_vector_ics);
|
||||
return ebx;
|
||||
}
|
||||
|
||||
|
||||
const Register StoreIC::ReceiverRegister() { return edx; }
|
||||
const Register StoreIC::NameRegister() { return ecx; }
|
||||
const Register StoreIC::ValueRegister() { return eax; }
|
||||
|
||||
|
||||
const Register KeyedStoreIC::MapRegister() { return ebx; }
|
||||
|
||||
|
||||
void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
|
||||
// Return address is on the stack.
|
||||
LoadIC_PushArgs(masm);
|
||||
@ -946,8 +921,9 @@ void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
|
||||
// Return address is on the stack.
|
||||
Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
|
||||
Code::ComputeHandlerFlags(Code::STORE_IC));
|
||||
masm->isolate()->stub_cache()->GenerateProbe(masm, flags, ReceiverRegister(),
|
||||
NameRegister(), ebx, no_reg);
|
||||
masm->isolate()->stub_cache()->GenerateProbe(
|
||||
masm, flags, StoreConvention::ReceiverRegister(),
|
||||
StoreConvention::NameRegister(), ebx, no_reg);
|
||||
|
||||
// Cache miss: Jump to runtime.
|
||||
GenerateMiss(masm);
|
||||
@ -955,9 +931,9 @@ void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
|
||||
|
||||
|
||||
static void StoreIC_PushArgs(MacroAssembler* masm) {
|
||||
Register receiver = StoreIC::ReceiverRegister();
|
||||
Register name = StoreIC::NameRegister();
|
||||
Register value = StoreIC::ValueRegister();
|
||||
Register receiver = StoreConvention::ReceiverRegister();
|
||||
Register name = StoreConvention::NameRegister();
|
||||
Register value = StoreConvention::ValueRegister();
|
||||
|
||||
DCHECK(!ebx.is(receiver) && !ebx.is(name) && !ebx.is(value));
|
||||
|
||||
@ -982,9 +958,9 @@ void StoreIC::GenerateMiss(MacroAssembler* masm) {
|
||||
|
||||
void StoreIC::GenerateNormal(MacroAssembler* masm) {
|
||||
Label restore_miss;
|
||||
Register receiver = ReceiverRegister();
|
||||
Register name = NameRegister();
|
||||
Register value = ValueRegister();
|
||||
Register receiver = StoreConvention::ReceiverRegister();
|
||||
Register name = StoreConvention::NameRegister();
|
||||
Register value = StoreConvention::ValueRegister();
|
||||
Register dictionary = ebx;
|
||||
|
||||
__ mov(dictionary, FieldOperand(receiver, JSObject::kPropertiesOffset));
|
||||
|
64
src/ic/ic-conventions.h
Normal file
64
src/ic/ic-conventions.h
Normal file
@ -0,0 +1,64 @@
|
||||
// Copyright 2014 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef V8_IC_CONVENTIONS_H_
|
||||
#define V8_IC_CONVENTIONS_H_
|
||||
|
||||
namespace v8 {
|
||||
namespace internal {
|
||||
|
||||
class LoadConvention {
|
||||
public:
|
||||
enum ParameterIndices { kReceiverIndex, kNameIndex, kParameterCount };
|
||||
static const Register ReceiverRegister();
|
||||
static const Register NameRegister();
|
||||
};
|
||||
|
||||
|
||||
class VectorLoadConvention : public LoadConvention {
|
||||
public:
|
||||
enum ParameterIndices {
|
||||
kReceiverIndex,
|
||||
kNameIndex,
|
||||
kSlotIndex,
|
||||
kParameterCount
|
||||
};
|
||||
static const Register SlotRegister();
|
||||
};
|
||||
|
||||
|
||||
class FullVectorLoadConvention : public VectorLoadConvention {
|
||||
public:
|
||||
enum ParameterIndices {
|
||||
kReceiverIndex,
|
||||
kNameIndex,
|
||||
kSlotIndex,
|
||||
kVectorIndex,
|
||||
kParameterCount
|
||||
};
|
||||
static const Register VectorRegister();
|
||||
};
|
||||
|
||||
|
||||
class StoreConvention {
|
||||
public:
|
||||
enum ParameterIndices {
|
||||
kReceiverIndex,
|
||||
kNameIndex,
|
||||
kValueIndex,
|
||||
kParameterCount
|
||||
};
|
||||
static const Register ReceiverRegister();
|
||||
static const Register NameRegister();
|
||||
static const Register ValueRegister();
|
||||
|
||||
// The map register isn't part of the normal call specification, but
|
||||
// ElementsTransitionAndStoreStub, used in polymorphic keyed store
|
||||
// stub implementations requires it to be initialized.
|
||||
static const Register MapRegister();
|
||||
};
|
||||
}
|
||||
} // namespace v8::internal
|
||||
|
||||
#endif // V8_IC_CONVENTIONS_H_
|
24
src/ic/ic.h
24
src/ic/ic.h
@ -352,15 +352,6 @@ OStream& operator<<(OStream& os, const CallIC::State& s);
|
||||
|
||||
class LoadIC : public IC {
|
||||
public:
|
||||
enum ParameterIndices { kReceiverIndex, kNameIndex, kParameterCount };
|
||||
static const Register ReceiverRegister();
|
||||
static const Register NameRegister();
|
||||
|
||||
// With flag vector-ics, there is an additional argument. And for calls from
|
||||
// crankshaft, yet another.
|
||||
static const Register SlotRegister();
|
||||
static const Register VectorRegister();
|
||||
|
||||
class State V8_FINAL BASE_EMBEDDED {
|
||||
public:
|
||||
explicit State(ExtraICState extra_ic_state) : state_(extra_ic_state) {}
|
||||
@ -531,16 +522,6 @@ class StoreIC : public IC {
|
||||
// IC state.
|
||||
static const ExtraICState kStrictModeState = 1 << StrictModeState::kShift;
|
||||
|
||||
enum ParameterIndices {
|
||||
kReceiverIndex,
|
||||
kNameIndex,
|
||||
kValueIndex,
|
||||
kParameterCount
|
||||
};
|
||||
static const Register ReceiverRegister();
|
||||
static const Register NameRegister();
|
||||
static const Register ValueRegister();
|
||||
|
||||
StoreIC(FrameDepth depth, Isolate* isolate) : IC(depth, isolate) {
|
||||
DCHECK(IsStoreStub());
|
||||
}
|
||||
@ -630,11 +611,6 @@ class KeyedStoreIC : public StoreIC {
|
||||
return ExtraICStateKeyedAccessStoreMode::decode(extra_state);
|
||||
}
|
||||
|
||||
// The map register isn't part of the normal call specification, but
|
||||
// ElementsTransitionAndStoreStub, used in polymorphic keyed store
|
||||
// stub implementations requires it to be initialized.
|
||||
static const Register MapRegister();
|
||||
|
||||
KeyedStoreIC(FrameDepth depth, Isolate* isolate) : StoreIC(depth, isolate) {
|
||||
DCHECK(target()->is_keyed_store_stub());
|
||||
}
|
||||
|
@ -22,8 +22,8 @@ void PropertyAccessCompiler::GenerateTailCall(MacroAssembler* masm,
|
||||
|
||||
Register* PropertyAccessCompiler::load_calling_convention() {
|
||||
// receiver, name, scratch1, scratch2, scratch3, scratch4.
|
||||
Register receiver = LoadIC::ReceiverRegister();
|
||||
Register name = LoadIC::NameRegister();
|
||||
Register receiver = LoadConvention::ReceiverRegister();
|
||||
Register name = LoadConvention::NameRegister();
|
||||
static Register registers[] = {receiver, name, rax, rbx, rdi, r8};
|
||||
return registers;
|
||||
}
|
||||
@ -31,9 +31,9 @@ Register* PropertyAccessCompiler::load_calling_convention() {
|
||||
|
||||
Register* PropertyAccessCompiler::store_calling_convention() {
|
||||
// receiver, name, scratch1, scratch2, scratch3.
|
||||
Register receiver = KeyedStoreIC::ReceiverRegister();
|
||||
Register name = KeyedStoreIC::NameRegister();
|
||||
DCHECK(rbx.is(KeyedStoreIC::MapRegister()));
|
||||
Register receiver = StoreConvention::ReceiverRegister();
|
||||
Register name = StoreConvention::NameRegister();
|
||||
DCHECK(rbx.is(StoreConvention::MapRegister()));
|
||||
static Register registers[] = {receiver, name, rbx, rdi, r8};
|
||||
return registers;
|
||||
}
|
||||
|
@ -283,8 +283,8 @@ void ElementHandlerCompiler::GenerateLoadDictionaryElement(
|
||||
// -- rdx : receiver
|
||||
// -- rsp[0] : return address
|
||||
// -----------------------------------
|
||||
DCHECK(rdx.is(LoadIC::ReceiverRegister()));
|
||||
DCHECK(rcx.is(LoadIC::NameRegister()));
|
||||
DCHECK(rdx.is(LoadConvention::ReceiverRegister()));
|
||||
DCHECK(rcx.is(LoadConvention::NameRegister()));
|
||||
Label slow, miss;
|
||||
|
||||
// This stub is meant to be tail-jumped to, the receiver must already
|
||||
@ -321,9 +321,9 @@ void ElementHandlerCompiler::GenerateLoadDictionaryElement(
|
||||
|
||||
|
||||
static void StoreIC_PushArgs(MacroAssembler* masm) {
|
||||
Register receiver = StoreIC::ReceiverRegister();
|
||||
Register name = StoreIC::NameRegister();
|
||||
Register value = StoreIC::ValueRegister();
|
||||
Register receiver = StoreConvention::ReceiverRegister();
|
||||
Register name = StoreConvention::NameRegister();
|
||||
Register value = StoreConvention::ValueRegister();
|
||||
|
||||
DCHECK(!rbx.is(receiver) && !rbx.is(name) && !rbx.is(value));
|
||||
|
||||
@ -838,7 +838,9 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor(
|
||||
}
|
||||
|
||||
|
||||
Register NamedStoreHandlerCompiler::value() { return StoreIC::ValueRegister(); }
|
||||
Register NamedStoreHandlerCompiler::value() {
|
||||
return StoreConvention::ValueRegister();
|
||||
}
|
||||
|
||||
|
||||
Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal(
|
||||
@ -847,7 +849,7 @@ Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal(
|
||||
FrontendHeader(receiver(), name, &miss);
|
||||
|
||||
// Get the value from the cell.
|
||||
Register result = StoreIC::ValueRegister();
|
||||
Register result = StoreConvention::ValueRegister();
|
||||
__ Move(result, cell);
|
||||
__ movp(result, FieldOperand(result, PropertyCell::kValueOffset));
|
||||
|
||||
|
@ -17,13 +17,14 @@ namespace internal {
|
||||
void PropertyICCompiler::GenerateRuntimeSetProperty(MacroAssembler* masm,
|
||||
StrictMode strict_mode) {
|
||||
// Return address is on the stack.
|
||||
DCHECK(!rbx.is(StoreIC::ReceiverRegister()) &&
|
||||
!rbx.is(StoreIC::NameRegister()) && !rbx.is(StoreIC::ValueRegister()));
|
||||
DCHECK(!rbx.is(StoreConvention::ReceiverRegister()) &&
|
||||
!rbx.is(StoreConvention::NameRegister()) &&
|
||||
!rbx.is(StoreConvention::ValueRegister()));
|
||||
|
||||
__ PopReturnAddressTo(rbx);
|
||||
__ Push(StoreIC::ReceiverRegister());
|
||||
__ Push(StoreIC::NameRegister());
|
||||
__ Push(StoreIC::ValueRegister());
|
||||
__ Push(StoreConvention::ReceiverRegister());
|
||||
__ Push(StoreConvention::NameRegister());
|
||||
__ Push(StoreConvention::ValueRegister());
|
||||
__ Push(Smi::FromInt(strict_mode));
|
||||
__ PushReturnAddressFrom(rbx);
|
||||
|
||||
@ -94,7 +95,7 @@ Handle<Code> PropertyICCompiler::CompilePolymorphic(TypeHandleList* types,
|
||||
// Polymorphic keyed stores may use the map register
|
||||
Register map_reg = scratch1();
|
||||
DCHECK(kind() != Code::KEYED_STORE_IC ||
|
||||
map_reg.is(KeyedStoreIC::MapRegister()));
|
||||
map_reg.is(StoreConvention::MapRegister()));
|
||||
__ movp(map_reg, FieldOperand(receiver(), HeapObject::kMapOffset));
|
||||
int receiver_count = types->length();
|
||||
int number_of_handled_maps = 0;
|
||||
|
41
src/ic/x64/ic-conventions-x64.cc
Normal file
41
src/ic/x64/ic-conventions-x64.cc
Normal file
@ -0,0 +1,41 @@
|
||||
// Copyright 2012 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "src/v8.h"
|
||||
|
||||
#if V8_TARGET_ARCH_X64
|
||||
|
||||
#include "src/codegen.h"
|
||||
#include "src/ic/ic-conventions.h"
|
||||
|
||||
namespace v8 {
|
||||
namespace internal {
|
||||
|
||||
// IC register specifications
|
||||
const Register LoadConvention::ReceiverRegister() { return rdx; }
|
||||
const Register LoadConvention::NameRegister() { return rcx; }
|
||||
|
||||
|
||||
const Register VectorLoadConvention::SlotRegister() {
|
||||
DCHECK(FLAG_vector_ics);
|
||||
return rax;
|
||||
}
|
||||
|
||||
|
||||
const Register FullVectorLoadConvention::VectorRegister() {
|
||||
DCHECK(FLAG_vector_ics);
|
||||
return rbx;
|
||||
}
|
||||
|
||||
|
||||
const Register StoreConvention::ReceiverRegister() { return rdx; }
|
||||
const Register StoreConvention::NameRegister() { return rcx; }
|
||||
const Register StoreConvention::ValueRegister() { return rax; }
|
||||
|
||||
|
||||
const Register StoreConvention::MapRegister() { return rbx; }
|
||||
}
|
||||
} // namespace v8::internal
|
||||
|
||||
#endif // V8_TARGET_ARCH_X64
|
@ -257,8 +257,8 @@ void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) {
|
||||
Label slow, check_name, index_smi, index_name, property_array_property;
|
||||
Label probe_dictionary, check_number_dictionary;
|
||||
|
||||
Register receiver = ReceiverRegister();
|
||||
Register key = NameRegister();
|
||||
Register receiver = LoadConvention::ReceiverRegister();
|
||||
Register key = LoadConvention::NameRegister();
|
||||
DCHECK(receiver.is(rdx));
|
||||
DCHECK(key.is(rcx));
|
||||
|
||||
@ -407,8 +407,8 @@ void KeyedLoadIC::GenerateString(MacroAssembler* masm) {
|
||||
// Return address is on the stack.
|
||||
Label miss;
|
||||
|
||||
Register receiver = ReceiverRegister();
|
||||
Register index = NameRegister();
|
||||
Register receiver = LoadConvention::ReceiverRegister();
|
||||
Register index = LoadConvention::NameRegister();
|
||||
Register scratch = rbx;
|
||||
Register result = rax;
|
||||
DCHECK(!scratch.is(receiver) && !scratch.is(index));
|
||||
@ -433,8 +433,8 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) {
|
||||
// Return address is on the stack.
|
||||
Label slow;
|
||||
|
||||
Register receiver = ReceiverRegister();
|
||||
Register key = NameRegister();
|
||||
Register receiver = LoadConvention::ReceiverRegister();
|
||||
Register key = LoadConvention::NameRegister();
|
||||
Register scratch = rax;
|
||||
DCHECK(!scratch.is(receiver) && !scratch.is(key));
|
||||
|
||||
@ -478,9 +478,9 @@ static void KeyedStoreGenerateGenericHelper(
|
||||
Label transition_smi_elements;
|
||||
Label finish_object_store, non_double_value, transition_double_elements;
|
||||
Label fast_double_without_map_check;
|
||||
Register receiver = KeyedStoreIC::ReceiverRegister();
|
||||
Register key = KeyedStoreIC::NameRegister();
|
||||
Register value = KeyedStoreIC::ValueRegister();
|
||||
Register receiver = StoreConvention::ReceiverRegister();
|
||||
Register key = StoreConvention::NameRegister();
|
||||
Register value = StoreConvention::ValueRegister();
|
||||
DCHECK(receiver.is(rdx));
|
||||
DCHECK(key.is(rcx));
|
||||
DCHECK(value.is(rax));
|
||||
@ -615,8 +615,8 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
|
||||
Label slow, slow_with_tagged_index, fast_object, fast_object_grow;
|
||||
Label fast_double, fast_double_grow;
|
||||
Label array, extra, check_if_double_array;
|
||||
Register receiver = ReceiverRegister();
|
||||
Register key = NameRegister();
|
||||
Register receiver = StoreConvention::ReceiverRegister();
|
||||
Register key = StoreConvention::NameRegister();
|
||||
DCHECK(receiver.is(rdx));
|
||||
DCHECK(key.is(rcx));
|
||||
|
||||
@ -767,8 +767,8 @@ static Operand GenerateUnmappedArgumentsLookup(MacroAssembler* masm,
|
||||
|
||||
void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
|
||||
// The return address is on the stack.
|
||||
Register receiver = ReceiverRegister();
|
||||
Register key = NameRegister();
|
||||
Register receiver = LoadConvention::ReceiverRegister();
|
||||
Register key = LoadConvention::NameRegister();
|
||||
DCHECK(receiver.is(rdx));
|
||||
DCHECK(key.is(rcx));
|
||||
|
||||
@ -793,9 +793,9 @@ void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
|
||||
void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) {
|
||||
// The return address is on the stack.
|
||||
Label slow, notin;
|
||||
Register receiver = ReceiverRegister();
|
||||
Register name = NameRegister();
|
||||
Register value = ValueRegister();
|
||||
Register receiver = StoreConvention::ReceiverRegister();
|
||||
Register name = StoreConvention::NameRegister();
|
||||
Register value = StoreConvention::ValueRegister();
|
||||
DCHECK(receiver.is(rdx));
|
||||
DCHECK(name.is(rcx));
|
||||
DCHECK(value.is(rax));
|
||||
@ -825,8 +825,8 @@ void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) {
|
||||
|
||||
void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
|
||||
// The return address is on the stack.
|
||||
Register receiver = ReceiverRegister();
|
||||
Register name = NameRegister();
|
||||
Register receiver = LoadConvention::ReceiverRegister();
|
||||
Register name = LoadConvention::NameRegister();
|
||||
DCHECK(receiver.is(rdx));
|
||||
DCHECK(name.is(rcx));
|
||||
|
||||
@ -842,15 +842,15 @@ void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
|
||||
|
||||
void LoadIC::GenerateNormal(MacroAssembler* masm) {
|
||||
Register dictionary = rax;
|
||||
DCHECK(!dictionary.is(ReceiverRegister()));
|
||||
DCHECK(!dictionary.is(NameRegister()));
|
||||
DCHECK(!dictionary.is(LoadConvention::ReceiverRegister()));
|
||||
DCHECK(!dictionary.is(LoadConvention::NameRegister()));
|
||||
|
||||
Label slow;
|
||||
|
||||
__ movp(dictionary,
|
||||
FieldOperand(ReceiverRegister(), JSObject::kPropertiesOffset));
|
||||
GenerateDictionaryLoad(masm, &slow, dictionary, NameRegister(), rbx, rdi,
|
||||
rax);
|
||||
__ movp(dictionary, FieldOperand(LoadConvention::ReceiverRegister(),
|
||||
JSObject::kPropertiesOffset));
|
||||
GenerateDictionaryLoad(masm, &slow, dictionary,
|
||||
LoadConvention::NameRegister(), rbx, rdi, rax);
|
||||
__ ret(0);
|
||||
|
||||
// Dictionary load failed, go slow (but don't miss).
|
||||
@ -873,8 +873,8 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
|
||||
__ IncrementCounter(counters->load_miss(), 1);
|
||||
|
||||
__ PopReturnAddressTo(LoadIC_TempRegister());
|
||||
__ Push(ReceiverRegister()); // receiver
|
||||
__ Push(NameRegister()); // name
|
||||
__ Push(LoadConvention::ReceiverRegister()); // receiver
|
||||
__ Push(LoadConvention::NameRegister()); // name
|
||||
__ PushReturnAddressFrom(LoadIC_TempRegister());
|
||||
|
||||
// Perform tail call to the entry.
|
||||
@ -888,8 +888,8 @@ void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
|
||||
// The return address is on the stack.
|
||||
|
||||
__ PopReturnAddressTo(LoadIC_TempRegister());
|
||||
__ Push(ReceiverRegister()); // receiver
|
||||
__ Push(NameRegister()); // name
|
||||
__ Push(LoadConvention::ReceiverRegister()); // receiver
|
||||
__ Push(LoadConvention::NameRegister()); // name
|
||||
__ PushReturnAddressFrom(LoadIC_TempRegister());
|
||||
|
||||
// Perform tail call to the entry.
|
||||
@ -903,8 +903,8 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
|
||||
__ IncrementCounter(counters->keyed_load_miss(), 1);
|
||||
|
||||
__ PopReturnAddressTo(KeyedLoadIC_TempRegister());
|
||||
__ Push(ReceiverRegister()); // receiver
|
||||
__ Push(NameRegister()); // name
|
||||
__ Push(LoadConvention::ReceiverRegister()); // receiver
|
||||
__ Push(LoadConvention::NameRegister()); // name
|
||||
__ PushReturnAddressFrom(KeyedLoadIC_TempRegister());
|
||||
|
||||
// Perform tail call to the entry.
|
||||
@ -914,37 +914,12 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
|
||||
}
|
||||
|
||||
|
||||
// IC register specifications
|
||||
const Register LoadIC::ReceiverRegister() { return rdx; }
|
||||
const Register LoadIC::NameRegister() { return rcx; }
|
||||
|
||||
|
||||
const Register LoadIC::SlotRegister() {
|
||||
DCHECK(FLAG_vector_ics);
|
||||
return rax;
|
||||
}
|
||||
|
||||
|
||||
const Register LoadIC::VectorRegister() {
|
||||
DCHECK(FLAG_vector_ics);
|
||||
return rbx;
|
||||
}
|
||||
|
||||
|
||||
const Register StoreIC::ReceiverRegister() { return rdx; }
|
||||
const Register StoreIC::NameRegister() { return rcx; }
|
||||
const Register StoreIC::ValueRegister() { return rax; }
|
||||
|
||||
|
||||
const Register KeyedStoreIC::MapRegister() { return rbx; }
|
||||
|
||||
|
||||
void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
|
||||
// The return address is on the stack.
|
||||
|
||||
__ PopReturnAddressTo(KeyedLoadIC_TempRegister());
|
||||
__ Push(ReceiverRegister()); // receiver
|
||||
__ Push(NameRegister()); // name
|
||||
__ Push(LoadConvention::ReceiverRegister()); // receiver
|
||||
__ Push(LoadConvention::NameRegister()); // name
|
||||
__ PushReturnAddressFrom(KeyedLoadIC_TempRegister());
|
||||
|
||||
// Perform tail call to the entry.
|
||||
@ -958,8 +933,9 @@ void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
|
||||
// Get the receiver from the stack and probe the stub cache.
|
||||
Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
|
||||
Code::ComputeHandlerFlags(Code::STORE_IC));
|
||||
masm->isolate()->stub_cache()->GenerateProbe(masm, flags, ReceiverRegister(),
|
||||
NameRegister(), rbx, no_reg);
|
||||
masm->isolate()->stub_cache()->GenerateProbe(
|
||||
masm, flags, StoreConvention::ReceiverRegister(),
|
||||
StoreConvention::NameRegister(), rbx, no_reg);
|
||||
|
||||
// Cache miss: Jump to runtime.
|
||||
GenerateMiss(masm);
|
||||
@ -967,9 +943,9 @@ void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
|
||||
|
||||
|
||||
static void StoreIC_PushArgs(MacroAssembler* masm) {
|
||||
Register receiver = StoreIC::ReceiverRegister();
|
||||
Register name = StoreIC::NameRegister();
|
||||
Register value = StoreIC::ValueRegister();
|
||||
Register receiver = StoreConvention::ReceiverRegister();
|
||||
Register name = StoreConvention::NameRegister();
|
||||
Register value = StoreConvention::ValueRegister();
|
||||
|
||||
DCHECK(!rbx.is(receiver) && !rbx.is(name) && !rbx.is(value));
|
||||
|
||||
@ -993,9 +969,9 @@ void StoreIC::GenerateMiss(MacroAssembler* masm) {
|
||||
|
||||
|
||||
void StoreIC::GenerateNormal(MacroAssembler* masm) {
|
||||
Register receiver = ReceiverRegister();
|
||||
Register name = NameRegister();
|
||||
Register value = ValueRegister();
|
||||
Register receiver = StoreConvention::ReceiverRegister();
|
||||
Register name = StoreConvention::NameRegister();
|
||||
Register value = StoreConvention::ValueRegister();
|
||||
Register dictionary = rbx;
|
||||
|
||||
Label miss;
|
||||
|
@ -1065,8 +1065,8 @@ void Builtins::Generate_FunctionApply(MacroAssembler* masm) {
|
||||
|
||||
// Copy all arguments from the array to the stack.
|
||||
Label entry, loop;
|
||||
Register receiver = LoadIC::ReceiverRegister();
|
||||
Register key = LoadIC::NameRegister();
|
||||
Register receiver = LoadConvention::ReceiverRegister();
|
||||
Register key = LoadConvention::NameRegister();
|
||||
__ movp(key, Operand(rbp, kIndexOffset));
|
||||
__ jmp(&entry);
|
||||
__ bind(&loop);
|
||||
@ -1074,7 +1074,7 @@ void Builtins::Generate_FunctionApply(MacroAssembler* masm) {
|
||||
|
||||
// Use inline caching to speed up access to arguments.
|
||||
if (FLAG_vector_ics) {
|
||||
__ Move(LoadIC::SlotRegister(), Smi::FromInt(0));
|
||||
__ Move(VectorLoadConvention::SlotRegister(), Smi::FromInt(0));
|
||||
}
|
||||
Handle<Code> ic =
|
||||
masm->isolate()->builtins()->KeyedLoadIC_Initialize();
|
||||
|
@ -775,7 +775,7 @@ void MathPowStub::Generate(MacroAssembler* masm) {
|
||||
|
||||
void FunctionPrototypeStub::Generate(MacroAssembler* masm) {
|
||||
Label miss;
|
||||
Register receiver = LoadIC::ReceiverRegister();
|
||||
Register receiver = LoadConvention::ReceiverRegister();
|
||||
|
||||
NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, r8,
|
||||
r9, &miss);
|
||||
|
@ -162,17 +162,17 @@ void DebugCodegen::GenerateCallICStubDebugBreak(MacroAssembler* masm) {
|
||||
|
||||
void DebugCodegen::GenerateLoadICDebugBreak(MacroAssembler* masm) {
|
||||
// Register state for IC load call (from ic-x64.cc).
|
||||
Register receiver = LoadIC::ReceiverRegister();
|
||||
Register name = LoadIC::NameRegister();
|
||||
Register receiver = LoadConvention::ReceiverRegister();
|
||||
Register name = LoadConvention::NameRegister();
|
||||
Generate_DebugBreakCallHelper(masm, receiver.bit() | name.bit(), 0, false);
|
||||
}
|
||||
|
||||
|
||||
void DebugCodegen::GenerateStoreICDebugBreak(MacroAssembler* masm) {
|
||||
// Register state for IC store call (from ic-x64.cc).
|
||||
Register receiver = StoreIC::ReceiverRegister();
|
||||
Register name = StoreIC::NameRegister();
|
||||
Register value = StoreIC::ValueRegister();
|
||||
Register receiver = StoreConvention::ReceiverRegister();
|
||||
Register name = StoreConvention::NameRegister();
|
||||
Register value = StoreConvention::ValueRegister();
|
||||
Generate_DebugBreakCallHelper(
|
||||
masm, receiver.bit() | name.bit() | value.bit(), 0, false);
|
||||
}
|
||||
@ -186,9 +186,9 @@ void DebugCodegen::GenerateKeyedLoadICDebugBreak(MacroAssembler* masm) {
|
||||
|
||||
void DebugCodegen::GenerateKeyedStoreICDebugBreak(MacroAssembler* masm) {
|
||||
// Register state for keyed IC store call (from ic-x64.cc).
|
||||
Register receiver = KeyedStoreIC::ReceiverRegister();
|
||||
Register name = KeyedStoreIC::NameRegister();
|
||||
Register value = KeyedStoreIC::ValueRegister();
|
||||
Register receiver = StoreConvention::ReceiverRegister();
|
||||
Register name = StoreConvention::NameRegister();
|
||||
Register value = StoreConvention::ValueRegister();
|
||||
Generate_DebugBreakCallHelper(
|
||||
masm, receiver.bit() | name.bit() | value.bit(), 0, false);
|
||||
}
|
||||
|
@ -1362,10 +1362,10 @@ void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy,
|
||||
|
||||
// All extension objects were empty and it is safe to use a global
|
||||
// load IC call.
|
||||
__ movp(LoadIC::ReceiverRegister(), GlobalObjectOperand());
|
||||
__ Move(LoadIC::NameRegister(), proxy->var()->name());
|
||||
__ movp(LoadConvention::ReceiverRegister(), GlobalObjectOperand());
|
||||
__ Move(LoadConvention::NameRegister(), proxy->var()->name());
|
||||
if (FLAG_vector_ics) {
|
||||
__ Move(LoadIC::SlotRegister(),
|
||||
__ Move(VectorLoadConvention::SlotRegister(),
|
||||
Smi::FromInt(proxy->VariableFeedbackSlot()));
|
||||
}
|
||||
|
||||
@ -1448,10 +1448,10 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
|
||||
switch (var->location()) {
|
||||
case Variable::UNALLOCATED: {
|
||||
Comment cmnt(masm_, "[ Global variable");
|
||||
__ Move(LoadIC::NameRegister(), var->name());
|
||||
__ movp(LoadIC::ReceiverRegister(), GlobalObjectOperand());
|
||||
__ Move(LoadConvention::NameRegister(), var->name());
|
||||
__ movp(LoadConvention::ReceiverRegister(), GlobalObjectOperand());
|
||||
if (FLAG_vector_ics) {
|
||||
__ Move(LoadIC::SlotRegister(),
|
||||
__ Move(VectorLoadConvention::SlotRegister(),
|
||||
Smi::FromInt(proxy->VariableFeedbackSlot()));
|
||||
}
|
||||
CallLoadIC(CONTEXTUAL);
|
||||
@ -1666,9 +1666,9 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
|
||||
if (key->value()->IsInternalizedString()) {
|
||||
if (property->emit_store()) {
|
||||
VisitForAccumulatorValue(value);
|
||||
DCHECK(StoreIC::ValueRegister().is(rax));
|
||||
__ Move(StoreIC::NameRegister(), key->value());
|
||||
__ movp(StoreIC::ReceiverRegister(), Operand(rsp, 0));
|
||||
DCHECK(StoreConvention::ValueRegister().is(rax));
|
||||
__ Move(StoreConvention::NameRegister(), key->value());
|
||||
__ movp(StoreConvention::ReceiverRegister(), Operand(rsp, 0));
|
||||
CallStoreIC(key->LiteralFeedbackId());
|
||||
PrepareForBailoutForId(key->id(), NO_REGISTERS);
|
||||
} else {
|
||||
@ -1847,7 +1847,7 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) {
|
||||
if (expr->is_compound()) {
|
||||
// We need the receiver both on the stack and in the register.
|
||||
VisitForStackValue(property->obj());
|
||||
__ movp(LoadIC::ReceiverRegister(), Operand(rsp, 0));
|
||||
__ movp(LoadConvention::ReceiverRegister(), Operand(rsp, 0));
|
||||
} else {
|
||||
VisitForStackValue(property->obj());
|
||||
}
|
||||
@ -1856,8 +1856,8 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) {
|
||||
if (expr->is_compound()) {
|
||||
VisitForStackValue(property->obj());
|
||||
VisitForStackValue(property->key());
|
||||
__ movp(LoadIC::ReceiverRegister(), Operand(rsp, kPointerSize));
|
||||
__ movp(LoadIC::NameRegister(), Operand(rsp, 0));
|
||||
__ movp(LoadConvention::ReceiverRegister(), Operand(rsp, kPointerSize));
|
||||
__ movp(LoadConvention::NameRegister(), Operand(rsp, 0));
|
||||
} else {
|
||||
VisitForStackValue(property->obj());
|
||||
VisitForStackValue(property->key());
|
||||
@ -1998,8 +1998,8 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
|
||||
|
||||
Label l_catch, l_try, l_suspend, l_continuation, l_resume;
|
||||
Label l_next, l_call, l_loop;
|
||||
Register load_receiver = LoadIC::ReceiverRegister();
|
||||
Register load_name = LoadIC::NameRegister();
|
||||
Register load_receiver = LoadConvention::ReceiverRegister();
|
||||
Register load_name = LoadConvention::NameRegister();
|
||||
|
||||
// Initial send value is undefined.
|
||||
__ LoadRoot(rax, Heap::kUndefinedValueRootIndex);
|
||||
@ -2056,7 +2056,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
|
||||
__ bind(&l_call);
|
||||
__ movp(load_receiver, Operand(rsp, kPointerSize));
|
||||
if (FLAG_vector_ics) {
|
||||
__ Move(LoadIC::SlotRegister(),
|
||||
__ Move(VectorLoadConvention::SlotRegister(),
|
||||
Smi::FromInt(expr->KeyedLoadFeedbackSlot()));
|
||||
}
|
||||
Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
|
||||
@ -2075,7 +2075,8 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
|
||||
__ Push(load_receiver); // save result
|
||||
__ LoadRoot(load_name, Heap::kdone_stringRootIndex); // "done"
|
||||
if (FLAG_vector_ics) {
|
||||
__ Move(LoadIC::SlotRegister(), Smi::FromInt(expr->DoneFeedbackSlot()));
|
||||
__ Move(VectorLoadConvention::SlotRegister(),
|
||||
Smi::FromInt(expr->DoneFeedbackSlot()));
|
||||
}
|
||||
CallLoadIC(NOT_CONTEXTUAL); // rax=result.done
|
||||
Handle<Code> bool_ic = ToBooleanStub::GetUninitialized(isolate());
|
||||
@ -2087,7 +2088,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
|
||||
__ Pop(load_receiver); // result
|
||||
__ LoadRoot(load_name, Heap::kvalue_stringRootIndex); // "value"
|
||||
if (FLAG_vector_ics) {
|
||||
__ Move(LoadIC::SlotRegister(),
|
||||
__ Move(VectorLoadConvention::SlotRegister(),
|
||||
Smi::FromInt(expr->ValueFeedbackSlot()));
|
||||
}
|
||||
CallLoadIC(NOT_CONTEXTUAL); // result.value in rax
|
||||
@ -2250,9 +2251,10 @@ void FullCodeGenerator::EmitCreateIteratorResult(bool done) {
|
||||
void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
|
||||
SetSourcePosition(prop->position());
|
||||
Literal* key = prop->key()->AsLiteral();
|
||||
__ Move(LoadIC::NameRegister(), key->value());
|
||||
__ Move(LoadConvention::NameRegister(), key->value());
|
||||
if (FLAG_vector_ics) {
|
||||
__ Move(LoadIC::SlotRegister(), Smi::FromInt(prop->PropertyFeedbackSlot()));
|
||||
__ Move(VectorLoadConvention::SlotRegister(),
|
||||
Smi::FromInt(prop->PropertyFeedbackSlot()));
|
||||
CallLoadIC(NOT_CONTEXTUAL);
|
||||
} else {
|
||||
CallLoadIC(NOT_CONTEXTUAL, prop->PropertyFeedbackId());
|
||||
@ -2264,7 +2266,8 @@ void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
|
||||
SetSourcePosition(prop->position());
|
||||
Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
|
||||
if (FLAG_vector_ics) {
|
||||
__ Move(LoadIC::SlotRegister(), Smi::FromInt(prop->PropertyFeedbackSlot()));
|
||||
__ Move(VectorLoadConvention::SlotRegister(),
|
||||
Smi::FromInt(prop->PropertyFeedbackSlot()));
|
||||
CallIC(ic);
|
||||
} else {
|
||||
CallIC(ic, prop->PropertyFeedbackId());
|
||||
@ -2369,9 +2372,10 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) {
|
||||
case NAMED_PROPERTY: {
|
||||
__ Push(rax); // Preserve value.
|
||||
VisitForAccumulatorValue(prop->obj());
|
||||
__ Move(StoreIC::ReceiverRegister(), rax);
|
||||
__ Pop(StoreIC::ValueRegister()); // Restore value.
|
||||
__ Move(StoreIC::NameRegister(), prop->key()->AsLiteral()->value());
|
||||
__ Move(StoreConvention::ReceiverRegister(), rax);
|
||||
__ Pop(StoreConvention::ValueRegister()); // Restore value.
|
||||
__ Move(StoreConvention::NameRegister(),
|
||||
prop->key()->AsLiteral()->value());
|
||||
CallStoreIC();
|
||||
break;
|
||||
}
|
||||
@ -2379,9 +2383,9 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) {
|
||||
__ Push(rax); // Preserve value.
|
||||
VisitForStackValue(prop->obj());
|
||||
VisitForAccumulatorValue(prop->key());
|
||||
__ Move(KeyedStoreIC::NameRegister(), rax);
|
||||
__ Pop(KeyedStoreIC::ReceiverRegister());
|
||||
__ Pop(KeyedStoreIC::ValueRegister()); // Restore value.
|
||||
__ Move(StoreConvention::NameRegister(), rax);
|
||||
__ Pop(StoreConvention::ReceiverRegister());
|
||||
__ Pop(StoreConvention::ValueRegister()); // Restore value.
|
||||
Handle<Code> ic = strict_mode() == SLOPPY
|
||||
? isolate()->builtins()->KeyedStoreIC_Initialize()
|
||||
: isolate()->builtins()->KeyedStoreIC_Initialize_Strict();
|
||||
@ -2408,8 +2412,8 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var,
|
||||
Token::Value op) {
|
||||
if (var->IsUnallocated()) {
|
||||
// Global var, const, or let.
|
||||
__ Move(StoreIC::NameRegister(), var->name());
|
||||
__ movp(StoreIC::ReceiverRegister(), GlobalObjectOperand());
|
||||
__ Move(StoreConvention::NameRegister(), var->name());
|
||||
__ movp(StoreConvention::ReceiverRegister(), GlobalObjectOperand());
|
||||
CallStoreIC();
|
||||
|
||||
} else if (op == Token::INIT_CONST_LEGACY) {
|
||||
@ -2479,8 +2483,8 @@ void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) {
|
||||
|
||||
// Record source code position before IC call.
|
||||
SetSourcePosition(expr->position());
|
||||
__ Move(StoreIC::NameRegister(), prop->key()->AsLiteral()->value());
|
||||
__ Pop(StoreIC::ReceiverRegister());
|
||||
__ Move(StoreConvention::NameRegister(), prop->key()->AsLiteral()->value());
|
||||
__ Pop(StoreConvention::ReceiverRegister());
|
||||
CallStoreIC(expr->AssignmentFeedbackId());
|
||||
|
||||
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG);
|
||||
@ -2491,9 +2495,9 @@ void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) {
|
||||
void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) {
|
||||
// Assignment to a property, using a keyed store IC.
|
||||
|
||||
__ Pop(KeyedStoreIC::NameRegister()); // Key.
|
||||
__ Pop(KeyedStoreIC::ReceiverRegister());
|
||||
DCHECK(KeyedStoreIC::ValueRegister().is(rax));
|
||||
__ Pop(StoreConvention::NameRegister()); // Key.
|
||||
__ Pop(StoreConvention::ReceiverRegister());
|
||||
DCHECK(StoreConvention::ValueRegister().is(rax));
|
||||
// Record source code position before IC call.
|
||||
SetSourcePosition(expr->position());
|
||||
Handle<Code> ic = strict_mode() == SLOPPY
|
||||
@ -2512,16 +2516,16 @@ void FullCodeGenerator::VisitProperty(Property* expr) {
|
||||
|
||||
if (key->IsPropertyName()) {
|
||||
VisitForAccumulatorValue(expr->obj());
|
||||
DCHECK(!rax.is(LoadIC::ReceiverRegister()));
|
||||
__ movp(LoadIC::ReceiverRegister(), rax);
|
||||
DCHECK(!rax.is(LoadConvention::ReceiverRegister()));
|
||||
__ movp(LoadConvention::ReceiverRegister(), rax);
|
||||
EmitNamedPropertyLoad(expr);
|
||||
PrepareForBailoutForId(expr->LoadId(), TOS_REG);
|
||||
context()->Plug(rax);
|
||||
} else {
|
||||
VisitForStackValue(expr->obj());
|
||||
VisitForAccumulatorValue(expr->key());
|
||||
__ Move(LoadIC::NameRegister(), rax);
|
||||
__ Pop(LoadIC::ReceiverRegister());
|
||||
__ Move(LoadConvention::NameRegister(), rax);
|
||||
__ Pop(LoadConvention::ReceiverRegister());
|
||||
EmitKeyedPropertyLoad(expr);
|
||||
context()->Plug(rax);
|
||||
}
|
||||
@ -2554,7 +2558,7 @@ void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) {
|
||||
} else {
|
||||
// Load the function from the receiver.
|
||||
DCHECK(callee->IsProperty());
|
||||
__ movp(LoadIC::ReceiverRegister(), Operand(rsp, 0));
|
||||
__ movp(LoadConvention::ReceiverRegister(), Operand(rsp, 0));
|
||||
EmitNamedPropertyLoad(callee->AsProperty());
|
||||
PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG);
|
||||
// Push the target function under the receiver.
|
||||
@ -2576,8 +2580,8 @@ void FullCodeGenerator::EmitKeyedCallWithLoadIC(Call* expr,
|
||||
|
||||
// Load the function from the receiver.
|
||||
DCHECK(callee->IsProperty());
|
||||
__ movp(LoadIC::ReceiverRegister(), Operand(rsp, 0));
|
||||
__ Move(LoadIC::NameRegister(), rax);
|
||||
__ movp(LoadConvention::ReceiverRegister(), Operand(rsp, 0));
|
||||
__ Move(LoadConvention::NameRegister(), rax);
|
||||
EmitKeyedPropertyLoad(callee->AsProperty());
|
||||
PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG);
|
||||
|
||||
@ -4055,10 +4059,10 @@ void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) {
|
||||
__ Push(FieldOperand(rax, GlobalObject::kBuiltinsOffset));
|
||||
|
||||
// Load the function from the receiver.
|
||||
__ movp(LoadIC::ReceiverRegister(), Operand(rsp, 0));
|
||||
__ Move(LoadIC::NameRegister(), expr->name());
|
||||
__ movp(LoadConvention::ReceiverRegister(), Operand(rsp, 0));
|
||||
__ Move(LoadConvention::NameRegister(), expr->name());
|
||||
if (FLAG_vector_ics) {
|
||||
__ Move(LoadIC::SlotRegister(),
|
||||
__ Move(VectorLoadConvention::SlotRegister(),
|
||||
Smi::FromInt(expr->CallRuntimeFeedbackSlot()));
|
||||
CallLoadIC(NOT_CONTEXTUAL);
|
||||
} else {
|
||||
@ -4241,15 +4245,15 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
|
||||
}
|
||||
if (assign_type == NAMED_PROPERTY) {
|
||||
VisitForStackValue(prop->obj());
|
||||
__ movp(LoadIC::ReceiverRegister(), Operand(rsp, 0));
|
||||
__ movp(LoadConvention::ReceiverRegister(), Operand(rsp, 0));
|
||||
EmitNamedPropertyLoad(prop);
|
||||
} else {
|
||||
VisitForStackValue(prop->obj());
|
||||
VisitForStackValue(prop->key());
|
||||
// Leave receiver on stack
|
||||
__ movp(LoadIC::ReceiverRegister(), Operand(rsp, kPointerSize));
|
||||
__ movp(LoadConvention::ReceiverRegister(), Operand(rsp, kPointerSize));
|
||||
// Copy of key, needed for later store.
|
||||
__ movp(LoadIC::NameRegister(), Operand(rsp, 0));
|
||||
__ movp(LoadConvention::NameRegister(), Operand(rsp, 0));
|
||||
EmitKeyedPropertyLoad(prop);
|
||||
}
|
||||
}
|
||||
@ -4361,8 +4365,9 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
|
||||
}
|
||||
break;
|
||||
case NAMED_PROPERTY: {
|
||||
__ Move(StoreIC::NameRegister(), prop->key()->AsLiteral()->value());
|
||||
__ Pop(StoreIC::ReceiverRegister());
|
||||
__ Move(StoreConvention::NameRegister(),
|
||||
prop->key()->AsLiteral()->value());
|
||||
__ Pop(StoreConvention::ReceiverRegister());
|
||||
CallStoreIC(expr->CountStoreFeedbackId());
|
||||
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG);
|
||||
if (expr->is_postfix()) {
|
||||
@ -4375,8 +4380,8 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
|
||||
break;
|
||||
}
|
||||
case KEYED_PROPERTY: {
|
||||
__ Pop(KeyedStoreIC::NameRegister());
|
||||
__ Pop(KeyedStoreIC::ReceiverRegister());
|
||||
__ Pop(StoreConvention::NameRegister());
|
||||
__ Pop(StoreConvention::ReceiverRegister());
|
||||
Handle<Code> ic = strict_mode() == SLOPPY
|
||||
? isolate()->builtins()->KeyedStoreIC_Initialize()
|
||||
: isolate()->builtins()->KeyedStoreIC_Initialize_Strict();
|
||||
@ -4402,10 +4407,10 @@ void FullCodeGenerator::VisitForTypeofValue(Expression* expr) {
|
||||
|
||||
if (proxy != NULL && proxy->var()->IsUnallocated()) {
|
||||
Comment cmnt(masm_, "[ Global variable");
|
||||
__ Move(LoadIC::NameRegister(), proxy->name());
|
||||
__ movp(LoadIC::ReceiverRegister(), GlobalObjectOperand());
|
||||
__ Move(LoadConvention::NameRegister(), proxy->name());
|
||||
__ movp(LoadConvention::ReceiverRegister(), GlobalObjectOperand());
|
||||
if (FLAG_vector_ics) {
|
||||
__ Move(LoadIC::SlotRegister(),
|
||||
__ Move(VectorLoadConvention::SlotRegister(),
|
||||
Smi::FromInt(proxy->VariableFeedbackSlot()));
|
||||
}
|
||||
// Use a regular load, not a contextual load, to avoid a reference
|
||||
|
@ -2850,20 +2850,22 @@ template <class T>
|
||||
void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
|
||||
DCHECK(FLAG_vector_ics);
|
||||
Register vector = ToRegister(instr->temp_vector());
|
||||
DCHECK(vector.is(LoadIC::VectorRegister()));
|
||||
DCHECK(vector.is(FullVectorLoadConvention::VectorRegister()));
|
||||
__ Move(vector, instr->hydrogen()->feedback_vector());
|
||||
// No need to allocate this register.
|
||||
DCHECK(LoadIC::SlotRegister().is(rax));
|
||||
__ Move(LoadIC::SlotRegister(), Smi::FromInt(instr->hydrogen()->slot()));
|
||||
DCHECK(VectorLoadConvention::SlotRegister().is(rax));
|
||||
__ Move(VectorLoadConvention::SlotRegister(),
|
||||
Smi::FromInt(instr->hydrogen()->slot()));
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(rsi));
|
||||
DCHECK(ToRegister(instr->global_object()).is(LoadIC::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->global_object())
|
||||
.is(LoadConvention::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->result()).is(rax));
|
||||
|
||||
__ Move(LoadIC::NameRegister(), instr->name());
|
||||
__ Move(LoadConvention::NameRegister(), instr->name());
|
||||
if (FLAG_vector_ics) {
|
||||
EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
|
||||
}
|
||||
@ -3003,10 +3005,10 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
|
||||
|
||||
void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(rsi));
|
||||
DCHECK(ToRegister(instr->object()).is(LoadIC::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->object()).is(LoadConvention::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->result()).is(rax));
|
||||
|
||||
__ Move(LoadIC::NameRegister(), instr->name());
|
||||
__ Move(LoadConvention::NameRegister(), instr->name());
|
||||
if (FLAG_vector_ics) {
|
||||
EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
|
||||
}
|
||||
@ -3287,8 +3289,8 @@ Operand LCodeGen::BuildFastArrayOperand(
|
||||
|
||||
void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(rsi));
|
||||
DCHECK(ToRegister(instr->object()).is(LoadIC::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->key()).is(LoadIC::NameRegister()));
|
||||
DCHECK(ToRegister(instr->object()).is(LoadConvention::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->key()).is(LoadConvention::NameRegister()));
|
||||
|
||||
if (FLAG_vector_ics) {
|
||||
EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
|
||||
@ -4187,10 +4189,10 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
|
||||
|
||||
void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(rsi));
|
||||
DCHECK(ToRegister(instr->object()).is(StoreIC::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->value()).is(StoreIC::ValueRegister()));
|
||||
DCHECK(ToRegister(instr->object()).is(StoreConvention::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->value()).is(StoreConvention::ValueRegister()));
|
||||
|
||||
__ Move(StoreIC::NameRegister(), instr->hydrogen()->name());
|
||||
__ Move(StoreConvention::NameRegister(), instr->hydrogen()->name());
|
||||
Handle<Code> ic = StoreIC::initialize_stub(isolate(), instr->strict_mode());
|
||||
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
||||
}
|
||||
@ -4452,9 +4454,9 @@ void LCodeGen::DoStoreKeyed(LStoreKeyed* instr) {
|
||||
|
||||
void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(rsi));
|
||||
DCHECK(ToRegister(instr->object()).is(KeyedStoreIC::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->key()).is(KeyedStoreIC::NameRegister()));
|
||||
DCHECK(ToRegister(instr->value()).is(KeyedStoreIC::ValueRegister()));
|
||||
DCHECK(ToRegister(instr->object()).is(StoreConvention::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->key()).is(StoreConvention::NameRegister()));
|
||||
DCHECK(ToRegister(instr->value()).is(StoreConvention::ValueRegister()));
|
||||
|
||||
Handle<Code> ic = instr->strict_mode() == STRICT
|
||||
? isolate()->builtins()->KeyedStoreIC_Initialize_Strict()
|
||||
|
@ -2058,11 +2058,11 @@ LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) {
|
||||
|
||||
LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), rsi);
|
||||
LOperand* global_object = UseFixed(instr->global_object(),
|
||||
LoadIC::ReceiverRegister());
|
||||
LOperand* global_object =
|
||||
UseFixed(instr->global_object(), LoadConvention::ReceiverRegister());
|
||||
LOperand* vector = NULL;
|
||||
if (FLAG_vector_ics) {
|
||||
vector = FixedTemp(LoadIC::VectorRegister());
|
||||
vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
|
||||
}
|
||||
|
||||
LLoadGlobalGeneric* result =
|
||||
@ -2131,10 +2131,11 @@ LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) {
|
||||
|
||||
LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), rsi);
|
||||
LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister());
|
||||
LOperand* object =
|
||||
UseFixed(instr->object(), LoadConvention::ReceiverRegister());
|
||||
LOperand* vector = NULL;
|
||||
if (FLAG_vector_ics) {
|
||||
vector = FixedTemp(LoadIC::VectorRegister());
|
||||
vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
|
||||
}
|
||||
LLoadNamedGeneric* result = new(zone()) LLoadNamedGeneric(
|
||||
context, object, vector);
|
||||
@ -2222,11 +2223,12 @@ LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) {
|
||||
|
||||
LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), rsi);
|
||||
LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister());
|
||||
LOperand* key = UseFixed(instr->key(), LoadIC::NameRegister());
|
||||
LOperand* object =
|
||||
UseFixed(instr->object(), LoadConvention::ReceiverRegister());
|
||||
LOperand* key = UseFixed(instr->key(), LoadConvention::NameRegister());
|
||||
LOperand* vector = NULL;
|
||||
if (FLAG_vector_ics) {
|
||||
vector = FixedTemp(LoadIC::VectorRegister());
|
||||
vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
|
||||
}
|
||||
|
||||
LLoadKeyedGeneric* result =
|
||||
@ -2303,10 +2305,10 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
|
||||
|
||||
LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), rsi);
|
||||
LOperand* object = UseFixed(instr->object(),
|
||||
KeyedStoreIC::ReceiverRegister());
|
||||
LOperand* key = UseFixed(instr->key(), KeyedStoreIC::NameRegister());
|
||||
LOperand* value = UseFixed(instr->value(), KeyedStoreIC::ValueRegister());
|
||||
LOperand* object =
|
||||
UseFixed(instr->object(), StoreConvention::ReceiverRegister());
|
||||
LOperand* key = UseFixed(instr->key(), StoreConvention::NameRegister());
|
||||
LOperand* value = UseFixed(instr->value(), StoreConvention::ValueRegister());
|
||||
|
||||
DCHECK(instr->object()->representation().IsTagged());
|
||||
DCHECK(instr->key()->representation().IsTagged());
|
||||
@ -2401,8 +2403,9 @@ LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
|
||||
|
||||
LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), rsi);
|
||||
LOperand* object = UseFixed(instr->object(), StoreIC::ReceiverRegister());
|
||||
LOperand* value = UseFixed(instr->value(), StoreIC::ValueRegister());
|
||||
LOperand* object =
|
||||
UseFixed(instr->object(), StoreConvention::ReceiverRegister());
|
||||
LOperand* value = UseFixed(instr->value(), StoreConvention::ValueRegister());
|
||||
|
||||
LStoreNamedGeneric* result =
|
||||
new(zone()) LStoreNamedGeneric(context, object, value);
|
||||
|
@ -610,6 +610,7 @@
|
||||
'../../src/ic/ic.h',
|
||||
'../../src/ic/ic-compiler.cc',
|
||||
'../../src/ic/ic-compiler.h',
|
||||
'../../src/ic/ic-conventions.h',
|
||||
'../../src/interface.cc',
|
||||
'../../src/interface.h',
|
||||
'../../src/interpreter-irregexp.cc',
|
||||
@ -799,6 +800,7 @@
|
||||
'../../src/ic/arm/handler-compiler-arm.cc',
|
||||
'../../src/ic/arm/ic-arm.cc',
|
||||
'../../src/ic/arm/ic-compiler-arm.cc',
|
||||
'../../src/ic/arm/ic-conventions-arm.cc',
|
||||
'../../src/ic/arm/stub-cache-arm.cc',
|
||||
],
|
||||
}],
|
||||
@ -854,6 +856,7 @@
|
||||
'../../src/ic/arm64/handler-compiler-arm64.cc',
|
||||
'../../src/ic/arm64/ic-arm64.cc',
|
||||
'../../src/ic/arm64/ic-compiler-arm64.cc',
|
||||
'../../src/ic/arm64/ic-conventions-arm64.cc',
|
||||
'../../src/ic/arm64/stub-cache-arm64.cc',
|
||||
],
|
||||
}],
|
||||
@ -892,6 +895,7 @@
|
||||
'../../src/ic/ia32/handler-compiler-ia32.cc',
|
||||
'../../src/ic/ia32/ic-ia32.cc',
|
||||
'../../src/ic/ia32/ic-compiler-ia32.cc',
|
||||
'../../src/ic/ia32/ic-conventions-ia32.cc',
|
||||
'../../src/ic/ia32/stub-cache-ia32.cc',
|
||||
],
|
||||
}],
|
||||
@ -1038,6 +1042,7 @@
|
||||
'../../src/ic/x64/handler-compiler-x64.cc',
|
||||
'../../src/ic/x64/ic-x64.cc',
|
||||
'../../src/ic/x64/ic-compiler-x64.cc',
|
||||
'../../src/ic/x64/ic-conventions-x64.cc',
|
||||
'../../src/ic/x64/stub-cache-x64.cc',
|
||||
],
|
||||
}],
|
||||
|
Loading…
Reference in New Issue
Block a user