X87: Make concrete classes for individual call descriptors

port r23639

original commit message:

  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.

BUG=
R=weiliang.lin@intel.com

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

Patch from Jing Bao <jing.bao@intel.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23708 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent f3d39dc4
...@@ -21,8 +21,8 @@ void PropertyAccessCompiler::GenerateTailCall(MacroAssembler* masm, ...@@ -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() { ...@@ -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;
} }
......
...@@ -22,8 +22,8 @@ void ElementHandlerCompiler::GenerateLoadDictionaryElement( ...@@ -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( ...@@ -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));
...@@ -854,7 +854,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor( ...@@ -854,7 +854,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor(
Register NamedStoreHandlerCompiler::value() { Register NamedStoreHandlerCompiler::value() {
return StoreConvention::ValueRegister(); return StoreDescriptor::ValueRegister();
} }
...@@ -864,7 +864,7 @@ Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal( ...@@ -864,7 +864,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));
......
...@@ -17,13 +17,13 @@ namespace internal { ...@@ -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, ...@@ -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;
......
// 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_X87
#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_X87
...@@ -312,8 +312,8 @@ void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) { ...@@ -312,8 +312,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));
...@@ -482,8 +482,8 @@ void KeyedLoadIC::GenerateString(MacroAssembler* masm) { ...@@ -482,8 +482,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;
...@@ -509,8 +509,8 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) { ...@@ -509,8 +509,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));
...@@ -549,8 +549,8 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) { ...@@ -549,8 +549,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));
...@@ -576,9 +576,9 @@ void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) { ...@@ -576,9 +576,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));
...@@ -610,9 +610,9 @@ static void KeyedStoreGenerateGenericHelper( ...@@ -610,9 +610,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));
...@@ -747,8 +747,8 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm, ...@@ -747,8 +747,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));
...@@ -827,8 +827,8 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm, ...@@ -827,8 +827,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));
...@@ -845,15 +845,15 @@ void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { ...@@ -845,15 +845,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).
...@@ -863,8 +863,8 @@ void LoadIC::GenerateNormal(MacroAssembler* masm) { ...@@ -863,8 +863,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);
...@@ -923,8 +923,8 @@ void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { ...@@ -923,8 +923,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);
...@@ -932,9 +932,9 @@ void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { ...@@ -932,9 +932,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));
...@@ -959,9 +959,9 @@ void StoreIC::GenerateMiss(MacroAssembler* masm) { ...@@ -959,9 +959,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));
......
...@@ -994,8 +994,8 @@ void Builtins::Generate_FunctionApply(MacroAssembler* masm) { ...@@ -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) { ...@@ -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);
......
...@@ -32,14 +32,12 @@ static void InitializeArrayConstructorDescriptor( ...@@ -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( ...@@ -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);
...@@ -338,7 +334,7 @@ void MathPowStub::Generate(MacroAssembler* masm) { ...@@ -338,7 +334,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);
...@@ -3888,14 +3884,14 @@ void StubFailureTrampolineStub::Generate(MacroAssembler* masm) { ...@@ -3888,14 +3884,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);
} }
......
...@@ -180,17 +180,17 @@ void DebugCodegen::GenerateCallICStubDebugBreak(MacroAssembler* masm) { ...@@ -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-x87.cc). // Register state for IC load call (from ic-x87.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-x87.cc). // Register state for IC store call (from ic-x87.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) { ...@@ -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-x87.cc). // Register state for keyed IC store call (from ic-x87.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);
} }
......
...@@ -1324,10 +1324,10 @@ void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy, ...@@ -1324,10 +1324,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())));
} }
...@@ -1411,10 +1411,10 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) { ...@@ -1411,10 +1411,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);
...@@ -1630,9 +1630,9 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { ...@@ -1630,9 +1630,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 {
...@@ -1810,7 +1810,7 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) { ...@@ -1810,7 +1810,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());
} }
...@@ -1819,8 +1819,8 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) { ...@@ -1819,8 +1819,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());
...@@ -1960,8 +1960,8 @@ void FullCodeGenerator::VisitYield(Yield* expr) { ...@@ -1960,8 +1960,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());
...@@ -2017,7 +2017,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) { ...@@ -2017,7 +2017,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();
...@@ -2037,7 +2037,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) { ...@@ -2037,7 +2037,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
...@@ -2051,7 +2051,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) { ...@@ -2051,7 +2051,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
...@@ -2213,9 +2213,9 @@ void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) { ...@@ -2213,9 +2213,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 {
...@@ -2228,7 +2228,7 @@ void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) { ...@@ -2228,7 +2228,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 {
...@@ -2368,9 +2368,9 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) { ...@@ -2368,9 +2368,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;
...@@ -2379,9 +2379,9 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) { ...@@ -2379,9 +2379,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();
...@@ -2408,8 +2408,8 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, ...@@ -2408,8 +2408,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) {
...@@ -2482,8 +2482,8 @@ void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) { ...@@ -2482,8 +2482,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);
...@@ -2496,9 +2496,9 @@ void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) { ...@@ -2496,9 +2496,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
...@@ -2517,15 +2517,15 @@ void FullCodeGenerator::VisitProperty(Property* expr) { ...@@ -2517,15 +2517,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);
} }
...@@ -2558,7 +2558,7 @@ void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) { ...@@ -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());
__ 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.
...@@ -2580,8 +2580,8 @@ void FullCodeGenerator::EmitKeyedCallWithLoadIC(Call* expr, ...@@ -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());
__ 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);
...@@ -4038,10 +4038,10 @@ void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) { ...@@ -4038,10 +4038,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 {
...@@ -4228,14 +4228,14 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { ...@@ -4228,14 +4228,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);
} }
} }
...@@ -4350,9 +4350,9 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { ...@@ -4350,9 +4350,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()) {
...@@ -4365,8 +4365,8 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { ...@@ -4365,8 +4365,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();
...@@ -4393,10 +4393,10 @@ void FullCodeGenerator::VisitForTypeofValue(Expression* expr) { ...@@ -4393,10 +4393,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
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#if V8_TARGET_ARCH_X87 #if V8_TARGET_ARCH_X87
#include "src/ic/ic-conventions.h"
#include "src/interface-descriptors.h" #include "src/interface-descriptors.h"
namespace v8 { namespace v8 {
...@@ -15,64 +14,107 @@ namespace internal { ...@@ -15,64 +14,107 @@ 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 = const Register VectorLoadICDescriptor::ReceiverRegister() {
isolate->call_descriptor(CallDescriptorKey::FastNewClosureCall); return LoadDescriptor::ReceiverRegister();
}
const Register VectorLoadICDescriptor::NameRegister() {
return LoadDescriptor::NameRegister();
}
const Register VectorLoadICDescriptor::SlotRegister() { return eax; }
const Register VectorLoadICDescriptor::VectorRegister() { return ebx; }
const Register StoreDescriptor::ReceiverRegister() { return edx; }
const Register StoreDescriptor::NameRegister() { return ecx; }
const Register StoreDescriptor::ValueRegister() { return eax; }
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 ebx;
}
const Register InstanceofDescriptor::left() { return eax; }
const Register InstanceofDescriptor::right() { return edx; }
void FastNewClosureDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {esi, ebx}; Register registers[] = {esi, ebx};
descriptor->Initialize(arraysize(registers), registers, NULL); InitializeData(isolate, key(), arraysize(registers), registers, NULL);
} }
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::FastNewContextCall); void FastNewContextDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {esi, edi}; Register registers[] = {esi, edi};
descriptor->Initialize(arraysize(registers), registers, NULL); InitializeData(isolate, key(), arraysize(registers), registers, NULL);
} }
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::ToNumberCall); void ToNumberDescriptor::Initialize(Isolate* isolate) {
// ToNumberStub invokes a function, and therefore needs a context. // ToNumberStub invokes a function, and therefore needs a context.
Register registers[] = {esi, eax}; Register registers[] = {esi, eax};
descriptor->Initialize(arraysize(registers), registers, NULL); InitializeData(isolate, key(), arraysize(registers), registers, NULL);
} }
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::NumberToStringCall); void NumberToStringDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {esi, eax}; Register registers[] = {esi, eax};
descriptor->Initialize(arraysize(registers), registers, NULL); InitializeData(isolate, key(), arraysize(registers), registers, NULL);
} }
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::FastCloneShallowArrayCall); void FastCloneShallowArrayDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {esi, eax, ebx, ecx}; Register registers[] = {esi, eax, ebx, ecx};
Representation representations[] = { Representation representations[] = {
Representation::Tagged(), Representation::Tagged(), Representation::Tagged(), Representation::Tagged(), Representation::Smi(),
Representation::Smi(), Representation::Tagged()}; Representation::Tagged()};
descriptor->Initialize(arraysize(registers), registers, representations); InitializeData(isolate, key(), arraysize(registers), registers,
} representations);
{ }
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::FastCloneShallowObjectCall);
void FastCloneShallowObjectDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {esi, eax, ebx, ecx, edx}; Register registers[] = {esi, eax, ebx, ecx, edx};
descriptor->Initialize(arraysize(registers), registers, NULL); InitializeData(isolate, key(), arraysize(registers), registers, NULL);
} }
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::CreateAllocationSiteCall); void CreateAllocationSiteDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {esi, ebx, edx}; Register registers[] = {esi, ebx, edx};
descriptor->Initialize(arraysize(registers), registers, NULL); InitializeData(isolate, key(), arraysize(registers), registers, NULL);
} }
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::CallFunctionCall); void CallFunctionDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {esi, edi}; Register registers[] = {esi, edi};
descriptor->Initialize(arraysize(registers), registers, NULL); InitializeData(isolate, key(), arraysize(registers), registers, NULL);
} }
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::CallConstructCall); void CallConstructDescriptor::Initialize(Isolate* isolate) {
// eax : number of arguments // eax : number of arguments
// ebx : feedback vector // ebx : feedback vector
// edx : (only if ebx is not the megamorphic symbol) slot in feedback // edx : (only if ebx is not the megamorphic symbol) slot in feedback
...@@ -81,110 +123,95 @@ void CallDescriptors::InitializeForIsolate(Isolate* isolate) { ...@@ -81,110 +123,95 @@ void CallDescriptors::InitializeForIsolate(Isolate* isolate) {
// TODO(turbofan): So far we don't gather type feedback and hence skip the // TODO(turbofan): So far we don't gather type feedback and hence skip the
// slot parameter, but ArrayConstructStub needs the vector to be undefined. // slot parameter, but ArrayConstructStub needs the vector to be undefined.
Register registers[] = {esi, eax, edi, ebx}; Register registers[] = {esi, eax, edi, ebx};
descriptor->Initialize(arraysize(registers), registers, NULL); InitializeData(isolate, key(), arraysize(registers), registers, NULL);
} }
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::RegExpConstructResultCall); void RegExpConstructResultDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {esi, ecx, ebx, eax}; Register registers[] = {esi, ecx, ebx, eax};
descriptor->Initialize(arraysize(registers), registers, NULL); InitializeData(isolate, key(), arraysize(registers), registers, NULL);
} }
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::TransitionElementsKindCall); void TransitionElementsKindDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {esi, eax, ebx}; Register registers[] = {esi, eax, ebx};
descriptor->Initialize(arraysize(registers), registers, NULL); InitializeData(isolate, key(), arraysize(registers), registers, NULL);
} }
{
CallInterfaceDescriptor* descriptor = isolate->call_descriptor(
CallDescriptorKey::ArrayConstructorConstantArgCountCall); void ArrayConstructorConstantArgCountDescriptor::Initialize(Isolate* isolate) {
// register state // register state
// eax -- number of arguments // eax -- number of arguments
// edi -- function // edi -- function
// ebx -- allocation site with elements kind // ebx -- allocation site with elements kind
Register registers[] = {esi, edi, ebx}; Register registers[] = {esi, edi, ebx};
descriptor->Initialize(arraysize(registers), registers, NULL); InitializeData(isolate, key(), arraysize(registers), registers, NULL);
} }
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::ArrayConstructorCall); void ArrayConstructorDescriptor::Initialize(Isolate* isolate) {
// stack param count needs (constructor pointer, and single argument) // stack param count needs (constructor pointer, and single argument)
Register registers[] = {esi, edi, ebx, eax}; Register registers[] = {esi, edi, ebx, eax};
Representation representations[] = { Representation representations[] = {
Representation::Tagged(), Representation::Tagged(), Representation::Tagged(), Representation::Tagged(),
Representation::Tagged(), Representation::Integer32()}; Representation::Tagged(), Representation::Integer32()};
descriptor->Initialize(arraysize(registers), registers, representations); InitializeData(isolate, key(), arraysize(registers), registers,
} representations);
{ }
CallInterfaceDescriptor* descriptor = isolate->call_descriptor(
CallDescriptorKey::InternalArrayConstructorConstantArgCountCall);
void InternalArrayConstructorConstantArgCountDescriptor::Initialize(
Isolate* isolate) {
// register state // register state
// eax -- number of arguments // eax -- number of arguments
// edi -- function // edi -- function
Register registers[] = {esi, edi}; Register registers[] = {esi, edi};
descriptor->Initialize(arraysize(registers), registers, NULL); InitializeData(isolate, key(), arraysize(registers), registers, NULL);
} }
{
CallInterfaceDescriptor* descriptor = isolate->call_descriptor(
CallDescriptorKey::InternalArrayConstructorCall); void InternalArrayConstructorDescriptor::Initialize(Isolate* isolate) {
// stack param count needs (constructor pointer, and single argument) // stack param count needs (constructor pointer, and single argument)
Register registers[] = {esi, edi, eax}; Register registers[] = {esi, edi, eax};
Representation representations[] = {Representation::Tagged(), Representation representations[] = {Representation::Tagged(),
Representation::Tagged(), Representation::Tagged(),
Representation::Integer32()}; Representation::Integer32()};
descriptor->Initialize(arraysize(registers), registers, representations); InitializeData(isolate, key(), arraysize(registers), registers,
} representations);
{ }
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::CompareNilCall);
void CompareNilDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {esi, eax}; Register registers[] = {esi, eax};
descriptor->Initialize(arraysize(registers), registers, NULL); InitializeData(isolate, key(), arraysize(registers), registers, NULL);
} }
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::ToBooleanCall); void ToBooleanDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {esi, eax}; Register registers[] = {esi, eax};
descriptor->Initialize(arraysize(registers), registers, NULL); InitializeData(isolate, key(), arraysize(registers), registers, NULL);
} }
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::BinaryOpCall); void BinaryOpDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {esi, edx, eax}; Register registers[] = {esi, edx, eax};
descriptor->Initialize(arraysize(registers), registers, NULL); InitializeData(isolate, key(), arraysize(registers), registers, NULL);
} }
{
CallInterfaceDescriptor* descriptor = isolate->call_descriptor(
CallDescriptorKey::BinaryOpWithAllocationSiteCall); void BinaryOpWithAllocationSiteDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {esi, ecx, edx, eax}; Register registers[] = {esi, ecx, edx, eax};
descriptor->Initialize(arraysize(registers), registers, NULL); InitializeData(isolate, key(), arraysize(registers), registers, NULL);
} }
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::StringAddCall); void StringAddDescriptor::Initialize(Isolate* isolate) {
Register registers[] = {esi, edx, eax}; Register registers[] = {esi, edx, eax};
descriptor->Initialize(arraysize(registers), registers, NULL); InitializeData(isolate, key(), arraysize(registers), registers, NULL);
} }
{
CallInterfaceDescriptor* descriptor = void KeyedDescriptor::Initialize(Isolate* isolate) {
isolate->call_descriptor(CallDescriptorKey::ArgumentAdaptorCall);
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
};
descriptor->Initialize(arraysize(registers), registers, representations);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::KeyedCall);
Register registers[] = { Register registers[] = {
esi, // context esi, // context
ecx, // key ecx, // key
...@@ -193,11 +220,12 @@ void CallDescriptors::InitializeForIsolate(Isolate* isolate) { ...@@ -193,11 +220,12 @@ void CallDescriptors::InitializeForIsolate(Isolate* isolate) {
Representation::Tagged(), // context Representation::Tagged(), // context
Representation::Tagged(), // key Representation::Tagged(), // key
}; };
descriptor->Initialize(arraysize(registers), registers, representations); InitializeData(isolate, key(), arraysize(registers), registers,
} representations);
{ }
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::NamedCall);
void NamedDescriptor::Initialize(Isolate* isolate) {
Register registers[] = { Register registers[] = {
esi, // context esi, // context
ecx, // name ecx, // name
...@@ -206,11 +234,12 @@ void CallDescriptors::InitializeForIsolate(Isolate* isolate) { ...@@ -206,11 +234,12 @@ void CallDescriptors::InitializeForIsolate(Isolate* isolate) {
Representation::Tagged(), // context Representation::Tagged(), // context
Representation::Tagged(), // name Representation::Tagged(), // name
}; };
descriptor->Initialize(arraysize(registers), registers, representations); InitializeData(isolate, key(), arraysize(registers), registers,
} representations);
{ }
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::CallHandler);
void CallHandlerDescriptor::Initialize(Isolate* isolate) {
Register registers[] = { Register registers[] = {
esi, // context esi, // context
edx, // name edx, // name
...@@ -219,11 +248,30 @@ void CallDescriptors::InitializeForIsolate(Isolate* isolate) { ...@@ -219,11 +248,30 @@ void CallDescriptors::InitializeForIsolate(Isolate* isolate) {
Representation::Tagged(), // context Representation::Tagged(), // context
Representation::Tagged(), // receiver Representation::Tagged(), // receiver
}; };
descriptor->Initialize(arraysize(registers), registers, representations); InitializeData(isolate, key(), arraysize(registers), registers,
} representations);
{ }
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::ApiFunctionCall);
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[] = { Register registers[] = {
esi, // context esi, // context
eax, // callee eax, // callee
...@@ -238,8 +286,8 @@ void CallDescriptors::InitializeForIsolate(Isolate* isolate) { ...@@ -238,8 +286,8 @@ void CallDescriptors::InitializeForIsolate(Isolate* isolate) {
Representation::Tagged(), // holder Representation::Tagged(), // holder
Representation::External(), // api_function_address Representation::External(), // api_function_address
}; };
descriptor->Initialize(arraysize(registers), registers, representations); InitializeData(isolate, key(), arraysize(registers), registers,
} representations);
} }
} }
} // namespace v8::internal } // namespace v8::internal
......
...@@ -2968,11 +2968,11 @@ template <class T> ...@@ -2968,11 +2968,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())));
} }
...@@ -2980,10 +2980,10 @@ void LCodeGen::EmitVectorLoadICRegisters(T* instr) { ...@@ -2980,10 +2980,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);
} }
...@@ -3115,10 +3115,10 @@ void LCodeGen::EmitPushTaggedOperand(LOperand* operand) { ...@@ -3115,10 +3115,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);
} }
...@@ -3340,8 +3340,8 @@ Operand LCodeGen::BuildFastArrayOperand( ...@@ -3340,8 +3340,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);
...@@ -3976,10 +3976,10 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { ...@@ -3976,10 +3976,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);
} }
...@@ -4187,9 +4187,9 @@ void LCodeGen::DoStoreKeyed(LStoreKeyed* instr) { ...@@ -4187,9 +4187,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()
......
...@@ -1119,13 +1119,13 @@ LInstruction* LChunkBuilder::DoCallJSFunction( ...@@ -1119,13 +1119,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());
} }
...@@ -2080,10 +2080,10 @@ LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) { ...@@ -2080,10 +2080,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 =
...@@ -2141,10 +2141,10 @@ LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { ...@@ -2141,10 +2141,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);
...@@ -2205,11 +2205,11 @@ LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) { ...@@ -2205,11 +2205,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);
...@@ -2295,9 +2295,9 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { ...@@ -2295,9 +2295,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());
...@@ -2400,8 +2400,8 @@ LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { ...@@ -2400,8 +2400,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);
......
...@@ -1906,10 +1906,10 @@ class LCallJSFunction FINAL : public LTemplateInstruction<1, 1, 0> { ...@@ -1906,10 +1906,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);
} }
......
...@@ -965,7 +965,6 @@ ...@@ -965,7 +965,6 @@
'../../src/ic/x87/handler-compiler-x87.cc', '../../src/ic/x87/handler-compiler-x87.cc',
'../../src/ic/x87/ic-x87.cc', '../../src/ic/x87/ic-x87.cc',
'../../src/ic/x87/ic-compiler-x87.cc', '../../src/ic/x87/ic-compiler-x87.cc',
'../../src/ic/x87/ic-conventions-x87.cc',
'../../src/ic/x87/stub-cache-x87.cc', '../../src/ic/x87/stub-cache-x87.cc',
], ],
}], }],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment