MIPS: Make concrete classes for individual call descriptors. - internal

Port r23639 (e5a2758)

Original commit message:
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=paul.lind@imgtec.com

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23666 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 2e6db865
...@@ -22,8 +22,8 @@ void PropertyAccessCompiler::GenerateTailCall(MacroAssembler* masm, ...@@ -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, a3, a0, t0, t1}; static Register registers[] = {receiver, name, a3, a0, t0, t1};
return registers; return registers;
} }
...@@ -31,9 +31,9 @@ Register* PropertyAccessCompiler::load_calling_convention() { ...@@ -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(a3.is(StoreConvention::MapRegister())); DCHECK(a3.is(ElementTransitionAndStoreDescriptor::MapRegister()));
static Register registers[] = {receiver, name, a3, t0, t1}; static Register registers[] = {receiver, name, a3, t0, t1};
return registers; return registers;
} }
......
...@@ -286,8 +286,8 @@ void ElementHandlerCompiler::GenerateLoadDictionaryElement( ...@@ -286,8 +286,8 @@ void ElementHandlerCompiler::GenerateLoadDictionaryElement(
// The return address is in ra. // The return address is in ra.
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(a1)); DCHECK(receiver.is(a1));
DCHECK(key.is(a2)); DCHECK(key.is(a2));
...@@ -312,8 +312,8 @@ void ElementHandlerCompiler::GenerateLoadDictionaryElement( ...@@ -312,8 +312,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.
...@@ -325,8 +325,8 @@ void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) { ...@@ -325,8 +325,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( ...@@ -829,7 +829,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor(
Register NamedStoreHandlerCompiler::value() { Register NamedStoreHandlerCompiler::value() {
return StoreConvention::ValueRegister(); return StoreDescriptor::ValueRegister();
} }
...@@ -840,7 +840,7 @@ Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal( ...@@ -840,7 +840,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();
__ li(result, Operand(cell)); __ li(result, Operand(cell));
__ lw(result, FieldMemOperand(result, Cell::kValueOffset)); __ lw(result, FieldMemOperand(result, Cell::kValueOffset));
......
...@@ -40,7 +40,7 @@ Handle<Code> PropertyICCompiler::CompilePolymorphic(TypeHandleList* types, ...@@ -40,7 +40,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;
...@@ -108,8 +108,8 @@ Handle<Code> PropertyICCompiler::CompileKeyedStorePolymorphic( ...@@ -108,8 +108,8 @@ Handle<Code> PropertyICCompiler::CompileKeyedStorePolymorphic(
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());
__ li(a0, Operand(Smi::FromInt(strict_mode))); __ li(a0, Operand(Smi::FromInt(strict_mode)));
__ Push(a0); __ Push(a0);
......
// 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_MIPS
#include "src/codegen.h"
#include "src/ic/ic-conventions.h"
namespace v8 {
namespace internal {
// IC register specifications
const Register LoadConvention::ReceiverRegister() { return a1; }
const Register LoadConvention::NameRegister() { return a2; }
const Register VectorLoadConvention::SlotRegister() { return a0; }
const Register FullVectorLoadConvention::VectorRegister() { return a3; }
const Register StoreConvention::ReceiverRegister() { return a1; }
const Register StoreConvention::NameRegister() { return a2; }
const Register StoreConvention::ValueRegister() { return a0; }
const Register StoreConvention::MapRegister() { return a3; }
const Register InstanceofConvention::left() { return a0; }
const Register InstanceofConvention::right() { return a1; }
}
} // namespace v8::internal
#endif // V8_TARGET_ARCH_MIPS
...@@ -251,8 +251,8 @@ static void GenerateKeyNameCheck(MacroAssembler* masm, Register key, ...@@ -251,8 +251,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(a1)); DCHECK(receiver.is(a1));
DCHECK(name.is(a2)); DCHECK(name.is(a2));
...@@ -269,15 +269,15 @@ void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { ...@@ -269,15 +269,15 @@ void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
void LoadIC::GenerateNormal(MacroAssembler* masm) { void LoadIC::GenerateNormal(MacroAssembler* masm) {
Register dictionary = a0; Register dictionary = a0;
DCHECK(!dictionary.is(LoadConvention::ReceiverRegister())); DCHECK(!dictionary.is(LoadDescriptor::ReceiverRegister()));
DCHECK(!dictionary.is(LoadConvention::NameRegister())); DCHECK(!dictionary.is(LoadDescriptor::NameRegister()));
Label slow; Label slow;
__ lw(dictionary, FieldMemOperand(LoadConvention::ReceiverRegister(), __ lw(dictionary, FieldMemOperand(LoadDescriptor::ReceiverRegister(),
JSObject::kPropertiesOffset)); JSObject::kPropertiesOffset));
GenerateDictionaryLoad(masm, &slow, dictionary, GenerateDictionaryLoad(masm, &slow, dictionary,
LoadConvention::NameRegister(), v0, a3, t0); LoadDescriptor::NameRegister(), v0, a3, t0);
__ Ret(); __ Ret();
// Dictionary load failed, go slow (but don't miss). // Dictionary load failed, go slow (but don't miss).
...@@ -296,8 +296,8 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) { ...@@ -296,8 +296,8 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
__ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, t0); __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, t0);
__ 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);
...@@ -308,8 +308,8 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) { ...@@ -308,8 +308,8 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
// The return address is in ra. // The return address is in ra.
__ 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);
} }
...@@ -394,8 +394,8 @@ static MemOperand GenerateUnmappedArgumentsLookup(MacroAssembler* masm, ...@@ -394,8 +394,8 @@ static MemOperand GenerateUnmappedArgumentsLookup(MacroAssembler* masm,
void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) { void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
// The return address is in ra. // The return address is in ra.
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
Register key = LoadConvention::NameRegister(); Register key = LoadDescriptor::NameRegister();
DCHECK(receiver.is(a1)); DCHECK(receiver.is(a1));
DCHECK(key.is(a2)); DCHECK(key.is(a2));
...@@ -419,9 +419,9 @@ void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) { ...@@ -419,9 +419,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(value.is(a0)); DCHECK(value.is(a0));
Label slow, notin; Label slow, notin;
...@@ -458,7 +458,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { ...@@ -458,7 +458,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
__ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, t0); __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, t0);
__ 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 =
...@@ -471,7 +471,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { ...@@ -471,7 +471,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
// The return address is in ra. // The return address is in ra.
__ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister()); __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
__ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1); __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1);
} }
...@@ -482,8 +482,8 @@ void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) { ...@@ -482,8 +482,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(a2)); DCHECK(key.is(a2));
DCHECK(receiver.is(a1)); DCHECK(receiver.is(a1));
...@@ -642,8 +642,8 @@ void KeyedLoadIC::GenerateString(MacroAssembler* masm) { ...@@ -642,8 +642,8 @@ void KeyedLoadIC::GenerateString(MacroAssembler* masm) {
// Return address is in ra. // Return address is in ra.
Label miss; Label miss;
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
Register index = LoadConvention::NameRegister(); Register index = LoadDescriptor::NameRegister();
Register scratch = a3; Register scratch = a3;
Register result = v0; Register result = v0;
DCHECK(!scratch.is(receiver) && !scratch.is(index)); DCHECK(!scratch.is(receiver) && !scratch.is(index));
...@@ -823,9 +823,9 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm, ...@@ -823,9 +823,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(value.is(a0)); DCHECK(value.is(a0));
Register receiver_map = a3; Register receiver_map = a3;
Register elements_map = t2; Register elements_map = t2;
...@@ -909,8 +909,8 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) { ...@@ -909,8 +909,8 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) {
// Return address is in ra. // Return address is in ra.
Label slow; Label slow;
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
Register key = LoadConvention::NameRegister(); Register key = LoadDescriptor::NameRegister();
Register scratch1 = a3; Register scratch1 = a3;
Register scratch2 = t0; Register scratch2 = t0;
DCHECK(!scratch1.is(receiver) && !scratch1.is(key)); DCHECK(!scratch1.is(receiver) && !scratch1.is(key));
...@@ -947,8 +947,8 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) { ...@@ -947,8 +947,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());
...@@ -957,11 +957,11 @@ void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { ...@@ -957,11 +957,11 @@ void KeyedStoreIC::GenerateMiss(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(a1)); DCHECK(receiver.is(a1));
DCHECK(name.is(a2)); DCHECK(name.is(a2));
DCHECK(StoreConvention::ValueRegister().is(a0)); DCHECK(StoreDescriptor::ValueRegister().is(a0));
// 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(
...@@ -975,8 +975,8 @@ void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { ...@@ -975,8 +975,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 =
ExternalReference(IC_Utility(kStoreIC_Miss), masm->isolate()); ExternalReference(IC_Utility(kStoreIC_Miss), masm->isolate());
...@@ -986,9 +986,9 @@ void StoreIC::GenerateMiss(MacroAssembler* masm) { ...@@ -986,9 +986,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 = a3; Register dictionary = a3;
DCHECK(receiver.is(a1)); DCHECK(receiver.is(a1));
DCHECK(name.is(a2)); DCHECK(name.is(a2));
......
...@@ -22,8 +22,8 @@ void PropertyAccessCompiler::GenerateTailCall(MacroAssembler* masm, ...@@ -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, a3, a0, a4, a5}; static Register registers[] = {receiver, name, a3, a0, a4, a5};
return registers; return registers;
} }
...@@ -31,9 +31,9 @@ Register* PropertyAccessCompiler::load_calling_convention() { ...@@ -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(a3.is(StoreConvention::MapRegister())); DCHECK(a3.is(ElementTransitionAndStoreDescriptor::MapRegister()));
static Register registers[] = {receiver, name, a3, a4, a5}; static Register registers[] = {receiver, name, a3, a4, a5};
return registers; return registers;
} }
......
...@@ -286,8 +286,8 @@ void ElementHandlerCompiler::GenerateLoadDictionaryElement( ...@@ -286,8 +286,8 @@ void ElementHandlerCompiler::GenerateLoadDictionaryElement(
// The return address is in ra // The return address is in ra
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(a1)); DCHECK(receiver.is(a1));
DCHECK(key.is(a2)); DCHECK(key.is(a2));
...@@ -313,8 +313,8 @@ void ElementHandlerCompiler::GenerateLoadDictionaryElement( ...@@ -313,8 +313,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.
...@@ -326,8 +326,8 @@ void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) { ...@@ -326,8 +326,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.
...@@ -830,7 +830,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor( ...@@ -830,7 +830,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor(
Register NamedStoreHandlerCompiler::value() { Register NamedStoreHandlerCompiler::value() {
return StoreConvention::ValueRegister(); return StoreDescriptor::ValueRegister();
} }
...@@ -841,7 +841,7 @@ Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal( ...@@ -841,7 +841,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();
__ li(result, Operand(cell)); __ li(result, Operand(cell));
__ ld(result, FieldMemOperand(result, Cell::kValueOffset)); __ ld(result, FieldMemOperand(result, Cell::kValueOffset));
......
...@@ -40,7 +40,7 @@ Handle<Code> PropertyICCompiler::CompilePolymorphic(TypeHandleList* types, ...@@ -40,7 +40,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;
...@@ -108,8 +108,8 @@ Handle<Code> PropertyICCompiler::CompileKeyedStorePolymorphic( ...@@ -108,8 +108,8 @@ Handle<Code> PropertyICCompiler::CompileKeyedStorePolymorphic(
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());
__ li(a0, Operand(Smi::FromInt(strict_mode))); __ li(a0, Operand(Smi::FromInt(strict_mode)));
__ Push(a0); __ Push(a0);
......
// 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_MIPS64
#include "src/codegen.h"
#include "src/ic/ic-conventions.h"
namespace v8 {
namespace internal {
// IC register specifications
const Register LoadConvention::ReceiverRegister() { return a1; }
const Register LoadConvention::NameRegister() { return a2; }
const Register VectorLoadConvention::SlotRegister() { return a0; }
const Register FullVectorLoadConvention::VectorRegister() { return a3; }
const Register StoreConvention::ReceiverRegister() { return a1; }
const Register StoreConvention::NameRegister() { return a2; }
const Register StoreConvention::ValueRegister() { return a0; }
const Register StoreConvention::MapRegister() { return a3; }
const Register InstanceofConvention::left() { return a0; }
const Register InstanceofConvention::right() { return a1; }
}
} // namespace v8::internal
#endif // V8_TARGET_ARCH_MIPS64
...@@ -250,8 +250,8 @@ static void GenerateKeyNameCheck(MacroAssembler* masm, Register key, ...@@ -250,8 +250,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(a1)); DCHECK(receiver.is(a1));
DCHECK(name.is(a2)); DCHECK(name.is(a2));
...@@ -268,14 +268,14 @@ void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { ...@@ -268,14 +268,14 @@ void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
void LoadIC::GenerateNormal(MacroAssembler* masm) { void LoadIC::GenerateNormal(MacroAssembler* masm) {
Register dictionary = a0; Register dictionary = a0;
DCHECK(!dictionary.is(LoadConvention::ReceiverRegister())); DCHECK(!dictionary.is(LoadDescriptor::ReceiverRegister()));
DCHECK(!dictionary.is(LoadConvention::NameRegister())); DCHECK(!dictionary.is(LoadDescriptor::NameRegister()));
Label slow; Label slow;
__ ld(dictionary, FieldMemOperand(LoadConvention::ReceiverRegister(), __ ld(dictionary, FieldMemOperand(LoadDescriptor::ReceiverRegister(),
JSObject::kPropertiesOffset)); JSObject::kPropertiesOffset));
GenerateDictionaryLoad(masm, &slow, dictionary, GenerateDictionaryLoad(masm, &slow, dictionary,
LoadConvention::NameRegister(), v0, a3, a4); LoadDescriptor::NameRegister(), v0, a3, a4);
__ Ret(); __ Ret();
// Dictionary load failed, go slow (but don't miss). // Dictionary load failed, go slow (but don't miss).
...@@ -294,8 +294,8 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) { ...@@ -294,8 +294,8 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
__ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, a4); __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, a4);
__ 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);
...@@ -306,8 +306,8 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) { ...@@ -306,8 +306,8 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
// The return address is in ra. // The return address is in ra.
__ 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);
} }
...@@ -392,8 +392,8 @@ static MemOperand GenerateUnmappedArgumentsLookup(MacroAssembler* masm, ...@@ -392,8 +392,8 @@ static MemOperand GenerateUnmappedArgumentsLookup(MacroAssembler* masm,
void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) { void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
// The return address is in ra. // The return address is in ra.
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
Register key = LoadConvention::NameRegister(); Register key = LoadDescriptor::NameRegister();
DCHECK(receiver.is(a1)); DCHECK(receiver.is(a1));
DCHECK(key.is(a2)); DCHECK(key.is(a2));
...@@ -417,9 +417,9 @@ void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) { ...@@ -417,9 +417,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(value.is(a0)); DCHECK(value.is(a0));
Label slow, notin; Label slow, notin;
...@@ -456,7 +456,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { ...@@ -456,7 +456,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
__ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, a4); __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, a4);
__ 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 =
...@@ -469,7 +469,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { ...@@ -469,7 +469,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
// The return address is in ra. // The return address is in ra.
__ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister()); __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
__ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1); __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1);
} }
...@@ -480,8 +480,8 @@ void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) { ...@@ -480,8 +480,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(a2)); DCHECK(key.is(a2));
DCHECK(receiver.is(a1)); DCHECK(receiver.is(a1));
...@@ -647,8 +647,8 @@ void KeyedLoadIC::GenerateString(MacroAssembler* masm) { ...@@ -647,8 +647,8 @@ void KeyedLoadIC::GenerateString(MacroAssembler* masm) {
// Return address is in ra. // Return address is in ra.
Label miss; Label miss;
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
Register index = LoadConvention::NameRegister(); Register index = LoadDescriptor::NameRegister();
Register scratch = a3; Register scratch = a3;
Register result = v0; Register result = v0;
DCHECK(!scratch.is(receiver) && !scratch.is(index)); DCHECK(!scratch.is(receiver) && !scratch.is(index));
...@@ -832,9 +832,9 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm, ...@@ -832,9 +832,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(value.is(a0)); DCHECK(value.is(a0));
Register receiver_map = a3; Register receiver_map = a3;
Register elements_map = a6; Register elements_map = a6;
...@@ -918,8 +918,8 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) { ...@@ -918,8 +918,8 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) {
// Return address is in ra. // Return address is in ra.
Label slow; Label slow;
Register receiver = LoadConvention::ReceiverRegister(); Register receiver = LoadDescriptor::ReceiverRegister();
Register key = LoadConvention::NameRegister(); Register key = LoadDescriptor::NameRegister();
Register scratch1 = a3; Register scratch1 = a3;
Register scratch2 = a4; Register scratch2 = a4;
DCHECK(!scratch1.is(receiver) && !scratch1.is(key)); DCHECK(!scratch1.is(receiver) && !scratch1.is(key));
...@@ -956,8 +956,8 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) { ...@@ -956,8 +956,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());
...@@ -966,11 +966,11 @@ void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { ...@@ -966,11 +966,11 @@ void KeyedStoreIC::GenerateMiss(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(a1)); DCHECK(receiver.is(a1));
DCHECK(name.is(a2)); DCHECK(name.is(a2));
DCHECK(StoreConvention::ValueRegister().is(a0)); DCHECK(StoreDescriptor::ValueRegister().is(a0));
// 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(
...@@ -984,8 +984,8 @@ void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { ...@@ -984,8 +984,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 =
ExternalReference(IC_Utility(kStoreIC_Miss), masm->isolate()); ExternalReference(IC_Utility(kStoreIC_Miss), masm->isolate());
...@@ -995,9 +995,9 @@ void StoreIC::GenerateMiss(MacroAssembler* masm) { ...@@ -995,9 +995,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 = a3; Register dictionary = a3;
DCHECK(!AreAliased(value, receiver, name, dictionary, a4, a5)); DCHECK(!AreAliased(value, receiver, name, dictionary, a4, a5));
......
...@@ -28,14 +28,12 @@ static void InitializeArrayConstructorDescriptor( ...@@ -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, a0, deopt_handler, descriptor->Initialize(major, call_descriptor, a0, 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( ...@@ -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, a0, deopt_handler, descriptor->Initialize(major, call_descriptor, a0, deopt_handler,
constant_stack_parameter_count, constant_stack_parameter_count,
JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS); JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS);
...@@ -1715,7 +1711,7 @@ void InstanceofStub::Generate(MacroAssembler* masm) { ...@@ -1715,7 +1711,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, a3, NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, a3,
t0, &miss); t0, &miss);
__ bind(&miss); __ bind(&miss);
...@@ -4543,14 +4539,14 @@ void StubFailureTrampolineStub::Generate(MacroAssembler* masm) { ...@@ -4543,14 +4539,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);
} }
......
...@@ -185,17 +185,17 @@ void DebugCodegen::GenerateCallICStubDebugBreak(MacroAssembler* masm) { ...@@ -185,17 +185,17 @@ void DebugCodegen::GenerateCallICStubDebugBreak(MacroAssembler* masm) {
void DebugCodegen::GenerateLoadICDebugBreak(MacroAssembler* masm) { void DebugCodegen::GenerateLoadICDebugBreak(MacroAssembler* masm) {
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-mips.cc). // Calling convention for IC store (from ic-mips.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);
} }
...@@ -209,9 +209,9 @@ void DebugCodegen::GenerateKeyedLoadICDebugBreak(MacroAssembler* masm) { ...@@ -209,9 +209,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-mips.cc). // Calling convention for IC keyed store call (from ic-mips.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);
} }
......
This diff is collapsed.
This diff is collapsed.
...@@ -2892,11 +2892,11 @@ template <class T> ...@@ -2892,11 +2892,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()));
__ li(vector, instr->hydrogen()->feedback_vector()); __ li(vector, instr->hydrogen()->feedback_vector());
// No need to allocate this register. // No need to allocate this register.
DCHECK(FullVectorLoadConvention::SlotRegister().is(a0)); DCHECK(VectorLoadICDescriptor::SlotRegister().is(a0));
__ li(FullVectorLoadConvention::SlotRegister(), __ li(VectorLoadICDescriptor::SlotRegister(),
Operand(Smi::FromInt(instr->hydrogen()->slot()))); Operand(Smi::FromInt(instr->hydrogen()->slot())));
} }
...@@ -2904,10 +2904,10 @@ void LCodeGen::EmitVectorLoadICRegisters(T* instr) { ...@@ -2904,10 +2904,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(v0)); DCHECK(ToRegister(instr->result()).is(v0));
__ li(LoadConvention::NameRegister(), Operand(instr->name())); __ li(LoadDescriptor::NameRegister(), Operand(instr->name()));
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
} }
...@@ -3031,11 +3031,11 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { ...@@ -3031,11 +3031,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(v0)); DCHECK(ToRegister(instr->result()).is(v0));
// Name is always in a2. // Name is always in a2.
__ li(LoadConvention::NameRegister(), Operand(instr->name())); __ li(LoadDescriptor::NameRegister(), Operand(instr->name()));
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
} }
...@@ -3340,8 +3340,8 @@ MemOperand LCodeGen::PrepareKeyedOperand(Register key, ...@@ -3340,8 +3340,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);
...@@ -4156,10 +4156,10 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { ...@@ -4156,10 +4156,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()));
__ li(StoreConvention::NameRegister(), Operand(instr->name())); __ li(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);
} }
...@@ -4387,9 +4387,9 @@ void LCodeGen::DoStoreKeyed(LStoreKeyed* instr) { ...@@ -4387,9 +4387,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()
......
...@@ -1087,14 +1087,14 @@ LInstruction* LChunkBuilder::DoCallJSFunction( ...@@ -1087,14 +1087,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());
} }
...@@ -2052,10 +2052,10 @@ LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) { ...@@ -2052,10 +2052,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);
...@@ -2111,10 +2111,10 @@ LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { ...@@ -2111,10 +2111,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 =
...@@ -2177,11 +2177,11 @@ LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) { ...@@ -2177,11 +2177,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 =
...@@ -2238,9 +2238,9 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { ...@@ -2238,9 +2238,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());
...@@ -2315,8 +2315,8 @@ LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { ...@@ -2315,8 +2315,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);
......
...@@ -1837,17 +1837,17 @@ class LCallJSFunction FINAL : public LTemplateInstruction<1, 1, 0> { ...@@ -1837,17 +1837,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")
...@@ -1857,7 +1857,7 @@ class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> { ...@@ -1857,7 +1857,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.
......
...@@ -27,14 +27,12 @@ static void InitializeArrayConstructorDescriptor( ...@@ -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, a0, deopt_handler, descriptor->Initialize(major, call_descriptor, a0, deopt_handler,
constant_stack_parameter_count, constant_stack_parameter_count,
JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS); JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS);
...@@ -50,14 +48,12 @@ static void InitializeInternalArrayConstructorDescriptor( ...@@ -50,14 +48,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, a0, deopt_handler, descriptor->Initialize(major, call_descriptor, a0, deopt_handler,
constant_stack_parameter_count, constant_stack_parameter_count,
JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS); JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS);
...@@ -1712,7 +1708,7 @@ void InstanceofStub::Generate(MacroAssembler* masm) { ...@@ -1712,7 +1708,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, a3, NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, a3,
a4, &miss); a4, &miss);
__ bind(&miss); __ bind(&miss);
...@@ -4579,14 +4575,14 @@ void StubFailureTrampolineStub::Generate(MacroAssembler* masm) { ...@@ -4579,14 +4575,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);
} }
......
...@@ -188,16 +188,16 @@ void DebugCodegen::GenerateCallICStubDebugBreak(MacroAssembler* masm) { ...@@ -188,16 +188,16 @@ void DebugCodegen::GenerateCallICStubDebugBreak(MacroAssembler* masm) {
void DebugCodegen::GenerateLoadICDebugBreak(MacroAssembler* masm) { void DebugCodegen::GenerateLoadICDebugBreak(MacroAssembler* masm) {
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) {
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);
} }
...@@ -211,9 +211,9 @@ void DebugCodegen::GenerateKeyedLoadICDebugBreak(MacroAssembler* masm) { ...@@ -211,9 +211,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-mips64.cc). // Calling convention for IC keyed store call (from ic-mips64.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);
} }
......
This diff is collapsed.
This diff is collapsed.
...@@ -2869,11 +2869,11 @@ template <class T> ...@@ -2869,11 +2869,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()));
__ li(vector, instr->hydrogen()->feedback_vector()); __ li(vector, instr->hydrogen()->feedback_vector());
// No need to allocate this register. // No need to allocate this register.
DCHECK(FullVectorLoadConvention::SlotRegister().is(a0)); DCHECK(VectorLoadICDescriptor::SlotRegister().is(a0));
__ li(FullVectorLoadConvention::SlotRegister(), __ li(VectorLoadICDescriptor::SlotRegister(),
Operand(Smi::FromInt(instr->hydrogen()->slot()))); Operand(Smi::FromInt(instr->hydrogen()->slot())));
} }
...@@ -2881,10 +2881,10 @@ void LCodeGen::EmitVectorLoadICRegisters(T* instr) { ...@@ -2881,10 +2881,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(v0)); DCHECK(ToRegister(instr->result()).is(v0));
__ li(LoadConvention::NameRegister(), Operand(instr->name())); __ li(LoadDescriptor::NameRegister(), Operand(instr->name()));
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
} }
...@@ -3022,11 +3022,11 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { ...@@ -3022,11 +3022,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(v0)); DCHECK(ToRegister(instr->result()).is(v0));
// Name is always in a2. // Name is always in a2.
__ li(LoadConvention::NameRegister(), Operand(instr->name())); __ li(LoadDescriptor::NameRegister(), Operand(instr->name()));
if (FLAG_vector_ics) { if (FLAG_vector_ics) {
EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
} }
...@@ -3372,8 +3372,8 @@ MemOperand LCodeGen::PrepareKeyedOperand(Register key, ...@@ -3372,8 +3372,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);
...@@ -4194,10 +4194,10 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { ...@@ -4194,10 +4194,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()));
__ li(StoreConvention::NameRegister(), Operand(instr->name())); __ li(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);
} }
...@@ -4458,9 +4458,9 @@ void LCodeGen::DoStoreKeyed(LStoreKeyed* instr) { ...@@ -4458,9 +4458,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()
......
...@@ -1087,15 +1087,15 @@ LInstruction* LChunkBuilder::DoCallJSFunction( ...@@ -1087,15 +1087,15 @@ 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());
} }
LCallWithDescriptor* result = new(zone()) LCallWithDescriptor( LCallWithDescriptor* result = new(zone()) LCallWithDescriptor(
...@@ -2050,10 +2050,10 @@ LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) { ...@@ -2050,10 +2050,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);
...@@ -2109,10 +2109,10 @@ LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { ...@@ -2109,10 +2109,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 =
...@@ -2176,11 +2176,11 @@ LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) { ...@@ -2176,11 +2176,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 =
...@@ -2238,9 +2238,9 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { ...@@ -2238,9 +2238,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());
...@@ -2315,8 +2315,8 @@ LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { ...@@ -2315,8 +2315,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);
......
...@@ -1836,17 +1836,17 @@ class LCallJSFunction FINAL : public LTemplateInstruction<1, 1, 0> { ...@@ -1836,17 +1836,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")
...@@ -1856,7 +1856,7 @@ class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> { ...@@ -1856,7 +1856,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.
......
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