Make concrete classes for individual call descriptors. The ic-convention classes that hold register specifications are merged into these new call descriptor classes, which should represent a final home for that information.

R=yangguo@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23639 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
mvstanton@chromium.org 2014-09-03 10:51:51 +00:00
parent e1a948a6f8
commit c2fe5b2b68
63 changed files with 2258 additions and 2067 deletions

View File

@ -730,7 +730,6 @@ source_set("v8_base") {
"src/ic/ic.h", "src/ic/ic.h",
"src/ic/ic-compiler.cc", "src/ic/ic-compiler.cc",
"src/ic/ic-compiler.h", "src/ic/ic-compiler.h",
"src/ic/ic-conventions.h",
"src/ic/stub-cache.cc", "src/ic/stub-cache.cc",
"src/ic/stub-cache.h", "src/ic/stub-cache.h",
"src/interface.cc", "src/interface.cc",
@ -910,7 +909,6 @@ source_set("v8_base") {
"src/compiler/ia32/instruction-selector-ia32.cc", "src/compiler/ia32/instruction-selector-ia32.cc",
"src/compiler/ia32/linkage-ia32.cc", "src/compiler/ia32/linkage-ia32.cc",
"src/ic/ia32/ic-ia32.cc", "src/ic/ia32/ic-ia32.cc",
"src/ic/ia32/ic-conventions-ia32.cc",
"src/ic/ia32/handler-ia32.cc", "src/ic/ia32/handler-ia32.cc",
"src/ic/ia32/stub-cache-ia32.cc", "src/ic/ia32/stub-cache-ia32.cc",
] ]
@ -950,7 +948,6 @@ source_set("v8_base") {
"src/ic/x64/handler-compiler-x64.cc", "src/ic/x64/handler-compiler-x64.cc",
"src/ic/x64/ic-x64.cc", "src/ic/x64/ic-x64.cc",
"src/ic/x64/ic-compiler-x64.cc", "src/ic/x64/ic-compiler-x64.cc",
"src/ic/x64/ic-conventions-x64.cc",
"src/ic/x64/stub-cache-x64.cc", "src/ic/x64/stub-cache-x64.cc",
] ]
} else if (v8_target_arch == "arm") { } else if (v8_target_arch == "arm") {
@ -993,7 +990,6 @@ source_set("v8_base") {
"src/ic/arm/handler-compiler-arm.cc", "src/ic/arm/handler-compiler-arm.cc",
"src/ic/arm/ic-arm.cc", "src/ic/arm/ic-arm.cc",
"src/ic/arm/ic-compiler-arm.cc", "src/ic/arm/ic-compiler-arm.cc",
"src/ic/arm/ic-conventions-arm.cc",
"src/ic/arm/stub-cache-arm.cc", "src/ic/arm/stub-cache-arm.cc",
] ]
} else if (v8_target_arch == "arm64") { } else if (v8_target_arch == "arm64") {
@ -1047,7 +1043,6 @@ source_set("v8_base") {
"src/ic/arm64/handler-compiler-arm64.cc", "src/ic/arm64/handler-compiler-arm64.cc",
"src/ic/arm64/ic-arm64.cc", "src/ic/arm64/ic-arm64.cc",
"src/ic/arm64/ic-compiler-arm64.cc", "src/ic/arm64/ic-compiler-arm64.cc",
"src/ic/arm64/ic-conventions-arm64.cc",
"src/ic/arm64/stub-cache-arm64.cc", "src/ic/arm64/stub-cache-arm64.cc",
] ]
} else if (v8_target_arch == "mipsel") { } else if (v8_target_arch == "mipsel") {

View File

@ -28,14 +28,12 @@ static void InitializeArrayConstructorDescriptor(
Runtime::kArrayConstructor)->entry; Runtime::kArrayConstructor)->entry;
if (constant_stack_parameter_count == 0) { if (constant_stack_parameter_count == 0) {
CallInterfaceDescriptor* call_descriptor = isolate->call_descriptor( ArrayConstructorConstantArgCountDescriptor call_descriptor(isolate);
CallDescriptorKey::ArrayConstructorConstantArgCountCall);
descriptor->Initialize(major, call_descriptor, deopt_handler, descriptor->Initialize(major, call_descriptor, deopt_handler,
constant_stack_parameter_count, constant_stack_parameter_count,
JS_FUNCTION_STUB_MODE); JS_FUNCTION_STUB_MODE);
} else { } else {
CallInterfaceDescriptor* call_descriptor = ArrayConstructorDescriptor call_descriptor(isolate);
isolate->call_descriptor(CallDescriptorKey::ArrayConstructorCall);
descriptor->Initialize(major, call_descriptor, r0, deopt_handler, descriptor->Initialize(major, call_descriptor, r0, deopt_handler,
constant_stack_parameter_count, constant_stack_parameter_count,
JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS); JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS);
@ -51,14 +49,12 @@ static void InitializeInternalArrayConstructorDescriptor(
Runtime::kInternalArrayConstructor)->entry; Runtime::kInternalArrayConstructor)->entry;
if (constant_stack_parameter_count == 0) { if (constant_stack_parameter_count == 0) {
CallInterfaceDescriptor* call_descriptor = isolate->call_descriptor( InternalArrayConstructorConstantArgCountDescriptor call_descriptor(isolate);
CallDescriptorKey::InternalArrayConstructorConstantArgCountCall);
descriptor->Initialize(major, call_descriptor, deopt_handler, descriptor->Initialize(major, call_descriptor, deopt_handler,
constant_stack_parameter_count, constant_stack_parameter_count,
JS_FUNCTION_STUB_MODE); JS_FUNCTION_STUB_MODE);
} else { } else {
CallInterfaceDescriptor* call_descriptor = isolate->call_descriptor( InternalArrayConstructorDescriptor call_descriptor(isolate);
CallDescriptorKey::InternalArrayConstructorCall);
descriptor->Initialize(major, call_descriptor, r0, deopt_handler, descriptor->Initialize(major, call_descriptor, r0, deopt_handler,
constant_stack_parameter_count, constant_stack_parameter_count,
JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS); JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS);
@ -1615,7 +1611,7 @@ void InstanceofStub::Generate(MacroAssembler* masm) {
void FunctionPrototypeStub::Generate(MacroAssembler* masm) { void FunctionPrototypeStub::Generate(MacroAssembler* masm) {
Label miss; Label miss;
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, r3, NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, r3,
r4, &miss); r4, &miss);
@ -4317,14 +4313,14 @@ void StubFailureTrampolineStub::Generate(MacroAssembler* masm) {
void LoadICTrampolineStub::Generate(MacroAssembler* masm) { void LoadICTrampolineStub::Generate(MacroAssembler* masm) {
EmitLoadTypeFeedbackVector(masm, FullVectorLoadConvention::VectorRegister()); EmitLoadTypeFeedbackVector(masm, VectorLoadICDescriptor::VectorRegister());
VectorLoadStub stub(isolate(), state()); VectorLoadStub stub(isolate(), state());
__ Jump(stub.GetCode(), RelocInfo::CODE_TARGET); __ Jump(stub.GetCode(), RelocInfo::CODE_TARGET);
} }
void KeyedLoadICTrampolineStub::Generate(MacroAssembler* masm) { void KeyedLoadICTrampolineStub::Generate(MacroAssembler* masm) {
EmitLoadTypeFeedbackVector(masm, FullVectorLoadConvention::VectorRegister()); EmitLoadTypeFeedbackVector(masm, VectorLoadICDescriptor::VectorRegister());
VectorKeyedLoadStub stub(isolate()); VectorKeyedLoadStub stub(isolate());
__ Jump(stub.GetCode(), RelocInfo::CODE_TARGET); __ Jump(stub.GetCode(), RelocInfo::CODE_TARGET);
} }

View File

@ -176,17 +176,17 @@ void DebugCodegen::GenerateCallICStubDebugBreak(MacroAssembler* masm) {
void DebugCodegen::GenerateLoadICDebugBreak(MacroAssembler* masm) { void DebugCodegen::GenerateLoadICDebugBreak(MacroAssembler* masm) {
// Calling convention for IC load (from ic-arm.cc). // Calling convention for IC load (from ic-arm.cc).
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
Register name = LoadConvention::NameRegister(); Register name = LoadDescriptor::NameRegister();
Generate_DebugBreakCallHelper(masm, receiver.bit() | name.bit(), 0); Generate_DebugBreakCallHelper(masm, receiver.bit() | name.bit(), 0);
} }
void DebugCodegen::GenerateStoreICDebugBreak(MacroAssembler* masm) { void DebugCodegen::GenerateStoreICDebugBreak(MacroAssembler* masm) {
// Calling convention for IC store (from ic-arm.cc). // Calling convention for IC store (from ic-arm.cc).
Register receiver = StoreConvention::ReceiverRegister(); Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreConvention::NameRegister(); Register name = StoreDescriptor::NameRegister();
Register value = StoreConvention::ValueRegister(); Register value = StoreDescriptor::ValueRegister();
Generate_DebugBreakCallHelper( Generate_DebugBreakCallHelper(
masm, receiver.bit() | name.bit() | value.bit(), 0); masm, receiver.bit() | name.bit() | value.bit(), 0);
} }
@ -200,9 +200,9 @@ void DebugCodegen::GenerateKeyedLoadICDebugBreak(MacroAssembler* masm) {
void DebugCodegen::GenerateKeyedStoreICDebugBreak(MacroAssembler* masm) { void DebugCodegen::GenerateKeyedStoreICDebugBreak(MacroAssembler* masm) {
// Calling convention for IC keyed store call (from ic-arm.cc). // Calling convention for IC keyed store call (from ic-arm.cc).
Register receiver = StoreConvention::ReceiverRegister(); Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreConvention::NameRegister(); Register name = StoreDescriptor::NameRegister();
Register value = StoreConvention::ValueRegister(); Register value = StoreDescriptor::ValueRegister();
Generate_DebugBreakCallHelper( Generate_DebugBreakCallHelper(
masm, receiver.bit() | name.bit() | value.bit(), 0); masm, receiver.bit() | name.bit() | value.bit(), 0);
} }

View File

@ -1402,10 +1402,10 @@ void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy,
__ bind(&fast); __ bind(&fast);
} }
__ ldr(LoadConvention::ReceiverRegister(), GlobalObjectOperand()); __ ldr(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
__ mov(LoadConvention::NameRegister(), Operand(proxy->var()->name())); __ mov(LoadDescriptor::NameRegister(), Operand(proxy->var()->name()));
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
__ mov(VectorLoadConvention::SlotRegister(), __ mov(VectorLoadICDescriptor::SlotRegister(),
Operand(Smi::FromInt(proxy->VariableFeedbackSlot()))); Operand(Smi::FromInt(proxy->VariableFeedbackSlot())));
} }
@ -1491,10 +1491,10 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
switch (var->location()) { switch (var->location()) {
case Variable::UNALLOCATED: { case Variable::UNALLOCATED: {
Comment cmnt(masm_, "[ Global variable"); Comment cmnt(masm_, "[ Global variable");
__ ldr(LoadConvention::ReceiverRegister(), GlobalObjectOperand()); __ ldr(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
__ mov(LoadConvention::NameRegister(), Operand(var->name())); __ mov(LoadDescriptor::NameRegister(), Operand(var->name()));
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
__ mov(VectorLoadConvention::SlotRegister(), __ mov(VectorLoadICDescriptor::SlotRegister(),
Operand(Smi::FromInt(proxy->VariableFeedbackSlot()))); Operand(Smi::FromInt(proxy->VariableFeedbackSlot())));
} }
CallLoadIC(CONTEXTUAL); CallLoadIC(CONTEXTUAL);
@ -1702,9 +1702,9 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
if (key->value()->IsInternalizedString()) { if (key->value()->IsInternalizedString()) {
if (property->emit_store()) { if (property->emit_store()) {
VisitForAccumulatorValue(value); VisitForAccumulatorValue(value);
DCHECK(StoreConvention::ValueRegister().is(r0)); DCHECK(StoreDescriptor::ValueRegister().is(r0));
__ mov(StoreConvention::NameRegister(), Operand(key->value())); __ mov(StoreDescriptor::NameRegister(), Operand(key->value()));
__ ldr(StoreConvention::ReceiverRegister(), MemOperand(sp)); __ ldr(StoreDescriptor::ReceiverRegister(), MemOperand(sp));
CallStoreIC(key->LiteralFeedbackId()); CallStoreIC(key->LiteralFeedbackId());
PrepareForBailoutForId(key->id(), NO_REGISTERS); PrepareForBailoutForId(key->id(), NO_REGISTERS);
} else { } else {
@ -1883,7 +1883,7 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) {
if (expr->is_compound()) { if (expr->is_compound()) {
// We need the receiver both on the stack and in the register. // We need the receiver both on the stack and in the register.
VisitForStackValue(property->obj()); VisitForStackValue(property->obj());
__ ldr(LoadConvention::ReceiverRegister(), MemOperand(sp, 0)); __ ldr(LoadDescriptor::ReceiverRegister(), MemOperand(sp, 0));
} else { } else {
VisitForStackValue(property->obj()); VisitForStackValue(property->obj());
} }
@ -1892,9 +1892,9 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) {
if (expr->is_compound()) { if (expr->is_compound()) {
VisitForStackValue(property->obj()); VisitForStackValue(property->obj());
VisitForStackValue(property->key()); VisitForStackValue(property->key());
__ ldr(LoadConvention::ReceiverRegister(), __ ldr(LoadDescriptor::ReceiverRegister(),
MemOperand(sp, 1 * kPointerSize)); MemOperand(sp, 1 * kPointerSize));
__ ldr(LoadConvention::NameRegister(), MemOperand(sp, 0)); __ ldr(LoadDescriptor::NameRegister(), MemOperand(sp, 0));
} else { } else {
VisitForStackValue(property->obj()); VisitForStackValue(property->obj());
VisitForStackValue(property->key()); VisitForStackValue(property->key());
@ -2033,8 +2033,8 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
Label l_catch, l_try, l_suspend, l_continuation, l_resume; Label l_catch, l_try, l_suspend, l_continuation, l_resume;
Label l_next, l_call, l_loop; Label l_next, l_call, l_loop;
Register load_receiver = LoadConvention::ReceiverRegister(); Register load_receiver = LoadDescriptor::ReceiverRegister();
Register load_name = LoadConvention::NameRegister(); Register load_name = LoadDescriptor::NameRegister();
// Initial send value is undefined. // Initial send value is undefined.
__ LoadRoot(r0, Heap::kUndefinedValueRootIndex); __ LoadRoot(r0, Heap::kUndefinedValueRootIndex);
@ -2089,7 +2089,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ ldr(load_receiver, MemOperand(sp, kPointerSize)); __ ldr(load_receiver, MemOperand(sp, kPointerSize));
__ ldr(load_name, MemOperand(sp, 2 * kPointerSize)); __ ldr(load_name, MemOperand(sp, 2 * kPointerSize));
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
__ mov(VectorLoadConvention::SlotRegister(), __ mov(VectorLoadICDescriptor::SlotRegister(),
Operand(Smi::FromInt(expr->KeyedLoadFeedbackSlot()))); Operand(Smi::FromInt(expr->KeyedLoadFeedbackSlot())));
} }
Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
@ -2109,7 +2109,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ push(load_receiver); // save result __ push(load_receiver); // save result
__ LoadRoot(load_name, Heap::kdone_stringRootIndex); // "done" __ LoadRoot(load_name, Heap::kdone_stringRootIndex); // "done"
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
__ mov(VectorLoadConvention::SlotRegister(), __ mov(VectorLoadICDescriptor::SlotRegister(),
Operand(Smi::FromInt(expr->DoneFeedbackSlot()))); Operand(Smi::FromInt(expr->DoneFeedbackSlot())));
} }
CallLoadIC(NOT_CONTEXTUAL); // r0=result.done CallLoadIC(NOT_CONTEXTUAL); // r0=result.done
@ -2122,7 +2122,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ pop(load_receiver); // result __ pop(load_receiver); // result
__ LoadRoot(load_name, Heap::kvalue_stringRootIndex); // "value" __ LoadRoot(load_name, Heap::kvalue_stringRootIndex); // "value"
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
__ mov(VectorLoadConvention::SlotRegister(), __ mov(VectorLoadICDescriptor::SlotRegister(),
Operand(Smi::FromInt(expr->ValueFeedbackSlot()))); Operand(Smi::FromInt(expr->ValueFeedbackSlot())));
} }
CallLoadIC(NOT_CONTEXTUAL); // r0=result.value CallLoadIC(NOT_CONTEXTUAL); // r0=result.value
@ -2299,9 +2299,9 @@ void FullCodeGenerator::EmitCreateIteratorResult(bool done) {
void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) { void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
SetSourcePosition(prop->position()); SetSourcePosition(prop->position());
Literal* key = prop->key()->AsLiteral(); Literal* key = prop->key()->AsLiteral();
__ mov(LoadConvention::NameRegister(), Operand(key->value())); __ mov(LoadDescriptor::NameRegister(), Operand(key->value()));
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
__ mov(VectorLoadConvention::SlotRegister(), __ mov(VectorLoadICDescriptor::SlotRegister(),
Operand(Smi::FromInt(prop->PropertyFeedbackSlot()))); Operand(Smi::FromInt(prop->PropertyFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL); CallLoadIC(NOT_CONTEXTUAL);
} else { } else {
@ -2314,7 +2314,7 @@ void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
SetSourcePosition(prop->position()); SetSourcePosition(prop->position());
Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
__ mov(VectorLoadConvention::SlotRegister(), __ mov(VectorLoadICDescriptor::SlotRegister(),
Operand(Smi::FromInt(prop->PropertyFeedbackSlot()))); Operand(Smi::FromInt(prop->PropertyFeedbackSlot())));
CallIC(ic); CallIC(ic);
} else { } else {
@ -2453,9 +2453,9 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) {
case NAMED_PROPERTY: { case NAMED_PROPERTY: {
__ push(r0); // Preserve value. __ push(r0); // Preserve value.
VisitForAccumulatorValue(prop->obj()); VisitForAccumulatorValue(prop->obj());
__ Move(StoreConvention::ReceiverRegister(), r0); __ Move(StoreDescriptor::ReceiverRegister(), r0);
__ pop(StoreConvention::ValueRegister()); // Restore value. __ pop(StoreDescriptor::ValueRegister()); // Restore value.
__ mov(StoreConvention::NameRegister(), __ mov(StoreDescriptor::NameRegister(),
Operand(prop->key()->AsLiteral()->value())); Operand(prop->key()->AsLiteral()->value()));
CallStoreIC(); CallStoreIC();
break; break;
@ -2464,9 +2464,9 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) {
__ push(r0); // Preserve value. __ push(r0); // Preserve value.
VisitForStackValue(prop->obj()); VisitForStackValue(prop->obj());
VisitForAccumulatorValue(prop->key()); VisitForAccumulatorValue(prop->key());
__ Move(StoreConvention::NameRegister(), r0); __ Move(StoreDescriptor::NameRegister(), r0);
__ Pop(StoreConvention::ValueRegister(), __ Pop(StoreDescriptor::ValueRegister(),
StoreConvention::ReceiverRegister()); StoreDescriptor::ReceiverRegister());
Handle<Code> ic = strict_mode() == SLOPPY Handle<Code> ic = strict_mode() == SLOPPY
? isolate()->builtins()->KeyedStoreIC_Initialize() ? isolate()->builtins()->KeyedStoreIC_Initialize()
: isolate()->builtins()->KeyedStoreIC_Initialize_Strict(); : isolate()->builtins()->KeyedStoreIC_Initialize_Strict();
@ -2494,8 +2494,8 @@ void FullCodeGenerator::EmitStoreToStackLocalOrContextSlot(
void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op) { void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op) {
if (var->IsUnallocated()) { if (var->IsUnallocated()) {
// Global var, const, or let. // Global var, const, or let.
__ mov(StoreConvention::NameRegister(), Operand(var->name())); __ mov(StoreDescriptor::NameRegister(), Operand(var->name()));
__ ldr(StoreConvention::ReceiverRegister(), GlobalObjectOperand()); __ ldr(StoreDescriptor::ReceiverRegister(), GlobalObjectOperand());
CallStoreIC(); CallStoreIC();
} else if (op == Token::INIT_CONST_LEGACY) { } else if (op == Token::INIT_CONST_LEGACY) {
@ -2567,9 +2567,9 @@ void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) {
// Record source code position before IC call. // Record source code position before IC call.
SetSourcePosition(expr->position()); SetSourcePosition(expr->position());
__ mov(StoreConvention::NameRegister(), __ mov(StoreDescriptor::NameRegister(),
Operand(prop->key()->AsLiteral()->value())); Operand(prop->key()->AsLiteral()->value()));
__ pop(StoreConvention::ReceiverRegister()); __ pop(StoreDescriptor::ReceiverRegister());
CallStoreIC(expr->AssignmentFeedbackId()); CallStoreIC(expr->AssignmentFeedbackId());
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); PrepareForBailoutForId(expr->AssignmentId(), TOS_REG);
@ -2582,8 +2582,8 @@ void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) {
// Record source code position before IC call. // Record source code position before IC call.
SetSourcePosition(expr->position()); SetSourcePosition(expr->position());
__ Pop(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister()); __ Pop(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister());
DCHECK(StoreConvention::ValueRegister().is(r0)); DCHECK(StoreDescriptor::ValueRegister().is(r0));
Handle<Code> ic = strict_mode() == SLOPPY Handle<Code> ic = strict_mode() == SLOPPY
? isolate()->builtins()->KeyedStoreIC_Initialize() ? isolate()->builtins()->KeyedStoreIC_Initialize()
@ -2601,15 +2601,15 @@ void FullCodeGenerator::VisitProperty(Property* expr) {
if (key->IsPropertyName()) { if (key->IsPropertyName()) {
VisitForAccumulatorValue(expr->obj()); VisitForAccumulatorValue(expr->obj());
__ Move(LoadConvention::ReceiverRegister(), r0); __ Move(LoadDescriptor::ReceiverRegister(), r0);
EmitNamedPropertyLoad(expr); EmitNamedPropertyLoad(expr);
PrepareForBailoutForId(expr->LoadId(), TOS_REG); PrepareForBailoutForId(expr->LoadId(), TOS_REG);
context()->Plug(r0); context()->Plug(r0);
} else { } else {
VisitForStackValue(expr->obj()); VisitForStackValue(expr->obj());
VisitForAccumulatorValue(expr->key()); VisitForAccumulatorValue(expr->key());
__ Move(LoadConvention::NameRegister(), r0); __ Move(LoadDescriptor::NameRegister(), r0);
__ pop(LoadConvention::ReceiverRegister()); __ pop(LoadDescriptor::ReceiverRegister());
EmitKeyedPropertyLoad(expr); EmitKeyedPropertyLoad(expr);
context()->Plug(r0); context()->Plug(r0);
} }
@ -2646,7 +2646,7 @@ void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) {
} else { } else {
// Load the function from the receiver. // Load the function from the receiver.
DCHECK(callee->IsProperty()); DCHECK(callee->IsProperty());
__ ldr(LoadConvention::ReceiverRegister(), MemOperand(sp, 0)); __ ldr(LoadDescriptor::ReceiverRegister(), MemOperand(sp, 0));
EmitNamedPropertyLoad(callee->AsProperty()); EmitNamedPropertyLoad(callee->AsProperty());
PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG); PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG);
// Push the target function under the receiver. // Push the target function under the receiver.
@ -2669,8 +2669,8 @@ void FullCodeGenerator::EmitKeyedCallWithLoadIC(Call* expr,
// Load the function from the receiver. // Load the function from the receiver.
DCHECK(callee->IsProperty()); DCHECK(callee->IsProperty());
__ ldr(LoadConvention::ReceiverRegister(), MemOperand(sp, 0)); __ ldr(LoadDescriptor::ReceiverRegister(), MemOperand(sp, 0));
__ Move(LoadConvention::NameRegister(), r0); __ Move(LoadDescriptor::NameRegister(), r0);
EmitKeyedPropertyLoad(callee->AsProperty()); EmitKeyedPropertyLoad(callee->AsProperty());
PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG); PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG);
@ -4083,15 +4083,15 @@ void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) {
if (expr->is_jsruntime()) { if (expr->is_jsruntime()) {
// Push the builtins object as the receiver. // Push the builtins object as the receiver.
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
__ ldr(receiver, GlobalObjectOperand()); __ ldr(receiver, GlobalObjectOperand());
__ ldr(receiver, FieldMemOperand(receiver, GlobalObject::kBuiltinsOffset)); __ ldr(receiver, FieldMemOperand(receiver, GlobalObject::kBuiltinsOffset));
__ push(receiver); __ push(receiver);
// Load the function from the receiver. // Load the function from the receiver.
__ mov(LoadConvention::NameRegister(), Operand(expr->name())); __ mov(LoadDescriptor::NameRegister(), Operand(expr->name()));
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
__ mov(VectorLoadConvention::SlotRegister(), __ mov(VectorLoadICDescriptor::SlotRegister(),
Operand(Smi::FromInt(expr->CallRuntimeFeedbackSlot()))); Operand(Smi::FromInt(expr->CallRuntimeFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL); CallLoadIC(NOT_CONTEXTUAL);
} else { } else {
@ -4274,14 +4274,14 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
if (assign_type == NAMED_PROPERTY) { if (assign_type == NAMED_PROPERTY) {
// Put the object both on the stack and in the register. // Put the object both on the stack and in the register.
VisitForStackValue(prop->obj()); VisitForStackValue(prop->obj());
__ ldr(LoadConvention::ReceiverRegister(), MemOperand(sp, 0)); __ ldr(LoadDescriptor::ReceiverRegister(), MemOperand(sp, 0));
EmitNamedPropertyLoad(prop); EmitNamedPropertyLoad(prop);
} else { } else {
VisitForStackValue(prop->obj()); VisitForStackValue(prop->obj());
VisitForStackValue(prop->key()); VisitForStackValue(prop->key());
__ ldr(LoadConvention::ReceiverRegister(), __ ldr(LoadDescriptor::ReceiverRegister(),
MemOperand(sp, 1 * kPointerSize)); MemOperand(sp, 1 * kPointerSize));
__ ldr(LoadConvention::NameRegister(), MemOperand(sp, 0)); __ ldr(LoadDescriptor::NameRegister(), MemOperand(sp, 0));
EmitKeyedPropertyLoad(prop); EmitKeyedPropertyLoad(prop);
} }
} }
@ -4389,9 +4389,9 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
} }
break; break;
case NAMED_PROPERTY: { case NAMED_PROPERTY: {
__ mov(StoreConvention::NameRegister(), __ mov(StoreDescriptor::NameRegister(),
Operand(prop->key()->AsLiteral()->value())); Operand(prop->key()->AsLiteral()->value()));
__ pop(StoreConvention::ReceiverRegister()); __ pop(StoreDescriptor::ReceiverRegister());
CallStoreIC(expr->CountStoreFeedbackId()); CallStoreIC(expr->CountStoreFeedbackId());
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); PrepareForBailoutForId(expr->AssignmentId(), TOS_REG);
if (expr->is_postfix()) { if (expr->is_postfix()) {
@ -4404,8 +4404,8 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
break; break;
} }
case KEYED_PROPERTY: { case KEYED_PROPERTY: {
__ Pop(StoreConvention::ReceiverRegister(), __ Pop(StoreDescriptor::ReceiverRegister(),
StoreConvention::NameRegister()); StoreDescriptor::NameRegister());
Handle<Code> ic = strict_mode() == SLOPPY Handle<Code> ic = strict_mode() == SLOPPY
? isolate()->builtins()->KeyedStoreIC_Initialize() ? isolate()->builtins()->KeyedStoreIC_Initialize()
: isolate()->builtins()->KeyedStoreIC_Initialize_Strict(); : isolate()->builtins()->KeyedStoreIC_Initialize_Strict();
@ -4430,10 +4430,10 @@ void FullCodeGenerator::VisitForTypeofValue(Expression* expr) {
VariableProxy* proxy = expr->AsVariableProxy(); VariableProxy* proxy = expr->AsVariableProxy();
if (proxy != NULL && proxy->var()->IsUnallocated()) { if (proxy != NULL && proxy->var()->IsUnallocated()) {
Comment cmnt(masm_, "[ Global variable"); Comment cmnt(masm_, "[ Global variable");
__ ldr(LoadConvention::ReceiverRegister(), GlobalObjectOperand()); __ ldr(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
__ mov(LoadConvention::NameRegister(), Operand(proxy->name())); __ mov(LoadDescriptor::NameRegister(), Operand(proxy->name()));
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
__ mov(VectorLoadConvention::SlotRegister(), __ mov(VectorLoadICDescriptor::SlotRegister(),
Operand(Smi::FromInt(proxy->VariableFeedbackSlot()))); Operand(Smi::FromInt(proxy->VariableFeedbackSlot())));
} }
// Use a regular load, not a contextual load, to avoid a reference // Use a regular load, not a contextual load, to avoid a reference

View File

@ -14,243 +14,294 @@ namespace internal {
const Register CallInterfaceDescriptor::ContextRegister() { return cp; } const Register CallInterfaceDescriptor::ContextRegister() { return cp; }
void CallDescriptors::InitializeForIsolate(Isolate* isolate) { const Register LoadDescriptor::ReceiverRegister() { return r1; }
static PlatformInterfaceDescriptor default_descriptor = const Register LoadDescriptor::NameRegister() { return r2; }
PlatformInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS);
const Register VectorLoadICDescriptor::ReceiverRegister() {
return LoadDescriptor::ReceiverRegister();
}
const Register VectorLoadICDescriptor::NameRegister() {
return LoadDescriptor::NameRegister();
}
const Register VectorLoadICDescriptor::SlotRegister() { return r0; }
const Register VectorLoadICDescriptor::VectorRegister() { return r3; }
const Register StoreDescriptor::ReceiverRegister() { return r1; }
const Register StoreDescriptor::NameRegister() { return r2; }
const Register StoreDescriptor::ValueRegister() { return r0; }
const Register ElementTransitionAndStoreDescriptor::ReceiverRegister() {
return StoreDescriptor::ReceiverRegister();
}
const Register ElementTransitionAndStoreDescriptor::NameRegister() {
return StoreDescriptor::NameRegister();
}
const Register ElementTransitionAndStoreDescriptor::ValueRegister() {
return StoreDescriptor::ValueRegister();
}
const Register ElementTransitionAndStoreDescriptor::MapRegister() { return r3; }
const Register InstanceofDescriptor::left() { return r0; }
const Register InstanceofDescriptor::right() { return r1; }
void FastNewClosureDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {cp, r2};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void FastNewContextDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {cp, r1};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void ToNumberDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {cp, r0};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void NumberToStringDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {cp, r0};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void FastCloneShallowArrayDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {cp, r3, r2, r1};
Representation representations[] = {
Representation::Tagged(), Representation::Tagged(), Representation::Smi(),
Representation::Tagged()};
InitializeData(isolate, key(), arraysize(registers), registers,
representations);
}
void FastCloneShallowObjectDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {cp, r3, r2, r1, r0};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void CreateAllocationSiteDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {cp, r2, r3};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void CallFunctionDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {cp, r1};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void CallConstructDescriptor::Initialize(Isolate* isolate) {
// r0 : number of arguments
// r1 : the function to call
// r2 : feedback vector
// r3 : (only if r2 is not the megamorphic symbol) slot in feedback
// vector (Smi)
// TODO(turbofan): So far we don't gather type feedback and hence skip the
// slot parameter, but ArrayConstructStub needs the vector to be undefined.
Register registers[] = {cp, r0, r1, r2};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void RegExpConstructResultDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {cp, r2, r1, r0};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void TransitionElementsKindDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {cp, r0, r1};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void ArrayConstructorConstantArgCountDescriptor::Initialize(Isolate* isolate) {
// register state
// cp -- context
// r0 -- number of arguments
// r1 -- function
// r2 -- allocation site with elements kind
Register registers[] = {cp, r1, r2};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void ArrayConstructorDescriptor::Initialize(Isolate* isolate) {
// stack param count needs (constructor pointer, and single argument)
Register registers[] = {cp, r1, r2, r0};
Representation representations[] = {
Representation::Tagged(), Representation::Tagged(),
Representation::Tagged(), Representation::Integer32()};
InitializeData(isolate, key(), arraysize(registers), registers,
representations);
}
void InternalArrayConstructorConstantArgCountDescriptor::Initialize(
Isolate* isolate) {
// register state
// cp -- context
// r0 -- number of arguments
// r1 -- constructor function
Register registers[] = {cp, r1};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void InternalArrayConstructorDescriptor::Initialize(Isolate* isolate) {
// stack param count needs (constructor pointer, and single argument)
Register registers[] = {cp, r1, r0};
Representation representations[] = {Representation::Tagged(),
Representation::Tagged(),
Representation::Integer32()};
InitializeData(isolate, key(), arraysize(registers), registers,
representations);
}
void CompareNilDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {cp, r0};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void ToBooleanDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {cp, r0};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void BinaryOpDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {cp, r1, r0};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void BinaryOpWithAllocationSiteDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {cp, r2, r1, r0};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void StringAddDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {cp, r1, r0};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void KeyedDescriptor::Initialize(Isolate* isolate) {
static PlatformInterfaceDescriptor noInlineDescriptor = static PlatformInterfaceDescriptor noInlineDescriptor =
PlatformInterfaceDescriptor(NEVER_INLINE_TARGET_ADDRESS); PlatformInterfaceDescriptor(NEVER_INLINE_TARGET_ADDRESS);
InitializeForIsolateAllPlatforms(isolate); Register registers[] = {
cp, // context
r2, // key
};
Representation representations[] = {
Representation::Tagged(), // context
Representation::Tagged(), // key
};
InitializeData(isolate, key(), arraysize(registers), registers,
representations, &noInlineDescriptor);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::FastNewClosureCall);
Register registers[] = {cp, r2};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::FastNewContextCall);
Register registers[] = {cp, r1};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::ToNumberCall);
Register registers[] = {cp, r0};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::NumberToStringCall);
Register registers[] = {cp, r0};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::FastCloneShallowArrayCall);
Register registers[] = {cp, r3, r2, r1};
Representation representations[] = {
Representation::Tagged(), Representation::Tagged(),
Representation::Smi(), Representation::Tagged()};
descriptor->Initialize(arraysize(registers), registers, representations);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::FastCloneShallowObjectCall);
Register registers[] = {cp, r3, r2, r1, r0};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::CreateAllocationSiteCall);
Register registers[] = {cp, r2, r3};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::CallFunctionCall);
Register registers[] = {cp, r1};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::CallConstructCall);
// r0 : number of arguments
// r1 : the function to call
// r2 : feedback vector
// r3 : (only if r2 is not the megamorphic symbol) slot in feedback
// vector (Smi)
// TODO(turbofan): So far we don't gather type feedback and hence skip the
// slot parameter, but ArrayConstructStub needs the vector to be undefined.
Register registers[] = {cp, r0, r1, r2};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::RegExpConstructResultCall);
Register registers[] = {cp, r2, r1, r0};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::TransitionElementsKindCall);
Register registers[] = {cp, r0, r1};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor = isolate->call_descriptor(
CallDescriptorKey::ArrayConstructorConstantArgCountCall);
// register state
// cp -- context
// r0 -- number of arguments
// r1 -- function
// r2 -- allocation site with elements kind
Register registers[] = {cp, r1, r2};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::ArrayConstructorCall);
// stack param count needs (constructor pointer, and single argument)
Register registers[] = {cp, r1, r2, r0};
Representation representations[] = {
Representation::Tagged(), Representation::Tagged(),
Representation::Tagged(), Representation::Integer32()};
descriptor->Initialize(arraysize(registers), registers, representations);
}
{
CallInterfaceDescriptor* descriptor = isolate->call_descriptor(
CallDescriptorKey::InternalArrayConstructorConstantArgCountCall);
// register state
// cp -- context
// r0 -- number of arguments
// r1 -- constructor function
Register registers[] = {cp, r1};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor = isolate->call_descriptor(
CallDescriptorKey::InternalArrayConstructorCall);
// stack param count needs (constructor pointer, and single argument)
Register registers[] = {cp, r1, r0};
Representation representations[] = {Representation::Tagged(),
Representation::Tagged(),
Representation::Integer32()};
descriptor->Initialize(arraysize(registers), registers, representations);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::CompareNilCall);
Register registers[] = {cp, r0};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::ToBooleanCall);
Register registers[] = {cp, r0};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::BinaryOpCall);
Register registers[] = {cp, r1, r0};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor = isolate->call_descriptor(
CallDescriptorKey::BinaryOpWithAllocationSiteCall);
Register registers[] = {cp, r2, r1, r0};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::StringAddCall);
Register registers[] = {cp, r1, r0};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{ void NamedDescriptor::Initialize(Isolate* isolate) {
CallInterfaceDescriptor* descriptor = static PlatformInterfaceDescriptor noInlineDescriptor =
isolate->call_descriptor(CallDescriptorKey::ArgumentAdaptorCall); PlatformInterfaceDescriptor(NEVER_INLINE_TARGET_ADDRESS);
Register registers[] = {
cp, // context Register registers[] = {
r1, // JSFunction cp, // context
r0, // actual number of arguments r2, // name
r2, // expected number of arguments };
}; Representation representations[] = {
Representation representations[] = { Representation::Tagged(), // context
Representation::Tagged(), // context Representation::Tagged(), // name
Representation::Tagged(), // JSFunction };
Representation::Integer32(), // actual number of arguments InitializeData(isolate, key(), arraysize(registers), registers,
Representation::Integer32(), // expected number of arguments representations, &noInlineDescriptor);
}; }
descriptor->Initialize(arraysize(registers), registers, representations,
&default_descriptor);
} void CallHandlerDescriptor::Initialize(Isolate* isolate) {
{ static PlatformInterfaceDescriptor default_descriptor =
CallInterfaceDescriptor* descriptor = PlatformInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS);
isolate->call_descriptor(CallDescriptorKey::KeyedCall);
Register registers[] = { Register registers[] = {
cp, // context cp, // context
r2, // key r0, // receiver
}; };
Representation representations[] = { Representation representations[] = {
Representation::Tagged(), // context Representation::Tagged(), // context
Representation::Tagged(), // key Representation::Tagged(), // receiver
}; };
descriptor->Initialize(arraysize(registers), registers, representations, InitializeData(isolate, key(), arraysize(registers), registers,
&noInlineDescriptor); representations, &default_descriptor);
} }
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::NamedCall); void ArgumentAdaptorDescriptor::Initialize(Isolate* isolate) {
Register registers[] = { static PlatformInterfaceDescriptor default_descriptor =
cp, // context PlatformInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS);
r2, // name
}; Register registers[] = {
Representation representations[] = { cp, // context
Representation::Tagged(), // context r1, // JSFunction
Representation::Tagged(), // name r0, // actual number of arguments
}; r2, // expected number of arguments
descriptor->Initialize(arraysize(registers), registers, representations, };
&noInlineDescriptor); Representation representations[] = {
} Representation::Tagged(), // context
{ Representation::Tagged(), // JSFunction
CallInterfaceDescriptor* descriptor = Representation::Integer32(), // actual number of arguments
isolate->call_descriptor(CallDescriptorKey::CallHandler); Representation::Integer32(), // expected number of arguments
Register registers[] = { };
cp, // context InitializeData(isolate, key(), arraysize(registers), registers,
r0, // receiver representations, &default_descriptor);
}; }
Representation representations[] = {
Representation::Tagged(), // context
Representation::Tagged(), // receiver void ApiFunctionDescriptor::Initialize(Isolate* isolate) {
}; static PlatformInterfaceDescriptor default_descriptor =
descriptor->Initialize(arraysize(registers), registers, representations, PlatformInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS);
&default_descriptor);
} Register registers[] = {
{ cp, // context
CallInterfaceDescriptor* descriptor = r0, // callee
isolate->call_descriptor(CallDescriptorKey::ApiFunctionCall); r4, // call_data
Register registers[] = { r2, // holder
cp, // context r1, // api_function_address
r0, // callee };
r4, // call_data Representation representations[] = {
r2, // holder Representation::Tagged(), // context
r1, // api_function_address Representation::Tagged(), // callee
}; Representation::Tagged(), // call_data
Representation representations[] = { Representation::Tagged(), // holder
Representation::Tagged(), // context Representation::External(), // api_function_address
Representation::Tagged(), // callee };
Representation::Tagged(), // call_data InitializeData(isolate, key(), arraysize(registers), registers,
Representation::Tagged(), // holder representations, &default_descriptor);
Representation::External(), // api_function_address
};
descriptor->Initialize(arraysize(registers), registers, representations,
&default_descriptor);
}
} }
} }
} // namespace v8::internal } // namespace v8::internal

View File

@ -1082,14 +1082,14 @@ LInstruction* LChunkBuilder::DoCallJSFunction(
LInstruction* LChunkBuilder::DoCallWithDescriptor( LInstruction* LChunkBuilder::DoCallWithDescriptor(
HCallWithDescriptor* instr) { HCallWithDescriptor* instr) {
const CallInterfaceDescriptor* descriptor = instr->descriptor(); CallInterfaceDescriptor descriptor = instr->descriptor();
LOperand* target = UseRegisterOrConstantAtStart(instr->target()); LOperand* target = UseRegisterOrConstantAtStart(instr->target());
ZoneList<LOperand*> ops(instr->OperandCount(), zone()); ZoneList<LOperand*> ops(instr->OperandCount(), zone());
ops.Add(target, zone()); ops.Add(target, zone());
for (int i = 1; i < instr->OperandCount(); i++) { for (int i = 1; i < instr->OperandCount(); i++) {
LOperand* op = UseFixed(instr->OperandAt(i), LOperand* op =
descriptor->GetParameterRegister(i - 1)); UseFixed(instr->OperandAt(i), descriptor.GetParameterRegister(i - 1));
ops.Add(op, zone()); ops.Add(op, zone());
} }
@ -2103,10 +2103,10 @@ LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) {
LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp); LOperand* context = UseFixed(instr->context(), cp);
LOperand* global_object = LOperand* global_object =
UseFixed(instr->global_object(), LoadConvention::ReceiverRegister()); UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister());
LOperand* vector = NULL; LOperand* vector = NULL;
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
vector = FixedTemp(FullVectorLoadConvention::VectorRegister()); vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
} }
LLoadGlobalGeneric* result = LLoadGlobalGeneric* result =
new(zone()) LLoadGlobalGeneric(context, global_object, vector); new(zone()) LLoadGlobalGeneric(context, global_object, vector);
@ -2162,10 +2162,10 @@ LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) {
LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp); LOperand* context = UseFixed(instr->context(), cp);
LOperand* object = LOperand* object =
UseFixed(instr->object(), LoadConvention::ReceiverRegister()); UseFixed(instr->object(), LoadDescriptor::ReceiverRegister());
LOperand* vector = NULL; LOperand* vector = NULL;
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
vector = FixedTemp(FullVectorLoadConvention::VectorRegister()); vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
} }
LInstruction* result = LInstruction* result =
@ -2228,11 +2228,11 @@ LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) {
LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp); LOperand* context = UseFixed(instr->context(), cp);
LOperand* object = LOperand* object =
UseFixed(instr->object(), LoadConvention::ReceiverRegister()); UseFixed(instr->object(), LoadDescriptor::ReceiverRegister());
LOperand* key = UseFixed(instr->key(), LoadConvention::NameRegister()); LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister());
LOperand* vector = NULL; LOperand* vector = NULL;
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
vector = FixedTemp(FullVectorLoadConvention::VectorRegister()); vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
} }
LInstruction* result = LInstruction* result =
@ -2289,9 +2289,9 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp); LOperand* context = UseFixed(instr->context(), cp);
LOperand* obj = LOperand* obj =
UseFixed(instr->object(), StoreConvention::ReceiverRegister()); UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
LOperand* key = UseFixed(instr->key(), StoreConvention::NameRegister()); LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister());
LOperand* val = UseFixed(instr->value(), StoreConvention::ValueRegister()); LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
DCHECK(instr->object()->representation().IsTagged()); DCHECK(instr->object()->representation().IsTagged());
DCHECK(instr->key()->representation().IsTagged()); DCHECK(instr->key()->representation().IsTagged());
@ -2366,8 +2366,8 @@ LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp); LOperand* context = UseFixed(instr->context(), cp);
LOperand* obj = LOperand* obj =
UseFixed(instr->object(), StoreConvention::ReceiverRegister()); UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
LOperand* val = UseFixed(instr->value(), StoreConvention::ValueRegister()); LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
LInstruction* result = new(zone()) LStoreNamedGeneric(context, obj, val); LInstruction* result = new(zone()) LStoreNamedGeneric(context, obj, val);
return MarkAsCall(result, instr); return MarkAsCall(result, instr);

View File

@ -1874,17 +1874,17 @@ class LCallJSFunction FINAL : public LTemplateInstruction<1, 1, 0> {
class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> { class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> {
public: public:
LCallWithDescriptor(const CallInterfaceDescriptor* descriptor, LCallWithDescriptor(CallInterfaceDescriptor descriptor,
const ZoneList<LOperand*>& operands, Zone* zone) const ZoneList<LOperand*>& operands, Zone* zone)
: descriptor_(descriptor), : descriptor_(descriptor),
inputs_(descriptor->GetRegisterParameterCount() + 1, zone) { inputs_(descriptor.GetRegisterParameterCount() + 1, zone) {
DCHECK(descriptor->GetRegisterParameterCount() + 1 == operands.length()); DCHECK(descriptor.GetRegisterParameterCount() + 1 == operands.length());
inputs_.AddAll(operands, zone); inputs_.AddAll(operands, zone);
} }
LOperand* target() const { return inputs_[0]; } LOperand* target() const { return inputs_[0]; }
const CallInterfaceDescriptor* descriptor() { return descriptor_; } const CallInterfaceDescriptor descriptor() { return descriptor_; }
private: private:
DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor") DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor")
@ -1894,7 +1894,7 @@ class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> {
int arity() const { return hydrogen()->argument_count() - 1; } int arity() const { return hydrogen()->argument_count() - 1; }
const CallInterfaceDescriptor* descriptor_; CallInterfaceDescriptor descriptor_;
ZoneList<LOperand*> inputs_; ZoneList<LOperand*> inputs_;
// Iterator support. // Iterator support.

View File

@ -2995,11 +2995,11 @@ template <class T>
void LCodeGen::EmitVectorLoadICRegisters(T* instr) { void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
DCHECK(FLAG_vector_ics); DCHECK(FLAG_vector_ics);
Register vector = ToRegister(instr->temp_vector()); Register vector = ToRegister(instr->temp_vector());
DCHECK(vector.is(FullVectorLoadConvention::VectorRegister())); DCHECK(vector.is(VectorLoadICDescriptor::VectorRegister()));
__ Move(vector, instr->hydrogen()->feedback_vector()); __ Move(vector, instr->hydrogen()->feedback_vector());
// No need to allocate this register. // No need to allocate this register.
DCHECK(FullVectorLoadConvention::SlotRegister().is(r0)); DCHECK(VectorLoadICDescriptor::SlotRegister().is(r0));
__ mov(FullVectorLoadConvention::SlotRegister(), __ mov(VectorLoadICDescriptor::SlotRegister(),
Operand(Smi::FromInt(instr->hydrogen()->slot()))); Operand(Smi::FromInt(instr->hydrogen()->slot())));
} }
@ -3007,10 +3007,10 @@ void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp)); DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->global_object()) DCHECK(ToRegister(instr->global_object())
.is(LoadConvention::ReceiverRegister())); .is(LoadDescriptor::ReceiverRegister()));
DCHECK(ToRegister(instr->result()).is(r0)); DCHECK(ToRegister(instr->result()).is(r0));
__ mov(LoadConvention::NameRegister(), Operand(instr->name())); __ mov(LoadDescriptor::NameRegister(), Operand(instr->name()));
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
} }
@ -3129,11 +3129,11 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp)); DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->object()).is(LoadConvention::ReceiverRegister())); DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
DCHECK(ToRegister(instr->result()).is(r0)); DCHECK(ToRegister(instr->result()).is(r0));
// Name is always in r2. // Name is always in r2.
__ mov(LoadConvention::NameRegister(), Operand(instr->name())); __ mov(LoadDescriptor::NameRegister(), Operand(instr->name()));
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
} }
@ -3421,8 +3421,8 @@ MemOperand LCodeGen::PrepareKeyedOperand(Register key,
void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp)); DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->object()).is(LoadConvention::ReceiverRegister())); DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
DCHECK(ToRegister(instr->key()).is(LoadConvention::NameRegister())); DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister()));
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
@ -3980,7 +3980,7 @@ void LCodeGen::DoCallWithDescriptor(LCallWithDescriptor* instr) {
Handle<Code> code = Handle<Code>::cast(ToHandle(target)); Handle<Code> code = Handle<Code>::cast(ToHandle(target));
generator.BeforeCall(__ CallSize(code, RelocInfo::CODE_TARGET)); generator.BeforeCall(__ CallSize(code, RelocInfo::CODE_TARGET));
PlatformInterfaceDescriptor* call_descriptor = PlatformInterfaceDescriptor* call_descriptor =
instr->descriptor()->platform_specific_descriptor(); instr->descriptor().platform_specific_descriptor();
__ Call(code, RelocInfo::CODE_TARGET, TypeFeedbackId::None(), al, __ Call(code, RelocInfo::CODE_TARGET, TypeFeedbackId::None(), al,
call_descriptor->storage_mode()); call_descriptor->storage_mode());
} else { } else {
@ -4200,10 +4200,10 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp)); DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->object()).is(StoreConvention::ReceiverRegister())); DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
DCHECK(ToRegister(instr->value()).is(StoreConvention::ValueRegister())); DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
__ mov(StoreConvention::NameRegister(), Operand(instr->name())); __ mov(StoreDescriptor::NameRegister(), Operand(instr->name()));
Handle<Code> ic = StoreIC::initialize_stub(isolate(), instr->strict_mode()); Handle<Code> ic = StoreIC::initialize_stub(isolate(), instr->strict_mode());
CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS);
} }
@ -4421,9 +4421,9 @@ void LCodeGen::DoStoreKeyed(LStoreKeyed* instr) {
void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp)); DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->object()).is(StoreConvention::ReceiverRegister())); DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
DCHECK(ToRegister(instr->key()).is(StoreConvention::NameRegister())); DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister()));
DCHECK(ToRegister(instr->value()).is(StoreConvention::ValueRegister())); DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
Handle<Code> ic = instr->strict_mode() == STRICT Handle<Code> ic = instr->strict_mode() == STRICT
? isolate()->builtins()->KeyedStoreIC_Initialize_Strict() ? isolate()->builtins()->KeyedStoreIC_Initialize_Strict()

View File

@ -31,14 +31,12 @@ static void InitializeArrayConstructorDescriptor(
Runtime::kArrayConstructor)->entry; Runtime::kArrayConstructor)->entry;
if (constant_stack_parameter_count == 0) { if (constant_stack_parameter_count == 0) {
CallInterfaceDescriptor* call_descriptor = isolate->call_descriptor( ArrayConstructorConstantArgCountDescriptor call_descriptor(isolate);
CallDescriptorKey::ArrayConstructorConstantArgCountCall);
descriptor->Initialize(major, call_descriptor, deopt_handler, descriptor->Initialize(major, call_descriptor, deopt_handler,
constant_stack_parameter_count, constant_stack_parameter_count,
JS_FUNCTION_STUB_MODE); JS_FUNCTION_STUB_MODE);
} else { } else {
CallInterfaceDescriptor* call_descriptor = ArrayConstructorDescriptor call_descriptor(isolate);
isolate->call_descriptor(CallDescriptorKey::ArrayConstructorCall);
descriptor->Initialize(major, call_descriptor, x0, deopt_handler, descriptor->Initialize(major, call_descriptor, x0, deopt_handler,
constant_stack_parameter_count, constant_stack_parameter_count,
JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS); JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS);
@ -72,14 +70,12 @@ static void InitializeInternalArrayConstructorDescriptor(
Runtime::kInternalArrayConstructor)->entry; Runtime::kInternalArrayConstructor)->entry;
if (constant_stack_parameter_count == 0) { if (constant_stack_parameter_count == 0) {
CallInterfaceDescriptor* call_descriptor = isolate->call_descriptor( InternalArrayConstructorConstantArgCountDescriptor call_descriptor(isolate);
CallDescriptorKey::InternalArrayConstructorConstantArgCountCall);
descriptor->Initialize(major, call_descriptor, deopt_handler, descriptor->Initialize(major, call_descriptor, deopt_handler,
constant_stack_parameter_count, constant_stack_parameter_count,
JS_FUNCTION_STUB_MODE); JS_FUNCTION_STUB_MODE);
} else { } else {
CallInterfaceDescriptor* call_descriptor = isolate->call_descriptor( InternalArrayConstructorDescriptor call_descriptor(isolate);
CallDescriptorKey::InternalArrayConstructorCall);
descriptor->Initialize(major, call_descriptor, x0, deopt_handler, descriptor->Initialize(major, call_descriptor, x0, deopt_handler,
constant_stack_parameter_count, constant_stack_parameter_count,
JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS); JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS);
@ -1430,7 +1426,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
void FunctionPrototypeStub::Generate(MacroAssembler* masm) { void FunctionPrototypeStub::Generate(MacroAssembler* masm) {
Label miss; Label miss;
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, x10, NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, x10,
x11, &miss); x11, &miss);
@ -4294,14 +4290,14 @@ void StubFailureTrampolineStub::Generate(MacroAssembler* masm) {
void LoadICTrampolineStub::Generate(MacroAssembler* masm) { void LoadICTrampolineStub::Generate(MacroAssembler* masm) {
EmitLoadTypeFeedbackVector(masm, FullVectorLoadConvention::VectorRegister()); EmitLoadTypeFeedbackVector(masm, VectorLoadICDescriptor::VectorRegister());
VectorLoadStub stub(isolate(), state()); VectorLoadStub stub(isolate(), state());
__ Jump(stub.GetCode(), RelocInfo::CODE_TARGET); __ Jump(stub.GetCode(), RelocInfo::CODE_TARGET);
} }
void KeyedLoadICTrampolineStub::Generate(MacroAssembler* masm) { void KeyedLoadICTrampolineStub::Generate(MacroAssembler* masm) {
EmitLoadTypeFeedbackVector(masm, FullVectorLoadConvention::VectorRegister()); EmitLoadTypeFeedbackVector(masm, VectorLoadICDescriptor::VectorRegister());
VectorKeyedLoadStub stub(isolate()); VectorKeyedLoadStub stub(isolate());
__ Jump(stub.GetCode(), RelocInfo::CODE_TARGET); __ Jump(stub.GetCode(), RelocInfo::CODE_TARGET);
} }

View File

@ -236,17 +236,17 @@ void DebugCodegen::GenerateCallICStubDebugBreak(MacroAssembler* masm) {
void DebugCodegen::GenerateLoadICDebugBreak(MacroAssembler* masm) { void DebugCodegen::GenerateLoadICDebugBreak(MacroAssembler* masm) {
// Calling convention for IC load (from ic-arm.cc). // Calling convention for IC load (from ic-arm.cc).
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
Register name = LoadConvention::NameRegister(); Register name = LoadDescriptor::NameRegister();
Generate_DebugBreakCallHelper(masm, receiver.Bit() | name.Bit(), 0, x10); Generate_DebugBreakCallHelper(masm, receiver.Bit() | name.Bit(), 0, x10);
} }
void DebugCodegen::GenerateStoreICDebugBreak(MacroAssembler* masm) { void DebugCodegen::GenerateStoreICDebugBreak(MacroAssembler* masm) {
// Calling convention for IC store (from ic-arm64.cc). // Calling convention for IC store (from ic-arm64.cc).
Register receiver = StoreConvention::ReceiverRegister(); Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreConvention::NameRegister(); Register name = StoreDescriptor::NameRegister();
Register value = StoreConvention::ValueRegister(); Register value = StoreDescriptor::ValueRegister();
Generate_DebugBreakCallHelper( Generate_DebugBreakCallHelper(
masm, receiver.Bit() | name.Bit() | value.Bit(), 0, x10); masm, receiver.Bit() | name.Bit() | value.Bit(), 0, x10);
} }
@ -260,9 +260,9 @@ void DebugCodegen::GenerateKeyedLoadICDebugBreak(MacroAssembler* masm) {
void DebugCodegen::GenerateKeyedStoreICDebugBreak(MacroAssembler* masm) { void DebugCodegen::GenerateKeyedStoreICDebugBreak(MacroAssembler* masm) {
// Calling convention for IC keyed store call (from ic-arm64.cc). // Calling convention for IC keyed store call (from ic-arm64.cc).
Register receiver = StoreConvention::ReceiverRegister(); Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreConvention::NameRegister(); Register name = StoreDescriptor::NameRegister();
Register value = StoreConvention::ValueRegister(); Register value = StoreDescriptor::ValueRegister();
Generate_DebugBreakCallHelper( Generate_DebugBreakCallHelper(
masm, receiver.Bit() | name.Bit() | value.Bit(), 0, x10); masm, receiver.Bit() | name.Bit() | value.Bit(), 0, x10);
} }

View File

@ -1383,10 +1383,10 @@ void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy,
__ Bind(&fast); __ Bind(&fast);
} }
__ Ldr(LoadConvention::ReceiverRegister(), GlobalObjectMemOperand()); __ Ldr(LoadDescriptor::ReceiverRegister(), GlobalObjectMemOperand());
__ Mov(LoadConvention::NameRegister(), Operand(proxy->var()->name())); __ Mov(LoadDescriptor::NameRegister(), Operand(proxy->var()->name()));
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
__ Mov(VectorLoadConvention::SlotRegister(), __ Mov(VectorLoadICDescriptor::SlotRegister(),
Smi::FromInt(proxy->VariableFeedbackSlot())); Smi::FromInt(proxy->VariableFeedbackSlot()));
} }
@ -1468,10 +1468,10 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
switch (var->location()) { switch (var->location()) {
case Variable::UNALLOCATED: { case Variable::UNALLOCATED: {
Comment cmnt(masm_, "Global variable"); Comment cmnt(masm_, "Global variable");
__ Ldr(LoadConvention::ReceiverRegister(), GlobalObjectMemOperand()); __ Ldr(LoadDescriptor::ReceiverRegister(), GlobalObjectMemOperand());
__ Mov(LoadConvention::NameRegister(), Operand(var->name())); __ Mov(LoadDescriptor::NameRegister(), Operand(var->name()));
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
__ Mov(VectorLoadConvention::SlotRegister(), __ Mov(VectorLoadICDescriptor::SlotRegister(),
Smi::FromInt(proxy->VariableFeedbackSlot())); Smi::FromInt(proxy->VariableFeedbackSlot()));
} }
CallLoadIC(CONTEXTUAL); CallLoadIC(CONTEXTUAL);
@ -1681,9 +1681,9 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
if (key->value()->IsInternalizedString()) { if (key->value()->IsInternalizedString()) {
if (property->emit_store()) { if (property->emit_store()) {
VisitForAccumulatorValue(value); VisitForAccumulatorValue(value);
DCHECK(StoreConvention::ValueRegister().is(x0)); DCHECK(StoreDescriptor::ValueRegister().is(x0));
__ Mov(StoreConvention::NameRegister(), Operand(key->value())); __ Mov(StoreDescriptor::NameRegister(), Operand(key->value()));
__ Peek(StoreConvention::ReceiverRegister(), 0); __ Peek(StoreDescriptor::ReceiverRegister(), 0);
CallStoreIC(key->LiteralFeedbackId()); CallStoreIC(key->LiteralFeedbackId());
PrepareForBailoutForId(key->id(), NO_REGISTERS); PrepareForBailoutForId(key->id(), NO_REGISTERS);
} else { } else {
@ -1861,7 +1861,7 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) {
if (expr->is_compound()) { if (expr->is_compound()) {
// We need the receiver both on the stack and in the register. // We need the receiver both on the stack and in the register.
VisitForStackValue(property->obj()); VisitForStackValue(property->obj());
__ Peek(LoadConvention::ReceiverRegister(), 0); __ Peek(LoadDescriptor::ReceiverRegister(), 0);
} else { } else {
VisitForStackValue(property->obj()); VisitForStackValue(property->obj());
} }
@ -1870,8 +1870,8 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) {
if (expr->is_compound()) { if (expr->is_compound()) {
VisitForStackValue(property->obj()); VisitForStackValue(property->obj());
VisitForStackValue(property->key()); VisitForStackValue(property->key());
__ Peek(LoadConvention::ReceiverRegister(), 1 * kPointerSize); __ Peek(LoadDescriptor::ReceiverRegister(), 1 * kPointerSize);
__ Peek(LoadConvention::NameRegister(), 0); __ Peek(LoadDescriptor::NameRegister(), 0);
} else { } else {
VisitForStackValue(property->obj()); VisitForStackValue(property->obj());
VisitForStackValue(property->key()); VisitForStackValue(property->key());
@ -1948,9 +1948,9 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) {
void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) { void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
SetSourcePosition(prop->position()); SetSourcePosition(prop->position());
Literal* key = prop->key()->AsLiteral(); Literal* key = prop->key()->AsLiteral();
__ Mov(LoadConvention::NameRegister(), Operand(key->value())); __ Mov(LoadDescriptor::NameRegister(), Operand(key->value()));
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
__ Mov(VectorLoadConvention::SlotRegister(), __ Mov(VectorLoadICDescriptor::SlotRegister(),
Smi::FromInt(prop->PropertyFeedbackSlot())); Smi::FromInt(prop->PropertyFeedbackSlot()));
CallLoadIC(NOT_CONTEXTUAL); CallLoadIC(NOT_CONTEXTUAL);
} else { } else {
@ -1964,7 +1964,7 @@ void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
// Call keyed load IC. It has arguments key and receiver in r0 and r1. // Call keyed load IC. It has arguments key and receiver in r0 and r1.
Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
__ Mov(VectorLoadConvention::SlotRegister(), __ Mov(VectorLoadICDescriptor::SlotRegister(),
Smi::FromInt(prop->PropertyFeedbackSlot())); Smi::FromInt(prop->PropertyFeedbackSlot()));
CallIC(ic); CallIC(ic);
} else { } else {
@ -2113,9 +2113,9 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) {
VisitForAccumulatorValue(prop->obj()); VisitForAccumulatorValue(prop->obj());
// TODO(all): We could introduce a VisitForRegValue(reg, expr) to avoid // TODO(all): We could introduce a VisitForRegValue(reg, expr) to avoid
// this copy. // this copy.
__ Mov(StoreConvention::ReceiverRegister(), x0); __ Mov(StoreDescriptor::ReceiverRegister(), x0);
__ Pop(StoreConvention::ValueRegister()); // Restore value. __ Pop(StoreDescriptor::ValueRegister()); // Restore value.
__ Mov(StoreConvention::NameRegister(), __ Mov(StoreDescriptor::NameRegister(),
Operand(prop->key()->AsLiteral()->value())); Operand(prop->key()->AsLiteral()->value()));
CallStoreIC(); CallStoreIC();
break; break;
@ -2124,9 +2124,9 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) {
__ Push(x0); // Preserve value. __ Push(x0); // Preserve value.
VisitForStackValue(prop->obj()); VisitForStackValue(prop->obj());
VisitForAccumulatorValue(prop->key()); VisitForAccumulatorValue(prop->key());
__ Mov(StoreConvention::NameRegister(), x0); __ Mov(StoreDescriptor::NameRegister(), x0);
__ Pop(StoreConvention::ReceiverRegister(), __ Pop(StoreDescriptor::ReceiverRegister(),
StoreConvention::ValueRegister()); StoreDescriptor::ValueRegister());
Handle<Code> ic = strict_mode() == SLOPPY Handle<Code> ic = strict_mode() == SLOPPY
? isolate()->builtins()->KeyedStoreIC_Initialize() ? isolate()->builtins()->KeyedStoreIC_Initialize()
: isolate()->builtins()->KeyedStoreIC_Initialize_Strict(); : isolate()->builtins()->KeyedStoreIC_Initialize_Strict();
@ -2156,8 +2156,8 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var,
ASM_LOCATION("FullCodeGenerator::EmitVariableAssignment"); ASM_LOCATION("FullCodeGenerator::EmitVariableAssignment");
if (var->IsUnallocated()) { if (var->IsUnallocated()) {
// Global var, const, or let. // Global var, const, or let.
__ Mov(StoreConvention::NameRegister(), Operand(var->name())); __ Mov(StoreDescriptor::NameRegister(), Operand(var->name()));
__ Ldr(StoreConvention::ReceiverRegister(), GlobalObjectMemOperand()); __ Ldr(StoreDescriptor::ReceiverRegister(), GlobalObjectMemOperand());
CallStoreIC(); CallStoreIC();
} else if (op == Token::INIT_CONST_LEGACY) { } else if (op == Token::INIT_CONST_LEGACY) {
@ -2229,9 +2229,9 @@ void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) {
// Record source code position before IC call. // Record source code position before IC call.
SetSourcePosition(expr->position()); SetSourcePosition(expr->position());
__ Mov(StoreConvention::NameRegister(), __ Mov(StoreDescriptor::NameRegister(),
Operand(prop->key()->AsLiteral()->value())); Operand(prop->key()->AsLiteral()->value()));
__ Pop(StoreConvention::ReceiverRegister()); __ Pop(StoreDescriptor::ReceiverRegister());
CallStoreIC(expr->AssignmentFeedbackId()); CallStoreIC(expr->AssignmentFeedbackId());
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); PrepareForBailoutForId(expr->AssignmentId(), TOS_REG);
@ -2246,8 +2246,8 @@ void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) {
// Record source code position before IC call. // Record source code position before IC call.
SetSourcePosition(expr->position()); SetSourcePosition(expr->position());
// TODO(all): Could we pass this in registers rather than on the stack? // TODO(all): Could we pass this in registers rather than on the stack?
__ Pop(StoreConvention::NameRegister(), StoreConvention::ReceiverRegister()); __ Pop(StoreDescriptor::NameRegister(), StoreDescriptor::ReceiverRegister());
DCHECK(StoreConvention::ValueRegister().is(x0)); DCHECK(StoreDescriptor::ValueRegister().is(x0));
Handle<Code> ic = strict_mode() == SLOPPY Handle<Code> ic = strict_mode() == SLOPPY
? isolate()->builtins()->KeyedStoreIC_Initialize() ? isolate()->builtins()->KeyedStoreIC_Initialize()
@ -2265,15 +2265,15 @@ void FullCodeGenerator::VisitProperty(Property* expr) {
if (key->IsPropertyName()) { if (key->IsPropertyName()) {
VisitForAccumulatorValue(expr->obj()); VisitForAccumulatorValue(expr->obj());
__ Move(LoadConvention::ReceiverRegister(), x0); __ Move(LoadDescriptor::ReceiverRegister(), x0);
EmitNamedPropertyLoad(expr); EmitNamedPropertyLoad(expr);
PrepareForBailoutForId(expr->LoadId(), TOS_REG); PrepareForBailoutForId(expr->LoadId(), TOS_REG);
context()->Plug(x0); context()->Plug(x0);
} else { } else {
VisitForStackValue(expr->obj()); VisitForStackValue(expr->obj());
VisitForAccumulatorValue(expr->key()); VisitForAccumulatorValue(expr->key());
__ Move(LoadConvention::NameRegister(), x0); __ Move(LoadDescriptor::NameRegister(), x0);
__ Pop(LoadConvention::ReceiverRegister()); __ Pop(LoadDescriptor::ReceiverRegister());
EmitKeyedPropertyLoad(expr); EmitKeyedPropertyLoad(expr);
context()->Plug(x0); context()->Plug(x0);
} }
@ -2309,7 +2309,7 @@ void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) {
} else { } else {
// Load the function from the receiver. // Load the function from the receiver.
DCHECK(callee->IsProperty()); DCHECK(callee->IsProperty());
__ Peek(LoadConvention::ReceiverRegister(), 0); __ Peek(LoadDescriptor::ReceiverRegister(), 0);
EmitNamedPropertyLoad(callee->AsProperty()); EmitNamedPropertyLoad(callee->AsProperty());
PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG); PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG);
// Push the target function under the receiver. // Push the target function under the receiver.
@ -2331,8 +2331,8 @@ void FullCodeGenerator::EmitKeyedCallWithLoadIC(Call* expr,
// Load the function from the receiver. // Load the function from the receiver.
DCHECK(callee->IsProperty()); DCHECK(callee->IsProperty());
__ Peek(LoadConvention::ReceiverRegister(), 0); __ Peek(LoadDescriptor::ReceiverRegister(), 0);
__ Move(LoadConvention::NameRegister(), x0); __ Move(LoadDescriptor::NameRegister(), x0);
EmitKeyedPropertyLoad(callee->AsProperty()); EmitKeyedPropertyLoad(callee->AsProperty());
PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG); PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG);
@ -3748,15 +3748,15 @@ void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) {
if (expr->is_jsruntime()) { if (expr->is_jsruntime()) {
// Push the builtins object as the receiver. // Push the builtins object as the receiver.
__ Ldr(x10, GlobalObjectMemOperand()); __ Ldr(x10, GlobalObjectMemOperand());
__ Ldr(LoadConvention::ReceiverRegister(), __ Ldr(LoadDescriptor::ReceiverRegister(),
FieldMemOperand(x10, GlobalObject::kBuiltinsOffset)); FieldMemOperand(x10, GlobalObject::kBuiltinsOffset));
__ Push(LoadConvention::ReceiverRegister()); __ Push(LoadDescriptor::ReceiverRegister());
// Load the function from the receiver. // Load the function from the receiver.
Handle<String> name = expr->name(); Handle<String> name = expr->name();
__ Mov(LoadConvention::NameRegister(), Operand(name)); __ Mov(LoadDescriptor::NameRegister(), Operand(name));
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
__ Mov(VectorLoadConvention::SlotRegister(), __ Mov(VectorLoadICDescriptor::SlotRegister(),
Smi::FromInt(expr->CallRuntimeFeedbackSlot())); Smi::FromInt(expr->CallRuntimeFeedbackSlot()));
CallLoadIC(NOT_CONTEXTUAL); CallLoadIC(NOT_CONTEXTUAL);
} else { } else {
@ -3936,14 +3936,14 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
if (assign_type == NAMED_PROPERTY) { if (assign_type == NAMED_PROPERTY) {
// Put the object both on the stack and in the register. // Put the object both on the stack and in the register.
VisitForStackValue(prop->obj()); VisitForStackValue(prop->obj());
__ Peek(LoadConvention::ReceiverRegister(), 0); __ Peek(LoadDescriptor::ReceiverRegister(), 0);
EmitNamedPropertyLoad(prop); EmitNamedPropertyLoad(prop);
} else { } else {
// KEYED_PROPERTY // KEYED_PROPERTY
VisitForStackValue(prop->obj()); VisitForStackValue(prop->obj());
VisitForStackValue(prop->key()); VisitForStackValue(prop->key());
__ Peek(LoadConvention::ReceiverRegister(), 1 * kPointerSize); __ Peek(LoadDescriptor::ReceiverRegister(), 1 * kPointerSize);
__ Peek(LoadConvention::NameRegister(), 0); __ Peek(LoadDescriptor::NameRegister(), 0);
EmitKeyedPropertyLoad(prop); EmitKeyedPropertyLoad(prop);
} }
} }
@ -4053,9 +4053,9 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
} }
break; break;
case NAMED_PROPERTY: { case NAMED_PROPERTY: {
__ Mov(StoreConvention::NameRegister(), __ Mov(StoreDescriptor::NameRegister(),
Operand(prop->key()->AsLiteral()->value())); Operand(prop->key()->AsLiteral()->value()));
__ Pop(StoreConvention::ReceiverRegister()); __ Pop(StoreDescriptor::ReceiverRegister());
CallStoreIC(expr->CountStoreFeedbackId()); CallStoreIC(expr->CountStoreFeedbackId());
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); PrepareForBailoutForId(expr->AssignmentId(), TOS_REG);
if (expr->is_postfix()) { if (expr->is_postfix()) {
@ -4068,8 +4068,8 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
break; break;
} }
case KEYED_PROPERTY: { case KEYED_PROPERTY: {
__ Pop(StoreConvention::NameRegister()); __ Pop(StoreDescriptor::NameRegister());
__ Pop(StoreConvention::ReceiverRegister()); __ Pop(StoreDescriptor::ReceiverRegister());
Handle<Code> ic = strict_mode() == SLOPPY Handle<Code> ic = strict_mode() == SLOPPY
? isolate()->builtins()->KeyedStoreIC_Initialize() ? isolate()->builtins()->KeyedStoreIC_Initialize()
: isolate()->builtins()->KeyedStoreIC_Initialize_Strict(); : isolate()->builtins()->KeyedStoreIC_Initialize_Strict();
@ -4094,10 +4094,10 @@ void FullCodeGenerator::VisitForTypeofValue(Expression* expr) {
VariableProxy* proxy = expr->AsVariableProxy(); VariableProxy* proxy = expr->AsVariableProxy();
if (proxy != NULL && proxy->var()->IsUnallocated()) { if (proxy != NULL && proxy->var()->IsUnallocated()) {
Comment cmnt(masm_, "Global variable"); Comment cmnt(masm_, "Global variable");
__ Ldr(LoadConvention::ReceiverRegister(), GlobalObjectMemOperand()); __ Ldr(LoadDescriptor::ReceiverRegister(), GlobalObjectMemOperand());
__ Mov(LoadConvention::NameRegister(), Operand(proxy->name())); __ Mov(LoadDescriptor::NameRegister(), Operand(proxy->name()));
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
__ Mov(VectorLoadConvention::SlotRegister(), __ Mov(VectorLoadICDescriptor::SlotRegister(),
Smi::FromInt(proxy->VariableFeedbackSlot())); Smi::FromInt(proxy->VariableFeedbackSlot()));
} }
// Use a regular load, not a contextual load, to avoid a reference // Use a regular load, not a contextual load, to avoid a reference
@ -4392,8 +4392,8 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
Label l_catch, l_try, l_suspend, l_continuation, l_resume; Label l_catch, l_try, l_suspend, l_continuation, l_resume;
Label l_next, l_call, l_loop; Label l_next, l_call, l_loop;
Register load_receiver = LoadConvention::ReceiverRegister(); Register load_receiver = LoadDescriptor::ReceiverRegister();
Register load_name = LoadConvention::NameRegister(); Register load_name = LoadDescriptor::NameRegister();
// Initial send value is undefined. // Initial send value is undefined.
__ LoadRoot(x0, Heap::kUndefinedValueRootIndex); __ LoadRoot(x0, Heap::kUndefinedValueRootIndex);
@ -4453,7 +4453,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ Peek(load_receiver, 1 * kPointerSize); __ Peek(load_receiver, 1 * kPointerSize);
__ Peek(load_name, 2 * kPointerSize); __ Peek(load_name, 2 * kPointerSize);
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
__ Mov(VectorLoadConvention::SlotRegister(), __ Mov(VectorLoadICDescriptor::SlotRegister(),
Smi::FromInt(expr->KeyedLoadFeedbackSlot())); Smi::FromInt(expr->KeyedLoadFeedbackSlot()));
} }
Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
@ -4473,7 +4473,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ Push(load_receiver); // save result __ Push(load_receiver); // save result
__ LoadRoot(load_name, Heap::kdone_stringRootIndex); // "done" __ LoadRoot(load_name, Heap::kdone_stringRootIndex); // "done"
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
__ Mov(VectorLoadConvention::SlotRegister(), __ Mov(VectorLoadICDescriptor::SlotRegister(),
Smi::FromInt(expr->DoneFeedbackSlot())); Smi::FromInt(expr->DoneFeedbackSlot()));
} }
CallLoadIC(NOT_CONTEXTUAL); // x0=result.done CallLoadIC(NOT_CONTEXTUAL); // x0=result.done
@ -4486,7 +4486,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ Pop(load_receiver); // result __ Pop(load_receiver); // result
__ LoadRoot(load_name, Heap::kvalue_stringRootIndex); // "value" __ LoadRoot(load_name, Heap::kvalue_stringRootIndex); // "value"
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
__ Mov(VectorLoadConvention::SlotRegister(), __ Mov(VectorLoadICDescriptor::SlotRegister(),
Smi::FromInt(expr->ValueFeedbackSlot())); Smi::FromInt(expr->ValueFeedbackSlot()));
} }
CallLoadIC(NOT_CONTEXTUAL); // x0=result.value CallLoadIC(NOT_CONTEXTUAL); // x0=result.value

View File

@ -14,282 +14,341 @@ namespace internal {
const Register CallInterfaceDescriptor::ContextRegister() { return cp; } const Register CallInterfaceDescriptor::ContextRegister() { return cp; }
void CallDescriptors::InitializeForIsolate(Isolate* isolate) { const Register LoadDescriptor::ReceiverRegister() { return x1; }
static PlatformInterfaceDescriptor default_descriptor = const Register LoadDescriptor::NameRegister() { return x2; }
PlatformInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS);
const Register VectorLoadICDescriptor::ReceiverRegister() {
return LoadDescriptor::ReceiverRegister();
}
const Register VectorLoadICDescriptor::NameRegister() {
return LoadDescriptor::NameRegister();
}
const Register VectorLoadICDescriptor::SlotRegister() { return x0; }
const Register VectorLoadICDescriptor::VectorRegister() { return x3; }
const Register StoreDescriptor::ReceiverRegister() { return x1; }
const Register StoreDescriptor::NameRegister() { return x2; }
const Register StoreDescriptor::ValueRegister() { return x0; }
const Register ElementTransitionAndStoreDescriptor::ReceiverRegister() {
return StoreDescriptor::ReceiverRegister();
}
const Register ElementTransitionAndStoreDescriptor::NameRegister() {
return StoreDescriptor::NameRegister();
}
const Register ElementTransitionAndStoreDescriptor::ValueRegister() {
return StoreDescriptor::ValueRegister();
}
const Register ElementTransitionAndStoreDescriptor::MapRegister() { return x3; }
const Register InstanceofDescriptor::left() {
// Object to check (instanceof lhs).
return x11;
}
const Register InstanceofDescriptor::right() {
// Constructor function (instanceof rhs).
return x10;
}
void FastNewClosureDescriptor::Initialize(Isolate* isolate) {
// cp: context
// x2: function info
Register registers[] = {cp, x2};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void FastNewContextDescriptor::Initialize(Isolate* isolate) {
// cp: context
// x1: function
Register registers[] = {cp, x1};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void ToNumberDescriptor::Initialize(Isolate* isolate) {
// cp: context
// x0: value
Register registers[] = {cp, x0};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void NumberToStringDescriptor::Initialize(Isolate* isolate) {
// cp: context
// x0: value
Register registers[] = {cp, x0};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void FastCloneShallowArrayDescriptor::Initialize(Isolate* isolate) {
// cp: context
// x3: array literals array
// x2: array literal index
// x1: constant elements
Register registers[] = {cp, x3, x2, x1};
Representation representations[] = {
Representation::Tagged(), Representation::Tagged(), Representation::Smi(),
Representation::Tagged()};
InitializeData(isolate, key(), arraysize(registers), registers,
representations);
}
void FastCloneShallowObjectDescriptor::Initialize(Isolate* isolate) {
// cp: context
// x3: object literals array
// x2: object literal index
// x1: constant properties
// x0: object literal flags
Register registers[] = {cp, x3, x2, x1, x0};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void CreateAllocationSiteDescriptor::Initialize(Isolate* isolate) {
// cp: context
// x2: feedback vector
// x3: call feedback slot
Register registers[] = {cp, x2, x3};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void CallFunctionDescriptor::Initialize(Isolate* isolate) {
// x1 function the function to call
Register registers[] = {cp, x1};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void CallConstructDescriptor::Initialize(Isolate* isolate) {
// x0 : number of arguments
// x1 : the function to call
// x2 : feedback vector
// x3 : slot in feedback vector (smi) (if r2 is not the megamorphic symbol)
// TODO(turbofan): So far we don't gather type feedback and hence skip the
// slot parameter, but ArrayConstructStub needs the vector to be undefined.
Register registers[] = {cp, x0, x1, x2};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void RegExpConstructResultDescriptor::Initialize(Isolate* isolate) {
// cp: context
// x2: length
// x1: index (of last match)
// x0: string
Register registers[] = {cp, x2, x1, x0};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void TransitionElementsKindDescriptor::Initialize(Isolate* isolate) {
// cp: context
// x0: value (js_array)
// x1: to_map
Register registers[] = {cp, x0, x1};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void ArrayConstructorConstantArgCountDescriptor::Initialize(Isolate* isolate) {
// cp: context
// x1: function
// x2: allocation site with elements kind
// x0: number of arguments to the constructor function
Register registers[] = {cp, x1, x2};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void ArrayConstructorDescriptor::Initialize(Isolate* isolate) {
// stack param count needs (constructor pointer, and single argument)
Register registers[] = {cp, x1, x2, x0};
Representation representations[] = {
Representation::Tagged(), Representation::Tagged(),
Representation::Tagged(), Representation::Integer32()};
InitializeData(isolate, key(), arraysize(registers), registers,
representations);
}
void InternalArrayConstructorConstantArgCountDescriptor::Initialize(
Isolate* isolate) {
// cp: context
// x1: constructor function
// x0: number of arguments to the constructor function
Register registers[] = {cp, x1};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void InternalArrayConstructorDescriptor::Initialize(Isolate* isolate) {
// stack param count needs (constructor pointer, and single argument)
Register registers[] = {cp, x1, x0};
Representation representations[] = {Representation::Tagged(),
Representation::Tagged(),
Representation::Integer32()};
InitializeData(isolate, key(), arraysize(registers), registers,
representations);
}
void CompareNilDescriptor::Initialize(Isolate* isolate) {
// cp: context
// x0: value to compare
Register registers[] = {cp, x0};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void ToBooleanDescriptor::Initialize(Isolate* isolate) {
// cp: context
// x0: value
Register registers[] = {cp, x0};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void BinaryOpDescriptor::Initialize(Isolate* isolate) {
// cp: context
// x1: left operand
// x0: right operand
Register registers[] = {cp, x1, x0};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void BinaryOpWithAllocationSiteDescriptor::Initialize(Isolate* isolate) {
// cp: context
// x2: allocation site
// x1: left operand
// x0: right operand
Register registers[] = {cp, x2, x1, x0};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void StringAddDescriptor::Initialize(Isolate* isolate) {
// cp: context
// x1: left operand
// x0: right operand
Register registers[] = {cp, x1, x0};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void KeyedDescriptor::Initialize(Isolate* isolate) {
static PlatformInterfaceDescriptor noInlineDescriptor = static PlatformInterfaceDescriptor noInlineDescriptor =
PlatformInterfaceDescriptor(NEVER_INLINE_TARGET_ADDRESS); PlatformInterfaceDescriptor(NEVER_INLINE_TARGET_ADDRESS);
InitializeForIsolateAllPlatforms(isolate); Register registers[] = {
cp, // context
x2, // key
};
Representation representations[] = {
Representation::Tagged(), // context
Representation::Tagged(), // key
};
InitializeData(isolate, key(), arraysize(registers), registers,
representations, &noInlineDescriptor);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::FastNewClosureCall);
// cp: context
// x2: function info
Register registers[] = {cp, x2};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::FastNewContextCall);
// cp: context
// x1: function
Register registers[] = {cp, x1};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::ToNumberCall);
// cp: context
// x0: value
Register registers[] = {cp, x0};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::NumberToStringCall);
// cp: context
// x0: value
Register registers[] = {cp, x0};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::FastCloneShallowArrayCall);
// cp: context
// x3: array literals array
// x2: array literal index
// x1: constant elements
Register registers[] = {cp, x3, x2, x1};
Representation representations[] = {
Representation::Tagged(), Representation::Tagged(),
Representation::Smi(), Representation::Tagged()};
descriptor->Initialize(arraysize(registers), registers, representations);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::FastCloneShallowObjectCall);
// cp: context
// x3: object literals array
// x2: object literal index
// x1: constant properties
// x0: object literal flags
Register registers[] = {cp, x3, x2, x1, x0};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::CreateAllocationSiteCall);
// cp: context
// x2: feedback vector
// x3: call feedback slot
Register registers[] = {cp, x2, x3};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::CallFunctionCall);
// x1 function the function to call
Register registers[] = {cp, x1};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::CallConstructCall);
// x0 : number of arguments
// x1 : the function to call
// x2 : feedback vector
// x3 : slot in feedback vector (smi) (if r2 is not the megamorphic symbol)
// TODO(turbofan): So far we don't gather type feedback and hence skip the
// slot parameter, but ArrayConstructStub needs the vector to be undefined.
Register registers[] = {cp, x0, x1, x2};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::RegExpConstructResultCall);
// cp: context
// x2: length
// x1: index (of last match)
// x0: string
Register registers[] = {cp, x2, x1, x0};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::TransitionElementsKindCall);
// cp: context
// x0: value (js_array)
// x1: to_map
Register registers[] = {cp, x0, x1};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor = isolate->call_descriptor(
CallDescriptorKey::ArrayConstructorConstantArgCountCall);
// cp: context
// x1: function
// x2: allocation site with elements kind
// x0: number of arguments to the constructor function
Register registers[] = {cp, x1, x2};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::ArrayConstructorCall);
// stack param count needs (constructor pointer, and single argument)
Register registers[] = {cp, x1, x2, x0};
Representation representations[] = {
Representation::Tagged(), Representation::Tagged(),
Representation::Tagged(), Representation::Integer32()};
descriptor->Initialize(arraysize(registers), registers, representations);
}
{
CallInterfaceDescriptor* descriptor = isolate->call_descriptor(
CallDescriptorKey::InternalArrayConstructorConstantArgCountCall);
// cp: context
// x1: constructor function
// x0: number of arguments to the constructor function
Register registers[] = {cp, x1};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor = isolate->call_descriptor(
CallDescriptorKey::InternalArrayConstructorCall);
// stack param count needs (constructor pointer, and single argument)
Register registers[] = {cp, x1, x0};
Representation representations[] = {Representation::Tagged(),
Representation::Tagged(),
Representation::Integer32()};
descriptor->Initialize(arraysize(registers), registers, representations);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::CompareNilCall);
// cp: context
// x0: value to compare
Register registers[] = {cp, x0};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::ToBooleanCall);
// cp: context
// x0: value
Register registers[] = {cp, x0};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::BinaryOpCall);
// cp: context
// x1: left operand
// x0: right operand
Register registers[] = {cp, x1, x0};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor = isolate->call_descriptor(
CallDescriptorKey::BinaryOpWithAllocationSiteCall);
// cp: context
// x2: allocation site
// x1: left operand
// x0: right operand
Register registers[] = {cp, x2, x1, x0};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::StringAddCall);
// cp: context
// x1: left operand
// x0: right operand
Register registers[] = {cp, x1, x0};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{ void NamedDescriptor::Initialize(Isolate* isolate) {
CallInterfaceDescriptor* descriptor = static PlatformInterfaceDescriptor noInlineDescriptor =
isolate->call_descriptor(CallDescriptorKey::ArgumentAdaptorCall); PlatformInterfaceDescriptor(NEVER_INLINE_TARGET_ADDRESS);
Register registers[] = {
cp, // context Register registers[] = {
x1, // JSFunction cp, // context
x0, // actual number of arguments x2, // name
x2, // expected number of arguments };
}; Representation representations[] = {
Representation representations[] = { Representation::Tagged(), // context
Representation::Tagged(), // context Representation::Tagged(), // name
Representation::Tagged(), // JSFunction };
Representation::Integer32(), // actual number of arguments InitializeData(isolate, key(), arraysize(registers), registers,
Representation::Integer32(), // expected number of arguments representations, &noInlineDescriptor);
}; }
descriptor->Initialize(arraysize(registers), registers, representations,
&default_descriptor);
} void CallHandlerDescriptor::Initialize(Isolate* isolate) {
{ static PlatformInterfaceDescriptor default_descriptor =
CallInterfaceDescriptor* descriptor = PlatformInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS);
isolate->call_descriptor(CallDescriptorKey::KeyedCall);
Register registers[] = { Register registers[] = {
cp, // context cp, // context
x2, // key x0, // receiver
}; };
Representation representations[] = { Representation representations[] = {
Representation::Tagged(), // context Representation::Tagged(), // context
Representation::Tagged(), // key Representation::Tagged(), // receiver
}; };
descriptor->Initialize(arraysize(registers), registers, representations, InitializeData(isolate, key(), arraysize(registers), registers,
&noInlineDescriptor); representations, &default_descriptor);
} }
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::NamedCall); void ArgumentAdaptorDescriptor::Initialize(Isolate* isolate) {
Register registers[] = { static PlatformInterfaceDescriptor default_descriptor =
cp, // context PlatformInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS);
x2, // name
}; Register registers[] = {
Representation representations[] = { cp, // context
Representation::Tagged(), // context x1, // JSFunction
Representation::Tagged(), // name x0, // actual number of arguments
}; x2, // expected number of arguments
descriptor->Initialize(arraysize(registers), registers, representations, };
&noInlineDescriptor); Representation representations[] = {
} Representation::Tagged(), // context
{ Representation::Tagged(), // JSFunction
CallInterfaceDescriptor* descriptor = Representation::Integer32(), // actual number of arguments
isolate->call_descriptor(CallDescriptorKey::CallHandler); Representation::Integer32(), // expected number of arguments
Register registers[] = { };
cp, // context InitializeData(isolate, key(), arraysize(registers), registers,
x0, // receiver representations, &default_descriptor);
}; }
Representation representations[] = {
Representation::Tagged(), // context
Representation::Tagged(), // receiver void ApiFunctionDescriptor::Initialize(Isolate* isolate) {
}; static PlatformInterfaceDescriptor default_descriptor =
descriptor->Initialize(arraysize(registers), registers, representations, PlatformInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS);
&default_descriptor);
} Register registers[] = {
{ cp, // context
CallInterfaceDescriptor* descriptor = x0, // callee
isolate->call_descriptor(CallDescriptorKey::ApiFunctionCall); x4, // call_data
Register registers[] = { x2, // holder
cp, // context x1, // api_function_address
x0, // callee };
x4, // call_data Representation representations[] = {
x2, // holder Representation::Tagged(), // context
x1, // api_function_address Representation::Tagged(), // callee
}; Representation::Tagged(), // call_data
Representation representations[] = { Representation::Tagged(), // holder
Representation::Tagged(), // context Representation::External(), // api_function_address
Representation::Tagged(), // callee };
Representation::Tagged(), // call_data InitializeData(isolate, key(), arraysize(registers), registers,
Representation::Tagged(), // holder representations, &default_descriptor);
Representation::External(), // api_function_address
};
descriptor->Initialize(arraysize(registers), registers, representations,
&default_descriptor);
}
} }
} }
} // namespace v8::internal } // namespace v8::internal

View File

@ -1036,14 +1036,14 @@ LInstruction* LChunkBuilder::DoCallJSFunction(
LInstruction* LChunkBuilder::DoCallWithDescriptor( LInstruction* LChunkBuilder::DoCallWithDescriptor(
HCallWithDescriptor* instr) { HCallWithDescriptor* instr) {
const CallInterfaceDescriptor* descriptor = instr->descriptor(); CallInterfaceDescriptor descriptor = instr->descriptor();
LOperand* target = UseRegisterOrConstantAtStart(instr->target()); LOperand* target = UseRegisterOrConstantAtStart(instr->target());
ZoneList<LOperand*> ops(instr->OperandCount(), zone()); ZoneList<LOperand*> ops(instr->OperandCount(), zone());
ops.Add(target, zone()); ops.Add(target, zone());
for (int i = 1; i < instr->OperandCount(); i++) { for (int i = 1; i < instr->OperandCount(); i++) {
LOperand* op = UseFixed(instr->OperandAt(i), LOperand* op =
descriptor->GetParameterRegister(i - 1)); UseFixed(instr->OperandAt(i), descriptor.GetParameterRegister(i - 1));
ops.Add(op, zone()); ops.Add(op, zone());
} }
@ -1665,10 +1665,10 @@ LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) {
LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp); LOperand* context = UseFixed(instr->context(), cp);
LOperand* global_object = LOperand* global_object =
UseFixed(instr->global_object(), LoadConvention::ReceiverRegister()); UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister());
LOperand* vector = NULL; LOperand* vector = NULL;
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
vector = FixedTemp(FullVectorLoadConvention::VectorRegister()); vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
} }
LLoadGlobalGeneric* result = LLoadGlobalGeneric* result =
@ -1727,11 +1727,11 @@ LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) {
LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp); LOperand* context = UseFixed(instr->context(), cp);
LOperand* object = LOperand* object =
UseFixed(instr->object(), LoadConvention::ReceiverRegister()); UseFixed(instr->object(), LoadDescriptor::ReceiverRegister());
LOperand* key = UseFixed(instr->key(), LoadConvention::NameRegister()); LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister());
LOperand* vector = NULL; LOperand* vector = NULL;
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
vector = FixedTemp(FullVectorLoadConvention::VectorRegister()); vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
} }
LInstruction* result = LInstruction* result =
@ -1750,10 +1750,10 @@ LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) {
LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp); LOperand* context = UseFixed(instr->context(), cp);
LOperand* object = LOperand* object =
UseFixed(instr->object(), LoadConvention::ReceiverRegister()); UseFixed(instr->object(), LoadDescriptor::ReceiverRegister());
LOperand* vector = NULL; LOperand* vector = NULL;
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
vector = FixedTemp(FullVectorLoadConvention::VectorRegister()); vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
} }
LInstruction* result = LInstruction* result =
@ -2370,9 +2370,9 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp); LOperand* context = UseFixed(instr->context(), cp);
LOperand* object = LOperand* object =
UseFixed(instr->object(), StoreConvention::ReceiverRegister()); UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
LOperand* key = UseFixed(instr->key(), StoreConvention::NameRegister()); LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister());
LOperand* value = UseFixed(instr->value(), StoreConvention::ValueRegister()); LOperand* value = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
DCHECK(instr->object()->representation().IsTagged()); DCHECK(instr->object()->representation().IsTagged());
DCHECK(instr->key()->representation().IsTagged()); DCHECK(instr->key()->representation().IsTagged());
@ -2415,8 +2415,8 @@ LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp); LOperand* context = UseFixed(instr->context(), cp);
LOperand* object = LOperand* object =
UseFixed(instr->object(), StoreConvention::ReceiverRegister()); UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
LOperand* value = UseFixed(instr->value(), StoreConvention::ValueRegister()); LOperand* value = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
LInstruction* result = new(zone()) LStoreNamedGeneric(context, object, value); LInstruction* result = new(zone()) LStoreNamedGeneric(context, object, value);
return MarkAsCall(result, instr); return MarkAsCall(result, instr);

View File

@ -1523,17 +1523,17 @@ class LInteger32ToDouble FINAL : public LTemplateInstruction<1, 1, 0> {
class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> { class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> {
public: public:
LCallWithDescriptor(const CallInterfaceDescriptor* descriptor, LCallWithDescriptor(CallInterfaceDescriptor descriptor,
const ZoneList<LOperand*>& operands, Zone* zone) const ZoneList<LOperand*>& operands, Zone* zone)
: descriptor_(descriptor), : descriptor_(descriptor),
inputs_(descriptor->GetRegisterParameterCount() + 1, zone) { inputs_(descriptor.GetRegisterParameterCount() + 1, zone) {
DCHECK(descriptor->GetRegisterParameterCount() + 1 == operands.length()); DCHECK(descriptor.GetRegisterParameterCount() + 1 == operands.length());
inputs_.AddAll(operands, zone); inputs_.AddAll(operands, zone);
} }
LOperand* target() const { return inputs_[0]; } LOperand* target() const { return inputs_[0]; }
const CallInterfaceDescriptor* descriptor() { return descriptor_; } CallInterfaceDescriptor descriptor() { return descriptor_; }
private: private:
DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor") DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor")
@ -1543,7 +1543,7 @@ class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> {
int arity() const { return hydrogen()->argument_count() - 1; } int arity() const { return hydrogen()->argument_count() - 1; }
const CallInterfaceDescriptor* descriptor_; CallInterfaceDescriptor descriptor_;
ZoneList<LOperand*> inputs_; ZoneList<LOperand*> inputs_;
// Iterator support. // Iterator support.

View File

@ -3349,11 +3349,11 @@ template <class T>
void LCodeGen::EmitVectorLoadICRegisters(T* instr) { void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
DCHECK(FLAG_vector_ics); DCHECK(FLAG_vector_ics);
Register vector = ToRegister(instr->temp_vector()); Register vector = ToRegister(instr->temp_vector());
DCHECK(vector.is(FullVectorLoadConvention::VectorRegister())); DCHECK(vector.is(VectorLoadICDescriptor::VectorRegister()));
__ Mov(vector, instr->hydrogen()->feedback_vector()); __ Mov(vector, instr->hydrogen()->feedback_vector());
// No need to allocate this register. // No need to allocate this register.
DCHECK(FullVectorLoadConvention::SlotRegister().is(x0)); DCHECK(VectorLoadICDescriptor::SlotRegister().is(x0));
__ Mov(FullVectorLoadConvention::SlotRegister(), __ Mov(VectorLoadICDescriptor::SlotRegister(),
Smi::FromInt(instr->hydrogen()->slot())); Smi::FromInt(instr->hydrogen()->slot()));
} }
@ -3361,9 +3361,9 @@ void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp)); DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->global_object()) DCHECK(ToRegister(instr->global_object())
.is(LoadConvention::ReceiverRegister())); .is(LoadDescriptor::ReceiverRegister()));
DCHECK(ToRegister(instr->result()).Is(x0)); DCHECK(ToRegister(instr->result()).Is(x0));
__ Mov(LoadConvention::NameRegister(), Operand(instr->name())); __ Mov(LoadDescriptor::NameRegister(), Operand(instr->name()));
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
} }
@ -3617,8 +3617,8 @@ void LCodeGen::DoLoadKeyedFixed(LLoadKeyedFixed* instr) {
void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp)); DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->object()).is(LoadConvention::ReceiverRegister())); DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
DCHECK(ToRegister(instr->key()).is(LoadConvention::NameRegister())); DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister()));
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
} }
@ -3673,8 +3673,8 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp)); DCHECK(ToRegister(instr->context()).is(cp));
// LoadIC expects name and receiver in registers. // LoadIC expects name and receiver in registers.
DCHECK(ToRegister(instr->object()).is(LoadConvention::ReceiverRegister())); DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
__ Mov(LoadConvention::NameRegister(), Operand(instr->name())); __ Mov(LoadDescriptor::NameRegister(), Operand(instr->name()));
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
} }
@ -5310,9 +5310,9 @@ void LCodeGen::DoStoreKeyedFixed(LStoreKeyedFixed* instr) {
void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp)); DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->object()).is(StoreConvention::ReceiverRegister())); DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
DCHECK(ToRegister(instr->key()).is(StoreConvention::NameRegister())); DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister()));
DCHECK(ToRegister(instr->value()).is(StoreConvention::ValueRegister())); DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
Handle<Code> ic = instr->strict_mode() == STRICT Handle<Code> ic = instr->strict_mode() == STRICT
? isolate()->builtins()->KeyedStoreIC_Initialize_Strict() ? isolate()->builtins()->KeyedStoreIC_Initialize_Strict()
@ -5417,10 +5417,10 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp)); DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->object()).is(StoreConvention::ReceiverRegister())); DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
DCHECK(ToRegister(instr->value()).is(StoreConvention::ValueRegister())); DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
__ Mov(StoreConvention::NameRegister(), Operand(instr->name())); __ Mov(StoreDescriptor::NameRegister(), Operand(instr->name()));
Handle<Code> ic = StoreIC::initialize_stub(isolate(), instr->strict_mode()); Handle<Code> ic = StoreIC::initialize_stub(isolate(), instr->strict_mode());
CallCode(ic, RelocInfo::CODE_TARGET, instr); CallCode(ic, RelocInfo::CODE_TARGET, instr);
} }

View File

@ -542,8 +542,8 @@ Handle<Code> CreateAllocationSiteStub::GenerateCode() {
template <> template <>
HValue* CodeStubGraphBuilder<LoadFastElementStub>::BuildCodeStub() { HValue* CodeStubGraphBuilder<LoadFastElementStub>::BuildCodeStub() {
HInstruction* load = BuildUncheckedMonomorphicElementAccess( HInstruction* load = BuildUncheckedMonomorphicElementAccess(
GetParameter(LoadConvention::kReceiverIndex), GetParameter(LoadDescriptor::kReceiverIndex),
GetParameter(LoadConvention::kNameIndex), NULL, GetParameter(LoadDescriptor::kNameIndex), NULL,
casted_stub()->is_js_array(), casted_stub()->elements_kind(), LOAD, casted_stub()->is_js_array(), casted_stub()->elements_kind(), LOAD,
NEVER_RETURN_HOLE, STANDARD_STORE); NEVER_RETURN_HOLE, STANDARD_STORE);
return load; return load;
@ -657,9 +657,9 @@ Handle<Code> StringLengthStub::GenerateCode() {
template <> template <>
HValue* CodeStubGraphBuilder<StoreFastElementStub>::BuildCodeStub() { HValue* CodeStubGraphBuilder<StoreFastElementStub>::BuildCodeStub() {
BuildUncheckedMonomorphicElementAccess( BuildUncheckedMonomorphicElementAccess(
GetParameter(StoreConvention::kReceiverIndex), GetParameter(StoreDescriptor::kReceiverIndex),
GetParameter(StoreConvention::kNameIndex), GetParameter(StoreDescriptor::kNameIndex),
GetParameter(StoreConvention::kValueIndex), casted_stub()->is_js_array(), GetParameter(StoreDescriptor::kValueIndex), casted_stub()->is_js_array(),
casted_stub()->elements_kind(), STORE, NEVER_RETURN_HOLE, casted_stub()->elements_kind(), STORE, NEVER_RETURN_HOLE,
casted_stub()->store_mode()); casted_stub()->store_mode());
@ -1101,7 +1101,7 @@ HValue* CodeStubGraphBuilder<StoreGlobalStub>::BuildCodeInitializedStub() {
Handle<PropertyCell> placeholder_cell = Handle<PropertyCell> placeholder_cell =
isolate()->factory()->NewPropertyCell(placeholer_value); isolate()->factory()->NewPropertyCell(placeholer_value);
HParameter* value = GetParameter(StoreConvention::kValueIndex); HParameter* value = GetParameter(StoreDescriptor::kValueIndex);
if (stub->check_global()) { if (stub->check_global()) {
// Check that the map of the global has not changed: use a placeholder map // Check that the map of the global has not changed: use a placeholder map
@ -1447,8 +1447,8 @@ Handle<Code> FastNewContextStub::GenerateCode() {
template <> template <>
HValue* CodeStubGraphBuilder<LoadDictionaryElementStub>::BuildCodeStub() { HValue* CodeStubGraphBuilder<LoadDictionaryElementStub>::BuildCodeStub() {
HValue* receiver = GetParameter(LoadConvention::kReceiverIndex); HValue* receiver = GetParameter(LoadDescriptor::kReceiverIndex);
HValue* key = GetParameter(LoadConvention::kNameIndex); HValue* key = GetParameter(LoadDescriptor::kNameIndex);
Add<HCheckSmi>(key); Add<HCheckSmi>(key);
@ -1568,8 +1568,8 @@ void CodeStubGraphBuilder<KeyedLoadGenericStub>::BuildExternalElementLoad(
HValue* CodeStubGraphBuilder<KeyedLoadGenericStub>::BuildCodeStub() { HValue* CodeStubGraphBuilder<KeyedLoadGenericStub>::BuildCodeStub() {
HValue* receiver = GetParameter(LoadConvention::kReceiverIndex); HValue* receiver = GetParameter(LoadDescriptor::kReceiverIndex);
HValue* key = GetParameter(LoadConvention::kNameIndex); HValue* key = GetParameter(LoadDescriptor::kNameIndex);
// Split into a smi/integer case and unique string case. // Split into a smi/integer case and unique string case.
HIfContinuation index_name_split_continuation(graph()->CreateBasicBlock(), HIfContinuation index_name_split_continuation(graph()->CreateBasicBlock(),
@ -1792,7 +1792,7 @@ Handle<Code> KeyedLoadGenericStub::GenerateCode() {
template <> template <>
HValue* CodeStubGraphBuilder<VectorLoadStub>::BuildCodeStub() { HValue* CodeStubGraphBuilder<VectorLoadStub>::BuildCodeStub() {
HValue* receiver = GetParameter(FullVectorLoadConvention::kReceiverIndex); HValue* receiver = GetParameter(VectorLoadICDescriptor::kReceiverIndex);
Add<HDeoptimize>("Always deopt", Deoptimizer::EAGER); Add<HDeoptimize>("Always deopt", Deoptimizer::EAGER);
return receiver; return receiver;
} }
@ -1803,7 +1803,7 @@ Handle<Code> VectorLoadStub::GenerateCode() { return DoGenerateCode(this); }
template <> template <>
HValue* CodeStubGraphBuilder<VectorKeyedLoadStub>::BuildCodeStub() { HValue* CodeStubGraphBuilder<VectorKeyedLoadStub>::BuildCodeStub() {
HValue* receiver = GetParameter(FullVectorLoadConvention::kReceiverIndex); HValue* receiver = GetParameter(VectorLoadICDescriptor::kReceiverIndex);
Add<HDeoptimize>("Always deopt", Deoptimizer::EAGER); Add<HDeoptimize>("Always deopt", Deoptimizer::EAGER);
return receiver; return receiver;
} }

View File

@ -17,8 +17,7 @@ namespace internal {
CodeStubInterfaceDescriptor::CodeStubInterfaceDescriptor() CodeStubInterfaceDescriptor::CodeStubInterfaceDescriptor()
: call_descriptor_(NULL), : stack_parameter_count_(no_reg),
stack_parameter_count_(no_reg),
hint_stack_parameter_count_(-1), hint_stack_parameter_count_(-1),
function_mode_(NOT_JS_FUNCTION_STUB_MODE), function_mode_(NOT_JS_FUNCTION_STUB_MODE),
deoptimization_handler_(NULL), deoptimization_handler_(NULL),
@ -28,7 +27,7 @@ CodeStubInterfaceDescriptor::CodeStubInterfaceDescriptor()
void CodeStubInterfaceDescriptor::Initialize( void CodeStubInterfaceDescriptor::Initialize(
CodeStub::Major major, CallInterfaceDescriptor* call_descriptor, CodeStub::Major major, CallInterfaceDescriptor call_descriptor,
Address deoptimization_handler, int hint_stack_parameter_count, Address deoptimization_handler, int hint_stack_parameter_count,
StubFunctionMode function_mode) { StubFunctionMode function_mode) {
call_descriptor_ = call_descriptor; call_descriptor_ = call_descriptor;
@ -40,7 +39,7 @@ void CodeStubInterfaceDescriptor::Initialize(
void CodeStubInterfaceDescriptor::Initialize( void CodeStubInterfaceDescriptor::Initialize(
CodeStub::Major major, CallInterfaceDescriptor* call_descriptor, CodeStub::Major major, CallInterfaceDescriptor call_descriptor,
Register stack_parameter_count, Address deoptimization_handler, Register stack_parameter_count, Address deoptimization_handler,
int hint_stack_parameter_count, StubFunctionMode function_mode, int hint_stack_parameter_count, StubFunctionMode function_mode,
HandlerArgumentsMode handler_mode) { HandlerArgumentsMode handler_mode) {
@ -501,8 +500,7 @@ void JSEntryStub::FinishCode(Handle<Code> code) {
void LoadFastElementStub::InitializeInterfaceDescriptor( void LoadFastElementStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
CallInterfaceDescriptor* call_descriptor = LoadDescriptor call_descriptor(isolate());
isolate()->call_descriptor(CallDescriptorKey::LoadICCall);
descriptor->Initialize(MajorKey(), call_descriptor, descriptor->Initialize(MajorKey(), call_descriptor,
FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure)); FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure));
} }
@ -510,8 +508,7 @@ void LoadFastElementStub::InitializeInterfaceDescriptor(
void LoadDictionaryElementStub::InitializeInterfaceDescriptor( void LoadDictionaryElementStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
CallInterfaceDescriptor* call_descriptor = LoadDescriptor call_descriptor(isolate());
isolate()->call_descriptor(CallDescriptorKey::LoadICCall);
descriptor->Initialize(MajorKey(), call_descriptor, descriptor->Initialize(MajorKey(), call_descriptor,
FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure)); FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure));
} }
@ -519,8 +516,7 @@ void LoadDictionaryElementStub::InitializeInterfaceDescriptor(
void KeyedLoadGenericStub::InitializeInterfaceDescriptor( void KeyedLoadGenericStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
CallInterfaceDescriptor* call_descriptor = LoadDescriptor call_descriptor(isolate());
isolate()->call_descriptor(CallDescriptorKey::LoadICCall);
descriptor->Initialize( descriptor->Initialize(
MajorKey(), call_descriptor, MajorKey(), call_descriptor,
Runtime::FunctionForId(Runtime::kKeyedGetProperty)->entry); Runtime::FunctionForId(Runtime::kKeyedGetProperty)->entry);
@ -530,13 +526,11 @@ void KeyedLoadGenericStub::InitializeInterfaceDescriptor(
void HandlerStub::InitializeInterfaceDescriptor( void HandlerStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
if (kind() == Code::LOAD_IC) { if (kind() == Code::LOAD_IC) {
CallInterfaceDescriptor* call_descriptor = LoadDescriptor call_descriptor(isolate());
isolate()->call_descriptor(CallDescriptorKey::LoadICCall);
descriptor->Initialize(MajorKey(), call_descriptor); descriptor->Initialize(MajorKey(), call_descriptor);
} else { } else {
DCHECK_EQ(Code::STORE_IC, kind()); DCHECK_EQ(Code::STORE_IC, kind());
CallInterfaceDescriptor* call_descriptor = StoreDescriptor call_descriptor(isolate());
isolate()->call_descriptor(CallDescriptorKey::StoreICCall);
descriptor->Initialize(MajorKey(), call_descriptor, descriptor->Initialize(MajorKey(), call_descriptor,
FUNCTION_ADDR(StoreIC_MissFromStubFailure)); FUNCTION_ADDR(StoreIC_MissFromStubFailure));
} }
@ -545,8 +539,7 @@ void HandlerStub::InitializeInterfaceDescriptor(
void StoreFastElementStub::InitializeInterfaceDescriptor( void StoreFastElementStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
CallInterfaceDescriptor* call_descriptor = StoreDescriptor call_descriptor(isolate());
isolate()->call_descriptor(CallDescriptorKey::StoreICCall);
descriptor->Initialize(MajorKey(), call_descriptor, descriptor->Initialize(MajorKey(), call_descriptor,
FUNCTION_ADDR(KeyedStoreIC_MissFromStubFailure)); FUNCTION_ADDR(KeyedStoreIC_MissFromStubFailure));
} }
@ -554,8 +547,7 @@ void StoreFastElementStub::InitializeInterfaceDescriptor(
void ElementsTransitionAndStoreStub::InitializeInterfaceDescriptor( void ElementsTransitionAndStoreStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
CallInterfaceDescriptor* call_descriptor = isolate()->call_descriptor( ElementTransitionAndStoreDescriptor call_descriptor(isolate());
CallDescriptorKey::ElementTransitionAndStoreCall);
descriptor->Initialize(MajorKey(), call_descriptor, descriptor->Initialize(MajorKey(), call_descriptor,
FUNCTION_ADDR(ElementsTransitionAndStoreIC_Miss)); FUNCTION_ADDR(ElementsTransitionAndStoreIC_Miss));
} }
@ -563,8 +555,7 @@ void ElementsTransitionAndStoreStub::InitializeInterfaceDescriptor(
void InstanceofStub::InitializeInterfaceDescriptor( void InstanceofStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
CallInterfaceDescriptor* call_descriptor = InstanceofDescriptor call_descriptor(isolate());
isolate()->call_descriptor(CallDescriptorKey::InstanceofCall);
descriptor->Initialize(MajorKey(), call_descriptor); descriptor->Initialize(MajorKey(), call_descriptor);
} }
@ -574,8 +565,7 @@ static void InitializeVectorLoadStub(Isolate* isolate,
CodeStub::Major major, CodeStub::Major major,
Address deoptimization_handler) { Address deoptimization_handler) {
DCHECK(FLAG_vector_ics); DCHECK(FLAG_vector_ics);
CallInterfaceDescriptor* call_descriptor = VectorLoadICDescriptor call_descriptor(isolate);
isolate->call_descriptor(CallDescriptorKey::VectorLoadICCall);
descriptor->Initialize(major, call_descriptor, deoptimization_handler); descriptor->Initialize(major, call_descriptor, deoptimization_handler);
} }
@ -597,8 +587,7 @@ void VectorKeyedLoadStub::InitializeInterfaceDescriptor(
void FastNewClosureStub::InitializeInterfaceDescriptor( void FastNewClosureStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
CallInterfaceDescriptor* call_descriptor = FastNewClosureDescriptor call_descriptor(isolate());
isolate()->call_descriptor(CallDescriptorKey::FastNewClosureCall);
descriptor->Initialize( descriptor->Initialize(
MajorKey(), call_descriptor, MajorKey(), call_descriptor,
Runtime::FunctionForId(Runtime::kNewClosureFromStubFailure)->entry); Runtime::FunctionForId(Runtime::kNewClosureFromStubFailure)->entry);
@ -607,24 +596,21 @@ void FastNewClosureStub::InitializeInterfaceDescriptor(
void FastNewContextStub::InitializeInterfaceDescriptor( void FastNewContextStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
CallInterfaceDescriptor* call_descriptor = FastNewContextDescriptor call_descriptor(isolate());
isolate()->call_descriptor(CallDescriptorKey::FastNewContextCall);
descriptor->Initialize(MajorKey(), call_descriptor); descriptor->Initialize(MajorKey(), call_descriptor);
} }
void ToNumberStub::InitializeInterfaceDescriptor( void ToNumberStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
CallInterfaceDescriptor* call_descriptor = ToNumberDescriptor call_descriptor(isolate());
isolate()->call_descriptor(CallDescriptorKey::ToNumberCall);
descriptor->Initialize(MajorKey(), call_descriptor); descriptor->Initialize(MajorKey(), call_descriptor);
} }
void NumberToStringStub::InitializeInterfaceDescriptor( void NumberToStringStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
CallInterfaceDescriptor* call_descriptor = NumberToStringDescriptor call_descriptor(isolate());
isolate()->call_descriptor(CallDescriptorKey::NumberToStringCall);
descriptor->Initialize( descriptor->Initialize(
MajorKey(), call_descriptor, MajorKey(), call_descriptor,
Runtime::FunctionForId(Runtime::kNumberToStringRT)->entry); Runtime::FunctionForId(Runtime::kNumberToStringRT)->entry);
@ -633,8 +619,7 @@ void NumberToStringStub::InitializeInterfaceDescriptor(
void FastCloneShallowArrayStub::InitializeInterfaceDescriptor( void FastCloneShallowArrayStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
CallInterfaceDescriptor* call_descriptor = FastCloneShallowArrayDescriptor call_descriptor(isolate());
isolate()->call_descriptor(CallDescriptorKey::FastCloneShallowArrayCall);
descriptor->Initialize( descriptor->Initialize(
MajorKey(), call_descriptor, MajorKey(), call_descriptor,
Runtime::FunctionForId(Runtime::kCreateArrayLiteralStubBailout)->entry); Runtime::FunctionForId(Runtime::kCreateArrayLiteralStubBailout)->entry);
@ -643,8 +628,7 @@ void FastCloneShallowArrayStub::InitializeInterfaceDescriptor(
void FastCloneShallowObjectStub::InitializeInterfaceDescriptor( void FastCloneShallowObjectStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
CallInterfaceDescriptor* call_descriptor = FastCloneShallowObjectDescriptor call_descriptor(isolate());
isolate()->call_descriptor(CallDescriptorKey::FastCloneShallowObjectCall);
descriptor->Initialize( descriptor->Initialize(
MajorKey(), call_descriptor, MajorKey(), call_descriptor,
Runtime::FunctionForId(Runtime::kCreateObjectLiteral)->entry); Runtime::FunctionForId(Runtime::kCreateObjectLiteral)->entry);
@ -653,32 +637,28 @@ void FastCloneShallowObjectStub::InitializeInterfaceDescriptor(
void CreateAllocationSiteStub::InitializeInterfaceDescriptor( void CreateAllocationSiteStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
CallInterfaceDescriptor* call_descriptor = CreateAllocationSiteDescriptor call_descriptor(isolate());
isolate()->call_descriptor(CallDescriptorKey::CreateAllocationSiteCall);
descriptor->Initialize(MajorKey(), call_descriptor); descriptor->Initialize(MajorKey(), call_descriptor);
} }
void CallFunctionStub::InitializeInterfaceDescriptor( void CallFunctionStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
CallInterfaceDescriptor* call_descriptor = CallFunctionDescriptor call_descriptor(isolate());
isolate()->call_descriptor(CallDescriptorKey::CallFunctionCall);
descriptor->Initialize(MajorKey(), call_descriptor); descriptor->Initialize(MajorKey(), call_descriptor);
} }
void CallConstructStub::InitializeInterfaceDescriptor( void CallConstructStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
CallInterfaceDescriptor* call_descriptor = CallConstructDescriptor call_descriptor(isolate());
isolate()->call_descriptor(CallDescriptorKey::CallConstructCall);
descriptor->Initialize(MajorKey(), call_descriptor); descriptor->Initialize(MajorKey(), call_descriptor);
} }
void RegExpConstructResultStub::InitializeInterfaceDescriptor( void RegExpConstructResultStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
CallInterfaceDescriptor* call_descriptor = RegExpConstructResultDescriptor call_descriptor(isolate());
isolate()->call_descriptor(CallDescriptorKey::RegExpConstructResultCall);
descriptor->Initialize( descriptor->Initialize(
MajorKey(), call_descriptor, MajorKey(), call_descriptor,
Runtime::FunctionForId(Runtime::kRegExpConstructResult)->entry); Runtime::FunctionForId(Runtime::kRegExpConstructResult)->entry);
@ -687,8 +667,7 @@ void RegExpConstructResultStub::InitializeInterfaceDescriptor(
void TransitionElementsKindStub::InitializeInterfaceDescriptor( void TransitionElementsKindStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
CallInterfaceDescriptor* call_descriptor = TransitionElementsKindDescriptor call_descriptor(isolate());
isolate()->call_descriptor(CallDescriptorKey::TransitionElementsKindCall);
descriptor->Initialize( descriptor->Initialize(
MajorKey(), call_descriptor, MajorKey(), call_descriptor,
Runtime::FunctionForId(Runtime::kTransitionElementsKind)->entry); Runtime::FunctionForId(Runtime::kTransitionElementsKind)->entry);
@ -697,8 +676,7 @@ void TransitionElementsKindStub::InitializeInterfaceDescriptor(
void CompareNilICStub::InitializeInterfaceDescriptor( void CompareNilICStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
CallInterfaceDescriptor* call_descriptor = CompareNilDescriptor call_descriptor(isolate());
isolate()->call_descriptor(CallDescriptorKey::CompareNilCall);
descriptor->Initialize(MajorKey(), call_descriptor, descriptor->Initialize(MajorKey(), call_descriptor,
FUNCTION_ADDR(CompareNilIC_Miss)); FUNCTION_ADDR(CompareNilIC_Miss));
descriptor->SetMissHandler( descriptor->SetMissHandler(
@ -707,8 +685,7 @@ void CompareNilICStub::InitializeInterfaceDescriptor(
void ToBooleanStub::InitializeInterfaceDescriptor( void ToBooleanStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
CallInterfaceDescriptor* call_descriptor = ToBooleanDescriptor call_descriptor(isolate());
isolate()->call_descriptor(CallDescriptorKey::ToBooleanCall);
descriptor->Initialize(MajorKey(), call_descriptor, descriptor->Initialize(MajorKey(), call_descriptor,
FUNCTION_ADDR(ToBooleanIC_Miss)); FUNCTION_ADDR(ToBooleanIC_Miss));
descriptor->SetMissHandler( descriptor->SetMissHandler(
@ -718,8 +695,7 @@ void ToBooleanStub::InitializeInterfaceDescriptor(
void BinaryOpICStub::InitializeInterfaceDescriptor( void BinaryOpICStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
CallInterfaceDescriptor* call_descriptor = BinaryOpDescriptor call_descriptor(isolate());
isolate()->call_descriptor(CallDescriptorKey::BinaryOpCall);
descriptor->Initialize(MajorKey(), call_descriptor, descriptor->Initialize(MajorKey(), call_descriptor,
FUNCTION_ADDR(BinaryOpIC_Miss)); FUNCTION_ADDR(BinaryOpIC_Miss));
descriptor->SetMissHandler( descriptor->SetMissHandler(
@ -729,8 +705,7 @@ void BinaryOpICStub::InitializeInterfaceDescriptor(
void BinaryOpWithAllocationSiteStub::InitializeInterfaceDescriptor( void BinaryOpWithAllocationSiteStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
CallInterfaceDescriptor* call_descriptor = isolate()->call_descriptor( BinaryOpWithAllocationSiteDescriptor call_descriptor(isolate());
CallDescriptorKey::BinaryOpWithAllocationSiteCall);
descriptor->Initialize(MajorKey(), call_descriptor, descriptor->Initialize(MajorKey(), call_descriptor,
FUNCTION_ADDR(BinaryOpIC_MissWithAllocationSite)); FUNCTION_ADDR(BinaryOpIC_MissWithAllocationSite));
} }
@ -738,8 +713,7 @@ void BinaryOpWithAllocationSiteStub::InitializeInterfaceDescriptor(
void StringAddStub::InitializeInterfaceDescriptor( void StringAddStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
CallInterfaceDescriptor* call_descriptor = StringAddDescriptor call_descriptor(isolate());
isolate()->call_descriptor(CallDescriptorKey::StringAddCall);
descriptor->Initialize(MajorKey(), call_descriptor, descriptor->Initialize(MajorKey(), call_descriptor,
Runtime::FunctionForId(Runtime::kStringAdd)->entry); Runtime::FunctionForId(Runtime::kStringAdd)->entry);
} }

View File

@ -10,7 +10,6 @@
#include "src/codegen.h" #include "src/codegen.h"
#include "src/globals.h" #include "src/globals.h"
#include "src/ic/ic.h" #include "src/ic/ic.h"
#include "src/ic/ic-conventions.h"
#include "src/interface-descriptors.h" #include "src/interface-descriptors.h"
#include "src/macro-assembler.h" #include "src/macro-assembler.h"
#include "src/ostreams.h" #include "src/ostreams.h"
@ -293,12 +292,12 @@ class CodeStubInterfaceDescriptor {
CodeStubInterfaceDescriptor(); CodeStubInterfaceDescriptor();
void Initialize(CodeStub::Major major, void Initialize(CodeStub::Major major,
CallInterfaceDescriptor* call_descriptor, CallInterfaceDescriptor call_descriptor,
Address deoptimization_handler = NULL, Address deoptimization_handler = NULL,
int hint_stack_parameter_count = -1, int hint_stack_parameter_count = -1,
StubFunctionMode function_mode = NOT_JS_FUNCTION_STUB_MODE); StubFunctionMode function_mode = NOT_JS_FUNCTION_STUB_MODE);
void Initialize(CodeStub::Major major, void Initialize(CodeStub::Major major,
CallInterfaceDescriptor* call_descriptor, CallInterfaceDescriptor call_descriptor,
Register stack_parameter_count, Register stack_parameter_count,
Address deoptimization_handler = NULL, Address deoptimization_handler = NULL,
int hint_stack_parameter_count = -1, int hint_stack_parameter_count = -1,
@ -313,36 +312,36 @@ class CodeStubInterfaceDescriptor {
DCHECK(!stack_parameter_count_.is_valid()); DCHECK(!stack_parameter_count_.is_valid());
} }
bool IsInitialized() const { return call_descriptor_ != NULL; } bool IsInitialized() const { return call_descriptor_.IsInitialized(); }
CallInterfaceDescriptor* call_descriptor() const { return call_descriptor_; } CallInterfaceDescriptor call_descriptor() const { return call_descriptor_; }
int GetEnvironmentLength() const { int GetEnvironmentLength() const {
return call_descriptor()->GetEnvironmentLength(); return call_descriptor().GetEnvironmentLength();
} }
int GetRegisterParameterCount() const { int GetRegisterParameterCount() const {
return call_descriptor()->GetRegisterParameterCount(); return call_descriptor().GetRegisterParameterCount();
} }
Register GetParameterRegister(int index) const { Register GetParameterRegister(int index) const {
return call_descriptor()->GetParameterRegister(index); return call_descriptor().GetParameterRegister(index);
} }
Representation GetParameterRepresentation(int index) const { Representation GetParameterRepresentation(int index) const {
return call_descriptor()->GetParameterRepresentation(index); return call_descriptor().GetParameterRepresentation(index);
} }
int GetEnvironmentParameterCount() const { int GetEnvironmentParameterCount() const {
return call_descriptor()->GetEnvironmentParameterCount(); return call_descriptor().GetEnvironmentParameterCount();
} }
Register GetEnvironmentParameterRegister(int index) const { Register GetEnvironmentParameterRegister(int index) const {
return call_descriptor()->GetEnvironmentParameterRegister(index); return call_descriptor().GetEnvironmentParameterRegister(index);
} }
Representation GetEnvironmentParameterRepresentation(int index) const { Representation GetEnvironmentParameterRepresentation(int index) const {
return call_descriptor()->GetEnvironmentParameterRepresentation(index); return call_descriptor().GetEnvironmentParameterRepresentation(index);
} }
ExternalReference miss_handler() const { ExternalReference miss_handler() const {
@ -355,12 +354,12 @@ class CodeStubInterfaceDescriptor {
} }
bool IsEnvironmentParameterCountRegister(int index) const { bool IsEnvironmentParameterCountRegister(int index) const {
return call_descriptor()->GetEnvironmentParameterRegister(index).is( return call_descriptor().GetEnvironmentParameterRegister(index).is(
stack_parameter_count_); stack_parameter_count_);
} }
int GetHandlerParameterCount() const { int GetHandlerParameterCount() const {
int params = call_descriptor()->GetEnvironmentParameterCount(); int params = call_descriptor().GetEnvironmentParameterCount();
if (handler_arguments_mode_ == PASS_ARGUMENTS) { if (handler_arguments_mode_ == PASS_ARGUMENTS) {
params += 1; params += 1;
} }
@ -374,7 +373,7 @@ class CodeStubInterfaceDescriptor {
CodeStub::Major MajorKey() const { return major_; } CodeStub::Major MajorKey() const { return major_; }
private: private:
CallInterfaceDescriptor* call_descriptor_; CallInterfaceDescriptor call_descriptor_;
Register stack_parameter_count_; Register stack_parameter_count_;
// If hint_stack_parameter_count_ > 0, the code stub can optimize the // If hint_stack_parameter_count_ > 0, the code stub can optimize the
// return sequence. Default value is -1, which means it is ignored. // return sequence. Default value is -1, which means it is ignored.
@ -702,8 +701,8 @@ class InstanceofStub: public PlatformCodeStub {
void Generate(MacroAssembler* masm); void Generate(MacroAssembler* masm);
static Register left() { return InstanceofConvention::left(); } static Register left() { return InstanceofDescriptor::left(); }
static Register right() { return InstanceofConvention::right(); } static Register right() { return InstanceofDescriptor::right(); }
virtual void InitializeInterfaceDescriptor( virtual void InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor); CodeStubInterfaceDescriptor* descriptor);
@ -2539,14 +2538,16 @@ class ElementsTransitionAndStoreStub : public HydrogenCodeStub {
}; };
static const Register ValueRegister() { static const Register ValueRegister() {
return StoreConvention::ValueRegister(); return ElementTransitionAndStoreDescriptor::ValueRegister();
}
static const Register MapRegister() {
return ElementTransitionAndStoreDescriptor::MapRegister();
} }
static const Register MapRegister() { return StoreConvention::MapRegister(); }
static const Register KeyRegister() { static const Register KeyRegister() {
return StoreConvention::NameRegister(); return ElementTransitionAndStoreDescriptor::NameRegister();
} }
static const Register ObjectRegister() { static const Register ObjectRegister() {
return StoreConvention::ReceiverRegister(); return ElementTransitionAndStoreDescriptor::ReceiverRegister();
} }
private: private:

View File

@ -46,8 +46,7 @@ class LoadICStubShim : public HydrogenCodeStub {
virtual void InitializeInterfaceDescriptor( virtual void InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) OVERRIDE { CodeStubInterfaceDescriptor* descriptor) OVERRIDE {
CallInterfaceDescriptor* call_descriptor = LoadDescriptor call_descriptor(isolate());
isolate()->call_descriptor(CallDescriptorKey::LoadICCall);
descriptor->Initialize(MajorKey(), call_descriptor); descriptor->Initialize(MajorKey(), call_descriptor);
} }
@ -74,8 +73,7 @@ class KeyedLoadICStubShim : public HydrogenCodeStub {
virtual void InitializeInterfaceDescriptor( virtual void InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) OVERRIDE { CodeStubInterfaceDescriptor* descriptor) OVERRIDE {
CallInterfaceDescriptor* call_descriptor = LoadDescriptor call_descriptor(isolate());
isolate()->call_descriptor(CallDescriptorKey::LoadICCall);
descriptor->Initialize(MajorKey(), call_descriptor); descriptor->Initialize(MajorKey(), call_descriptor);
} }
@ -101,8 +99,7 @@ class StoreICStubShim : public HydrogenCodeStub {
virtual void InitializeInterfaceDescriptor( virtual void InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) OVERRIDE { CodeStubInterfaceDescriptor* descriptor) OVERRIDE {
CallInterfaceDescriptor* call_descriptor = StoreDescriptor call_descriptor(isolate());
isolate()->call_descriptor(CallDescriptorKey::StoreICCall);
descriptor->Initialize(MajorKey(), call_descriptor); descriptor->Initialize(MajorKey(), call_descriptor);
} }
@ -132,8 +129,7 @@ class KeyedStoreICStubShim : public HydrogenCodeStub {
virtual void InitializeInterfaceDescriptor( virtual void InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) OVERRIDE { CodeStubInterfaceDescriptor* descriptor) OVERRIDE {
CallInterfaceDescriptor* call_descriptor = StoreDescriptor call_descriptor(isolate());
isolate()->call_descriptor(CallDescriptorKey::StoreICCall);
descriptor->Initialize(MajorKey(), call_descriptor); descriptor->Initialize(MajorKey(), call_descriptor);
} }

View File

@ -2321,9 +2321,9 @@ class HCallWithDescriptor FINAL : public HInstruction {
public: public:
static HCallWithDescriptor* New(Zone* zone, HValue* context, HValue* target, static HCallWithDescriptor* New(Zone* zone, HValue* context, HValue* target,
int argument_count, int argument_count,
const CallInterfaceDescriptor* descriptor, CallInterfaceDescriptor descriptor,
const Vector<HValue*>& operands) { const Vector<HValue*>& operands) {
DCHECK(operands.length() == descriptor->GetEnvironmentLength()); DCHECK(operands.length() == descriptor.GetEnvironmentLength());
HCallWithDescriptor* res = HCallWithDescriptor* res =
new(zone) HCallWithDescriptor(target, argument_count, new(zone) HCallWithDescriptor(target, argument_count,
descriptor, operands, zone); descriptor, operands, zone);
@ -2343,8 +2343,8 @@ class HCallWithDescriptor FINAL : public HInstruction {
return Representation::Tagged(); return Representation::Tagged();
} else { } else {
int par_index = index - 1; int par_index = index - 1;
DCHECK(par_index < descriptor_->GetEnvironmentLength()); DCHECK(par_index < descriptor_.GetEnvironmentLength());
return descriptor_->GetParameterRepresentation(par_index); return descriptor_.GetParameterRepresentation(par_index);
} }
} }
@ -2362,7 +2362,7 @@ class HCallWithDescriptor FINAL : public HInstruction {
return -argument_count_; return -argument_count_;
} }
const CallInterfaceDescriptor* descriptor() const { return descriptor_; } CallInterfaceDescriptor descriptor() const { return descriptor_; }
HValue* target() { HValue* target() {
return OperandAt(0); return OperandAt(0);
@ -2373,10 +2373,10 @@ class HCallWithDescriptor FINAL : public HInstruction {
private: private:
// The argument count includes the receiver. // The argument count includes the receiver.
HCallWithDescriptor(HValue* target, int argument_count, HCallWithDescriptor(HValue* target, int argument_count,
const CallInterfaceDescriptor* descriptor, CallInterfaceDescriptor descriptor,
const Vector<HValue*>& operands, Zone* zone) const Vector<HValue*>& operands, Zone* zone)
: descriptor_(descriptor), : descriptor_(descriptor),
values_(descriptor->GetEnvironmentLength() + 1, zone) { values_(descriptor.GetEnvironmentLength() + 1, zone) {
argument_count_ = argument_count; argument_count_ = argument_count;
AddOperand(target, zone); AddOperand(target, zone);
for (int i = 0; i < operands.length(); i++) { for (int i = 0; i < operands.length(); i++) {
@ -2396,7 +2396,7 @@ class HCallWithDescriptor FINAL : public HInstruction {
values_[index] = value; values_[index] = value;
} }
const CallInterfaceDescriptor* descriptor_; CallInterfaceDescriptor descriptor_;
ZoneList<HValue*> values_; ZoneList<HValue*> values_;
int argument_count_; int argument_count_;
}; };

View File

@ -7394,9 +7394,7 @@ HInstruction* HOptimizedGraphBuilder::NewPlainFunctionCall(
HInstruction* HOptimizedGraphBuilder::NewArgumentAdaptorCall( HInstruction* HOptimizedGraphBuilder::NewArgumentAdaptorCall(
HValue* fun, HValue* context, HValue* fun, HValue* context,
int argument_count, HValue* expected_param_count) { int argument_count, HValue* expected_param_count) {
CallInterfaceDescriptor* descriptor = ArgumentAdaptorDescriptor descriptor(isolate());
isolate()->call_descriptor(CallDescriptorKey::ArgumentAdaptorCall);
HValue* arity = Add<HConstant>(argument_count - 1); HValue* arity = Add<HConstant>(argument_count - 1);
HValue* op_vals[] = { context, fun, arity, expected_param_count }; HValue* op_vals[] = { context, fun, arity, expected_param_count };
@ -7407,7 +7405,7 @@ HInstruction* HOptimizedGraphBuilder::NewArgumentAdaptorCall(
return New<HCallWithDescriptor>( return New<HCallWithDescriptor>(
adaptor_value, argument_count, descriptor, adaptor_value, argument_count, descriptor,
Vector<HValue*>(op_vals, descriptor->GetEnvironmentLength())); Vector<HValue*>(op_vals, descriptor.GetEnvironmentLength()));
} }
@ -8644,19 +8642,16 @@ bool HOptimizedGraphBuilder::TryInlineApiCall(Handle<JSFunction> function,
api_function_address api_function_address
}; };
CallInterfaceDescriptor* descriptor = ApiFunctionDescriptor descriptor(isolate());
isolate()->call_descriptor(CallDescriptorKey::ApiFunctionCall);
CallApiFunctionStub stub(isolate(), is_store, call_data_is_undefined, argc); CallApiFunctionStub stub(isolate(), is_store, call_data_is_undefined, argc);
Handle<Code> code = stub.GetCode(); Handle<Code> code = stub.GetCode();
HConstant* code_value = Add<HConstant>(code); HConstant* code_value = Add<HConstant>(code);
DCHECK((sizeof(op_vals) / kPointerSize) == DCHECK((sizeof(op_vals) / kPointerSize) == descriptor.GetEnvironmentLength());
descriptor->GetEnvironmentLength());
HInstruction* call = New<HCallWithDescriptor>( HInstruction* call = New<HCallWithDescriptor>(
code_value, argc + 1, descriptor, code_value, argc + 1, descriptor,
Vector<HValue*>(op_vals, descriptor->GetEnvironmentLength())); Vector<HValue*>(op_vals, descriptor.GetEnvironmentLength()));
if (drop_extra) Drop(1); // Drop function. if (drop_extra) Drop(1); // Drop function.
ast_context()->ReturnInstruction(call, ast_id); ast_context()->ReturnInstruction(call, ast_id);

View File

@ -994,8 +994,8 @@ void Builtins::Generate_FunctionApply(MacroAssembler* masm) {
// Copy all arguments from the array to the stack. // Copy all arguments from the array to the stack.
Label entry, loop; Label entry, loop;
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
Register key = LoadConvention::NameRegister(); Register key = LoadDescriptor::NameRegister();
__ mov(key, Operand(ebp, kIndexOffset)); __ mov(key, Operand(ebp, kIndexOffset));
__ jmp(&entry); __ jmp(&entry);
__ bind(&loop); __ bind(&loop);
@ -1003,7 +1003,8 @@ void Builtins::Generate_FunctionApply(MacroAssembler* masm) {
// Use inline caching to speed up access to arguments. // Use inline caching to speed up access to arguments.
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
__ mov(VectorLoadConvention::SlotRegister(), Immediate(Smi::FromInt(0))); __ mov(VectorLoadICDescriptor::SlotRegister(),
Immediate(Smi::FromInt(0)));
} }
Handle<Code> ic = masm->isolate()->builtins()->KeyedLoadIC_Initialize(); Handle<Code> ic = masm->isolate()->builtins()->KeyedLoadIC_Initialize();
__ call(ic, RelocInfo::CODE_TARGET); __ call(ic, RelocInfo::CODE_TARGET);

View File

@ -32,14 +32,12 @@ static void InitializeArrayConstructorDescriptor(
Runtime::kArrayConstructor)->entry; Runtime::kArrayConstructor)->entry;
if (constant_stack_parameter_count == 0) { if (constant_stack_parameter_count == 0) {
CallInterfaceDescriptor* call_descriptor = isolate->call_descriptor( ArrayConstructorConstantArgCountDescriptor call_descriptor(isolate);
CallDescriptorKey::ArrayConstructorConstantArgCountCall);
descriptor->Initialize(major, call_descriptor, deopt_handler, descriptor->Initialize(major, call_descriptor, deopt_handler,
constant_stack_parameter_count, constant_stack_parameter_count,
JS_FUNCTION_STUB_MODE); JS_FUNCTION_STUB_MODE);
} else { } else {
CallInterfaceDescriptor* call_descriptor = ArrayConstructorDescriptor call_descriptor(isolate);
isolate->call_descriptor(CallDescriptorKey::ArrayConstructorCall);
descriptor->Initialize(major, call_descriptor, eax, deopt_handler, descriptor->Initialize(major, call_descriptor, eax, deopt_handler,
constant_stack_parameter_count, constant_stack_parameter_count,
JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS); JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS);
@ -58,14 +56,12 @@ static void InitializeInternalArrayConstructorDescriptor(
Runtime::kInternalArrayConstructor)->entry; Runtime::kInternalArrayConstructor)->entry;
if (constant_stack_parameter_count == 0) { if (constant_stack_parameter_count == 0) {
CallInterfaceDescriptor* call_descriptor = isolate->call_descriptor( InternalArrayConstructorConstantArgCountDescriptor call_descriptor(isolate);
CallDescriptorKey::InternalArrayConstructorConstantArgCountCall);
descriptor->Initialize(major, call_descriptor, deopt_handler, descriptor->Initialize(major, call_descriptor, deopt_handler,
constant_stack_parameter_count, constant_stack_parameter_count,
JS_FUNCTION_STUB_MODE); JS_FUNCTION_STUB_MODE);
} else { } else {
CallInterfaceDescriptor* call_descriptor = isolate->call_descriptor( InternalArrayConstructorDescriptor call_descriptor(isolate);
CallDescriptorKey::InternalArrayConstructorCall);
descriptor->Initialize(major, call_descriptor, eax, deopt_handler, descriptor->Initialize(major, call_descriptor, eax, deopt_handler,
constant_stack_parameter_count, constant_stack_parameter_count,
JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS); JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS);
@ -665,7 +661,7 @@ void MathPowStub::Generate(MacroAssembler* masm) {
void FunctionPrototypeStub::Generate(MacroAssembler* masm) { void FunctionPrototypeStub::Generate(MacroAssembler* masm) {
Label miss; Label miss;
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, eax, NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, eax,
ebx, &miss); ebx, &miss);
@ -4248,14 +4244,14 @@ void StubFailureTrampolineStub::Generate(MacroAssembler* masm) {
void LoadICTrampolineStub::Generate(MacroAssembler* masm) { void LoadICTrampolineStub::Generate(MacroAssembler* masm) {
EmitLoadTypeFeedbackVector(masm, FullVectorLoadConvention::VectorRegister()); EmitLoadTypeFeedbackVector(masm, VectorLoadICDescriptor::VectorRegister());
VectorLoadStub stub(isolate(), state()); VectorLoadStub stub(isolate(), state());
__ jmp(stub.GetCode(), RelocInfo::CODE_TARGET); __ jmp(stub.GetCode(), RelocInfo::CODE_TARGET);
} }
void KeyedLoadICTrampolineStub::Generate(MacroAssembler* masm) { void KeyedLoadICTrampolineStub::Generate(MacroAssembler* masm) {
EmitLoadTypeFeedbackVector(masm, FullVectorLoadConvention::VectorRegister()); EmitLoadTypeFeedbackVector(masm, VectorLoadICDescriptor::VectorRegister());
VectorKeyedLoadStub stub(isolate()); VectorKeyedLoadStub stub(isolate());
__ jmp(stub.GetCode(), RelocInfo::CODE_TARGET); __ jmp(stub.GetCode(), RelocInfo::CODE_TARGET);
} }

View File

@ -180,17 +180,17 @@ void DebugCodegen::GenerateCallICStubDebugBreak(MacroAssembler* masm) {
void DebugCodegen::GenerateLoadICDebugBreak(MacroAssembler* masm) { void DebugCodegen::GenerateLoadICDebugBreak(MacroAssembler* masm) {
// Register state for IC load call (from ic-ia32.cc). // Register state for IC load call (from ic-ia32.cc).
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
Register name = LoadConvention::NameRegister(); Register name = LoadDescriptor::NameRegister();
Generate_DebugBreakCallHelper(masm, receiver.bit() | name.bit(), 0, false); Generate_DebugBreakCallHelper(masm, receiver.bit() | name.bit(), 0, false);
} }
void DebugCodegen::GenerateStoreICDebugBreak(MacroAssembler* masm) { void DebugCodegen::GenerateStoreICDebugBreak(MacroAssembler* masm) {
// Register state for IC store call (from ic-ia32.cc). // Register state for IC store call (from ic-ia32.cc).
Register receiver = StoreConvention::ReceiverRegister(); Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreConvention::NameRegister(); Register name = StoreDescriptor::NameRegister();
Register value = StoreConvention::ValueRegister(); Register value = StoreDescriptor::ValueRegister();
Generate_DebugBreakCallHelper( Generate_DebugBreakCallHelper(
masm, receiver.bit() | name.bit() | value.bit(), 0, false); masm, receiver.bit() | name.bit() | value.bit(), 0, false);
} }
@ -204,9 +204,9 @@ void DebugCodegen::GenerateKeyedLoadICDebugBreak(MacroAssembler* masm) {
void DebugCodegen::GenerateKeyedStoreICDebugBreak(MacroAssembler* masm) { void DebugCodegen::GenerateKeyedStoreICDebugBreak(MacroAssembler* masm) {
// Register state for keyed IC store call (from ic-ia32.cc). // Register state for keyed IC store call (from ic-ia32.cc).
Register receiver = StoreConvention::ReceiverRegister(); Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreConvention::NameRegister(); Register name = StoreDescriptor::NameRegister();
Register value = StoreConvention::ValueRegister(); Register value = StoreDescriptor::ValueRegister();
Generate_DebugBreakCallHelper( Generate_DebugBreakCallHelper(
masm, receiver.bit() | name.bit() | value.bit(), 0, false); masm, receiver.bit() | name.bit() | value.bit(), 0, false);
} }

View File

@ -1327,10 +1327,10 @@ void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy,
// All extension objects were empty and it is safe to use a global // All extension objects were empty and it is safe to use a global
// load IC call. // load IC call.
__ mov(LoadConvention::ReceiverRegister(), GlobalObjectOperand()); __ mov(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
__ mov(LoadConvention::NameRegister(), proxy->var()->name()); __ mov(LoadDescriptor::NameRegister(), proxy->var()->name());
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
__ mov(VectorLoadConvention::SlotRegister(), __ mov(VectorLoadICDescriptor::SlotRegister(),
Immediate(Smi::FromInt(proxy->VariableFeedbackSlot()))); Immediate(Smi::FromInt(proxy->VariableFeedbackSlot())));
} }
@ -1414,10 +1414,10 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
switch (var->location()) { switch (var->location()) {
case Variable::UNALLOCATED: { case Variable::UNALLOCATED: {
Comment cmnt(masm_, "[ Global variable"); Comment cmnt(masm_, "[ Global variable");
__ mov(LoadConvention::ReceiverRegister(), GlobalObjectOperand()); __ mov(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
__ mov(LoadConvention::NameRegister(), var->name()); __ mov(LoadDescriptor::NameRegister(), var->name());
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
__ mov(VectorLoadConvention::SlotRegister(), __ mov(VectorLoadICDescriptor::SlotRegister(),
Immediate(Smi::FromInt(proxy->VariableFeedbackSlot()))); Immediate(Smi::FromInt(proxy->VariableFeedbackSlot())));
} }
CallLoadIC(CONTEXTUAL); CallLoadIC(CONTEXTUAL);
@ -1633,9 +1633,9 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
if (key->value()->IsInternalizedString()) { if (key->value()->IsInternalizedString()) {
if (property->emit_store()) { if (property->emit_store()) {
VisitForAccumulatorValue(value); VisitForAccumulatorValue(value);
DCHECK(StoreConvention::ValueRegister().is(eax)); DCHECK(StoreDescriptor::ValueRegister().is(eax));
__ mov(StoreConvention::NameRegister(), Immediate(key->value())); __ mov(StoreDescriptor::NameRegister(), Immediate(key->value()));
__ mov(StoreConvention::ReceiverRegister(), Operand(esp, 0)); __ mov(StoreDescriptor::ReceiverRegister(), Operand(esp, 0));
CallStoreIC(key->LiteralFeedbackId()); CallStoreIC(key->LiteralFeedbackId());
PrepareForBailoutForId(key->id(), NO_REGISTERS); PrepareForBailoutForId(key->id(), NO_REGISTERS);
} else { } else {
@ -1814,7 +1814,7 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) {
if (expr->is_compound()) { if (expr->is_compound()) {
// We need the receiver both on the stack and in the register. // We need the receiver both on the stack and in the register.
VisitForStackValue(property->obj()); VisitForStackValue(property->obj());
__ mov(LoadConvention::ReceiverRegister(), Operand(esp, 0)); __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, 0));
} else { } else {
VisitForStackValue(property->obj()); VisitForStackValue(property->obj());
} }
@ -1823,8 +1823,8 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) {
if (expr->is_compound()) { if (expr->is_compound()) {
VisitForStackValue(property->obj()); VisitForStackValue(property->obj());
VisitForStackValue(property->key()); VisitForStackValue(property->key());
__ mov(LoadConvention::ReceiverRegister(), Operand(esp, kPointerSize)); __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, kPointerSize));
__ mov(LoadConvention::NameRegister(), Operand(esp, 0)); __ mov(LoadDescriptor::NameRegister(), Operand(esp, 0));
} else { } else {
VisitForStackValue(property->obj()); VisitForStackValue(property->obj());
VisitForStackValue(property->key()); 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_catch, l_try, l_suspend, l_continuation, l_resume;
Label l_next, l_call, l_loop; Label l_next, l_call, l_loop;
Register load_receiver = LoadConvention::ReceiverRegister(); Register load_receiver = LoadDescriptor::ReceiverRegister();
Register load_name = LoadConvention::NameRegister(); Register load_name = LoadDescriptor::NameRegister();
// Initial send value is undefined. // Initial send value is undefined.
__ mov(eax, isolate()->factory()->undefined_value()); __ mov(eax, isolate()->factory()->undefined_value());
@ -2023,7 +2023,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ bind(&l_call); __ bind(&l_call);
__ mov(load_receiver, Operand(esp, kPointerSize)); __ mov(load_receiver, Operand(esp, kPointerSize));
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
__ mov(VectorLoadConvention::SlotRegister(), __ mov(VectorLoadICDescriptor::SlotRegister(),
Immediate(Smi::FromInt(expr->KeyedLoadFeedbackSlot()))); Immediate(Smi::FromInt(expr->KeyedLoadFeedbackSlot())));
} }
Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
@ -2043,7 +2043,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ mov(load_name, __ mov(load_name,
isolate()->factory()->done_string()); // "done" isolate()->factory()->done_string()); // "done"
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
__ mov(VectorLoadConvention::SlotRegister(), __ mov(VectorLoadICDescriptor::SlotRegister(),
Immediate(Smi::FromInt(expr->DoneFeedbackSlot()))); Immediate(Smi::FromInt(expr->DoneFeedbackSlot())));
} }
CallLoadIC(NOT_CONTEXTUAL); // result.done in eax CallLoadIC(NOT_CONTEXTUAL); // result.done in eax
@ -2057,7 +2057,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ mov(load_name, __ mov(load_name,
isolate()->factory()->value_string()); // "value" isolate()->factory()->value_string()); // "value"
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
__ mov(VectorLoadConvention::SlotRegister(), __ mov(VectorLoadICDescriptor::SlotRegister(),
Immediate(Smi::FromInt(expr->ValueFeedbackSlot()))); Immediate(Smi::FromInt(expr->ValueFeedbackSlot())));
} }
CallLoadIC(NOT_CONTEXTUAL); // result.value in eax CallLoadIC(NOT_CONTEXTUAL); // result.value in eax
@ -2219,9 +2219,9 @@ void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
SetSourcePosition(prop->position()); SetSourcePosition(prop->position());
Literal* key = prop->key()->AsLiteral(); Literal* key = prop->key()->AsLiteral();
DCHECK(!key->value()->IsSmi()); DCHECK(!key->value()->IsSmi());
__ mov(LoadConvention::NameRegister(), Immediate(key->value())); __ mov(LoadDescriptor::NameRegister(), Immediate(key->value()));
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
__ mov(VectorLoadConvention::SlotRegister(), __ mov(VectorLoadICDescriptor::SlotRegister(),
Immediate(Smi::FromInt(prop->PropertyFeedbackSlot()))); Immediate(Smi::FromInt(prop->PropertyFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL); CallLoadIC(NOT_CONTEXTUAL);
} else { } else {
@ -2234,7 +2234,7 @@ void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
SetSourcePosition(prop->position()); SetSourcePosition(prop->position());
Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
__ mov(VectorLoadConvention::SlotRegister(), __ mov(VectorLoadICDescriptor::SlotRegister(),
Immediate(Smi::FromInt(prop->PropertyFeedbackSlot()))); Immediate(Smi::FromInt(prop->PropertyFeedbackSlot())));
CallIC(ic); CallIC(ic);
} else { } else {
@ -2374,9 +2374,9 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) {
case NAMED_PROPERTY: { case NAMED_PROPERTY: {
__ push(eax); // Preserve value. __ push(eax); // Preserve value.
VisitForAccumulatorValue(prop->obj()); VisitForAccumulatorValue(prop->obj());
__ Move(StoreConvention::ReceiverRegister(), eax); __ Move(StoreDescriptor::ReceiverRegister(), eax);
__ pop(StoreConvention::ValueRegister()); // Restore value. __ pop(StoreDescriptor::ValueRegister()); // Restore value.
__ mov(StoreConvention::NameRegister(), __ mov(StoreDescriptor::NameRegister(),
prop->key()->AsLiteral()->value()); prop->key()->AsLiteral()->value());
CallStoreIC(); CallStoreIC();
break; break;
@ -2385,9 +2385,9 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) {
__ push(eax); // Preserve value. __ push(eax); // Preserve value.
VisitForStackValue(prop->obj()); VisitForStackValue(prop->obj());
VisitForAccumulatorValue(prop->key()); VisitForAccumulatorValue(prop->key());
__ Move(StoreConvention::NameRegister(), eax); __ Move(StoreDescriptor::NameRegister(), eax);
__ pop(StoreConvention::ReceiverRegister()); // Receiver. __ pop(StoreDescriptor::ReceiverRegister()); // Receiver.
__ pop(StoreConvention::ValueRegister()); // Restore value. __ pop(StoreDescriptor::ValueRegister()); // Restore value.
Handle<Code> ic = strict_mode() == SLOPPY Handle<Code> ic = strict_mode() == SLOPPY
? isolate()->builtins()->KeyedStoreIC_Initialize() ? isolate()->builtins()->KeyedStoreIC_Initialize()
: isolate()->builtins()->KeyedStoreIC_Initialize_Strict(); : isolate()->builtins()->KeyedStoreIC_Initialize_Strict();
@ -2414,8 +2414,8 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var,
Token::Value op) { Token::Value op) {
if (var->IsUnallocated()) { if (var->IsUnallocated()) {
// Global var, const, or let. // Global var, const, or let.
__ mov(StoreConvention::NameRegister(), var->name()); __ mov(StoreDescriptor::NameRegister(), var->name());
__ mov(StoreConvention::ReceiverRegister(), GlobalObjectOperand()); __ mov(StoreDescriptor::ReceiverRegister(), GlobalObjectOperand());
CallStoreIC(); CallStoreIC();
} else if (op == Token::INIT_CONST_LEGACY) { } else if (op == Token::INIT_CONST_LEGACY) {
@ -2488,8 +2488,8 @@ void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) {
// Record source code position before IC call. // Record source code position before IC call.
SetSourcePosition(expr->position()); SetSourcePosition(expr->position());
__ mov(StoreConvention::NameRegister(), prop->key()->AsLiteral()->value()); __ mov(StoreDescriptor::NameRegister(), prop->key()->AsLiteral()->value());
__ pop(StoreConvention::ReceiverRegister()); __ pop(StoreDescriptor::ReceiverRegister());
CallStoreIC(expr->AssignmentFeedbackId()); CallStoreIC(expr->AssignmentFeedbackId());
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); PrepareForBailoutForId(expr->AssignmentId(), TOS_REG);
context()->Plug(eax); context()->Plug(eax);
@ -2502,9 +2502,9 @@ void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) {
// esp[0] : key // esp[0] : key
// esp[kPointerSize] : receiver // esp[kPointerSize] : receiver
__ pop(StoreConvention::NameRegister()); // Key. __ pop(StoreDescriptor::NameRegister()); // Key.
__ pop(StoreConvention::ReceiverRegister()); __ pop(StoreDescriptor::ReceiverRegister());
DCHECK(StoreConvention::ValueRegister().is(eax)); DCHECK(StoreDescriptor::ValueRegister().is(eax));
// Record source code position before IC call. // Record source code position before IC call.
SetSourcePosition(expr->position()); SetSourcePosition(expr->position());
Handle<Code> ic = strict_mode() == SLOPPY Handle<Code> ic = strict_mode() == SLOPPY
@ -2523,15 +2523,15 @@ void FullCodeGenerator::VisitProperty(Property* expr) {
if (key->IsPropertyName()) { if (key->IsPropertyName()) {
VisitForAccumulatorValue(expr->obj()); VisitForAccumulatorValue(expr->obj());
__ Move(LoadConvention::ReceiverRegister(), result_register()); __ Move(LoadDescriptor::ReceiverRegister(), result_register());
EmitNamedPropertyLoad(expr); EmitNamedPropertyLoad(expr);
PrepareForBailoutForId(expr->LoadId(), TOS_REG); PrepareForBailoutForId(expr->LoadId(), TOS_REG);
context()->Plug(eax); context()->Plug(eax);
} else { } else {
VisitForStackValue(expr->obj()); VisitForStackValue(expr->obj());
VisitForAccumulatorValue(expr->key()); VisitForAccumulatorValue(expr->key());
__ pop(LoadConvention::ReceiverRegister()); // Object. __ pop(LoadDescriptor::ReceiverRegister()); // Object.
__ Move(LoadConvention::NameRegister(), result_register()); // Key. __ Move(LoadDescriptor::NameRegister(), result_register()); // Key.
EmitKeyedPropertyLoad(expr); EmitKeyedPropertyLoad(expr);
context()->Plug(eax); context()->Plug(eax);
} }
@ -2564,7 +2564,7 @@ void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) {
} else { } else {
// Load the function from the receiver. // Load the function from the receiver.
DCHECK(callee->IsProperty()); DCHECK(callee->IsProperty());
__ mov(LoadConvention::ReceiverRegister(), Operand(esp, 0)); __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, 0));
EmitNamedPropertyLoad(callee->AsProperty()); EmitNamedPropertyLoad(callee->AsProperty());
PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG); PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG);
// Push the target function under the receiver. // Push the target function under the receiver.
@ -2586,8 +2586,8 @@ void FullCodeGenerator::EmitKeyedCallWithLoadIC(Call* expr,
// Load the function from the receiver. // Load the function from the receiver.
DCHECK(callee->IsProperty()); DCHECK(callee->IsProperty());
__ mov(LoadConvention::ReceiverRegister(), Operand(esp, 0)); __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, 0));
__ mov(LoadConvention::NameRegister(), eax); __ mov(LoadDescriptor::NameRegister(), eax);
EmitKeyedPropertyLoad(callee->AsProperty()); EmitKeyedPropertyLoad(callee->AsProperty());
PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG); PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG);
@ -4045,10 +4045,10 @@ void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) {
__ push(FieldOperand(eax, GlobalObject::kBuiltinsOffset)); __ push(FieldOperand(eax, GlobalObject::kBuiltinsOffset));
// Load the function from the receiver. // Load the function from the receiver.
__ mov(LoadConvention::ReceiverRegister(), Operand(esp, 0)); __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, 0));
__ mov(LoadConvention::NameRegister(), Immediate(expr->name())); __ mov(LoadDescriptor::NameRegister(), Immediate(expr->name()));
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
__ mov(VectorLoadConvention::SlotRegister(), __ mov(VectorLoadICDescriptor::SlotRegister(),
Immediate(Smi::FromInt(expr->CallRuntimeFeedbackSlot()))); Immediate(Smi::FromInt(expr->CallRuntimeFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL); CallLoadIC(NOT_CONTEXTUAL);
} else { } else {
@ -4235,14 +4235,14 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
if (assign_type == NAMED_PROPERTY) { if (assign_type == NAMED_PROPERTY) {
// Put the object both on the stack and in the register. // Put the object both on the stack and in the register.
VisitForStackValue(prop->obj()); VisitForStackValue(prop->obj());
__ mov(LoadConvention::ReceiverRegister(), Operand(esp, 0)); __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, 0));
EmitNamedPropertyLoad(prop); EmitNamedPropertyLoad(prop);
} else { } else {
VisitForStackValue(prop->obj()); VisitForStackValue(prop->obj());
VisitForStackValue(prop->key()); VisitForStackValue(prop->key());
__ mov(LoadConvention::ReceiverRegister(), __ mov(LoadDescriptor::ReceiverRegister(),
Operand(esp, kPointerSize)); // Object. Operand(esp, kPointerSize)); // Object.
__ mov(LoadConvention::NameRegister(), Operand(esp, 0)); // Key. __ mov(LoadDescriptor::NameRegister(), Operand(esp, 0)); // Key.
EmitKeyedPropertyLoad(prop); EmitKeyedPropertyLoad(prop);
} }
} }
@ -4357,9 +4357,9 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
} }
break; break;
case NAMED_PROPERTY: { case NAMED_PROPERTY: {
__ mov(StoreConvention::NameRegister(), __ mov(StoreDescriptor::NameRegister(),
prop->key()->AsLiteral()->value()); prop->key()->AsLiteral()->value());
__ pop(StoreConvention::ReceiverRegister()); __ pop(StoreDescriptor::ReceiverRegister());
CallStoreIC(expr->CountStoreFeedbackId()); CallStoreIC(expr->CountStoreFeedbackId());
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); PrepareForBailoutForId(expr->AssignmentId(), TOS_REG);
if (expr->is_postfix()) { if (expr->is_postfix()) {
@ -4372,8 +4372,8 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
break; break;
} }
case KEYED_PROPERTY: { case KEYED_PROPERTY: {
__ pop(StoreConvention::NameRegister()); __ pop(StoreDescriptor::NameRegister());
__ pop(StoreConvention::ReceiverRegister()); __ pop(StoreDescriptor::ReceiverRegister());
Handle<Code> ic = strict_mode() == SLOPPY Handle<Code> ic = strict_mode() == SLOPPY
? isolate()->builtins()->KeyedStoreIC_Initialize() ? isolate()->builtins()->KeyedStoreIC_Initialize()
: isolate()->builtins()->KeyedStoreIC_Initialize_Strict(); : isolate()->builtins()->KeyedStoreIC_Initialize_Strict();
@ -4400,10 +4400,10 @@ void FullCodeGenerator::VisitForTypeofValue(Expression* expr) {
if (proxy != NULL && proxy->var()->IsUnallocated()) { if (proxy != NULL && proxy->var()->IsUnallocated()) {
Comment cmnt(masm_, "[ Global variable"); Comment cmnt(masm_, "[ Global variable");
__ mov(LoadConvention::ReceiverRegister(), GlobalObjectOperand()); __ mov(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
__ mov(LoadConvention::NameRegister(), Immediate(proxy->name())); __ mov(LoadDescriptor::NameRegister(), Immediate(proxy->name()));
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
__ mov(VectorLoadConvention::SlotRegister(), __ mov(VectorLoadICDescriptor::SlotRegister(),
Immediate(Smi::FromInt(proxy->VariableFeedbackSlot()))); Immediate(Smi::FromInt(proxy->VariableFeedbackSlot())));
} }
// Use a regular load, not a contextual load, to avoid a reference // Use a regular load, not a contextual load, to avoid a reference

View File

@ -6,7 +6,6 @@
#if V8_TARGET_ARCH_IA32 #if V8_TARGET_ARCH_IA32
#include "src/ic/ic-conventions.h"
#include "src/interface-descriptors.h" #include "src/interface-descriptors.h"
namespace v8 { namespace v8 {
@ -15,231 +14,280 @@ namespace internal {
const Register CallInterfaceDescriptor::ContextRegister() { return esi; } const Register CallInterfaceDescriptor::ContextRegister() { return esi; }
void CallDescriptors::InitializeForIsolate(Isolate* isolate) { const Register LoadDescriptor::ReceiverRegister() { return edx; }
InitializeForIsolateAllPlatforms(isolate); const Register LoadDescriptor::NameRegister() { return ecx; }
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::FastNewClosureCall);
Register registers[] = {esi, ebx};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::FastNewContextCall);
Register registers[] = {esi, edi};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::ToNumberCall);
// ToNumberStub invokes a function, and therefore needs a context.
Register registers[] = {esi, eax};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::NumberToStringCall);
Register registers[] = {esi, eax};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::FastCloneShallowArrayCall);
Register registers[] = {esi, eax, ebx, ecx};
Representation representations[] = {
Representation::Tagged(), Representation::Tagged(),
Representation::Smi(), Representation::Tagged()};
descriptor->Initialize(arraysize(registers), registers, representations);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::FastCloneShallowObjectCall);
Register registers[] = {esi, eax, ebx, ecx, edx};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::CreateAllocationSiteCall);
Register registers[] = {esi, ebx, edx};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::CallFunctionCall);
Register registers[] = {esi, edi};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::CallConstructCall);
// eax : number of arguments
// ebx : feedback vector
// edx : (only if ebx is not the megamorphic symbol) slot in feedback
// vector (Smi)
// edi : constructor function
// TODO(turbofan): So far we don't gather type feedback and hence skip the
// slot parameter, but ArrayConstructStub needs the vector to be undefined.
Register registers[] = {esi, eax, edi, ebx};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::RegExpConstructResultCall);
Register registers[] = {esi, ecx, ebx, eax};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::TransitionElementsKindCall);
Register registers[] = {esi, eax, ebx};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor = isolate->call_descriptor(
CallDescriptorKey::ArrayConstructorConstantArgCountCall);
// register state
// eax -- number of arguments
// edi -- function
// ebx -- allocation site with elements kind
Register registers[] = {esi, edi, ebx};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::ArrayConstructorCall);
// stack param count needs (constructor pointer, and single argument)
Register registers[] = {esi, edi, ebx, eax};
Representation representations[] = {
Representation::Tagged(), Representation::Tagged(),
Representation::Tagged(), Representation::Integer32()};
descriptor->Initialize(arraysize(registers), registers, representations);
}
{
CallInterfaceDescriptor* descriptor = isolate->call_descriptor(
CallDescriptorKey::InternalArrayConstructorConstantArgCountCall);
// register state
// eax -- number of arguments
// edi -- function
Register registers[] = {esi, edi};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor = isolate->call_descriptor(
CallDescriptorKey::InternalArrayConstructorCall);
// stack param count needs (constructor pointer, and single argument)
Register registers[] = {esi, edi, eax};
Representation representations[] = {Representation::Tagged(),
Representation::Tagged(),
Representation::Integer32()};
descriptor->Initialize(arraysize(registers), registers, representations);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::CompareNilCall);
Register registers[] = {esi, eax};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::ToBooleanCall);
Register registers[] = {esi, eax};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::BinaryOpCall);
Register registers[] = {esi, edx, eax};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor = isolate->call_descriptor(
CallDescriptorKey::BinaryOpWithAllocationSiteCall);
Register registers[] = {esi, ecx, edx, eax};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::StringAddCall);
Register registers[] = {esi, edx, eax};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{ const Register VectorLoadICDescriptor::ReceiverRegister() {
CallInterfaceDescriptor* descriptor = return LoadDescriptor::ReceiverRegister();
isolate->call_descriptor(CallDescriptorKey::ArgumentAdaptorCall); }
Register registers[] = {
esi, // context
edi, // JSFunction const Register VectorLoadICDescriptor::NameRegister() {
eax, // actual number of arguments return LoadDescriptor::NameRegister();
ebx, // expected number of arguments }
};
Representation representations[] = {
Representation::Tagged(), // context const Register VectorLoadICDescriptor::SlotRegister() { return eax; }
Representation::Tagged(), // JSFunction const Register VectorLoadICDescriptor::VectorRegister() { return ebx; }
Representation::Integer32(), // actual number of arguments
Representation::Integer32(), // expected number of arguments
}; const Register StoreDescriptor::ReceiverRegister() { return edx; }
descriptor->Initialize(arraysize(registers), registers, representations); const Register StoreDescriptor::NameRegister() { return ecx; }
} const Register StoreDescriptor::ValueRegister() { return eax; }
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::KeyedCall); const Register ElementTransitionAndStoreDescriptor::ReceiverRegister() {
Register registers[] = { return StoreDescriptor::ReceiverRegister();
esi, // context }
ecx, // key
};
Representation representations[] = { const Register ElementTransitionAndStoreDescriptor::NameRegister() {
Representation::Tagged(), // context return StoreDescriptor::NameRegister();
Representation::Tagged(), // key }
};
descriptor->Initialize(arraysize(registers), registers, representations);
} const Register ElementTransitionAndStoreDescriptor::ValueRegister() {
{ return StoreDescriptor::ValueRegister();
CallInterfaceDescriptor* descriptor = }
isolate->call_descriptor(CallDescriptorKey::NamedCall);
Register registers[] = {
esi, // context const Register ElementTransitionAndStoreDescriptor::MapRegister() {
ecx, // name return ebx;
}; }
Representation representations[] = {
Representation::Tagged(), // context
Representation::Tagged(), // name const Register InstanceofDescriptor::left() { return eax; }
}; const Register InstanceofDescriptor::right() { return edx; }
descriptor->Initialize(arraysize(registers), registers, representations);
}
{ void FastNewClosureDescriptor::Initialize(Isolate* isolate) {
CallInterfaceDescriptor* descriptor = Register registers[] = {esi, ebx};
isolate->call_descriptor(CallDescriptorKey::CallHandler); InitializeData(isolate, key(), arraysize(registers), registers, NULL);
Register registers[] = { }
esi, // context
edx, // name
}; void FastNewContextDescriptor::Initialize(Isolate* isolate) {
Representation representations[] = { Register registers[] = {esi, edi};
Representation::Tagged(), // context InitializeData(isolate, key(), arraysize(registers), registers, NULL);
Representation::Tagged(), // receiver }
};
descriptor->Initialize(arraysize(registers), registers, representations);
} void ToNumberDescriptor::Initialize(Isolate* isolate) {
{ // ToNumberStub invokes a function, and therefore needs a context.
CallInterfaceDescriptor* descriptor = Register registers[] = {esi, eax};
isolate->call_descriptor(CallDescriptorKey::ApiFunctionCall); InitializeData(isolate, key(), arraysize(registers), registers, NULL);
Register registers[] = { }
esi, // context
eax, // callee
ebx, // call_data void NumberToStringDescriptor::Initialize(Isolate* isolate) {
ecx, // holder Register registers[] = {esi, eax};
edx, // api_function_address InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}; }
Representation representations[] = {
Representation::Tagged(), // context
Representation::Tagged(), // callee void FastCloneShallowArrayDescriptor::Initialize(Isolate* isolate) {
Representation::Tagged(), // call_data Register registers[] = {esi, eax, ebx, ecx};
Representation::Tagged(), // holder Representation representations[] = {
Representation::External(), // api_function_address Representation::Tagged(), Representation::Tagged(), Representation::Smi(),
}; Representation::Tagged()};
descriptor->Initialize(arraysize(registers), registers, representations); InitializeData(isolate, key(), arraysize(registers), registers,
} representations);
}
void FastCloneShallowObjectDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {esi, eax, ebx, ecx, edx};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void CreateAllocationSiteDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {esi, ebx, edx};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void CallFunctionDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {esi, edi};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void CallConstructDescriptor::Initialize(Isolate* isolate) {
// eax : number of arguments
// ebx : feedback vector
// edx : (only if ebx is not the megamorphic symbol) slot in feedback
// vector (Smi)
// edi : constructor function
// TODO(turbofan): So far we don't gather type feedback and hence skip the
// slot parameter, but ArrayConstructStub needs the vector to be undefined.
Register registers[] = {esi, eax, edi, ebx};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void RegExpConstructResultDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {esi, ecx, ebx, eax};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void TransitionElementsKindDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {esi, eax, ebx};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void ArrayConstructorConstantArgCountDescriptor::Initialize(Isolate* isolate) {
// register state
// eax -- number of arguments
// edi -- function
// ebx -- allocation site with elements kind
Register registers[] = {esi, edi, ebx};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void ArrayConstructorDescriptor::Initialize(Isolate* isolate) {
// stack param count needs (constructor pointer, and single argument)
Register registers[] = {esi, edi, ebx, eax};
Representation representations[] = {
Representation::Tagged(), Representation::Tagged(),
Representation::Tagged(), Representation::Integer32()};
InitializeData(isolate, key(), arraysize(registers), registers,
representations);
}
void InternalArrayConstructorConstantArgCountDescriptor::Initialize(
Isolate* isolate) {
// register state
// eax -- number of arguments
// edi -- function
Register registers[] = {esi, edi};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void InternalArrayConstructorDescriptor::Initialize(Isolate* isolate) {
// stack param count needs (constructor pointer, and single argument)
Register registers[] = {esi, edi, eax};
Representation representations[] = {Representation::Tagged(),
Representation::Tagged(),
Representation::Integer32()};
InitializeData(isolate, key(), arraysize(registers), registers,
representations);
}
void CompareNilDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {esi, eax};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void ToBooleanDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {esi, eax};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void BinaryOpDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {esi, edx, eax};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void BinaryOpWithAllocationSiteDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {esi, ecx, edx, eax};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void StringAddDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {esi, edx, eax};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void KeyedDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {
esi, // context
ecx, // key
};
Representation representations[] = {
Representation::Tagged(), // context
Representation::Tagged(), // key
};
InitializeData(isolate, key(), arraysize(registers), registers,
representations);
}
void NamedDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {
esi, // context
ecx, // name
};
Representation representations[] = {
Representation::Tagged(), // context
Representation::Tagged(), // name
};
InitializeData(isolate, key(), arraysize(registers), registers,
representations);
}
void CallHandlerDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {
esi, // context
edx, // name
};
Representation representations[] = {
Representation::Tagged(), // context
Representation::Tagged(), // receiver
};
InitializeData(isolate, key(), arraysize(registers), registers,
representations);
}
void ArgumentAdaptorDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {
esi, // context
edi, // JSFunction
eax, // actual number of arguments
ebx, // expected number of arguments
};
Representation representations[] = {
Representation::Tagged(), // context
Representation::Tagged(), // JSFunction
Representation::Integer32(), // actual number of arguments
Representation::Integer32(), // expected number of arguments
};
InitializeData(isolate, key(), arraysize(registers), registers,
representations);
}
void ApiFunctionDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {
esi, // context
eax, // callee
ebx, // call_data
ecx, // holder
edx, // api_function_address
};
Representation representations[] = {
Representation::Tagged(), // context
Representation::Tagged(), // callee
Representation::Tagged(), // call_data
Representation::Tagged(), // holder
Representation::External(), // api_function_address
};
InitializeData(isolate, key(), arraysize(registers), registers,
representations);
} }
} }
} // namespace v8::internal } // namespace v8::internal

View File

@ -2833,11 +2833,11 @@ template <class T>
void LCodeGen::EmitVectorLoadICRegisters(T* instr) { void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
DCHECK(FLAG_vector_ics); DCHECK(FLAG_vector_ics);
Register vector = ToRegister(instr->temp_vector()); Register vector = ToRegister(instr->temp_vector());
DCHECK(vector.is(FullVectorLoadConvention::VectorRegister())); DCHECK(vector.is(VectorLoadICDescriptor::VectorRegister()));
__ mov(vector, instr->hydrogen()->feedback_vector()); __ mov(vector, instr->hydrogen()->feedback_vector());
// No need to allocate this register. // No need to allocate this register.
DCHECK(FullVectorLoadConvention::SlotRegister().is(eax)); DCHECK(VectorLoadICDescriptor::SlotRegister().is(eax));
__ mov(FullVectorLoadConvention::SlotRegister(), __ mov(VectorLoadICDescriptor::SlotRegister(),
Immediate(Smi::FromInt(instr->hydrogen()->slot()))); Immediate(Smi::FromInt(instr->hydrogen()->slot())));
} }
@ -2845,10 +2845,10 @@ void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(esi)); DCHECK(ToRegister(instr->context()).is(esi));
DCHECK(ToRegister(instr->global_object()) DCHECK(ToRegister(instr->global_object())
.is(LoadConvention::ReceiverRegister())); .is(LoadDescriptor::ReceiverRegister()));
DCHECK(ToRegister(instr->result()).is(eax)); DCHECK(ToRegister(instr->result()).is(eax));
__ mov(LoadConvention::NameRegister(), instr->name()); __ mov(LoadDescriptor::NameRegister(), instr->name());
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
} }
@ -2982,10 +2982,10 @@ void LCodeGen::EmitPushTaggedOperand(LOperand* operand) {
void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(esi)); DCHECK(ToRegister(instr->context()).is(esi));
DCHECK(ToRegister(instr->object()).is(LoadConvention::ReceiverRegister())); DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
DCHECK(ToRegister(instr->result()).is(eax)); DCHECK(ToRegister(instr->result()).is(eax));
__ mov(LoadConvention::NameRegister(), instr->name()); __ mov(LoadDescriptor::NameRegister(), instr->name());
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
} }
@ -3210,8 +3210,8 @@ Operand LCodeGen::BuildFastArrayOperand(
void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(esi)); DCHECK(ToRegister(instr->context()).is(esi));
DCHECK(ToRegister(instr->object()).is(LoadConvention::ReceiverRegister())); DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
DCHECK(ToRegister(instr->key()).is(LoadConvention::NameRegister())); DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister()));
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
@ -4069,10 +4069,10 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(esi)); DCHECK(ToRegister(instr->context()).is(esi));
DCHECK(ToRegister(instr->object()).is(StoreConvention::ReceiverRegister())); DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
DCHECK(ToRegister(instr->value()).is(StoreConvention::ValueRegister())); DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
__ mov(StoreConvention::NameRegister(), instr->name()); __ mov(StoreDescriptor::NameRegister(), instr->name());
Handle<Code> ic = StoreIC::initialize_stub(isolate(), instr->strict_mode()); Handle<Code> ic = StoreIC::initialize_stub(isolate(), instr->strict_mode());
CallCode(ic, RelocInfo::CODE_TARGET, instr); CallCode(ic, RelocInfo::CODE_TARGET, instr);
} }
@ -4251,9 +4251,9 @@ void LCodeGen::DoStoreKeyed(LStoreKeyed* instr) {
void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(esi)); DCHECK(ToRegister(instr->context()).is(esi));
DCHECK(ToRegister(instr->object()).is(StoreConvention::ReceiverRegister())); DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
DCHECK(ToRegister(instr->key()).is(StoreConvention::NameRegister())); DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister()));
DCHECK(ToRegister(instr->value()).is(StoreConvention::ValueRegister())); DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
Handle<Code> ic = instr->strict_mode() == STRICT Handle<Code> ic = instr->strict_mode() == STRICT
? isolate()->builtins()->KeyedStoreIC_Initialize_Strict() ? isolate()->builtins()->KeyedStoreIC_Initialize_Strict()

View File

@ -1123,13 +1123,13 @@ LInstruction* LChunkBuilder::DoCallJSFunction(
LInstruction* LChunkBuilder::DoCallWithDescriptor( LInstruction* LChunkBuilder::DoCallWithDescriptor(
HCallWithDescriptor* instr) { HCallWithDescriptor* instr) {
const CallInterfaceDescriptor* descriptor = instr->descriptor(); CallInterfaceDescriptor descriptor = instr->descriptor();
LOperand* target = UseRegisterOrConstantAtStart(instr->target()); LOperand* target = UseRegisterOrConstantAtStart(instr->target());
ZoneList<LOperand*> ops(instr->OperandCount(), zone()); ZoneList<LOperand*> ops(instr->OperandCount(), zone());
ops.Add(target, zone()); ops.Add(target, zone());
for (int i = 1; i < instr->OperandCount(); i++) { for (int i = 1; i < instr->OperandCount(); i++) {
LOperand* op = UseFixed(instr->OperandAt(i), LOperand* op =
descriptor->GetParameterRegister(i - 1)); UseFixed(instr->OperandAt(i), descriptor.GetParameterRegister(i - 1));
ops.Add(op, zone()); ops.Add(op, zone());
} }
@ -2107,10 +2107,10 @@ LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) {
LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
LOperand* context = UseFixed(instr->context(), esi); LOperand* context = UseFixed(instr->context(), esi);
LOperand* global_object = LOperand* global_object =
UseFixed(instr->global_object(), LoadConvention::ReceiverRegister()); UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister());
LOperand* vector = NULL; LOperand* vector = NULL;
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
vector = FixedTemp(FullVectorLoadConvention::VectorRegister()); vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
} }
LLoadGlobalGeneric* result = LLoadGlobalGeneric* result =
@ -2168,10 +2168,10 @@ LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) {
LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), esi); LOperand* context = UseFixed(instr->context(), esi);
LOperand* object = LOperand* object =
UseFixed(instr->object(), LoadConvention::ReceiverRegister()); UseFixed(instr->object(), LoadDescriptor::ReceiverRegister());
LOperand* vector = NULL; LOperand* vector = NULL;
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
vector = FixedTemp(FullVectorLoadConvention::VectorRegister()); vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
} }
LLoadNamedGeneric* result = new(zone()) LLoadNamedGeneric( LLoadNamedGeneric* result = new(zone()) LLoadNamedGeneric(
context, object, vector); context, object, vector);
@ -2232,11 +2232,11 @@ LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) {
LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), esi); LOperand* context = UseFixed(instr->context(), esi);
LOperand* object = LOperand* object =
UseFixed(instr->object(), LoadConvention::ReceiverRegister()); UseFixed(instr->object(), LoadDescriptor::ReceiverRegister());
LOperand* key = UseFixed(instr->key(), LoadConvention::NameRegister()); LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister());
LOperand* vector = NULL; LOperand* vector = NULL;
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
vector = FixedTemp(FullVectorLoadConvention::VectorRegister()); vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
} }
LLoadKeyedGeneric* result = LLoadKeyedGeneric* result =
new(zone()) LLoadKeyedGeneric(context, object, key, vector); new(zone()) LLoadKeyedGeneric(context, object, key, vector);
@ -2318,9 +2318,9 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), esi); LOperand* context = UseFixed(instr->context(), esi);
LOperand* object = LOperand* object =
UseFixed(instr->object(), StoreConvention::ReceiverRegister()); UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
LOperand* key = UseFixed(instr->key(), StoreConvention::NameRegister()); LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister());
LOperand* value = UseFixed(instr->value(), StoreConvention::ValueRegister()); LOperand* value = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
DCHECK(instr->object()->representation().IsTagged()); DCHECK(instr->object()->representation().IsTagged());
DCHECK(instr->key()->representation().IsTagged()); DCHECK(instr->key()->representation().IsTagged());
@ -2423,8 +2423,8 @@ LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), esi); LOperand* context = UseFixed(instr->context(), esi);
LOperand* object = LOperand* object =
UseFixed(instr->object(), StoreConvention::ReceiverRegister()); UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
LOperand* value = UseFixed(instr->value(), StoreConvention::ValueRegister()); LOperand* value = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
LStoreNamedGeneric* result = LStoreNamedGeneric* result =
new(zone()) LStoreNamedGeneric(context, object, value); new(zone()) LStoreNamedGeneric(context, object, value);

View File

@ -1891,10 +1891,10 @@ class LCallJSFunction FINAL : public LTemplateInstruction<1, 1, 0> {
class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> { class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> {
public: public:
LCallWithDescriptor(const CallInterfaceDescriptor* descriptor, LCallWithDescriptor(CallInterfaceDescriptor descriptor,
const ZoneList<LOperand*>& operands, Zone* zone) const ZoneList<LOperand*>& operands, Zone* zone)
: inputs_(descriptor->GetRegisterParameterCount() + 1, zone) { : inputs_(descriptor.GetRegisterParameterCount() + 1, zone) {
DCHECK(descriptor->GetRegisterParameterCount() + 1 == operands.length()); DCHECK(descriptor.GetRegisterParameterCount() + 1 == operands.length());
inputs_.AddAll(operands, zone); inputs_.AddAll(operands, zone);
} }

View File

@ -22,8 +22,8 @@ void PropertyAccessCompiler::GenerateTailCall(MacroAssembler* masm,
Register* PropertyAccessCompiler::load_calling_convention() { Register* PropertyAccessCompiler::load_calling_convention() {
// receiver, name, scratch1, scratch2, scratch3, scratch4. // receiver, name, scratch1, scratch2, scratch3, scratch4.
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
Register name = LoadConvention::NameRegister(); Register name = LoadDescriptor::NameRegister();
static Register registers[] = {receiver, name, r3, r0, r4, r5}; static Register registers[] = {receiver, name, r3, r0, r4, r5};
return registers; return registers;
} }
@ -31,9 +31,9 @@ Register* PropertyAccessCompiler::load_calling_convention() {
Register* PropertyAccessCompiler::store_calling_convention() { Register* PropertyAccessCompiler::store_calling_convention() {
// receiver, name, scratch1, scratch2, scratch3. // receiver, name, scratch1, scratch2, scratch3.
Register receiver = StoreConvention::ReceiverRegister(); Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreConvention::NameRegister(); Register name = StoreDescriptor::NameRegister();
DCHECK(r3.is(StoreConvention::MapRegister())); DCHECK(r3.is(ElementTransitionAndStoreDescriptor::MapRegister()));
static Register registers[] = {receiver, name, r3, r4, r5}; static Register registers[] = {receiver, name, r3, r4, r5};
return registers; return registers;
} }

View File

@ -291,8 +291,8 @@ void ElementHandlerCompiler::GenerateLoadDictionaryElement(
// The return address is in lr. // The return address is in lr.
Label slow, miss; Label slow, miss;
Register key = LoadConvention::NameRegister(); Register key = LoadDescriptor::NameRegister();
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
DCHECK(receiver.is(r1)); DCHECK(receiver.is(r1));
DCHECK(key.is(r2)); DCHECK(key.is(r2));
@ -316,8 +316,8 @@ void ElementHandlerCompiler::GenerateLoadDictionaryElement(
void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) { void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
// Push receiver, key and value for runtime call. // Push receiver, key and value for runtime call.
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(), __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
StoreConvention::ValueRegister()); StoreDescriptor::ValueRegister());
// The slow case calls into the runtime to complete the store without causing // 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. // 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) { void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) {
// Push receiver, key and value for runtime call. // Push receiver, key and value for runtime call.
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(), __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
StoreConvention::ValueRegister()); StoreDescriptor::ValueRegister());
// The slow case calls into the runtime to complete the store without causing // 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. // an IC miss that would otherwise cause a transition to the generic stub.
@ -829,7 +829,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor(
Register NamedStoreHandlerCompiler::value() { Register NamedStoreHandlerCompiler::value() {
return StoreConvention::ValueRegister(); return StoreDescriptor::ValueRegister();
} }
@ -839,7 +839,7 @@ Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal(
FrontendHeader(receiver(), name, &miss); FrontendHeader(receiver(), name, &miss);
// Get the value from the cell. // Get the value from the cell.
Register result = StoreConvention::ValueRegister(); Register result = StoreDescriptor::ValueRegister();
__ mov(result, Operand(cell)); __ mov(result, Operand(cell));
__ ldr(result, FieldMemOperand(result, Cell::kValueOffset)); __ ldr(result, FieldMemOperand(result, Cell::kValueOffset));

View File

@ -244,8 +244,8 @@ static void GenerateKeyNameCheck(MacroAssembler* masm, Register key,
void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
// The return address is in lr. // The return address is in lr.
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
Register name = LoadConvention::NameRegister(); Register name = LoadDescriptor::NameRegister();
DCHECK(receiver.is(r1)); DCHECK(receiver.is(r1));
DCHECK(name.is(r2)); DCHECK(name.is(r2));
@ -262,15 +262,15 @@ void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
void LoadIC::GenerateNormal(MacroAssembler* masm) { void LoadIC::GenerateNormal(MacroAssembler* masm) {
Register dictionary = r0; Register dictionary = r0;
DCHECK(!dictionary.is(LoadConvention::ReceiverRegister())); DCHECK(!dictionary.is(LoadDescriptor::ReceiverRegister()));
DCHECK(!dictionary.is(LoadConvention::NameRegister())); DCHECK(!dictionary.is(LoadDescriptor::NameRegister()));
Label slow; Label slow;
__ ldr(dictionary, FieldMemOperand(LoadConvention::ReceiverRegister(), __ ldr(dictionary, FieldMemOperand(LoadDescriptor::ReceiverRegister(),
JSObject::kPropertiesOffset)); JSObject::kPropertiesOffset));
GenerateDictionaryLoad(masm, &slow, dictionary, GenerateDictionaryLoad(masm, &slow, dictionary,
LoadConvention::NameRegister(), r0, r3, r4); LoadDescriptor::NameRegister(), r0, r3, r4);
__ Ret(); __ Ret();
// Dictionary load failed, go slow (but don't miss). // Dictionary load failed, go slow (but don't miss).
@ -289,8 +289,8 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
__ IncrementCounter(isolate->counters()->load_miss(), 1, r3, r4); __ IncrementCounter(isolate->counters()->load_miss(), 1, r3, r4);
__ mov(LoadIC_TempRegister(), LoadConvention::ReceiverRegister()); __ mov(LoadIC_TempRegister(), LoadDescriptor::ReceiverRegister());
__ Push(LoadIC_TempRegister(), LoadConvention::NameRegister()); __ Push(LoadIC_TempRegister(), LoadDescriptor::NameRegister());
// Perform tail call to the entry. // Perform tail call to the entry.
ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate); ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate);
@ -301,8 +301,8 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
// The return address is in lr. // The return address is in lr.
__ mov(LoadIC_TempRegister(), LoadConvention::ReceiverRegister()); __ mov(LoadIC_TempRegister(), LoadDescriptor::ReceiverRegister());
__ Push(LoadIC_TempRegister(), LoadConvention::NameRegister()); __ Push(LoadIC_TempRegister(), LoadDescriptor::NameRegister());
__ TailCallRuntime(Runtime::kGetProperty, 2, 1); __ TailCallRuntime(Runtime::kGetProperty, 2, 1);
} }
@ -389,8 +389,8 @@ static MemOperand GenerateUnmappedArgumentsLookup(MacroAssembler* masm,
void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) { void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
// The return address is in lr. // The return address is in lr.
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
Register key = LoadConvention::NameRegister(); Register key = LoadDescriptor::NameRegister();
DCHECK(receiver.is(r1)); DCHECK(receiver.is(r1));
DCHECK(key.is(r2)); DCHECK(key.is(r2));
@ -414,9 +414,9 @@ void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) { void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) {
Register receiver = StoreConvention::ReceiverRegister(); Register receiver = StoreDescriptor::ReceiverRegister();
Register key = StoreConvention::NameRegister(); Register key = StoreDescriptor::NameRegister();
Register value = StoreConvention::ValueRegister(); Register value = StoreDescriptor::ValueRegister();
DCHECK(receiver.is(r1)); DCHECK(receiver.is(r1));
DCHECK(key.is(r2)); DCHECK(key.is(r2));
DCHECK(value.is(r0)); DCHECK(value.is(r0));
@ -449,7 +449,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
__ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, r3, r4); __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, r3, r4);
__ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister()); __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
// Perform tail call to the entry. // Perform tail call to the entry.
ExternalReference ref = ExternalReference ref =
@ -462,7 +462,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
// The return address is in lr. // The return address is in lr.
__ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister()); __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
__ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1); __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1);
} }
@ -473,8 +473,8 @@ void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) {
Label slow, check_name, index_smi, index_name, property_array_property; Label slow, check_name, index_smi, index_name, property_array_property;
Label probe_dictionary, check_number_dictionary; Label probe_dictionary, check_number_dictionary;
Register key = LoadConvention::NameRegister(); Register key = LoadDescriptor::NameRegister();
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
DCHECK(key.is(r2)); DCHECK(key.is(r2));
DCHECK(receiver.is(r1)); DCHECK(receiver.is(r1));
@ -635,8 +635,8 @@ void KeyedLoadIC::GenerateString(MacroAssembler* masm) {
// Return address is in lr. // Return address is in lr.
Label miss; Label miss;
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
Register index = LoadConvention::NameRegister(); Register index = LoadDescriptor::NameRegister();
Register scratch = r3; Register scratch = r3;
Register result = r0; Register result = r0;
DCHECK(!scratch.is(receiver) && !scratch.is(index)); DCHECK(!scratch.is(receiver) && !scratch.is(index));
@ -661,8 +661,8 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) {
// Return address is in lr. // Return address is in lr.
Label slow; Label slow;
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
Register key = LoadConvention::NameRegister(); Register key = LoadDescriptor::NameRegister();
Register scratch1 = r3; Register scratch1 = r3;
Register scratch2 = r4; Register scratch2 = r4;
DCHECK(!scratch1.is(receiver) && !scratch1.is(key)); DCHECK(!scratch1.is(receiver) && !scratch1.is(key));
@ -701,8 +701,8 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) {
void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
// Push receiver, key and value for runtime call. // Push receiver, key and value for runtime call.
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(), __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
StoreConvention::ValueRegister()); StoreDescriptor::ValueRegister());
ExternalReference ref = ExternalReference ref =
ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate()); ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate());
@ -864,9 +864,9 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
Label array, extra, check_if_double_array; Label array, extra, check_if_double_array;
// Register usage. // Register usage.
Register value = StoreConvention::ValueRegister(); Register value = StoreDescriptor::ValueRegister();
Register key = StoreConvention::NameRegister(); Register key = StoreDescriptor::NameRegister();
Register receiver = StoreConvention::ReceiverRegister(); Register receiver = StoreDescriptor::ReceiverRegister();
DCHECK(receiver.is(r1)); DCHECK(receiver.is(r1));
DCHECK(key.is(r2)); DCHECK(key.is(r2));
DCHECK(value.is(r0)); DCHECK(value.is(r0));
@ -953,11 +953,11 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
Register receiver = StoreConvention::ReceiverRegister(); Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreConvention::NameRegister(); Register name = StoreDescriptor::NameRegister();
DCHECK(receiver.is(r1)); DCHECK(receiver.is(r1));
DCHECK(name.is(r2)); DCHECK(name.is(r2));
DCHECK(StoreConvention::ValueRegister().is(r0)); DCHECK(StoreDescriptor::ValueRegister().is(r0));
// Get the receiver from the stack and probe the stub cache. // Get the receiver from the stack and probe the stub cache.
Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
@ -972,8 +972,8 @@ void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
void StoreIC::GenerateMiss(MacroAssembler* masm) { void StoreIC::GenerateMiss(MacroAssembler* masm) {
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(), __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
StoreConvention::ValueRegister()); StoreDescriptor::ValueRegister());
// Perform tail call to the entry. // Perform tail call to the entry.
ExternalReference ref = ExternalReference ref =
@ -984,9 +984,9 @@ void StoreIC::GenerateMiss(MacroAssembler* masm) {
void StoreIC::GenerateNormal(MacroAssembler* masm) { void StoreIC::GenerateNormal(MacroAssembler* masm) {
Label miss; Label miss;
Register receiver = StoreConvention::ReceiverRegister(); Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreConvention::NameRegister(); Register name = StoreDescriptor::NameRegister();
Register value = StoreConvention::ValueRegister(); Register value = StoreDescriptor::ValueRegister();
Register dictionary = r3; Register dictionary = r3;
DCHECK(receiver.is(r1)); DCHECK(receiver.is(r1));
DCHECK(name.is(r2)); DCHECK(name.is(r2));

View File

@ -16,8 +16,8 @@ namespace internal {
void PropertyICCompiler::GenerateRuntimeSetProperty(MacroAssembler* masm, void PropertyICCompiler::GenerateRuntimeSetProperty(MacroAssembler* masm,
StrictMode strict_mode) { StrictMode strict_mode) {
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(), __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
StoreConvention::ValueRegister()); StoreDescriptor::ValueRegister());
__ mov(r0, Operand(Smi::FromInt(strict_mode))); __ mov(r0, Operand(Smi::FromInt(strict_mode)));
__ Push(r0); __ Push(r0);
@ -57,7 +57,7 @@ Handle<Code> PropertyICCompiler::CompilePolymorphic(TypeHandleList* types,
// Polymorphic keyed stores may use the map register // Polymorphic keyed stores may use the map register
Register map_reg = scratch1(); Register map_reg = scratch1();
DCHECK(kind() != Code::KEYED_STORE_IC || DCHECK(kind() != Code::KEYED_STORE_IC ||
map_reg.is(StoreConvention::MapRegister())); map_reg.is(ElementTransitionAndStoreDescriptor::MapRegister()));
int receiver_count = types->length(); int receiver_count = types->length();
int number_of_handled_maps = 0; int number_of_handled_maps = 0;

View File

@ -1,37 +0,0 @@
// 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() { return r0; }
const Register FullVectorLoadConvention::VectorRegister() { 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; }
const Register InstanceofConvention::left() { return r0; }
const Register InstanceofConvention::right() { return r1; }
}
} // namespace v8::internal
#endif // V8_TARGET_ARCH_ARM

View File

@ -29,8 +29,8 @@ void PropertyAccessCompiler::GenerateTailCall(MacroAssembler* masm,
Register* PropertyAccessCompiler::load_calling_convention() { Register* PropertyAccessCompiler::load_calling_convention() {
// receiver, name, scratch1, scratch2, scratch3, scratch4. // receiver, name, scratch1, scratch2, scratch3, scratch4.
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
Register name = LoadConvention::NameRegister(); Register name = LoadDescriptor::NameRegister();
static Register registers[] = {receiver, name, x3, x0, x4, x5}; static Register registers[] = {receiver, name, x3, x0, x4, x5};
return registers; return registers;
} }
@ -38,9 +38,9 @@ Register* PropertyAccessCompiler::load_calling_convention() {
Register* PropertyAccessCompiler::store_calling_convention() { Register* PropertyAccessCompiler::store_calling_convention() {
// receiver, value, scratch1, scratch2, scratch3. // receiver, value, scratch1, scratch2, scratch3.
Register receiver = StoreConvention::ReceiverRegister(); Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreConvention::NameRegister(); Register name = StoreDescriptor::NameRegister();
DCHECK(x3.is(StoreConvention::MapRegister())); DCHECK(x3.is(ElementTransitionAndStoreDescriptor::MapRegister()));
static Register registers[] = {receiver, name, x3, x4, x5}; static Register registers[] = {receiver, name, x3, x4, x5};
return registers; return registers;
} }

View File

@ -285,8 +285,8 @@ void ElementHandlerCompiler::GenerateLoadDictionaryElement(
Label slow, miss; Label slow, miss;
Register result = x0; Register result = x0;
Register key = LoadConvention::NameRegister(); Register key = LoadDescriptor::NameRegister();
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
DCHECK(receiver.is(x1)); DCHECK(receiver.is(x1));
DCHECK(key.is(x2)); DCHECK(key.is(x2));
@ -308,8 +308,8 @@ void ElementHandlerCompiler::GenerateLoadDictionaryElement(
void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) { void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
// Push receiver, name and value for runtime call. // Push receiver, name and value for runtime call.
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(), __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
StoreConvention::ValueRegister()); StoreDescriptor::ValueRegister());
// The slow case calls into the runtime to complete the store without causing // 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. // 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"); ASM_LOCATION("ElementHandlerCompiler::GenerateStoreSlow");
// Push receiver, key and value for runtime call. // Push receiver, key and value for runtime call.
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(), __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
StoreConvention::ValueRegister()); StoreDescriptor::ValueRegister());
// The slow case calls into the runtime to complete the store without causing // 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. // 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); FrontendHeader(receiver(), name, &miss);
// Get the value from the cell. // Get the value from the cell.
Register result = StoreConvention::ValueRegister(); Register result = StoreDescriptor::ValueRegister();
__ Mov(result, Operand(cell)); __ Mov(result, Operand(cell));
__ Ldr(result, FieldMemOperand(result, Cell::kValueOffset)); __ Ldr(result, FieldMemOperand(result, Cell::kValueOffset));
@ -383,7 +383,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor(
Register NamedStoreHandlerCompiler::value() { Register NamedStoreHandlerCompiler::value() {
return StoreConvention::ValueRegister(); return StoreDescriptor::ValueRegister();
} }

View File

@ -333,8 +333,8 @@ static MemOperand GenerateUnmappedArgumentsLookup(MacroAssembler* masm,
void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
// The return address is in lr. // The return address is in lr.
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
Register name = LoadConvention::NameRegister(); Register name = LoadDescriptor::NameRegister();
DCHECK(receiver.is(x1)); DCHECK(receiver.is(x1));
DCHECK(name.is(x2)); DCHECK(name.is(x2));
@ -351,14 +351,14 @@ void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
void LoadIC::GenerateNormal(MacroAssembler* masm) { void LoadIC::GenerateNormal(MacroAssembler* masm) {
Register dictionary = x0; Register dictionary = x0;
DCHECK(!dictionary.is(LoadConvention::ReceiverRegister())); DCHECK(!dictionary.is(LoadDescriptor::ReceiverRegister()));
DCHECK(!dictionary.is(LoadConvention::NameRegister())); DCHECK(!dictionary.is(LoadDescriptor::NameRegister()));
Label slow; Label slow;
__ Ldr(dictionary, FieldMemOperand(LoadConvention::ReceiverRegister(), __ Ldr(dictionary, FieldMemOperand(LoadDescriptor::ReceiverRegister(),
JSObject::kPropertiesOffset)); JSObject::kPropertiesOffset));
GenerateDictionaryLoad(masm, &slow, dictionary, GenerateDictionaryLoad(masm, &slow, dictionary,
LoadConvention::NameRegister(), x0, x3, x4); LoadDescriptor::NameRegister(), x0, x3, x4);
__ Ret(); __ Ret();
// Dictionary load failed, go slow (but don't miss). // Dictionary load failed, go slow (but don't miss).
@ -375,7 +375,7 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
__ IncrementCounter(isolate->counters()->load_miss(), 1, x3, x4); __ IncrementCounter(isolate->counters()->load_miss(), 1, x3, x4);
// Perform tail call to the entry. // Perform tail call to the entry.
__ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister()); __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate); ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate);
__ TailCallExternalReference(ref, 2, 1); __ TailCallExternalReference(ref, 2, 1);
} }
@ -383,7 +383,7 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
// The return address is in lr. // The return address is in lr.
__ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister()); __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
__ TailCallRuntime(Runtime::kGetProperty, 2, 1); __ TailCallRuntime(Runtime::kGetProperty, 2, 1);
} }
@ -391,8 +391,8 @@ void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) { void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
// The return address is in lr. // The return address is in lr.
Register result = x0; Register result = x0;
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
Register key = LoadConvention::NameRegister(); Register key = LoadDescriptor::NameRegister();
DCHECK(receiver.is(x1)); DCHECK(receiver.is(x1));
DCHECK(key.is(x2)); DCHECK(key.is(x2));
@ -420,9 +420,9 @@ void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) { void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) {
ASM_LOCATION("KeyedStoreIC::GenerateSloppyArguments"); ASM_LOCATION("KeyedStoreIC::GenerateSloppyArguments");
Label slow, notin; Label slow, notin;
Register value = StoreConvention::ValueRegister(); Register value = StoreDescriptor::ValueRegister();
Register key = StoreConvention::NameRegister(); Register key = StoreDescriptor::NameRegister();
Register receiver = StoreConvention::ReceiverRegister(); Register receiver = StoreDescriptor::ReceiverRegister();
DCHECK(receiver.is(x1)); DCHECK(receiver.is(x1));
DCHECK(key.is(x2)); DCHECK(key.is(x2));
DCHECK(value.is(x0)); DCHECK(value.is(x0));
@ -469,7 +469,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
__ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, x10, x11); __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, x10, x11);
__ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister()); __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
// Perform tail call to the entry. // Perform tail call to the entry.
ExternalReference ref = ExternalReference ref =
@ -481,7 +481,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
// The return address is in lr. // The return address is in lr.
__ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister()); __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
__ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1); __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1);
} }
@ -645,8 +645,8 @@ void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) {
// The return address is in lr. // The return address is in lr.
Label slow, check_name, index_smi, index_name; Label slow, check_name, index_smi, index_name;
Register key = LoadConvention::NameRegister(); Register key = LoadDescriptor::NameRegister();
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
DCHECK(key.is(x2)); DCHECK(key.is(x2));
DCHECK(receiver.is(x1)); DCHECK(receiver.is(x1));
@ -678,8 +678,8 @@ void KeyedLoadIC::GenerateString(MacroAssembler* masm) {
// Return address is in lr. // Return address is in lr.
Label miss; Label miss;
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
Register index = LoadConvention::NameRegister(); Register index = LoadDescriptor::NameRegister();
Register result = x0; Register result = x0;
Register scratch = x3; Register scratch = x3;
DCHECK(!scratch.is(receiver) && !scratch.is(index)); DCHECK(!scratch.is(receiver) && !scratch.is(index));
@ -704,8 +704,8 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) {
// Return address is in lr. // Return address is in lr.
Label slow; Label slow;
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
Register key = LoadConvention::NameRegister(); Register key = LoadDescriptor::NameRegister();
Register scratch1 = x3; Register scratch1 = x3;
Register scratch2 = x4; Register scratch2 = x4;
DCHECK(!AreAliased(scratch1, scratch2, receiver, key)); DCHECK(!AreAliased(scratch1, scratch2, receiver, key));
@ -744,8 +744,8 @@ void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
ASM_LOCATION("KeyedStoreIC::GenerateMiss"); ASM_LOCATION("KeyedStoreIC::GenerateMiss");
// Push receiver, key and value for runtime call. // Push receiver, key and value for runtime call.
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(), __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
StoreConvention::ValueRegister()); StoreDescriptor::ValueRegister());
ExternalReference ref = ExternalReference ref =
ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate()); ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate());
@ -896,9 +896,9 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
Label fast_double_grow; Label fast_double_grow;
Label fast_double; Label fast_double;
Register value = StoreConvention::ValueRegister(); Register value = StoreDescriptor::ValueRegister();
Register key = StoreConvention::NameRegister(); Register key = StoreDescriptor::NameRegister();
Register receiver = StoreConvention::ReceiverRegister(); Register receiver = StoreDescriptor::ReceiverRegister();
DCHECK(receiver.is(x1)); DCHECK(receiver.is(x1));
DCHECK(key.is(x2)); DCHECK(key.is(x2));
DCHECK(value.is(x0)); DCHECK(value.is(x0));
@ -986,9 +986,9 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
Register receiver = StoreConvention::ReceiverRegister(); Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreConvention::NameRegister(); Register name = StoreDescriptor::NameRegister();
DCHECK(!AreAliased(receiver, name, StoreConvention::ValueRegister(), x3, x4, DCHECK(!AreAliased(receiver, name, StoreDescriptor::ValueRegister(), x3, x4,
x5, x6)); x5, x6));
// Probe the stub cache. // Probe the stub cache.
@ -1003,8 +1003,8 @@ void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
void StoreIC::GenerateMiss(MacroAssembler* masm) { void StoreIC::GenerateMiss(MacroAssembler* masm) {
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(), __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
StoreConvention::ValueRegister()); StoreDescriptor::ValueRegister());
// Tail call to the entry. // Tail call to the entry.
ExternalReference ref = ExternalReference ref =
@ -1015,9 +1015,9 @@ void StoreIC::GenerateMiss(MacroAssembler* masm) {
void StoreIC::GenerateNormal(MacroAssembler* masm) { void StoreIC::GenerateNormal(MacroAssembler* masm) {
Label miss; Label miss;
Register value = StoreConvention::ValueRegister(); Register value = StoreDescriptor::ValueRegister();
Register receiver = StoreConvention::ReceiverRegister(); Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreConvention::NameRegister(); Register name = StoreDescriptor::NameRegister();
Register dictionary = x3; Register dictionary = x3;
DCHECK(!AreAliased(value, receiver, name, x3, x4, x5)); DCHECK(!AreAliased(value, receiver, name, x3, x4, x5));

View File

@ -17,8 +17,8 @@ void PropertyICCompiler::GenerateRuntimeSetProperty(MacroAssembler* masm,
StrictMode strict_mode) { StrictMode strict_mode) {
ASM_LOCATION("PropertyICCompiler::GenerateRuntimeSetProperty"); ASM_LOCATION("PropertyICCompiler::GenerateRuntimeSetProperty");
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(), __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
StoreConvention::ValueRegister()); StoreDescriptor::ValueRegister());
__ Mov(x10, Smi::FromInt(strict_mode)); __ Mov(x10, Smi::FromInt(strict_mode));
__ Push(x10); __ Push(x10);
@ -57,7 +57,7 @@ Handle<Code> PropertyICCompiler::CompilePolymorphic(TypeHandleList* types,
// Polymorphic keyed stores may use the map register // Polymorphic keyed stores may use the map register
Register map_reg = scratch1(); Register map_reg = scratch1();
DCHECK(kind() != Code::KEYED_STORE_IC || DCHECK(kind() != Code::KEYED_STORE_IC ||
map_reg.is(StoreConvention::MapRegister())); map_reg.is(ElementTransitionAndStoreDescriptor::MapRegister()));
__ Ldr(map_reg, FieldMemOperand(receiver(), HeapObject::kMapOffset)); __ Ldr(map_reg, FieldMemOperand(receiver(), HeapObject::kMapOffset));
int receiver_count = types->length(); int receiver_count = types->length();
int number_of_handled_maps = 0; int number_of_handled_maps = 0;

View File

@ -1,47 +0,0 @@
// 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() { return x0; }
const Register FullVectorLoadConvention::VectorRegister() { 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; }
const Register InstanceofConvention::left() {
// Object to check (instanceof lhs).
return x11;
}
const Register InstanceofConvention::right() {
// Constructor function (instanceof rhs).
return x10;
}
}
} // namespace v8::internal
#endif // V8_TARGET_ARCH_ARM64

View File

@ -21,8 +21,8 @@ void PropertyAccessCompiler::GenerateTailCall(MacroAssembler* masm,
Register* PropertyAccessCompiler::load_calling_convention() { Register* PropertyAccessCompiler::load_calling_convention() {
// receiver, name, scratch1, scratch2, scratch3, scratch4. // receiver, name, scratch1, scratch2, scratch3, scratch4.
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
Register name = LoadConvention::NameRegister(); Register name = LoadDescriptor::NameRegister();
static Register registers[] = {receiver, name, ebx, eax, edi, no_reg}; static Register registers[] = {receiver, name, ebx, eax, edi, no_reg};
return registers; return registers;
} }
@ -30,9 +30,9 @@ Register* PropertyAccessCompiler::load_calling_convention() {
Register* PropertyAccessCompiler::store_calling_convention() { Register* PropertyAccessCompiler::store_calling_convention() {
// receiver, name, scratch1, scratch2, scratch3. // receiver, name, scratch1, scratch2, scratch3.
Register receiver = StoreConvention::ReceiverRegister(); Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreConvention::NameRegister(); Register name = StoreDescriptor::NameRegister();
DCHECK(ebx.is(StoreConvention::MapRegister())); DCHECK(ebx.is(ElementTransitionAndStoreDescriptor::MapRegister()));
static Register registers[] = {receiver, name, ebx, edi, no_reg}; static Register registers[] = {receiver, name, ebx, edi, no_reg};
return registers; return registers;
} }

View File

@ -22,8 +22,8 @@ void ElementHandlerCompiler::GenerateLoadDictionaryElement(
// -- edx : receiver // -- edx : receiver
// -- esp[0] : return address // -- esp[0] : return address
// ----------------------------------- // -----------------------------------
DCHECK(edx.is(LoadConvention::ReceiverRegister())); DCHECK(edx.is(LoadDescriptor::ReceiverRegister()));
DCHECK(ecx.is(LoadConvention::NameRegister())); DCHECK(ecx.is(LoadDescriptor::NameRegister()));
Label slow, miss; Label slow, miss;
// This stub is meant to be tail-jumped to, the receiver must already // 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) { static void StoreIC_PushArgs(MacroAssembler* masm) {
Register receiver = StoreConvention::ReceiverRegister(); Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreConvention::NameRegister(); Register name = StoreDescriptor::NameRegister();
Register value = StoreConvention::ValueRegister(); Register value = StoreDescriptor::ValueRegister();
DCHECK(!ebx.is(receiver) && !ebx.is(name) && !ebx.is(value)); DCHECK(!ebx.is(receiver) && !ebx.is(name) && !ebx.is(value));
@ -853,7 +853,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor(
Register NamedStoreHandlerCompiler::value() { Register NamedStoreHandlerCompiler::value() {
return StoreConvention::ValueRegister(); return StoreDescriptor::ValueRegister();
} }
@ -863,7 +863,7 @@ Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal(
FrontendHeader(receiver(), name, &miss); FrontendHeader(receiver(), name, &miss);
// Get the value from the cell. // Get the value from the cell.
Register result = StoreConvention::ValueRegister(); Register result = StoreDescriptor::ValueRegister();
if (masm()->serializer_enabled()) { if (masm()->serializer_enabled()) {
__ mov(result, Immediate(cell)); __ mov(result, Immediate(cell));
__ mov(result, FieldOperand(result, PropertyCell::kValueOffset)); __ mov(result, FieldOperand(result, PropertyCell::kValueOffset));

View File

@ -17,13 +17,13 @@ namespace internal {
void PropertyICCompiler::GenerateRuntimeSetProperty(MacroAssembler* masm, void PropertyICCompiler::GenerateRuntimeSetProperty(MacroAssembler* masm,
StrictMode strict_mode) { StrictMode strict_mode) {
// Return address is on the stack. // Return address is on the stack.
DCHECK(!ebx.is(StoreConvention::ReceiverRegister()) && DCHECK(!ebx.is(StoreDescriptor::ReceiverRegister()) &&
!ebx.is(StoreConvention::NameRegister()) && !ebx.is(StoreDescriptor::NameRegister()) &&
!ebx.is(StoreConvention::ValueRegister())); !ebx.is(StoreDescriptor::ValueRegister()));
__ pop(ebx); __ pop(ebx);
__ push(StoreConvention::ReceiverRegister()); __ push(StoreDescriptor::ReceiverRegister());
__ push(StoreConvention::NameRegister()); __ push(StoreDescriptor::NameRegister());
__ push(StoreConvention::ValueRegister()); __ push(StoreDescriptor::ValueRegister());
__ push(Immediate(Smi::FromInt(strict_mode))); __ push(Immediate(Smi::FromInt(strict_mode)));
__ push(ebx); // return address __ push(ebx); // return address
@ -61,7 +61,7 @@ Handle<Code> PropertyICCompiler::CompilePolymorphic(TypeHandleList* types,
// Polymorphic keyed stores may use the map register // Polymorphic keyed stores may use the map register
Register map_reg = scratch1(); Register map_reg = scratch1();
DCHECK(kind() != Code::KEYED_STORE_IC || DCHECK(kind() != Code::KEYED_STORE_IC ||
map_reg.is(StoreConvention::MapRegister())); map_reg.is(ElementTransitionAndStoreDescriptor::MapRegister()));
__ mov(map_reg, FieldOperand(receiver(), HeapObject::kMapOffset)); __ mov(map_reg, FieldOperand(receiver(), HeapObject::kMapOffset));
int receiver_count = types->length(); int receiver_count = types->length();
int number_of_handled_maps = 0; int number_of_handled_maps = 0;

View File

@ -1,38 +0,0 @@
// 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() { return eax; }
const Register FullVectorLoadConvention::VectorRegister() { 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; }
const Register InstanceofConvention::left() { return eax; }
const Register InstanceofConvention::right() { return edx; }
}
} // namespace v8::internal
#endif // V8_TARGET_ARCH_IA32

View File

@ -310,8 +310,8 @@ void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) {
Label slow, check_name, index_smi, index_name, property_array_property; Label slow, check_name, index_smi, index_name, property_array_property;
Label probe_dictionary, check_number_dictionary; Label probe_dictionary, check_number_dictionary;
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
Register key = LoadConvention::NameRegister(); Register key = LoadDescriptor::NameRegister();
DCHECK(receiver.is(edx)); DCHECK(receiver.is(edx));
DCHECK(key.is(ecx)); DCHECK(key.is(ecx));
@ -480,8 +480,8 @@ void KeyedLoadIC::GenerateString(MacroAssembler* masm) {
// Return address is on the stack. // Return address is on the stack.
Label miss; Label miss;
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
Register index = LoadConvention::NameRegister(); Register index = LoadDescriptor::NameRegister();
Register scratch = ebx; Register scratch = ebx;
DCHECK(!scratch.is(receiver) && !scratch.is(index)); DCHECK(!scratch.is(receiver) && !scratch.is(index));
Register result = eax; Register result = eax;
@ -507,8 +507,8 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) {
// Return address is on the stack. // Return address is on the stack.
Label slow; Label slow;
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
Register key = LoadConvention::NameRegister(); Register key = LoadDescriptor::NameRegister();
Register scratch = eax; Register scratch = eax;
DCHECK(!scratch.is(receiver) && !scratch.is(key)); DCHECK(!scratch.is(receiver) && !scratch.is(key));
@ -547,8 +547,8 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) {
void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) { void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
// The return address is on the stack. // The return address is on the stack.
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
Register key = LoadConvention::NameRegister(); Register key = LoadDescriptor::NameRegister();
DCHECK(receiver.is(edx)); DCHECK(receiver.is(edx));
DCHECK(key.is(ecx)); DCHECK(key.is(ecx));
@ -574,9 +574,9 @@ void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) { void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) {
// Return address is on the stack. // Return address is on the stack.
Label slow, notin; Label slow, notin;
Register receiver = StoreConvention::ReceiverRegister(); Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreConvention::NameRegister(); Register name = StoreDescriptor::NameRegister();
Register value = StoreConvention::ValueRegister(); Register value = StoreDescriptor::ValueRegister();
DCHECK(receiver.is(edx)); DCHECK(receiver.is(edx));
DCHECK(name.is(ecx)); DCHECK(name.is(ecx));
DCHECK(value.is(eax)); DCHECK(value.is(eax));
@ -608,9 +608,9 @@ static void KeyedStoreGenerateGenericHelper(
Label transition_smi_elements; Label transition_smi_elements;
Label finish_object_store, non_double_value, transition_double_elements; Label finish_object_store, non_double_value, transition_double_elements;
Label fast_double_without_map_check; Label fast_double_without_map_check;
Register receiver = StoreConvention::ReceiverRegister(); Register receiver = StoreDescriptor::ReceiverRegister();
Register key = StoreConvention::NameRegister(); Register key = StoreDescriptor::NameRegister();
Register value = StoreConvention::ValueRegister(); Register value = StoreDescriptor::ValueRegister();
DCHECK(receiver.is(edx)); DCHECK(receiver.is(edx));
DCHECK(key.is(ecx)); DCHECK(key.is(ecx));
DCHECK(value.is(eax)); DCHECK(value.is(eax));
@ -746,8 +746,8 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
Label slow, fast_object, fast_object_grow; Label slow, fast_object, fast_object_grow;
Label fast_double, fast_double_grow; Label fast_double, fast_double_grow;
Label array, extra, check_if_double_array; Label array, extra, check_if_double_array;
Register receiver = StoreConvention::ReceiverRegister(); Register receiver = StoreDescriptor::ReceiverRegister();
Register key = StoreConvention::NameRegister(); Register key = StoreDescriptor::NameRegister();
DCHECK(receiver.is(edx)); DCHECK(receiver.is(edx));
DCHECK(key.is(ecx)); DCHECK(key.is(ecx));
@ -826,8 +826,8 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
// The return address is on the stack. // The return address is on the stack.
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
Register name = LoadConvention::NameRegister(); Register name = LoadDescriptor::NameRegister();
DCHECK(receiver.is(edx)); DCHECK(receiver.is(edx));
DCHECK(name.is(ecx)); DCHECK(name.is(ecx));
@ -844,15 +844,15 @@ void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
void LoadIC::GenerateNormal(MacroAssembler* masm) { void LoadIC::GenerateNormal(MacroAssembler* masm) {
Register dictionary = eax; Register dictionary = eax;
DCHECK(!dictionary.is(LoadConvention::ReceiverRegister())); DCHECK(!dictionary.is(LoadDescriptor::ReceiverRegister()));
DCHECK(!dictionary.is(LoadConvention::NameRegister())); DCHECK(!dictionary.is(LoadDescriptor::NameRegister()));
Label slow; Label slow;
__ mov(dictionary, FieldOperand(LoadConvention::ReceiverRegister(), __ mov(dictionary, FieldOperand(LoadDescriptor::ReceiverRegister(),
JSObject::kPropertiesOffset)); JSObject::kPropertiesOffset));
GenerateDictionaryLoad(masm, &slow, dictionary, GenerateDictionaryLoad(masm, &slow, dictionary,
LoadConvention::NameRegister(), edi, ebx, eax); LoadDescriptor::NameRegister(), edi, ebx, eax);
__ ret(0); __ ret(0);
// Dictionary load failed, go slow (but don't miss). // Dictionary load failed, go slow (but don't miss).
@ -862,8 +862,8 @@ void LoadIC::GenerateNormal(MacroAssembler* masm) {
static void LoadIC_PushArgs(MacroAssembler* masm) { static void LoadIC_PushArgs(MacroAssembler* masm) {
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
Register name = LoadConvention::NameRegister(); Register name = LoadDescriptor::NameRegister();
DCHECK(!ebx.is(receiver) && !ebx.is(name)); DCHECK(!ebx.is(receiver) && !ebx.is(name));
__ pop(ebx); __ pop(ebx);
@ -922,8 +922,8 @@ void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
Code::ComputeHandlerFlags(Code::STORE_IC)); Code::ComputeHandlerFlags(Code::STORE_IC));
masm->isolate()->stub_cache()->GenerateProbe( masm->isolate()->stub_cache()->GenerateProbe(
masm, flags, StoreConvention::ReceiverRegister(), masm, flags, StoreDescriptor::ReceiverRegister(),
StoreConvention::NameRegister(), ebx, no_reg); StoreDescriptor::NameRegister(), ebx, no_reg);
// Cache miss: Jump to runtime. // Cache miss: Jump to runtime.
GenerateMiss(masm); GenerateMiss(masm);
@ -931,9 +931,9 @@ void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
static void StoreIC_PushArgs(MacroAssembler* masm) { static void StoreIC_PushArgs(MacroAssembler* masm) {
Register receiver = StoreConvention::ReceiverRegister(); Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreConvention::NameRegister(); Register name = StoreDescriptor::NameRegister();
Register value = StoreConvention::ValueRegister(); Register value = StoreDescriptor::ValueRegister();
DCHECK(!ebx.is(receiver) && !ebx.is(name) && !ebx.is(value)); DCHECK(!ebx.is(receiver) && !ebx.is(name) && !ebx.is(value));
@ -958,9 +958,9 @@ void StoreIC::GenerateMiss(MacroAssembler* masm) {
void StoreIC::GenerateNormal(MacroAssembler* masm) { void StoreIC::GenerateNormal(MacroAssembler* masm) {
Label restore_miss; Label restore_miss;
Register receiver = StoreConvention::ReceiverRegister(); Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreConvention::NameRegister(); Register name = StoreDescriptor::NameRegister();
Register value = StoreConvention::ValueRegister(); Register value = StoreDescriptor::ValueRegister();
Register dictionary = ebx; Register dictionary = ebx;
__ mov(dictionary, FieldOperand(receiver, JSObject::kPropertiesOffset)); __ mov(dictionary, FieldOperand(receiver, JSObject::kPropertiesOffset));

View File

@ -1,72 +0,0 @@
// 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();
};
class InstanceofConvention {
public:
enum ParameterIndices { kLeftIndex, kRightIndex, kParameterCount };
static const Register left();
static const Register right();
};
}
} // namespace v8::internal
#endif // V8_IC_CONVENTIONS_H_

View File

@ -22,8 +22,8 @@ void PropertyAccessCompiler::GenerateTailCall(MacroAssembler* masm,
Register* PropertyAccessCompiler::load_calling_convention() { Register* PropertyAccessCompiler::load_calling_convention() {
// receiver, name, scratch1, scratch2, scratch3, scratch4. // receiver, name, scratch1, scratch2, scratch3, scratch4.
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
Register name = LoadConvention::NameRegister(); Register name = LoadDescriptor::NameRegister();
static Register registers[] = {receiver, name, rax, rbx, rdi, r8}; static Register registers[] = {receiver, name, rax, rbx, rdi, r8};
return registers; return registers;
} }
@ -31,9 +31,9 @@ Register* PropertyAccessCompiler::load_calling_convention() {
Register* PropertyAccessCompiler::store_calling_convention() { Register* PropertyAccessCompiler::store_calling_convention() {
// receiver, name, scratch1, scratch2, scratch3. // receiver, name, scratch1, scratch2, scratch3.
Register receiver = StoreConvention::ReceiverRegister(); Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreConvention::NameRegister(); Register name = StoreDescriptor::NameRegister();
DCHECK(rbx.is(StoreConvention::MapRegister())); DCHECK(rbx.is(ElementTransitionAndStoreDescriptor::MapRegister()));
static Register registers[] = {receiver, name, rbx, rdi, r8}; static Register registers[] = {receiver, name, rbx, rdi, r8};
return registers; return registers;
} }

View File

@ -283,8 +283,8 @@ void ElementHandlerCompiler::GenerateLoadDictionaryElement(
// -- rdx : receiver // -- rdx : receiver
// -- rsp[0] : return address // -- rsp[0] : return address
// ----------------------------------- // -----------------------------------
DCHECK(rdx.is(LoadConvention::ReceiverRegister())); DCHECK(rdx.is(LoadDescriptor::ReceiverRegister()));
DCHECK(rcx.is(LoadConvention::NameRegister())); DCHECK(rcx.is(LoadDescriptor::NameRegister()));
Label slow, miss; Label slow, miss;
// This stub is meant to be tail-jumped to, the receiver must already // 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) { static void StoreIC_PushArgs(MacroAssembler* masm) {
Register receiver = StoreConvention::ReceiverRegister(); Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreConvention::NameRegister(); Register name = StoreDescriptor::NameRegister();
Register value = StoreConvention::ValueRegister(); Register value = StoreDescriptor::ValueRegister();
DCHECK(!rbx.is(receiver) && !rbx.is(name) && !rbx.is(value)); DCHECK(!rbx.is(receiver) && !rbx.is(name) && !rbx.is(value));
@ -839,7 +839,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor(
Register NamedStoreHandlerCompiler::value() { Register NamedStoreHandlerCompiler::value() {
return StoreConvention::ValueRegister(); return StoreDescriptor::ValueRegister();
} }
@ -849,7 +849,7 @@ Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal(
FrontendHeader(receiver(), name, &miss); FrontendHeader(receiver(), name, &miss);
// Get the value from the cell. // Get the value from the cell.
Register result = StoreConvention::ValueRegister(); Register result = StoreDescriptor::ValueRegister();
__ Move(result, cell); __ Move(result, cell);
__ movp(result, FieldOperand(result, PropertyCell::kValueOffset)); __ movp(result, FieldOperand(result, PropertyCell::kValueOffset));

View File

@ -17,14 +17,14 @@ namespace internal {
void PropertyICCompiler::GenerateRuntimeSetProperty(MacroAssembler* masm, void PropertyICCompiler::GenerateRuntimeSetProperty(MacroAssembler* masm,
StrictMode strict_mode) { StrictMode strict_mode) {
// Return address is on the stack. // Return address is on the stack.
DCHECK(!rbx.is(StoreConvention::ReceiverRegister()) && DCHECK(!rbx.is(StoreDescriptor::ReceiverRegister()) &&
!rbx.is(StoreConvention::NameRegister()) && !rbx.is(StoreDescriptor::NameRegister()) &&
!rbx.is(StoreConvention::ValueRegister())); !rbx.is(StoreDescriptor::ValueRegister()));
__ PopReturnAddressTo(rbx); __ PopReturnAddressTo(rbx);
__ Push(StoreConvention::ReceiverRegister()); __ Push(StoreDescriptor::ReceiverRegister());
__ Push(StoreConvention::NameRegister()); __ Push(StoreDescriptor::NameRegister());
__ Push(StoreConvention::ValueRegister()); __ Push(StoreDescriptor::ValueRegister());
__ Push(Smi::FromInt(strict_mode)); __ Push(Smi::FromInt(strict_mode));
__ PushReturnAddressFrom(rbx); __ PushReturnAddressFrom(rbx);
@ -95,7 +95,7 @@ Handle<Code> PropertyICCompiler::CompilePolymorphic(TypeHandleList* types,
// Polymorphic keyed stores may use the map register // Polymorphic keyed stores may use the map register
Register map_reg = scratch1(); Register map_reg = scratch1();
DCHECK(kind() != Code::KEYED_STORE_IC || DCHECK(kind() != Code::KEYED_STORE_IC ||
map_reg.is(StoreConvention::MapRegister())); map_reg.is(ElementTransitionAndStoreDescriptor::MapRegister()));
__ movp(map_reg, FieldOperand(receiver(), HeapObject::kMapOffset)); __ movp(map_reg, FieldOperand(receiver(), HeapObject::kMapOffset));
int receiver_count = types->length(); int receiver_count = types->length();
int number_of_handled_maps = 0; int number_of_handled_maps = 0;

View File

@ -1,38 +0,0 @@
// 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() { return rax; }
const Register FullVectorLoadConvention::VectorRegister() { 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; }
// Passing arguments in registers is not supported.
const Register InstanceofConvention::left() { return rax; }
const Register InstanceofConvention::right() { return rdx; }
}
} // namespace v8::internal
#endif // V8_TARGET_ARCH_X64

View File

@ -257,8 +257,8 @@ void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) {
Label slow, check_name, index_smi, index_name, property_array_property; Label slow, check_name, index_smi, index_name, property_array_property;
Label probe_dictionary, check_number_dictionary; Label probe_dictionary, check_number_dictionary;
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
Register key = LoadConvention::NameRegister(); Register key = LoadDescriptor::NameRegister();
DCHECK(receiver.is(rdx)); DCHECK(receiver.is(rdx));
DCHECK(key.is(rcx)); DCHECK(key.is(rcx));
@ -407,8 +407,8 @@ void KeyedLoadIC::GenerateString(MacroAssembler* masm) {
// Return address is on the stack. // Return address is on the stack.
Label miss; Label miss;
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
Register index = LoadConvention::NameRegister(); Register index = LoadDescriptor::NameRegister();
Register scratch = rbx; Register scratch = rbx;
Register result = rax; Register result = rax;
DCHECK(!scratch.is(receiver) && !scratch.is(index)); DCHECK(!scratch.is(receiver) && !scratch.is(index));
@ -433,8 +433,8 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) {
// Return address is on the stack. // Return address is on the stack.
Label slow; Label slow;
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
Register key = LoadConvention::NameRegister(); Register key = LoadDescriptor::NameRegister();
Register scratch = rax; Register scratch = rax;
DCHECK(!scratch.is(receiver) && !scratch.is(key)); DCHECK(!scratch.is(receiver) && !scratch.is(key));
@ -478,9 +478,9 @@ static void KeyedStoreGenerateGenericHelper(
Label transition_smi_elements; Label transition_smi_elements;
Label finish_object_store, non_double_value, transition_double_elements; Label finish_object_store, non_double_value, transition_double_elements;
Label fast_double_without_map_check; Label fast_double_without_map_check;
Register receiver = StoreConvention::ReceiverRegister(); Register receiver = StoreDescriptor::ReceiverRegister();
Register key = StoreConvention::NameRegister(); Register key = StoreDescriptor::NameRegister();
Register value = StoreConvention::ValueRegister(); Register value = StoreDescriptor::ValueRegister();
DCHECK(receiver.is(rdx)); DCHECK(receiver.is(rdx));
DCHECK(key.is(rcx)); DCHECK(key.is(rcx));
DCHECK(value.is(rax)); 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 slow, slow_with_tagged_index, fast_object, fast_object_grow;
Label fast_double, fast_double_grow; Label fast_double, fast_double_grow;
Label array, extra, check_if_double_array; Label array, extra, check_if_double_array;
Register receiver = StoreConvention::ReceiverRegister(); Register receiver = StoreDescriptor::ReceiverRegister();
Register key = StoreConvention::NameRegister(); Register key = StoreDescriptor::NameRegister();
DCHECK(receiver.is(rdx)); DCHECK(receiver.is(rdx));
DCHECK(key.is(rcx)); DCHECK(key.is(rcx));
@ -767,8 +767,8 @@ static Operand GenerateUnmappedArgumentsLookup(MacroAssembler* masm,
void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) { void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
// The return address is on the stack. // The return address is on the stack.
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
Register key = LoadConvention::NameRegister(); Register key = LoadDescriptor::NameRegister();
DCHECK(receiver.is(rdx)); DCHECK(receiver.is(rdx));
DCHECK(key.is(rcx)); DCHECK(key.is(rcx));
@ -793,9 +793,9 @@ void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) { void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) {
// The return address is on the stack. // The return address is on the stack.
Label slow, notin; Label slow, notin;
Register receiver = StoreConvention::ReceiverRegister(); Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreConvention::NameRegister(); Register name = StoreDescriptor::NameRegister();
Register value = StoreConvention::ValueRegister(); Register value = StoreDescriptor::ValueRegister();
DCHECK(receiver.is(rdx)); DCHECK(receiver.is(rdx));
DCHECK(name.is(rcx)); DCHECK(name.is(rcx));
DCHECK(value.is(rax)); DCHECK(value.is(rax));
@ -825,8 +825,8 @@ void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) {
void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
// The return address is on the stack. // The return address is on the stack.
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
Register name = LoadConvention::NameRegister(); Register name = LoadDescriptor::NameRegister();
DCHECK(receiver.is(rdx)); DCHECK(receiver.is(rdx));
DCHECK(name.is(rcx)); DCHECK(name.is(rcx));
@ -842,15 +842,15 @@ void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
void LoadIC::GenerateNormal(MacroAssembler* masm) { void LoadIC::GenerateNormal(MacroAssembler* masm) {
Register dictionary = rax; Register dictionary = rax;
DCHECK(!dictionary.is(LoadConvention::ReceiverRegister())); DCHECK(!dictionary.is(LoadDescriptor::ReceiverRegister()));
DCHECK(!dictionary.is(LoadConvention::NameRegister())); DCHECK(!dictionary.is(LoadDescriptor::NameRegister()));
Label slow; Label slow;
__ movp(dictionary, FieldOperand(LoadConvention::ReceiverRegister(), __ movp(dictionary, FieldOperand(LoadDescriptor::ReceiverRegister(),
JSObject::kPropertiesOffset)); JSObject::kPropertiesOffset));
GenerateDictionaryLoad(masm, &slow, dictionary, GenerateDictionaryLoad(masm, &slow, dictionary,
LoadConvention::NameRegister(), rbx, rdi, rax); LoadDescriptor::NameRegister(), rbx, rdi, rax);
__ ret(0); __ ret(0);
// Dictionary load failed, go slow (but don't miss). // Dictionary load failed, go slow (but don't miss).
@ -873,8 +873,8 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
__ IncrementCounter(counters->load_miss(), 1); __ IncrementCounter(counters->load_miss(), 1);
__ PopReturnAddressTo(LoadIC_TempRegister()); __ PopReturnAddressTo(LoadIC_TempRegister());
__ Push(LoadConvention::ReceiverRegister()); // receiver __ Push(LoadDescriptor::ReceiverRegister()); // receiver
__ Push(LoadConvention::NameRegister()); // name __ Push(LoadDescriptor::NameRegister()); // name
__ PushReturnAddressFrom(LoadIC_TempRegister()); __ PushReturnAddressFrom(LoadIC_TempRegister());
// Perform tail call to the entry. // Perform tail call to the entry.
@ -888,8 +888,8 @@ void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
// The return address is on the stack. // The return address is on the stack.
__ PopReturnAddressTo(LoadIC_TempRegister()); __ PopReturnAddressTo(LoadIC_TempRegister());
__ Push(LoadConvention::ReceiverRegister()); // receiver __ Push(LoadDescriptor::ReceiverRegister()); // receiver
__ Push(LoadConvention::NameRegister()); // name __ Push(LoadDescriptor::NameRegister()); // name
__ PushReturnAddressFrom(LoadIC_TempRegister()); __ PushReturnAddressFrom(LoadIC_TempRegister());
// Perform tail call to the entry. // Perform tail call to the entry.
@ -903,8 +903,8 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
__ IncrementCounter(counters->keyed_load_miss(), 1); __ IncrementCounter(counters->keyed_load_miss(), 1);
__ PopReturnAddressTo(KeyedLoadIC_TempRegister()); __ PopReturnAddressTo(KeyedLoadIC_TempRegister());
__ Push(LoadConvention::ReceiverRegister()); // receiver __ Push(LoadDescriptor::ReceiverRegister()); // receiver
__ Push(LoadConvention::NameRegister()); // name __ Push(LoadDescriptor::NameRegister()); // name
__ PushReturnAddressFrom(KeyedLoadIC_TempRegister()); __ PushReturnAddressFrom(KeyedLoadIC_TempRegister());
// Perform tail call to the entry. // Perform tail call to the entry.
@ -918,8 +918,8 @@ void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
// The return address is on the stack. // The return address is on the stack.
__ PopReturnAddressTo(KeyedLoadIC_TempRegister()); __ PopReturnAddressTo(KeyedLoadIC_TempRegister());
__ Push(LoadConvention::ReceiverRegister()); // receiver __ Push(LoadDescriptor::ReceiverRegister()); // receiver
__ Push(LoadConvention::NameRegister()); // name __ Push(LoadDescriptor::NameRegister()); // name
__ PushReturnAddressFrom(KeyedLoadIC_TempRegister()); __ PushReturnAddressFrom(KeyedLoadIC_TempRegister());
// Perform tail call to the entry. // Perform tail call to the entry.
@ -934,8 +934,8 @@ void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
Code::ComputeHandlerFlags(Code::STORE_IC)); Code::ComputeHandlerFlags(Code::STORE_IC));
masm->isolate()->stub_cache()->GenerateProbe( masm->isolate()->stub_cache()->GenerateProbe(
masm, flags, StoreConvention::ReceiverRegister(), masm, flags, StoreDescriptor::ReceiverRegister(),
StoreConvention::NameRegister(), rbx, no_reg); StoreDescriptor::NameRegister(), rbx, no_reg);
// Cache miss: Jump to runtime. // Cache miss: Jump to runtime.
GenerateMiss(masm); GenerateMiss(masm);
@ -943,9 +943,9 @@ void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
static void StoreIC_PushArgs(MacroAssembler* masm) { static void StoreIC_PushArgs(MacroAssembler* masm) {
Register receiver = StoreConvention::ReceiverRegister(); Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreConvention::NameRegister(); Register name = StoreDescriptor::NameRegister();
Register value = StoreConvention::ValueRegister(); Register value = StoreDescriptor::ValueRegister();
DCHECK(!rbx.is(receiver) && !rbx.is(name) && !rbx.is(value)); DCHECK(!rbx.is(receiver) && !rbx.is(name) && !rbx.is(value));
@ -969,9 +969,9 @@ void StoreIC::GenerateMiss(MacroAssembler* masm) {
void StoreIC::GenerateNormal(MacroAssembler* masm) { void StoreIC::GenerateNormal(MacroAssembler* masm) {
Register receiver = StoreConvention::ReceiverRegister(); Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreConvention::NameRegister(); Register name = StoreDescriptor::NameRegister();
Register value = StoreConvention::ValueRegister(); Register value = StoreDescriptor::ValueRegister();
Register dictionary = rbx; Register dictionary = rbx;
Label miss; Label miss;

View File

@ -4,13 +4,12 @@
#include "src/v8.h" #include "src/v8.h"
#include "src/ic/ic-conventions.h"
#include "src/interface-descriptors.h" #include "src/interface-descriptors.h"
namespace v8 { namespace v8 {
namespace internal { namespace internal {
void CallInterfaceDescriptor::Initialize( void CallInterfaceDescriptorData::Initialize(
int register_parameter_count, Register* registers, int register_parameter_count, Register* registers,
Representation* register_param_representations, Representation* register_param_representations,
PlatformInterfaceDescriptor* platform_descriptor) { PlatformInterfaceDescriptor* platform_descriptor) {
@ -18,7 +17,8 @@ void CallInterfaceDescriptor::Initialize(
register_param_count_ = register_parameter_count; register_param_count_ = register_parameter_count;
// An interface descriptor must have a context register. // An interface descriptor must have a context register.
DCHECK(register_parameter_count > 0 && registers[0].is(ContextRegister())); DCHECK(register_parameter_count > 0 &&
registers[0].is(CallInterfaceDescriptor::ContextRegister()));
// InterfaceDescriptor owns a copy of the registers array. // InterfaceDescriptor owns a copy of the registers array.
register_params_.Reset(NewArray<Register>(register_parameter_count)); register_params_.Reset(NewArray<Register>(register_parameter_count));
@ -42,51 +42,50 @@ void CallInterfaceDescriptor::Initialize(
} }
void CallDescriptors::InitializeForIsolateAllPlatforms(Isolate* isolate) { void LoadDescriptor::Initialize(Isolate* isolate) {
{ Register registers[] = {ContextRegister(), ReceiverRegister(),
CallInterfaceDescriptor* descriptor = NameRegister()};
isolate->call_descriptor(CallDescriptorKey::LoadICCall); InitializeData(isolate, key(), arraysize(registers), registers, NULL);
Register registers[] = {CallInterfaceDescriptor::ContextRegister(), }
LoadConvention::ReceiverRegister(),
LoadConvention::NameRegister()};
descriptor->Initialize(arraysize(registers), registers, NULL); void StoreDescriptor::Initialize(Isolate* isolate) {
} Register registers[] = {ContextRegister(), ReceiverRegister(), NameRegister(),
{ ValueRegister()};
CallInterfaceDescriptor* descriptor = InitializeData(isolate, key(), arraysize(registers), registers, NULL);
isolate->call_descriptor(CallDescriptorKey::StoreICCall); }
Register registers[] = {CallInterfaceDescriptor::ContextRegister(),
StoreConvention::ReceiverRegister(),
StoreConvention::NameRegister(), void ElementTransitionAndStoreDescriptor::Initialize(Isolate* isolate) {
StoreConvention::ValueRegister()}; Register registers[] = {ContextRegister(), ValueRegister(), MapRegister(),
descriptor->Initialize(arraysize(registers), registers, NULL); NameRegister(), ReceiverRegister()};
} InitializeData(isolate, key(), arraysize(registers), registers, NULL);
{ }
CallInterfaceDescriptor* descriptor = isolate->call_descriptor(
CallDescriptorKey::ElementTransitionAndStoreCall);
Register registers[] = { void InstanceofDescriptor::Initialize(Isolate* isolate) {
CallInterfaceDescriptor::ContextRegister(), Register registers[] = {ContextRegister(), left(), right()};
StoreConvention::ValueRegister(), StoreConvention::MapRegister(), InitializeData(isolate, key(), arraysize(registers), registers, NULL);
StoreConvention::NameRegister(), StoreConvention::ReceiverRegister()}; }
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{ void VectorLoadICDescriptor::Initialize(Isolate* isolate) {
CallInterfaceDescriptor* descriptor = Register registers[] = {ContextRegister(), ReceiverRegister(), NameRegister(),
isolate->call_descriptor(CallDescriptorKey::InstanceofCall); SlotRegister(), VectorRegister()};
Register registers[] = {CallInterfaceDescriptor::ContextRegister(), InitializeData(isolate, key(), arraysize(registers), registers, NULL);
InstanceofConvention::left(), }
InstanceofConvention::right()};
descriptor->Initialize(arraysize(registers), registers, NULL);
} void CallDescriptors::InitializeForIsolate(Isolate* isolate) {
{ // Mechanically initialize all descriptors. The DCHECK makes sure that the
CallInterfaceDescriptor* descriptor = // Initialize() method did what it is supposed to do.
isolate->call_descriptor(CallDescriptorKey::VectorLoadICCall);
Register registers[] = {CallInterfaceDescriptor::ContextRegister(), #define INITIALIZE_DESCRIPTOR(D) \
FullVectorLoadConvention::ReceiverRegister(), D##Descriptor::Initialize(isolate); \
FullVectorLoadConvention::NameRegister(), DCHECK(D##Descriptor(isolate).IsInitialized());
FullVectorLoadConvention::SlotRegister(),
FullVectorLoadConvention::VectorRegister()}; INTERFACE_DESCRIPTOR_LIST(INITIALIZE_DESCRIPTOR)
descriptor->Initialize(arraysize(registers), registers, NULL); #undef INITIALIZE_DESCRIPTOR
}
} }
} }
} // namespace v8::internal } // namespace v8::internal

View File

@ -13,12 +13,45 @@ namespace internal {
class PlatformInterfaceDescriptor; class PlatformInterfaceDescriptor;
class CallInterfaceDescriptor { #define INTERFACE_DESCRIPTOR_LIST(V) \
V(Load) \
V(Store) \
V(ElementTransitionAndStore) \
V(Instanceof) \
V(VectorLoadIC) \
V(FastNewClosure) \
V(FastNewContext) \
V(ToNumber) \
V(NumberToString) \
V(FastCloneShallowArray) \
V(FastCloneShallowObject) \
V(CreateAllocationSite) \
V(CallFunction) \
V(CallConstruct) \
V(RegExpConstructResult) \
V(TransitionElementsKind) \
V(ArrayConstructorConstantArgCount) \
V(ArrayConstructor) \
V(InternalArrayConstructorConstantArgCount) \
V(InternalArrayConstructor) \
V(CompareNil) \
V(ToBoolean) \
V(BinaryOp) \
V(BinaryOpWithAllocationSite) \
V(StringAdd) \
V(Keyed) \
V(Named) \
V(CallHandler) \
V(ArgumentAdaptor) \
V(ApiFunction)
class CallInterfaceDescriptorData {
public: public:
CallInterfaceDescriptor() : register_param_count_(-1) {} CallInterfaceDescriptorData() : register_param_count_(-1) {}
// A copy of the passed in registers and param_representations is made // A copy of the passed in registers and param_representations is made
// and owned by the CallInterfaceDescriptor. // and owned by the CallInterfaceDescriptorData.
// TODO(mvstanton): Instead of taking parallel arrays register and // TODO(mvstanton): Instead of taking parallel arrays register and
// param_representations, how about a struct that puts the representation // param_representations, how about a struct that puts the representation
@ -30,21 +63,80 @@ class CallInterfaceDescriptor {
bool IsInitialized() const { return register_param_count_ >= 0; } bool IsInitialized() const { return register_param_count_ >= 0; }
int GetEnvironmentLength() const { return register_param_count_; } int register_param_count() const { return register_param_count_; }
Register register_param(int index) const { return register_params_[index]; }
Register* register_params() const { return register_params_.get(); }
Representation register_param_representation(int index) const {
return register_param_representations_[index];
}
Representation* register_param_representations() const {
return register_param_representations_.get();
}
PlatformInterfaceDescriptor* platform_specific_descriptor() const {
return platform_specific_descriptor_;
}
int GetRegisterParameterCount() const { return register_param_count_; } private:
int register_param_count_;
// The Register params are allocated dynamically by the
// InterfaceDescriptor, and freed on destruction. This is because static
// arrays of Registers cause creation of runtime static initializers
// which we don't want.
SmartArrayPointer<Register> register_params_;
// Specifies Representations for the stub's parameter. Points to an array of
// Representations of the same length of the numbers of parameters to the
// stub, or if NULL (the default value), Representation of each parameter
// assumed to be Tagged().
SmartArrayPointer<Representation> register_param_representations_;
PlatformInterfaceDescriptor* platform_specific_descriptor_;
DISALLOW_COPY_AND_ASSIGN(CallInterfaceDescriptorData);
};
class CallDescriptors {
public:
enum Key {
#define DEF_ENUM(name) name,
INTERFACE_DESCRIPTOR_LIST(DEF_ENUM)
#undef DEF_ENUM
NUMBER_OF_DESCRIPTORS
};
static void InitializeForIsolate(Isolate* isolate);
};
class CallInterfaceDescriptor {
public:
CallInterfaceDescriptor() : data_(NULL) {}
CallInterfaceDescriptor(Isolate* isolate, CallDescriptors::Key key)
: data_(isolate->call_descriptor_data(key)) {}
bool IsInitialized() const {
return data() != NULL && data()->IsInitialized();
}
int GetEnvironmentLength() const { return data()->register_param_count(); }
int GetRegisterParameterCount() const {
return data()->register_param_count();
}
Register GetParameterRegister(int index) const { Register GetParameterRegister(int index) const {
return register_params_[index]; return data()->register_param(index);
} }
Representation GetParameterRepresentation(int index) const { Representation GetParameterRepresentation(int index) const {
DCHECK(index < register_param_count_); DCHECK(index < data()->register_param_count());
if (register_param_representations_.get() == NULL) { if (data()->register_param_representations() == NULL) {
return Representation::Tagged(); return Representation::Tagged();
} }
return register_param_representations_[index]; return data()->register_param_representation(index);
} }
// "Environment" versions of parameter functions. The first register // "Environment" versions of parameter functions. The first register
@ -63,76 +155,264 @@ class CallInterfaceDescriptor {
// Some platforms have extra information to associate with the descriptor. // Some platforms have extra information to associate with the descriptor.
PlatformInterfaceDescriptor* platform_specific_descriptor() const { PlatformInterfaceDescriptor* platform_specific_descriptor() const {
return platform_specific_descriptor_; return data()->platform_specific_descriptor();
} }
static const Register ContextRegister(); static const Register ContextRegister();
protected:
const CallInterfaceDescriptorData* data() const { return data_; }
static void InitializeData(
Isolate* isolate, CallDescriptors::Key key, int register_parameter_count,
Register* registers, Representation* param_representations,
PlatformInterfaceDescriptor* platform_descriptor = NULL) {
isolate->call_descriptor_data(key)
->Initialize(register_parameter_count, registers, param_representations,
platform_descriptor);
}
private: private:
int register_param_count_; const CallInterfaceDescriptorData* data_;
// The Register params are allocated dynamically by the
// InterfaceDescriptor, and freed on destruction. This is because static
// arrays of Registers cause creation of runtime static initializers
// which we don't want.
SmartArrayPointer<Register> register_params_;
// Specifies Representations for the stub's parameter. Points to an array of
// Representations of the same length of the numbers of parameters to the
// stub, or if NULL (the default value), Representation of each parameter
// assumed to be Tagged().
SmartArrayPointer<Representation> register_param_representations_;
PlatformInterfaceDescriptor* platform_specific_descriptor_;
DISALLOW_COPY_AND_ASSIGN(CallInterfaceDescriptor);
}; };
enum CallDescriptorKey { #define DECLARE_DESCRIPTOR(name) \
LoadICCall, explicit name(Isolate* isolate) : CallInterfaceDescriptor(isolate, key()) {} \
StoreICCall, static inline CallDescriptors::Key key(); \
ElementTransitionAndStoreCall, static void Initialize(Isolate* isolate);
InstanceofCall,
VectorLoadICCall,
FastNewClosureCall,
FastNewContextCall,
ToNumberCall,
NumberToStringCall,
FastCloneShallowArrayCall,
FastCloneShallowObjectCall,
CreateAllocationSiteCall,
CallFunctionCall,
CallConstructCall,
RegExpConstructResultCall,
TransitionElementsKindCall,
ArrayConstructorConstantArgCountCall,
ArrayConstructorCall,
InternalArrayConstructorConstantArgCountCall,
InternalArrayConstructorCall,
CompareNilCall,
ToBooleanCall,
BinaryOpCall,
BinaryOpWithAllocationSiteCall,
StringAddCall,
KeyedCall,
NamedCall,
CallHandler,
ArgumentAdaptorCall,
ApiFunctionCall,
NUMBER_OF_CALL_DESCRIPTORS
};
class CallDescriptors { class LoadDescriptor : public CallInterfaceDescriptor {
public: public:
static void InitializeForIsolate(Isolate* isolate); DECLARE_DESCRIPTOR(LoadDescriptor)
private: enum ParameterIndices { kReceiverIndex, kNameIndex };
static void InitializeForIsolateAllPlatforms(Isolate* isolate); static const Register ReceiverRegister();
static const Register NameRegister();
}; };
class StoreDescriptor : public CallInterfaceDescriptor {
public:
DECLARE_DESCRIPTOR(StoreDescriptor)
enum ParameterIndices {
kReceiverIndex,
kNameIndex,
kValueIndex,
kParameterCount
};
static const Register ReceiverRegister();
static const Register NameRegister();
static const Register ValueRegister();
};
class ElementTransitionAndStoreDescriptor : public CallInterfaceDescriptor {
public:
DECLARE_DESCRIPTOR(ElementTransitionAndStoreDescriptor)
static const Register ReceiverRegister();
static const Register NameRegister();
static const Register ValueRegister();
static const Register MapRegister();
};
class InstanceofDescriptor : public CallInterfaceDescriptor {
public:
DECLARE_DESCRIPTOR(InstanceofDescriptor)
enum ParameterIndices { kLeftIndex, kRightIndex, kParameterCount };
static const Register left();
static const Register right();
};
class VectorLoadICDescriptor : public CallInterfaceDescriptor {
public:
DECLARE_DESCRIPTOR(VectorLoadICDescriptor)
enum ParameterIndices {
kReceiverIndex,
kNameIndex,
kSlotIndex,
kVectorIndex,
kParameterCount
};
static const Register ReceiverRegister();
static const Register NameRegister();
static const Register SlotRegister();
static const Register VectorRegister();
};
class FastNewClosureDescriptor : public CallInterfaceDescriptor {
public:
DECLARE_DESCRIPTOR(FastNewClosureDescriptor)
};
class FastNewContextDescriptor : public CallInterfaceDescriptor {
public:
DECLARE_DESCRIPTOR(FastNewContextDescriptor)
};
class ToNumberDescriptor : public CallInterfaceDescriptor {
public:
DECLARE_DESCRIPTOR(ToNumberDescriptor)
};
class NumberToStringDescriptor : public CallInterfaceDescriptor {
public:
DECLARE_DESCRIPTOR(NumberToStringDescriptor)
};
class FastCloneShallowArrayDescriptor : public CallInterfaceDescriptor {
public:
DECLARE_DESCRIPTOR(FastCloneShallowArrayDescriptor)
};
class FastCloneShallowObjectDescriptor : public CallInterfaceDescriptor {
public:
DECLARE_DESCRIPTOR(FastCloneShallowObjectDescriptor)
};
class CreateAllocationSiteDescriptor : public CallInterfaceDescriptor {
public:
DECLARE_DESCRIPTOR(CreateAllocationSiteDescriptor)
};
class CallFunctionDescriptor : public CallInterfaceDescriptor {
public:
DECLARE_DESCRIPTOR(CallFunctionDescriptor)
};
class CallConstructDescriptor : public CallInterfaceDescriptor {
public:
DECLARE_DESCRIPTOR(CallConstructDescriptor)
};
class RegExpConstructResultDescriptor : public CallInterfaceDescriptor {
public:
DECLARE_DESCRIPTOR(RegExpConstructResultDescriptor)
};
class TransitionElementsKindDescriptor : public CallInterfaceDescriptor {
public:
DECLARE_DESCRIPTOR(TransitionElementsKindDescriptor)
};
class ArrayConstructorConstantArgCountDescriptor
: public CallInterfaceDescriptor {
public:
DECLARE_DESCRIPTOR(ArrayConstructorConstantArgCountDescriptor)
};
class ArrayConstructorDescriptor : public CallInterfaceDescriptor {
public:
DECLARE_DESCRIPTOR(ArrayConstructorDescriptor)
};
class InternalArrayConstructorConstantArgCountDescriptor
: public CallInterfaceDescriptor {
public:
DECLARE_DESCRIPTOR(InternalArrayConstructorConstantArgCountDescriptor)
};
class InternalArrayConstructorDescriptor : public CallInterfaceDescriptor {
public:
DECLARE_DESCRIPTOR(InternalArrayConstructorDescriptor)
};
class CompareNilDescriptor : public CallInterfaceDescriptor {
public:
DECLARE_DESCRIPTOR(CompareNilDescriptor)
};
class ToBooleanDescriptor : public CallInterfaceDescriptor {
public:
DECLARE_DESCRIPTOR(ToBooleanDescriptor)
};
class BinaryOpDescriptor : public CallInterfaceDescriptor {
public:
DECLARE_DESCRIPTOR(BinaryOpDescriptor)
};
class BinaryOpWithAllocationSiteDescriptor : public CallInterfaceDescriptor {
public:
DECLARE_DESCRIPTOR(BinaryOpWithAllocationSiteDescriptor)
};
class StringAddDescriptor : public CallInterfaceDescriptor {
public:
DECLARE_DESCRIPTOR(StringAddDescriptor)
};
class KeyedDescriptor : public CallInterfaceDescriptor {
public:
DECLARE_DESCRIPTOR(KeyedDescriptor)
};
class NamedDescriptor : public CallInterfaceDescriptor {
public:
DECLARE_DESCRIPTOR(NamedDescriptor)
};
class CallHandlerDescriptor : public CallInterfaceDescriptor {
public:
DECLARE_DESCRIPTOR(CallHandlerDescriptor)
};
class ArgumentAdaptorDescriptor : public CallInterfaceDescriptor {
public:
DECLARE_DESCRIPTOR(ArgumentAdaptorDescriptor)
};
class ApiFunctionDescriptor : public CallInterfaceDescriptor {
public:
DECLARE_DESCRIPTOR(ApiFunctionDescriptor)
};
#undef DECLARE_DESCRIPTOR
// We define the association between CallDescriptors::Key and the specialized
// descriptor here to reduce boilerplate and mistakes.
#define DEF_KEY(name) \
CallDescriptors::Key name##Descriptor::key() { return CallDescriptors::name; }
INTERFACE_DESCRIPTOR_LIST(DEF_KEY)
#undef DEF_KEY
} }
} // namespace v8::internal } // namespace v8::internal
#if V8_TARGET_ARCH_ARM64 #if V8_TARGET_ARCH_ARM64
#include "src/arm64/interface-descriptors-arm64.h" #include "src/arm64/interface-descriptors-arm64.h"
#elif V8_TARGET_ARCH_ARM #elif V8_TARGET_ARCH_ARM

View File

@ -1505,7 +1505,7 @@ Isolate::Isolate()
regexp_stack_(NULL), regexp_stack_(NULL),
date_cache_(NULL), date_cache_(NULL),
code_stub_interface_descriptors_(NULL), code_stub_interface_descriptors_(NULL),
call_descriptors_(NULL), call_descriptor_data_(NULL),
// TODO(bmeurer) Initialized lazily because it depends on flags; can // TODO(bmeurer) Initialized lazily because it depends on flags; can
// be fixed once the default isolate cleanup is done. // be fixed once the default isolate cleanup is done.
random_number_generator_(NULL), random_number_generator_(NULL),
@ -1704,8 +1704,8 @@ Isolate::~Isolate() {
delete[] code_stub_interface_descriptors_; delete[] code_stub_interface_descriptors_;
code_stub_interface_descriptors_ = NULL; code_stub_interface_descriptors_ = NULL;
delete[] call_descriptors_; delete[] call_descriptor_data_;
call_descriptors_ = NULL; call_descriptor_data_ = NULL;
delete regexp_stack_; delete regexp_stack_;
regexp_stack_ = NULL; regexp_stack_ = NULL;
@ -1882,8 +1882,8 @@ bool Isolate::Init(Deserializer* des) {
date_cache_ = new DateCache(); date_cache_ = new DateCache();
code_stub_interface_descriptors_ = code_stub_interface_descriptors_ =
new CodeStubInterfaceDescriptor[CodeStub::NUMBER_OF_IDS]; new CodeStubInterfaceDescriptor[CodeStub::NUMBER_OF_IDS];
call_descriptors_ = call_descriptor_data_ =
new CallInterfaceDescriptor[NUMBER_OF_CALL_DESCRIPTORS]; new CallInterfaceDescriptorData[CallDescriptors::NUMBER_OF_DESCRIPTORS];
cpu_profiler_ = new CpuProfiler(this); cpu_profiler_ = new CpuProfiler(this);
heap_profiler_ = new HeapProfiler(heap()); heap_profiler_ = new HeapProfiler(heap());
@ -2239,9 +2239,9 @@ CodeStubInterfaceDescriptor*
} }
CallInterfaceDescriptor* Isolate::call_descriptor(int index) { CallInterfaceDescriptorData* Isolate::call_descriptor_data(int index) {
DCHECK(0 <= index && index < CallDescriptorKey::NUMBER_OF_CALL_DESCRIPTORS); DCHECK(0 <= index && index < CallDescriptors::NUMBER_OF_DESCRIPTORS);
return &call_descriptors_[index]; return &call_descriptor_data_[index];
} }

View File

@ -33,7 +33,7 @@ class RandomNumberGenerator;
namespace internal { namespace internal {
class Bootstrapper; class Bootstrapper;
class CallInterfaceDescriptor; class CallInterfaceDescriptorData;
class CodeGenerator; class CodeGenerator;
class CodeRange; class CodeRange;
class CodeStubInterfaceDescriptor; class CodeStubInterfaceDescriptor;
@ -1037,7 +1037,7 @@ class Isolate {
CodeStubInterfaceDescriptor* CodeStubInterfaceDescriptor*
code_stub_interface_descriptor(int index); code_stub_interface_descriptor(int index);
CallInterfaceDescriptor* call_descriptor(int index); CallInterfaceDescriptorData* call_descriptor_data(int index);
void IterateDeferredHandles(ObjectVisitor* visitor); void IterateDeferredHandles(ObjectVisitor* visitor);
void LinkDeferredHandles(DeferredHandles* deferred_handles); void LinkDeferredHandles(DeferredHandles* deferred_handles);
@ -1274,7 +1274,7 @@ class Isolate {
DateCache* date_cache_; DateCache* date_cache_;
unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize_mapping_; unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize_mapping_;
CodeStubInterfaceDescriptor* code_stub_interface_descriptors_; CodeStubInterfaceDescriptor* code_stub_interface_descriptors_;
CallInterfaceDescriptor* call_descriptors_; CallInterfaceDescriptorData* call_descriptor_data_;
base::RandomNumberGenerator* random_number_generator_; base::RandomNumberGenerator* random_number_generator_;
// Whether the isolate has been created for snapshotting. // Whether the isolate has been created for snapshotting.

View File

@ -1065,8 +1065,8 @@ void Builtins::Generate_FunctionApply(MacroAssembler* masm) {
// Copy all arguments from the array to the stack. // Copy all arguments from the array to the stack.
Label entry, loop; Label entry, loop;
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
Register key = LoadConvention::NameRegister(); Register key = LoadDescriptor::NameRegister();
__ movp(key, Operand(rbp, kIndexOffset)); __ movp(key, Operand(rbp, kIndexOffset));
__ jmp(&entry); __ jmp(&entry);
__ bind(&loop); __ bind(&loop);
@ -1074,7 +1074,7 @@ void Builtins::Generate_FunctionApply(MacroAssembler* masm) {
// Use inline caching to speed up access to arguments. // Use inline caching to speed up access to arguments.
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
__ Move(VectorLoadConvention::SlotRegister(), Smi::FromInt(0)); __ Move(VectorLoadICDescriptor::SlotRegister(), Smi::FromInt(0));
} }
Handle<Code> ic = Handle<Code> ic =
masm->isolate()->builtins()->KeyedLoadIC_Initialize(); masm->isolate()->builtins()->KeyedLoadIC_Initialize();

View File

@ -27,14 +27,12 @@ static void InitializeArrayConstructorDescriptor(
Runtime::kArrayConstructor)->entry; Runtime::kArrayConstructor)->entry;
if (constant_stack_parameter_count == 0) { if (constant_stack_parameter_count == 0) {
CallInterfaceDescriptor* call_descriptor = isolate->call_descriptor( ArrayConstructorConstantArgCountDescriptor call_descriptor(isolate);
CallDescriptorKey::ArrayConstructorConstantArgCountCall);
descriptor->Initialize(major, call_descriptor, deopt_handler, descriptor->Initialize(major, call_descriptor, deopt_handler,
constant_stack_parameter_count, constant_stack_parameter_count,
JS_FUNCTION_STUB_MODE); JS_FUNCTION_STUB_MODE);
} else { } else {
CallInterfaceDescriptor* call_descriptor = ArrayConstructorDescriptor call_descriptor(isolate);
isolate->call_descriptor(CallDescriptorKey::ArrayConstructorCall);
descriptor->Initialize(major, call_descriptor, rax, deopt_handler, descriptor->Initialize(major, call_descriptor, rax, deopt_handler,
constant_stack_parameter_count, constant_stack_parameter_count,
JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS); JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS);
@ -46,22 +44,16 @@ static void InitializeInternalArrayConstructorDescriptor(
Isolate* isolate, CodeStub::Major major, Isolate* isolate, CodeStub::Major major,
CodeStubInterfaceDescriptor* descriptor, CodeStubInterfaceDescriptor* descriptor,
int constant_stack_parameter_count) { int constant_stack_parameter_count) {
// register state
// rsi -- context
// rax -- number of arguments
// rdi -- constructor function
Address deopt_handler = Runtime::FunctionForId( Address deopt_handler = Runtime::FunctionForId(
Runtime::kInternalArrayConstructor)->entry; Runtime::kInternalArrayConstructor)->entry;
if (constant_stack_parameter_count == 0) { if (constant_stack_parameter_count == 0) {
CallInterfaceDescriptor* call_descriptor = isolate->call_descriptor( InternalArrayConstructorConstantArgCountDescriptor call_descriptor(isolate);
CallDescriptorKey::InternalArrayConstructorConstantArgCountCall);
descriptor->Initialize(major, call_descriptor, deopt_handler, descriptor->Initialize(major, call_descriptor, deopt_handler,
constant_stack_parameter_count, constant_stack_parameter_count,
JS_FUNCTION_STUB_MODE); JS_FUNCTION_STUB_MODE);
} else { } else {
CallInterfaceDescriptor* call_descriptor = isolate->call_descriptor( InternalArrayConstructorDescriptor call_descriptor(isolate);
CallDescriptorKey::InternalArrayConstructorCall);
descriptor->Initialize(major, call_descriptor, rax, deopt_handler, descriptor->Initialize(major, call_descriptor, rax, deopt_handler,
constant_stack_parameter_count, constant_stack_parameter_count,
JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS); JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS);
@ -541,7 +533,7 @@ void MathPowStub::Generate(MacroAssembler* masm) {
void FunctionPrototypeStub::Generate(MacroAssembler* masm) { void FunctionPrototypeStub::Generate(MacroAssembler* masm) {
Label miss; Label miss;
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, r8, NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, r8,
r9, &miss); r9, &miss);
@ -4181,14 +4173,14 @@ void StubFailureTrampolineStub::Generate(MacroAssembler* masm) {
void LoadICTrampolineStub::Generate(MacroAssembler* masm) { void LoadICTrampolineStub::Generate(MacroAssembler* masm) {
EmitLoadTypeFeedbackVector(masm, FullVectorLoadConvention::VectorRegister()); EmitLoadTypeFeedbackVector(masm, VectorLoadICDescriptor::VectorRegister());
VectorLoadStub stub(isolate(), state()); VectorLoadStub stub(isolate(), state());
__ jmp(stub.GetCode(), RelocInfo::CODE_TARGET); __ jmp(stub.GetCode(), RelocInfo::CODE_TARGET);
} }
void KeyedLoadICTrampolineStub::Generate(MacroAssembler* masm) { void KeyedLoadICTrampolineStub::Generate(MacroAssembler* masm) {
EmitLoadTypeFeedbackVector(masm, FullVectorLoadConvention::VectorRegister()); EmitLoadTypeFeedbackVector(masm, VectorLoadICDescriptor::VectorRegister());
VectorKeyedLoadStub stub(isolate()); VectorKeyedLoadStub stub(isolate());
__ jmp(stub.GetCode(), RelocInfo::CODE_TARGET); __ jmp(stub.GetCode(), RelocInfo::CODE_TARGET);
} }

View File

@ -162,17 +162,17 @@ void DebugCodegen::GenerateCallICStubDebugBreak(MacroAssembler* masm) {
void DebugCodegen::GenerateLoadICDebugBreak(MacroAssembler* masm) { void DebugCodegen::GenerateLoadICDebugBreak(MacroAssembler* masm) {
// Register state for IC load call (from ic-x64.cc). // Register state for IC load call (from ic-x64.cc).
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
Register name = LoadConvention::NameRegister(); Register name = LoadDescriptor::NameRegister();
Generate_DebugBreakCallHelper(masm, receiver.bit() | name.bit(), 0, false); Generate_DebugBreakCallHelper(masm, receiver.bit() | name.bit(), 0, false);
} }
void DebugCodegen::GenerateStoreICDebugBreak(MacroAssembler* masm) { void DebugCodegen::GenerateStoreICDebugBreak(MacroAssembler* masm) {
// Register state for IC store call (from ic-x64.cc). // Register state for IC store call (from ic-x64.cc).
Register receiver = StoreConvention::ReceiverRegister(); Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreConvention::NameRegister(); Register name = StoreDescriptor::NameRegister();
Register value = StoreConvention::ValueRegister(); Register value = StoreDescriptor::ValueRegister();
Generate_DebugBreakCallHelper( Generate_DebugBreakCallHelper(
masm, receiver.bit() | name.bit() | value.bit(), 0, false); masm, receiver.bit() | name.bit() | value.bit(), 0, false);
} }
@ -186,9 +186,9 @@ void DebugCodegen::GenerateKeyedLoadICDebugBreak(MacroAssembler* masm) {
void DebugCodegen::GenerateKeyedStoreICDebugBreak(MacroAssembler* masm) { void DebugCodegen::GenerateKeyedStoreICDebugBreak(MacroAssembler* masm) {
// Register state for keyed IC store call (from ic-x64.cc). // Register state for keyed IC store call (from ic-x64.cc).
Register receiver = StoreConvention::ReceiverRegister(); Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreConvention::NameRegister(); Register name = StoreDescriptor::NameRegister();
Register value = StoreConvention::ValueRegister(); Register value = StoreDescriptor::ValueRegister();
Generate_DebugBreakCallHelper( Generate_DebugBreakCallHelper(
masm, receiver.bit() | name.bit() | value.bit(), 0, false); masm, receiver.bit() | name.bit() | value.bit(), 0, false);
} }

View File

@ -1362,10 +1362,10 @@ void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy,
// All extension objects were empty and it is safe to use a global // All extension objects were empty and it is safe to use a global
// load IC call. // load IC call.
__ movp(LoadConvention::ReceiverRegister(), GlobalObjectOperand()); __ movp(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
__ Move(LoadConvention::NameRegister(), proxy->var()->name()); __ Move(LoadDescriptor::NameRegister(), proxy->var()->name());
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
__ Move(VectorLoadConvention::SlotRegister(), __ Move(VectorLoadICDescriptor::SlotRegister(),
Smi::FromInt(proxy->VariableFeedbackSlot())); Smi::FromInt(proxy->VariableFeedbackSlot()));
} }
@ -1448,10 +1448,10 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
switch (var->location()) { switch (var->location()) {
case Variable::UNALLOCATED: { case Variable::UNALLOCATED: {
Comment cmnt(masm_, "[ Global variable"); Comment cmnt(masm_, "[ Global variable");
__ Move(LoadConvention::NameRegister(), var->name()); __ Move(LoadDescriptor::NameRegister(), var->name());
__ movp(LoadConvention::ReceiverRegister(), GlobalObjectOperand()); __ movp(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
__ Move(VectorLoadConvention::SlotRegister(), __ Move(VectorLoadICDescriptor::SlotRegister(),
Smi::FromInt(proxy->VariableFeedbackSlot())); Smi::FromInt(proxy->VariableFeedbackSlot()));
} }
CallLoadIC(CONTEXTUAL); CallLoadIC(CONTEXTUAL);
@ -1666,9 +1666,9 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
if (key->value()->IsInternalizedString()) { if (key->value()->IsInternalizedString()) {
if (property->emit_store()) { if (property->emit_store()) {
VisitForAccumulatorValue(value); VisitForAccumulatorValue(value);
DCHECK(StoreConvention::ValueRegister().is(rax)); DCHECK(StoreDescriptor::ValueRegister().is(rax));
__ Move(StoreConvention::NameRegister(), key->value()); __ Move(StoreDescriptor::NameRegister(), key->value());
__ movp(StoreConvention::ReceiverRegister(), Operand(rsp, 0)); __ movp(StoreDescriptor::ReceiverRegister(), Operand(rsp, 0));
CallStoreIC(key->LiteralFeedbackId()); CallStoreIC(key->LiteralFeedbackId());
PrepareForBailoutForId(key->id(), NO_REGISTERS); PrepareForBailoutForId(key->id(), NO_REGISTERS);
} else { } else {
@ -1847,7 +1847,7 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) {
if (expr->is_compound()) { if (expr->is_compound()) {
// We need the receiver both on the stack and in the register. // We need the receiver both on the stack and in the register.
VisitForStackValue(property->obj()); VisitForStackValue(property->obj());
__ movp(LoadConvention::ReceiverRegister(), Operand(rsp, 0)); __ movp(LoadDescriptor::ReceiverRegister(), Operand(rsp, 0));
} else { } else {
VisitForStackValue(property->obj()); VisitForStackValue(property->obj());
} }
@ -1856,8 +1856,8 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) {
if (expr->is_compound()) { if (expr->is_compound()) {
VisitForStackValue(property->obj()); VisitForStackValue(property->obj());
VisitForStackValue(property->key()); VisitForStackValue(property->key());
__ movp(LoadConvention::ReceiverRegister(), Operand(rsp, kPointerSize)); __ movp(LoadDescriptor::ReceiverRegister(), Operand(rsp, kPointerSize));
__ movp(LoadConvention::NameRegister(), Operand(rsp, 0)); __ movp(LoadDescriptor::NameRegister(), Operand(rsp, 0));
} else { } else {
VisitForStackValue(property->obj()); VisitForStackValue(property->obj());
VisitForStackValue(property->key()); 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_catch, l_try, l_suspend, l_continuation, l_resume;
Label l_next, l_call, l_loop; Label l_next, l_call, l_loop;
Register load_receiver = LoadConvention::ReceiverRegister(); Register load_receiver = LoadDescriptor::ReceiverRegister();
Register load_name = LoadConvention::NameRegister(); Register load_name = LoadDescriptor::NameRegister();
// Initial send value is undefined. // Initial send value is undefined.
__ LoadRoot(rax, Heap::kUndefinedValueRootIndex); __ LoadRoot(rax, Heap::kUndefinedValueRootIndex);
@ -2056,7 +2056,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ bind(&l_call); __ bind(&l_call);
__ movp(load_receiver, Operand(rsp, kPointerSize)); __ movp(load_receiver, Operand(rsp, kPointerSize));
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
__ Move(VectorLoadConvention::SlotRegister(), __ Move(VectorLoadICDescriptor::SlotRegister(),
Smi::FromInt(expr->KeyedLoadFeedbackSlot())); Smi::FromInt(expr->KeyedLoadFeedbackSlot()));
} }
Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
@ -2075,7 +2075,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ Push(load_receiver); // save result __ Push(load_receiver); // save result
__ LoadRoot(load_name, Heap::kdone_stringRootIndex); // "done" __ LoadRoot(load_name, Heap::kdone_stringRootIndex); // "done"
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
__ Move(VectorLoadConvention::SlotRegister(), __ Move(VectorLoadICDescriptor::SlotRegister(),
Smi::FromInt(expr->DoneFeedbackSlot())); Smi::FromInt(expr->DoneFeedbackSlot()));
} }
CallLoadIC(NOT_CONTEXTUAL); // rax=result.done CallLoadIC(NOT_CONTEXTUAL); // rax=result.done
@ -2088,7 +2088,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ Pop(load_receiver); // result __ Pop(load_receiver); // result
__ LoadRoot(load_name, Heap::kvalue_stringRootIndex); // "value" __ LoadRoot(load_name, Heap::kvalue_stringRootIndex); // "value"
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
__ Move(VectorLoadConvention::SlotRegister(), __ Move(VectorLoadICDescriptor::SlotRegister(),
Smi::FromInt(expr->ValueFeedbackSlot())); Smi::FromInt(expr->ValueFeedbackSlot()));
} }
CallLoadIC(NOT_CONTEXTUAL); // result.value in rax CallLoadIC(NOT_CONTEXTUAL); // result.value in rax
@ -2251,9 +2251,9 @@ void FullCodeGenerator::EmitCreateIteratorResult(bool done) {
void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) { void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
SetSourcePosition(prop->position()); SetSourcePosition(prop->position());
Literal* key = prop->key()->AsLiteral(); Literal* key = prop->key()->AsLiteral();
__ Move(LoadConvention::NameRegister(), key->value()); __ Move(LoadDescriptor::NameRegister(), key->value());
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
__ Move(VectorLoadConvention::SlotRegister(), __ Move(VectorLoadICDescriptor::SlotRegister(),
Smi::FromInt(prop->PropertyFeedbackSlot())); Smi::FromInt(prop->PropertyFeedbackSlot()));
CallLoadIC(NOT_CONTEXTUAL); CallLoadIC(NOT_CONTEXTUAL);
} else { } else {
@ -2266,7 +2266,7 @@ void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
SetSourcePosition(prop->position()); SetSourcePosition(prop->position());
Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
__ Move(VectorLoadConvention::SlotRegister(), __ Move(VectorLoadICDescriptor::SlotRegister(),
Smi::FromInt(prop->PropertyFeedbackSlot())); Smi::FromInt(prop->PropertyFeedbackSlot()));
CallIC(ic); CallIC(ic);
} else { } else {
@ -2372,9 +2372,9 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) {
case NAMED_PROPERTY: { case NAMED_PROPERTY: {
__ Push(rax); // Preserve value. __ Push(rax); // Preserve value.
VisitForAccumulatorValue(prop->obj()); VisitForAccumulatorValue(prop->obj());
__ Move(StoreConvention::ReceiverRegister(), rax); __ Move(StoreDescriptor::ReceiverRegister(), rax);
__ Pop(StoreConvention::ValueRegister()); // Restore value. __ Pop(StoreDescriptor::ValueRegister()); // Restore value.
__ Move(StoreConvention::NameRegister(), __ Move(StoreDescriptor::NameRegister(),
prop->key()->AsLiteral()->value()); prop->key()->AsLiteral()->value());
CallStoreIC(); CallStoreIC();
break; break;
@ -2383,9 +2383,9 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) {
__ Push(rax); // Preserve value. __ Push(rax); // Preserve value.
VisitForStackValue(prop->obj()); VisitForStackValue(prop->obj());
VisitForAccumulatorValue(prop->key()); VisitForAccumulatorValue(prop->key());
__ Move(StoreConvention::NameRegister(), rax); __ Move(StoreDescriptor::NameRegister(), rax);
__ Pop(StoreConvention::ReceiverRegister()); __ Pop(StoreDescriptor::ReceiverRegister());
__ Pop(StoreConvention::ValueRegister()); // Restore value. __ Pop(StoreDescriptor::ValueRegister()); // Restore value.
Handle<Code> ic = strict_mode() == SLOPPY Handle<Code> ic = strict_mode() == SLOPPY
? isolate()->builtins()->KeyedStoreIC_Initialize() ? isolate()->builtins()->KeyedStoreIC_Initialize()
: isolate()->builtins()->KeyedStoreIC_Initialize_Strict(); : isolate()->builtins()->KeyedStoreIC_Initialize_Strict();
@ -2412,8 +2412,8 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var,
Token::Value op) { Token::Value op) {
if (var->IsUnallocated()) { if (var->IsUnallocated()) {
// Global var, const, or let. // Global var, const, or let.
__ Move(StoreConvention::NameRegister(), var->name()); __ Move(StoreDescriptor::NameRegister(), var->name());
__ movp(StoreConvention::ReceiverRegister(), GlobalObjectOperand()); __ movp(StoreDescriptor::ReceiverRegister(), GlobalObjectOperand());
CallStoreIC(); CallStoreIC();
} else if (op == Token::INIT_CONST_LEGACY) { } else if (op == Token::INIT_CONST_LEGACY) {
@ -2483,8 +2483,8 @@ void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) {
// Record source code position before IC call. // Record source code position before IC call.
SetSourcePosition(expr->position()); SetSourcePosition(expr->position());
__ Move(StoreConvention::NameRegister(), prop->key()->AsLiteral()->value()); __ Move(StoreDescriptor::NameRegister(), prop->key()->AsLiteral()->value());
__ Pop(StoreConvention::ReceiverRegister()); __ Pop(StoreDescriptor::ReceiverRegister());
CallStoreIC(expr->AssignmentFeedbackId()); CallStoreIC(expr->AssignmentFeedbackId());
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); PrepareForBailoutForId(expr->AssignmentId(), TOS_REG);
@ -2495,9 +2495,9 @@ void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) {
void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) { void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) {
// Assignment to a property, using a keyed store IC. // Assignment to a property, using a keyed store IC.
__ Pop(StoreConvention::NameRegister()); // Key. __ Pop(StoreDescriptor::NameRegister()); // Key.
__ Pop(StoreConvention::ReceiverRegister()); __ Pop(StoreDescriptor::ReceiverRegister());
DCHECK(StoreConvention::ValueRegister().is(rax)); DCHECK(StoreDescriptor::ValueRegister().is(rax));
// Record source code position before IC call. // Record source code position before IC call.
SetSourcePosition(expr->position()); SetSourcePosition(expr->position());
Handle<Code> ic = strict_mode() == SLOPPY Handle<Code> ic = strict_mode() == SLOPPY
@ -2516,16 +2516,16 @@ void FullCodeGenerator::VisitProperty(Property* expr) {
if (key->IsPropertyName()) { if (key->IsPropertyName()) {
VisitForAccumulatorValue(expr->obj()); VisitForAccumulatorValue(expr->obj());
DCHECK(!rax.is(LoadConvention::ReceiverRegister())); DCHECK(!rax.is(LoadDescriptor::ReceiverRegister()));
__ movp(LoadConvention::ReceiverRegister(), rax); __ movp(LoadDescriptor::ReceiverRegister(), rax);
EmitNamedPropertyLoad(expr); EmitNamedPropertyLoad(expr);
PrepareForBailoutForId(expr->LoadId(), TOS_REG); PrepareForBailoutForId(expr->LoadId(), TOS_REG);
context()->Plug(rax); context()->Plug(rax);
} else { } else {
VisitForStackValue(expr->obj()); VisitForStackValue(expr->obj());
VisitForAccumulatorValue(expr->key()); VisitForAccumulatorValue(expr->key());
__ Move(LoadConvention::NameRegister(), rax); __ Move(LoadDescriptor::NameRegister(), rax);
__ Pop(LoadConvention::ReceiverRegister()); __ Pop(LoadDescriptor::ReceiverRegister());
EmitKeyedPropertyLoad(expr); EmitKeyedPropertyLoad(expr);
context()->Plug(rax); context()->Plug(rax);
} }
@ -2558,7 +2558,7 @@ void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) {
} else { } else {
// Load the function from the receiver. // Load the function from the receiver.
DCHECK(callee->IsProperty()); DCHECK(callee->IsProperty());
__ movp(LoadConvention::ReceiverRegister(), Operand(rsp, 0)); __ movp(LoadDescriptor::ReceiverRegister(), Operand(rsp, 0));
EmitNamedPropertyLoad(callee->AsProperty()); EmitNamedPropertyLoad(callee->AsProperty());
PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG); PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG);
// Push the target function under the receiver. // Push the target function under the receiver.
@ -2580,8 +2580,8 @@ void FullCodeGenerator::EmitKeyedCallWithLoadIC(Call* expr,
// Load the function from the receiver. // Load the function from the receiver.
DCHECK(callee->IsProperty()); DCHECK(callee->IsProperty());
__ movp(LoadConvention::ReceiverRegister(), Operand(rsp, 0)); __ movp(LoadDescriptor::ReceiverRegister(), Operand(rsp, 0));
__ Move(LoadConvention::NameRegister(), rax); __ Move(LoadDescriptor::NameRegister(), rax);
EmitKeyedPropertyLoad(callee->AsProperty()); EmitKeyedPropertyLoad(callee->AsProperty());
PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG); PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG);
@ -4059,10 +4059,10 @@ void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) {
__ Push(FieldOperand(rax, GlobalObject::kBuiltinsOffset)); __ Push(FieldOperand(rax, GlobalObject::kBuiltinsOffset));
// Load the function from the receiver. // Load the function from the receiver.
__ movp(LoadConvention::ReceiverRegister(), Operand(rsp, 0)); __ movp(LoadDescriptor::ReceiverRegister(), Operand(rsp, 0));
__ Move(LoadConvention::NameRegister(), expr->name()); __ Move(LoadDescriptor::NameRegister(), expr->name());
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
__ Move(VectorLoadConvention::SlotRegister(), __ Move(VectorLoadICDescriptor::SlotRegister(),
Smi::FromInt(expr->CallRuntimeFeedbackSlot())); Smi::FromInt(expr->CallRuntimeFeedbackSlot()));
CallLoadIC(NOT_CONTEXTUAL); CallLoadIC(NOT_CONTEXTUAL);
} else { } else {
@ -4245,15 +4245,15 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
} }
if (assign_type == NAMED_PROPERTY) { if (assign_type == NAMED_PROPERTY) {
VisitForStackValue(prop->obj()); VisitForStackValue(prop->obj());
__ movp(LoadConvention::ReceiverRegister(), Operand(rsp, 0)); __ movp(LoadDescriptor::ReceiverRegister(), Operand(rsp, 0));
EmitNamedPropertyLoad(prop); EmitNamedPropertyLoad(prop);
} else { } else {
VisitForStackValue(prop->obj()); VisitForStackValue(prop->obj());
VisitForStackValue(prop->key()); VisitForStackValue(prop->key());
// Leave receiver on stack // Leave receiver on stack
__ movp(LoadConvention::ReceiverRegister(), Operand(rsp, kPointerSize)); __ movp(LoadDescriptor::ReceiverRegister(), Operand(rsp, kPointerSize));
// Copy of key, needed for later store. // Copy of key, needed for later store.
__ movp(LoadConvention::NameRegister(), Operand(rsp, 0)); __ movp(LoadDescriptor::NameRegister(), Operand(rsp, 0));
EmitKeyedPropertyLoad(prop); EmitKeyedPropertyLoad(prop);
} }
} }
@ -4365,9 +4365,9 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
} }
break; break;
case NAMED_PROPERTY: { case NAMED_PROPERTY: {
__ Move(StoreConvention::NameRegister(), __ Move(StoreDescriptor::NameRegister(),
prop->key()->AsLiteral()->value()); prop->key()->AsLiteral()->value());
__ Pop(StoreConvention::ReceiverRegister()); __ Pop(StoreDescriptor::ReceiverRegister());
CallStoreIC(expr->CountStoreFeedbackId()); CallStoreIC(expr->CountStoreFeedbackId());
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); PrepareForBailoutForId(expr->AssignmentId(), TOS_REG);
if (expr->is_postfix()) { if (expr->is_postfix()) {
@ -4380,8 +4380,8 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
break; break;
} }
case KEYED_PROPERTY: { case KEYED_PROPERTY: {
__ Pop(StoreConvention::NameRegister()); __ Pop(StoreDescriptor::NameRegister());
__ Pop(StoreConvention::ReceiverRegister()); __ Pop(StoreDescriptor::ReceiverRegister());
Handle<Code> ic = strict_mode() == SLOPPY Handle<Code> ic = strict_mode() == SLOPPY
? isolate()->builtins()->KeyedStoreIC_Initialize() ? isolate()->builtins()->KeyedStoreIC_Initialize()
: isolate()->builtins()->KeyedStoreIC_Initialize_Strict(); : isolate()->builtins()->KeyedStoreIC_Initialize_Strict();
@ -4407,10 +4407,10 @@ void FullCodeGenerator::VisitForTypeofValue(Expression* expr) {
if (proxy != NULL && proxy->var()->IsUnallocated()) { if (proxy != NULL && proxy->var()->IsUnallocated()) {
Comment cmnt(masm_, "[ Global variable"); Comment cmnt(masm_, "[ Global variable");
__ Move(LoadConvention::NameRegister(), proxy->name()); __ Move(LoadDescriptor::NameRegister(), proxy->name());
__ movp(LoadConvention::ReceiverRegister(), GlobalObjectOperand()); __ movp(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
__ Move(VectorLoadConvention::SlotRegister(), __ Move(VectorLoadICDescriptor::SlotRegister(),
Smi::FromInt(proxy->VariableFeedbackSlot())); Smi::FromInt(proxy->VariableFeedbackSlot()));
} }
// Use a regular load, not a contextual load, to avoid a reference // Use a regular load, not a contextual load, to avoid a reference

View File

@ -14,232 +14,281 @@ namespace internal {
const Register CallInterfaceDescriptor::ContextRegister() { return rsi; } const Register CallInterfaceDescriptor::ContextRegister() { return rsi; }
void CallDescriptors::InitializeForIsolate(Isolate* isolate) { const Register LoadDescriptor::ReceiverRegister() { return rdx; }
InitializeForIsolateAllPlatforms(isolate); const Register LoadDescriptor::NameRegister() { return rcx; }
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::FastNewClosureCall);
Register registers[] = {rsi, rbx};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::FastNewContextCall);
Register registers[] = {rsi, rdi};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::ToNumberCall);
// ToNumberStub invokes a function, and therefore needs a context.
Register registers[] = {rsi, rax};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::NumberToStringCall);
Register registers[] = {rsi, rax};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::FastCloneShallowArrayCall);
Register registers[] = {rsi, rax, rbx, rcx};
Representation representations[] = {
Representation::Tagged(), Representation::Tagged(),
Representation::Smi(), Representation::Tagged()};
descriptor->Initialize(arraysize(registers), registers, representations);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::FastCloneShallowObjectCall);
Register registers[] = {rsi, rax, rbx, rcx, rdx};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::CreateAllocationSiteCall);
Register registers[] = {rsi, rbx, rdx};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::CallFunctionCall);
Register registers[] = {rsi, rdi};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::CallConstructCall);
// rax : number of arguments
// rbx : feedback vector
// rdx : (only if rbx is not the megamorphic symbol) slot in feedback
// vector (Smi)
// rdi : constructor function
// TODO(turbofan): So far we don't gather type feedback and hence skip the
// slot parameter, but ArrayConstructStub needs the vector to be undefined.
Register registers[] = {rsi, rax, rdi, rbx};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::RegExpConstructResultCall);
Register registers[] = {rsi, rcx, rbx, rax};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::TransitionElementsKindCall);
Register registers[] = {rsi, rax, rbx};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor = isolate->call_descriptor(
CallDescriptorKey::ArrayConstructorConstantArgCountCall);
// register state
// rax -- number of arguments
// rdi -- function
// rbx -- allocation site with elements kind
Register registers[] = {rsi, rdi, rbx};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::ArrayConstructorCall);
// stack param count needs (constructor pointer, and single argument)
Register registers[] = {rsi, rdi, rbx, rax};
Representation representations[] = {
Representation::Tagged(), Representation::Tagged(),
Representation::Tagged(), Representation::Integer32()};
descriptor->Initialize(arraysize(registers), registers, representations);
}
{
CallInterfaceDescriptor* descriptor = isolate->call_descriptor(
CallDescriptorKey::InternalArrayConstructorConstantArgCountCall);
// register state
// rsi -- context
// rax -- number of arguments
// rdi -- constructor function
Register registers[] = {rsi, rdi};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor = isolate->call_descriptor(
CallDescriptorKey::InternalArrayConstructorCall);
// stack param count needs (constructor pointer, and single argument)
Register registers[] = {rsi, rdi, rax};
Representation representations[] = {Representation::Tagged(),
Representation::Tagged(),
Representation::Integer32()};
descriptor->Initialize(arraysize(registers), registers, representations);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::CompareNilCall);
Register registers[] = {rsi, rax};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::ToBooleanCall);
Register registers[] = {rsi, rax};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::BinaryOpCall);
Register registers[] = {rsi, rdx, rax};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor = isolate->call_descriptor(
CallDescriptorKey::BinaryOpWithAllocationSiteCall);
Register registers[] = {rsi, rcx, rdx, rax};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::StringAddCall);
Register registers[] = {rsi, rdx, rax};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{ const Register VectorLoadICDescriptor::ReceiverRegister() {
CallInterfaceDescriptor* descriptor = return LoadDescriptor::ReceiverRegister();
isolate->call_descriptor(CallDescriptorKey::ArgumentAdaptorCall); }
Register registers[] = {
rsi, // context
rdi, // JSFunction const Register VectorLoadICDescriptor::NameRegister() {
rax, // actual number of arguments return LoadDescriptor::NameRegister();
rbx, // expected number of arguments }
};
Representation representations[] = {
Representation::Tagged(), // context const Register VectorLoadICDescriptor::SlotRegister() { return rax; }
Representation::Tagged(), // JSFunction const Register VectorLoadICDescriptor::VectorRegister() { return rbx; }
Representation::Integer32(), // actual number of arguments
Representation::Integer32(), // expected number of arguments
}; const Register StoreDescriptor::ReceiverRegister() { return rdx; }
descriptor->Initialize(arraysize(registers), registers, representations); const Register StoreDescriptor::NameRegister() { return rcx; }
} const Register StoreDescriptor::ValueRegister() { return rax; }
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::KeyedCall); const Register ElementTransitionAndStoreDescriptor::ReceiverRegister() {
Register registers[] = { return StoreDescriptor::ReceiverRegister();
rsi, // context }
rcx, // key
};
Representation representations[] = { const Register ElementTransitionAndStoreDescriptor::NameRegister() {
Representation::Tagged(), // context return StoreDescriptor::NameRegister();
Representation::Tagged(), // key }
};
descriptor->Initialize(arraysize(registers), registers, representations);
} const Register ElementTransitionAndStoreDescriptor::ValueRegister() {
{ return StoreDescriptor::ValueRegister();
CallInterfaceDescriptor* descriptor = }
isolate->call_descriptor(CallDescriptorKey::NamedCall);
Register registers[] = {
rsi, // context const Register ElementTransitionAndStoreDescriptor::MapRegister() {
rcx, // name return rbx;
}; }
Representation representations[] = {
Representation::Tagged(), // context
Representation::Tagged(), // name const Register InstanceofDescriptor::left() { return rax; }
}; const Register InstanceofDescriptor::right() { return rdx; }
descriptor->Initialize(arraysize(registers), registers, representations);
}
{ void FastNewClosureDescriptor::Initialize(Isolate* isolate) {
CallInterfaceDescriptor* descriptor = Register registers[] = {rsi, rbx};
isolate->call_descriptor(CallDescriptorKey::CallHandler); InitializeData(isolate, key(), arraysize(registers), registers, NULL);
Register registers[] = { }
rsi, // context
rdx, // receiver
}; void FastNewContextDescriptor::Initialize(Isolate* isolate) {
Representation representations[] = { Register registers[] = {rsi, rdi};
Representation::Tagged(), // context InitializeData(isolate, key(), arraysize(registers), registers, NULL);
Representation::Tagged(), // receiver }
};
descriptor->Initialize(arraysize(registers), registers, representations);
} void ToNumberDescriptor::Initialize(Isolate* isolate) {
{ // ToNumberStub invokes a function, and therefore needs a context.
CallInterfaceDescriptor* descriptor = Register registers[] = {rsi, rax};
isolate->call_descriptor(CallDescriptorKey::ApiFunctionCall); InitializeData(isolate, key(), arraysize(registers), registers, NULL);
Register registers[] = { }
rsi, // context
rax, // callee
rbx, // call_data void NumberToStringDescriptor::Initialize(Isolate* isolate) {
rcx, // holder Register registers[] = {rsi, rax};
rdx, // api_function_address InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}; }
Representation representations[] = {
Representation::Tagged(), // context
Representation::Tagged(), // callee void FastCloneShallowArrayDescriptor::Initialize(Isolate* isolate) {
Representation::Tagged(), // call_data Register registers[] = {rsi, rax, rbx, rcx};
Representation::Tagged(), // holder Representation representations[] = {
Representation::External(), // api_function_address Representation::Tagged(), Representation::Tagged(), Representation::Smi(),
}; Representation::Tagged()};
descriptor->Initialize(arraysize(registers), registers, representations); InitializeData(isolate, key(), arraysize(registers), registers,
} representations);
}
void FastCloneShallowObjectDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {rsi, rax, rbx, rcx, rdx};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void CreateAllocationSiteDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {rsi, rbx, rdx};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void CallFunctionDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {rsi, rdi};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void CallConstructDescriptor::Initialize(Isolate* isolate) {
// rax : number of arguments
// rbx : feedback vector
// rdx : (only if rbx is not the megamorphic symbol) slot in feedback
// vector (Smi)
// rdi : constructor function
// TODO(turbofan): So far we don't gather type feedback and hence skip the
// slot parameter, but ArrayConstructStub needs the vector to be undefined.
Register registers[] = {rsi, rax, rdi, rbx};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void RegExpConstructResultDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {rsi, rcx, rbx, rax};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void TransitionElementsKindDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {rsi, rax, rbx};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void ArrayConstructorConstantArgCountDescriptor::Initialize(Isolate* isolate) {
// register state
// rax -- number of arguments
// rdi -- function
// rbx -- allocation site with elements kind
Register registers[] = {rsi, rdi, rbx};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void ArrayConstructorDescriptor::Initialize(Isolate* isolate) {
// stack param count needs (constructor pointer, and single argument)
Register registers[] = {rsi, rdi, rbx, rax};
Representation representations[] = {
Representation::Tagged(), Representation::Tagged(),
Representation::Tagged(), Representation::Integer32()};
InitializeData(isolate, key(), arraysize(registers), registers,
representations);
}
void InternalArrayConstructorConstantArgCountDescriptor::Initialize(
Isolate* isolate) {
// register state
// rsi -- context
// rax -- number of arguments
// rdi -- constructor function
Register registers[] = {rsi, rdi};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void InternalArrayConstructorDescriptor::Initialize(Isolate* isolate) {
// stack param count needs (constructor pointer, and single argument)
Register registers[] = {rsi, rdi, rax};
Representation representations[] = {Representation::Tagged(),
Representation::Tagged(),
Representation::Integer32()};
InitializeData(isolate, key(), arraysize(registers), registers,
representations);
}
void CompareNilDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {rsi, rax};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void ToBooleanDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {rsi, rax};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void BinaryOpDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {rsi, rdx, rax};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void BinaryOpWithAllocationSiteDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {rsi, rcx, rdx, rax};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void StringAddDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {rsi, rdx, rax};
InitializeData(isolate, key(), arraysize(registers), registers, NULL);
}
void KeyedDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {
rsi, // context
rcx, // key
};
Representation representations[] = {
Representation::Tagged(), // context
Representation::Tagged(), // key
};
InitializeData(isolate, key(), arraysize(registers), registers,
representations);
}
void NamedDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {
rsi, // context
rcx, // name
};
Representation representations[] = {
Representation::Tagged(), // context
Representation::Tagged(), // name
};
InitializeData(isolate, key(), arraysize(registers), registers,
representations);
}
void CallHandlerDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {
rsi, // context
rdx, // receiver
};
Representation representations[] = {
Representation::Tagged(), // context
Representation::Tagged(), // receiver
};
InitializeData(isolate, key(), arraysize(registers), registers,
representations);
}
void ArgumentAdaptorDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {
rsi, // context
rdi, // JSFunction
rax, // actual number of arguments
rbx, // expected number of arguments
};
Representation representations[] = {
Representation::Tagged(), // context
Representation::Tagged(), // JSFunction
Representation::Integer32(), // actual number of arguments
Representation::Integer32(), // expected number of arguments
};
InitializeData(isolate, key(), arraysize(registers), registers,
representations);
}
void ApiFunctionDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {
rsi, // context
rax, // callee
rbx, // call_data
rcx, // holder
rdx, // api_function_address
};
Representation representations[] = {
Representation::Tagged(), // context
Representation::Tagged(), // callee
Representation::Tagged(), // call_data
Representation::Tagged(), // holder
Representation::External(), // api_function_address
};
InitializeData(isolate, key(), arraysize(registers), registers,
representations);
} }
} }
} // namespace v8::internal } // namespace v8::internal

View File

@ -2851,11 +2851,11 @@ template <class T>
void LCodeGen::EmitVectorLoadICRegisters(T* instr) { void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
DCHECK(FLAG_vector_ics); DCHECK(FLAG_vector_ics);
Register vector = ToRegister(instr->temp_vector()); Register vector = ToRegister(instr->temp_vector());
DCHECK(vector.is(FullVectorLoadConvention::VectorRegister())); DCHECK(vector.is(VectorLoadICDescriptor::VectorRegister()));
__ Move(vector, instr->hydrogen()->feedback_vector()); __ Move(vector, instr->hydrogen()->feedback_vector());
// No need to allocate this register. // No need to allocate this register.
DCHECK(VectorLoadConvention::SlotRegister().is(rax)); DCHECK(VectorLoadICDescriptor::SlotRegister().is(rax));
__ Move(VectorLoadConvention::SlotRegister(), __ Move(VectorLoadICDescriptor::SlotRegister(),
Smi::FromInt(instr->hydrogen()->slot())); Smi::FromInt(instr->hydrogen()->slot()));
} }
@ -2863,10 +2863,10 @@ void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(rsi)); DCHECK(ToRegister(instr->context()).is(rsi));
DCHECK(ToRegister(instr->global_object()) DCHECK(ToRegister(instr->global_object())
.is(LoadConvention::ReceiverRegister())); .is(LoadDescriptor::ReceiverRegister()));
DCHECK(ToRegister(instr->result()).is(rax)); DCHECK(ToRegister(instr->result()).is(rax));
__ Move(LoadConvention::NameRegister(), instr->name()); __ Move(LoadDescriptor::NameRegister(), instr->name());
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
} }
@ -3006,10 +3006,10 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(rsi)); DCHECK(ToRegister(instr->context()).is(rsi));
DCHECK(ToRegister(instr->object()).is(LoadConvention::ReceiverRegister())); DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
DCHECK(ToRegister(instr->result()).is(rax)); DCHECK(ToRegister(instr->result()).is(rax));
__ Move(LoadConvention::NameRegister(), instr->name()); __ Move(LoadDescriptor::NameRegister(), instr->name());
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
} }
@ -3290,8 +3290,8 @@ Operand LCodeGen::BuildFastArrayOperand(
void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(rsi)); DCHECK(ToRegister(instr->context()).is(rsi));
DCHECK(ToRegister(instr->object()).is(LoadConvention::ReceiverRegister())); DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
DCHECK(ToRegister(instr->key()).is(LoadConvention::NameRegister())); DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister()));
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
@ -4190,10 +4190,10 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(rsi)); DCHECK(ToRegister(instr->context()).is(rsi));
DCHECK(ToRegister(instr->object()).is(StoreConvention::ReceiverRegister())); DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
DCHECK(ToRegister(instr->value()).is(StoreConvention::ValueRegister())); DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
__ Move(StoreConvention::NameRegister(), instr->hydrogen()->name()); __ Move(StoreDescriptor::NameRegister(), instr->hydrogen()->name());
Handle<Code> ic = StoreIC::initialize_stub(isolate(), instr->strict_mode()); Handle<Code> ic = StoreIC::initialize_stub(isolate(), instr->strict_mode());
CallCode(ic, RelocInfo::CODE_TARGET, instr); CallCode(ic, RelocInfo::CODE_TARGET, instr);
} }
@ -4455,9 +4455,9 @@ void LCodeGen::DoStoreKeyed(LStoreKeyed* instr) {
void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(rsi)); DCHECK(ToRegister(instr->context()).is(rsi));
DCHECK(ToRegister(instr->object()).is(StoreConvention::ReceiverRegister())); DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
DCHECK(ToRegister(instr->key()).is(StoreConvention::NameRegister())); DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister()));
DCHECK(ToRegister(instr->value()).is(StoreConvention::ValueRegister())); DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
Handle<Code> ic = instr->strict_mode() == STRICT Handle<Code> ic = instr->strict_mode() == STRICT
? isolate()->builtins()->KeyedStoreIC_Initialize_Strict() ? isolate()->builtins()->KeyedStoreIC_Initialize_Strict()

View File

@ -1102,14 +1102,14 @@ LInstruction* LChunkBuilder::DoCallJSFunction(
LInstruction* LChunkBuilder::DoCallWithDescriptor( LInstruction* LChunkBuilder::DoCallWithDescriptor(
HCallWithDescriptor* instr) { HCallWithDescriptor* instr) {
const CallInterfaceDescriptor* descriptor = instr->descriptor(); CallInterfaceDescriptor descriptor = instr->descriptor();
LOperand* target = UseRegisterOrConstantAtStart(instr->target()); LOperand* target = UseRegisterOrConstantAtStart(instr->target());
ZoneList<LOperand*> ops(instr->OperandCount(), zone()); ZoneList<LOperand*> ops(instr->OperandCount(), zone());
ops.Add(target, zone()); ops.Add(target, zone());
for (int i = 1; i < instr->OperandCount(); i++) { for (int i = 1; i < instr->OperandCount(); i++) {
LOperand* op = UseFixed(instr->OperandAt(i), LOperand* op =
descriptor->GetParameterRegister(i - 1)); UseFixed(instr->OperandAt(i), descriptor.GetParameterRegister(i - 1));
ops.Add(op, zone()); ops.Add(op, zone());
} }
@ -2058,10 +2058,10 @@ LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) {
LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
LOperand* context = UseFixed(instr->context(), rsi); LOperand* context = UseFixed(instr->context(), rsi);
LOperand* global_object = LOperand* global_object =
UseFixed(instr->global_object(), LoadConvention::ReceiverRegister()); UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister());
LOperand* vector = NULL; LOperand* vector = NULL;
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
vector = FixedTemp(FullVectorLoadConvention::VectorRegister()); vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
} }
LLoadGlobalGeneric* result = LLoadGlobalGeneric* result =
@ -2131,10 +2131,10 @@ LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) {
LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), rsi); LOperand* context = UseFixed(instr->context(), rsi);
LOperand* object = LOperand* object =
UseFixed(instr->object(), LoadConvention::ReceiverRegister()); UseFixed(instr->object(), LoadDescriptor::ReceiverRegister());
LOperand* vector = NULL; LOperand* vector = NULL;
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
vector = FixedTemp(FullVectorLoadConvention::VectorRegister()); vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
} }
LLoadNamedGeneric* result = new(zone()) LLoadNamedGeneric( LLoadNamedGeneric* result = new(zone()) LLoadNamedGeneric(
context, object, vector); context, object, vector);
@ -2223,11 +2223,11 @@ LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) {
LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), rsi); LOperand* context = UseFixed(instr->context(), rsi);
LOperand* object = LOperand* object =
UseFixed(instr->object(), LoadConvention::ReceiverRegister()); UseFixed(instr->object(), LoadDescriptor::ReceiverRegister());
LOperand* key = UseFixed(instr->key(), LoadConvention::NameRegister()); LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister());
LOperand* vector = NULL; LOperand* vector = NULL;
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
vector = FixedTemp(FullVectorLoadConvention::VectorRegister()); vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
} }
LLoadKeyedGeneric* result = LLoadKeyedGeneric* result =
@ -2305,9 +2305,9 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), rsi); LOperand* context = UseFixed(instr->context(), rsi);
LOperand* object = LOperand* object =
UseFixed(instr->object(), StoreConvention::ReceiverRegister()); UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
LOperand* key = UseFixed(instr->key(), StoreConvention::NameRegister()); LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister());
LOperand* value = UseFixed(instr->value(), StoreConvention::ValueRegister()); LOperand* value = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
DCHECK(instr->object()->representation().IsTagged()); DCHECK(instr->object()->representation().IsTagged());
DCHECK(instr->key()->representation().IsTagged()); DCHECK(instr->key()->representation().IsTagged());
@ -2403,8 +2403,8 @@ LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), rsi); LOperand* context = UseFixed(instr->context(), rsi);
LOperand* object = LOperand* object =
UseFixed(instr->object(), StoreConvention::ReceiverRegister()); UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
LOperand* value = UseFixed(instr->value(), StoreConvention::ValueRegister()); LOperand* value = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
LStoreNamedGeneric* result = LStoreNamedGeneric* result =
new(zone()) LStoreNamedGeneric(context, object, value); new(zone()) LStoreNamedGeneric(context, object, value);

View File

@ -1877,10 +1877,10 @@ class LCallJSFunction FINAL : public LTemplateInstruction<1, 1, 0> {
class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> { class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> {
public: public:
LCallWithDescriptor(const CallInterfaceDescriptor* descriptor, LCallWithDescriptor(CallInterfaceDescriptor descriptor,
const ZoneList<LOperand*>& operands, Zone* zone) const ZoneList<LOperand*>& operands, Zone* zone)
: inputs_(descriptor->GetRegisterParameterCount() + 1, zone) { : inputs_(descriptor.GetRegisterParameterCount() + 1, zone) {
DCHECK(descriptor->GetRegisterParameterCount() + 1 == operands.length()); DCHECK(descriptor.GetRegisterParameterCount() + 1 == operands.length());
inputs_.AddAll(operands, zone); inputs_.AddAll(operands, zone);
} }

View File

@ -643,7 +643,6 @@
'../../src/ic/ic.h', '../../src/ic/ic.h',
'../../src/ic/ic-compiler.cc', '../../src/ic/ic-compiler.cc',
'../../src/ic/ic-compiler.h', '../../src/ic/ic-compiler.h',
'../../src/ic/ic-conventions.h',
'../../src/interface.cc', '../../src/interface.cc',
'../../src/interface.h', '../../src/interface.h',
'../../src/interface-descriptors.cc', '../../src/interface-descriptors.cc',
@ -837,7 +836,6 @@
'../../src/ic/arm/handler-compiler-arm.cc', '../../src/ic/arm/handler-compiler-arm.cc',
'../../src/ic/arm/ic-arm.cc', '../../src/ic/arm/ic-arm.cc',
'../../src/ic/arm/ic-compiler-arm.cc', '../../src/ic/arm/ic-compiler-arm.cc',
'../../src/ic/arm/ic-conventions-arm.cc',
'../../src/ic/arm/stub-cache-arm.cc', '../../src/ic/arm/stub-cache-arm.cc',
], ],
}], }],
@ -895,7 +893,6 @@
'../../src/ic/arm64/handler-compiler-arm64.cc', '../../src/ic/arm64/handler-compiler-arm64.cc',
'../../src/ic/arm64/ic-arm64.cc', '../../src/ic/arm64/ic-arm64.cc',
'../../src/ic/arm64/ic-compiler-arm64.cc', '../../src/ic/arm64/ic-compiler-arm64.cc',
'../../src/ic/arm64/ic-conventions-arm64.cc',
'../../src/ic/arm64/stub-cache-arm64.cc', '../../src/ic/arm64/stub-cache-arm64.cc',
], ],
}], }],
@ -935,7 +932,6 @@
'../../src/ic/ia32/handler-compiler-ia32.cc', '../../src/ic/ia32/handler-compiler-ia32.cc',
'../../src/ic/ia32/ic-ia32.cc', '../../src/ic/ia32/ic-ia32.cc',
'../../src/ic/ia32/ic-compiler-ia32.cc', '../../src/ic/ia32/ic-compiler-ia32.cc',
'../../src/ic/ia32/ic-conventions-ia32.cc',
'../../src/ic/ia32/stub-cache-ia32.cc', '../../src/ic/ia32/stub-cache-ia32.cc',
], ],
}], }],
@ -1089,7 +1085,6 @@
'../../src/ic/x64/handler-compiler-x64.cc', '../../src/ic/x64/handler-compiler-x64.cc',
'../../src/ic/x64/ic-x64.cc', '../../src/ic/x64/ic-x64.cc',
'../../src/ic/x64/ic-compiler-x64.cc', '../../src/ic/x64/ic-compiler-x64.cc',
'../../src/ic/x64/ic-conventions-x64.cc',
'../../src/ic/x64/stub-cache-x64.cc', '../../src/ic/x64/stub-cache-x64.cc',
], ],
}], }],