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,
Register* PropertyAccessCompiler::load_calling_convention() {
// receiver, name, scratch1, scratch2, scratch3, scratch4.
Register receiver = LoadConvention::ReceiverRegister();
Register name = LoadConvention::NameRegister();
Register receiver = LoadDescriptor::ReceiverRegister();
Register name = LoadDescriptor::NameRegister();
static Register registers[] = {receiver, name, a3, a0, t0, t1};
return registers;
}
......@@ -31,9 +31,9 @@ Register* PropertyAccessCompiler::load_calling_convention() {
Register* PropertyAccessCompiler::store_calling_convention() {
// receiver, name, scratch1, scratch2, scratch3.
Register receiver = StoreConvention::ReceiverRegister();
Register name = StoreConvention::NameRegister();
DCHECK(a3.is(StoreConvention::MapRegister()));
Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreDescriptor::NameRegister();
DCHECK(a3.is(ElementTransitionAndStoreDescriptor::MapRegister()));
static Register registers[] = {receiver, name, a3, t0, t1};
return registers;
}
......
......@@ -286,8 +286,8 @@ void ElementHandlerCompiler::GenerateLoadDictionaryElement(
// The return address is in ra.
Label slow, miss;
Register key = LoadConvention::NameRegister();
Register receiver = LoadConvention::ReceiverRegister();
Register key = LoadDescriptor::NameRegister();
Register receiver = LoadDescriptor::ReceiverRegister();
DCHECK(receiver.is(a1));
DCHECK(key.is(a2));
......@@ -312,8 +312,8 @@ void ElementHandlerCompiler::GenerateLoadDictionaryElement(
void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
// Push receiver, key and value for runtime call.
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
StoreConvention::ValueRegister());
__ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
StoreDescriptor::ValueRegister());
// The slow case calls into the runtime to complete the store without causing
// an IC miss that would otherwise cause a transition to the generic stub.
......@@ -325,8 +325,8 @@ void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) {
// Push receiver, key and value for runtime call.
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
StoreConvention::ValueRegister());
__ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
StoreDescriptor::ValueRegister());
// The slow case calls into the runtime to complete the store without causing
// an IC miss that would otherwise cause a transition to the generic stub.
......@@ -829,7 +829,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor(
Register NamedStoreHandlerCompiler::value() {
return StoreConvention::ValueRegister();
return StoreDescriptor::ValueRegister();
}
......@@ -840,7 +840,7 @@ Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal(
FrontendHeader(receiver(), name, &miss);
// Get the value from the cell.
Register result = StoreConvention::ValueRegister();
Register result = StoreDescriptor::ValueRegister();
__ li(result, Operand(cell));
__ lw(result, FieldMemOperand(result, Cell::kValueOffset));
......
......@@ -40,7 +40,7 @@ Handle<Code> PropertyICCompiler::CompilePolymorphic(TypeHandleList* types,
// Polymorphic keyed stores may use the map register
Register map_reg = scratch1();
DCHECK(kind() != Code::KEYED_STORE_IC ||
map_reg.is(StoreConvention::MapRegister()));
map_reg.is(ElementTransitionAndStoreDescriptor::MapRegister()));
int receiver_count = types->length();
int number_of_handled_maps = 0;
......@@ -108,8 +108,8 @@ Handle<Code> PropertyICCompiler::CompileKeyedStorePolymorphic(
void PropertyICCompiler::GenerateRuntimeSetProperty(MacroAssembler* masm,
StrictMode strict_mode) {
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
StoreConvention::ValueRegister());
__ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
StoreDescriptor::ValueRegister());
__ li(a0, Operand(Smi::FromInt(strict_mode)));
__ 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,
void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
// The return address is in lr.
Register receiver = LoadConvention::ReceiverRegister();
Register name = LoadConvention::NameRegister();
Register receiver = LoadDescriptor::ReceiverRegister();
Register name = LoadDescriptor::NameRegister();
DCHECK(receiver.is(a1));
DCHECK(name.is(a2));
......@@ -269,15 +269,15 @@ void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
void LoadIC::GenerateNormal(MacroAssembler* masm) {
Register dictionary = a0;
DCHECK(!dictionary.is(LoadConvention::ReceiverRegister()));
DCHECK(!dictionary.is(LoadConvention::NameRegister()));
DCHECK(!dictionary.is(LoadDescriptor::ReceiverRegister()));
DCHECK(!dictionary.is(LoadDescriptor::NameRegister()));
Label slow;
__ lw(dictionary, FieldMemOperand(LoadConvention::ReceiverRegister(),
__ lw(dictionary, FieldMemOperand(LoadDescriptor::ReceiverRegister(),
JSObject::kPropertiesOffset));
GenerateDictionaryLoad(masm, &slow, dictionary,
LoadConvention::NameRegister(), v0, a3, t0);
LoadDescriptor::NameRegister(), v0, a3, t0);
__ Ret();
// Dictionary load failed, go slow (but don't miss).
......@@ -296,8 +296,8 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
__ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, t0);
__ mov(LoadIC_TempRegister(), LoadConvention::ReceiverRegister());
__ Push(LoadIC_TempRegister(), LoadConvention::NameRegister());
__ mov(LoadIC_TempRegister(), LoadDescriptor::ReceiverRegister());
__ Push(LoadIC_TempRegister(), LoadDescriptor::NameRegister());
// Perform tail call to the entry.
ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate);
......@@ -308,8 +308,8 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
// The return address is in ra.
__ mov(LoadIC_TempRegister(), LoadConvention::ReceiverRegister());
__ Push(LoadIC_TempRegister(), LoadConvention::NameRegister());
__ mov(LoadIC_TempRegister(), LoadDescriptor::ReceiverRegister());
__ Push(LoadIC_TempRegister(), LoadDescriptor::NameRegister());
__ TailCallRuntime(Runtime::kGetProperty, 2, 1);
}
......@@ -394,8 +394,8 @@ static MemOperand GenerateUnmappedArgumentsLookup(MacroAssembler* masm,
void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
// The return address is in ra.
Register receiver = LoadConvention::ReceiverRegister();
Register key = LoadConvention::NameRegister();
Register receiver = LoadDescriptor::ReceiverRegister();
Register key = LoadDescriptor::NameRegister();
DCHECK(receiver.is(a1));
DCHECK(key.is(a2));
......@@ -419,9 +419,9 @@ void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) {
Register receiver = StoreConvention::ReceiverRegister();
Register key = StoreConvention::NameRegister();
Register value = StoreConvention::ValueRegister();
Register receiver = StoreDescriptor::ReceiverRegister();
Register key = StoreDescriptor::NameRegister();
Register value = StoreDescriptor::ValueRegister();
DCHECK(value.is(a0));
Label slow, notin;
......@@ -458,7 +458,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
__ 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.
ExternalReference ref =
......@@ -471,7 +471,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
// The return address is in ra.
__ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister());
__ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
__ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1);
}
......@@ -482,8 +482,8 @@ void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) {
Label slow, check_name, index_smi, index_name, property_array_property;
Label probe_dictionary, check_number_dictionary;
Register key = LoadConvention::NameRegister();
Register receiver = LoadConvention::ReceiverRegister();
Register key = LoadDescriptor::NameRegister();
Register receiver = LoadDescriptor::ReceiverRegister();
DCHECK(key.is(a2));
DCHECK(receiver.is(a1));
......@@ -642,8 +642,8 @@ void KeyedLoadIC::GenerateString(MacroAssembler* masm) {
// Return address is in ra.
Label miss;
Register receiver = LoadConvention::ReceiverRegister();
Register index = LoadConvention::NameRegister();
Register receiver = LoadDescriptor::ReceiverRegister();
Register index = LoadDescriptor::NameRegister();
Register scratch = a3;
Register result = v0;
DCHECK(!scratch.is(receiver) && !scratch.is(index));
......@@ -823,9 +823,9 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
Label array, extra, check_if_double_array;
// Register usage.
Register value = StoreConvention::ValueRegister();
Register key = StoreConvention::NameRegister();
Register receiver = StoreConvention::ReceiverRegister();
Register value = StoreDescriptor::ValueRegister();
Register key = StoreDescriptor::NameRegister();
Register receiver = StoreDescriptor::ReceiverRegister();
DCHECK(value.is(a0));
Register receiver_map = a3;
Register elements_map = t2;
......@@ -909,8 +909,8 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) {
// Return address is in ra.
Label slow;
Register receiver = LoadConvention::ReceiverRegister();
Register key = LoadConvention::NameRegister();
Register receiver = LoadDescriptor::ReceiverRegister();
Register key = LoadDescriptor::NameRegister();
Register scratch1 = a3;
Register scratch2 = t0;
DCHECK(!scratch1.is(receiver) && !scratch1.is(key));
......@@ -947,8 +947,8 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) {
void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
// Push receiver, key and value for runtime call.
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
StoreConvention::ValueRegister());
__ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
StoreDescriptor::ValueRegister());
ExternalReference ref =
ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate());
......@@ -957,11 +957,11 @@ void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
Register receiver = StoreConvention::ReceiverRegister();
Register name = StoreConvention::NameRegister();
Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreDescriptor::NameRegister();
DCHECK(receiver.is(a1));
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.
Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
......@@ -975,8 +975,8 @@ void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
void StoreIC::GenerateMiss(MacroAssembler* masm) {
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
StoreConvention::ValueRegister());
__ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
StoreDescriptor::ValueRegister());
// Perform tail call to the entry.
ExternalReference ref =
ExternalReference(IC_Utility(kStoreIC_Miss), masm->isolate());
......@@ -986,9 +986,9 @@ void StoreIC::GenerateMiss(MacroAssembler* masm) {
void StoreIC::GenerateNormal(MacroAssembler* masm) {
Label miss;
Register receiver = StoreConvention::ReceiverRegister();
Register name = StoreConvention::NameRegister();
Register value = StoreConvention::ValueRegister();
Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreDescriptor::NameRegister();
Register value = StoreDescriptor::ValueRegister();
Register dictionary = a3;
DCHECK(receiver.is(a1));
DCHECK(name.is(a2));
......
......@@ -22,8 +22,8 @@ void PropertyAccessCompiler::GenerateTailCall(MacroAssembler* masm,
Register* PropertyAccessCompiler::load_calling_convention() {
// receiver, name, scratch1, scratch2, scratch3, scratch4.
Register receiver = LoadConvention::ReceiverRegister();
Register name = LoadConvention::NameRegister();
Register receiver = LoadDescriptor::ReceiverRegister();
Register name = LoadDescriptor::NameRegister();
static Register registers[] = {receiver, name, a3, a0, a4, a5};
return registers;
}
......@@ -31,9 +31,9 @@ Register* PropertyAccessCompiler::load_calling_convention() {
Register* PropertyAccessCompiler::store_calling_convention() {
// receiver, name, scratch1, scratch2, scratch3.
Register receiver = StoreConvention::ReceiverRegister();
Register name = StoreConvention::NameRegister();
DCHECK(a3.is(StoreConvention::MapRegister()));
Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreDescriptor::NameRegister();
DCHECK(a3.is(ElementTransitionAndStoreDescriptor::MapRegister()));
static Register registers[] = {receiver, name, a3, a4, a5};
return registers;
}
......
......@@ -286,8 +286,8 @@ void ElementHandlerCompiler::GenerateLoadDictionaryElement(
// The return address is in ra
Label slow, miss;
Register key = LoadConvention::NameRegister();
Register receiver = LoadConvention::ReceiverRegister();
Register key = LoadDescriptor::NameRegister();
Register receiver = LoadDescriptor::ReceiverRegister();
DCHECK(receiver.is(a1));
DCHECK(key.is(a2));
......@@ -313,8 +313,8 @@ void ElementHandlerCompiler::GenerateLoadDictionaryElement(
void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
// Push receiver, key and value for runtime call.
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
StoreConvention::ValueRegister());
__ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
StoreDescriptor::ValueRegister());
// The slow case calls into the runtime to complete the store without causing
// an IC miss that would otherwise cause a transition to the generic stub.
......@@ -326,8 +326,8 @@ void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) {
// Push receiver, key and value for runtime call.
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
StoreConvention::ValueRegister());
__ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
StoreDescriptor::ValueRegister());
// The slow case calls into the runtime to complete the store without causing
// an IC miss that would otherwise cause a transition to the generic stub.
......@@ -830,7 +830,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor(
Register NamedStoreHandlerCompiler::value() {
return StoreConvention::ValueRegister();
return StoreDescriptor::ValueRegister();
}
......@@ -841,7 +841,7 @@ Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal(
FrontendHeader(receiver(), name, &miss);
// Get the value from the cell.
Register result = StoreConvention::ValueRegister();
Register result = StoreDescriptor::ValueRegister();
__ li(result, Operand(cell));
__ ld(result, FieldMemOperand(result, Cell::kValueOffset));
......
......@@ -40,7 +40,7 @@ Handle<Code> PropertyICCompiler::CompilePolymorphic(TypeHandleList* types,
// Polymorphic keyed stores may use the map register
Register map_reg = scratch1();
DCHECK(kind() != Code::KEYED_STORE_IC ||
map_reg.is(StoreConvention::MapRegister()));
map_reg.is(ElementTransitionAndStoreDescriptor::MapRegister()));
int receiver_count = types->length();
int number_of_handled_maps = 0;
......@@ -108,8 +108,8 @@ Handle<Code> PropertyICCompiler::CompileKeyedStorePolymorphic(
void PropertyICCompiler::GenerateRuntimeSetProperty(MacroAssembler* masm,
StrictMode strict_mode) {
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
StoreConvention::ValueRegister());
__ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
StoreDescriptor::ValueRegister());
__ li(a0, Operand(Smi::FromInt(strict_mode)));
__ 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,
void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
// The return address is in lr.
Register receiver = LoadConvention::ReceiverRegister();
Register name = LoadConvention::NameRegister();
Register receiver = LoadDescriptor::ReceiverRegister();
Register name = LoadDescriptor::NameRegister();
DCHECK(receiver.is(a1));
DCHECK(name.is(a2));
......@@ -268,14 +268,14 @@ void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
void LoadIC::GenerateNormal(MacroAssembler* masm) {
Register dictionary = a0;
DCHECK(!dictionary.is(LoadConvention::ReceiverRegister()));
DCHECK(!dictionary.is(LoadConvention::NameRegister()));
DCHECK(!dictionary.is(LoadDescriptor::ReceiverRegister()));
DCHECK(!dictionary.is(LoadDescriptor::NameRegister()));
Label slow;
__ ld(dictionary, FieldMemOperand(LoadConvention::ReceiverRegister(),
__ ld(dictionary, FieldMemOperand(LoadDescriptor::ReceiverRegister(),
JSObject::kPropertiesOffset));
GenerateDictionaryLoad(masm, &slow, dictionary,
LoadConvention::NameRegister(), v0, a3, a4);
LoadDescriptor::NameRegister(), v0, a3, a4);
__ Ret();
// Dictionary load failed, go slow (but don't miss).
......@@ -294,8 +294,8 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
__ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, a4);
__ mov(LoadIC_TempRegister(), LoadConvention::ReceiverRegister());
__ Push(LoadIC_TempRegister(), LoadConvention::NameRegister());
__ mov(LoadIC_TempRegister(), LoadDescriptor::ReceiverRegister());
__ Push(LoadIC_TempRegister(), LoadDescriptor::NameRegister());
// Perform tail call to the entry.
ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate);
......@@ -306,8 +306,8 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
// The return address is in ra.
__ mov(LoadIC_TempRegister(), LoadConvention::ReceiverRegister());
__ Push(LoadIC_TempRegister(), LoadConvention::NameRegister());
__ mov(LoadIC_TempRegister(), LoadDescriptor::ReceiverRegister());
__ Push(LoadIC_TempRegister(), LoadDescriptor::NameRegister());
__ TailCallRuntime(Runtime::kGetProperty, 2, 1);
}
......@@ -392,8 +392,8 @@ static MemOperand GenerateUnmappedArgumentsLookup(MacroAssembler* masm,
void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
// The return address is in ra.
Register receiver = LoadConvention::ReceiverRegister();
Register key = LoadConvention::NameRegister();
Register receiver = LoadDescriptor::ReceiverRegister();
Register key = LoadDescriptor::NameRegister();
DCHECK(receiver.is(a1));
DCHECK(key.is(a2));
......@@ -417,9 +417,9 @@ void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) {
Register receiver = StoreConvention::ReceiverRegister();
Register key = StoreConvention::NameRegister();
Register value = StoreConvention::ValueRegister();
Register receiver = StoreDescriptor::ReceiverRegister();
Register key = StoreDescriptor::NameRegister();
Register value = StoreDescriptor::ValueRegister();
DCHECK(value.is(a0));
Label slow, notin;
......@@ -456,7 +456,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
__ 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.
ExternalReference ref =
......@@ -469,7 +469,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
// The return address is in ra.
__ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister());
__ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
__ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1);
}
......@@ -480,8 +480,8 @@ void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) {
Label slow, check_name, index_smi, index_name, property_array_property;
Label probe_dictionary, check_number_dictionary;
Register key = LoadConvention::NameRegister();
Register receiver = LoadConvention::ReceiverRegister();
Register key = LoadDescriptor::NameRegister();
Register receiver = LoadDescriptor::ReceiverRegister();
DCHECK(key.is(a2));
DCHECK(receiver.is(a1));
......@@ -647,8 +647,8 @@ void KeyedLoadIC::GenerateString(MacroAssembler* masm) {
// Return address is in ra.
Label miss;
Register receiver = LoadConvention::ReceiverRegister();
Register index = LoadConvention::NameRegister();
Register receiver = LoadDescriptor::ReceiverRegister();
Register index = LoadDescriptor::NameRegister();
Register scratch = a3;
Register result = v0;
DCHECK(!scratch.is(receiver) && !scratch.is(index));
......@@ -832,9 +832,9 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
Label array, extra, check_if_double_array;
// Register usage.
Register value = StoreConvention::ValueRegister();
Register key = StoreConvention::NameRegister();
Register receiver = StoreConvention::ReceiverRegister();
Register value = StoreDescriptor::ValueRegister();
Register key = StoreDescriptor::NameRegister();
Register receiver = StoreDescriptor::ReceiverRegister();
DCHECK(value.is(a0));
Register receiver_map = a3;
Register elements_map = a6;
......@@ -918,8 +918,8 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) {
// Return address is in ra.
Label slow;
Register receiver = LoadConvention::ReceiverRegister();
Register key = LoadConvention::NameRegister();
Register receiver = LoadDescriptor::ReceiverRegister();
Register key = LoadDescriptor::NameRegister();
Register scratch1 = a3;
Register scratch2 = a4;
DCHECK(!scratch1.is(receiver) && !scratch1.is(key));
......@@ -956,8 +956,8 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) {
void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
// Push receiver, key and value for runtime call.
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
StoreConvention::ValueRegister());
__ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
StoreDescriptor::ValueRegister());
ExternalReference ref =
ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate());
......@@ -966,11 +966,11 @@ void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
Register receiver = StoreConvention::ReceiverRegister();
Register name = StoreConvention::NameRegister();
Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreDescriptor::NameRegister();
DCHECK(receiver.is(a1));
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.
Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
......@@ -984,8 +984,8 @@ void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
void StoreIC::GenerateMiss(MacroAssembler* masm) {
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
StoreConvention::ValueRegister());
__ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
StoreDescriptor::ValueRegister());
// Perform tail call to the entry.
ExternalReference ref =
ExternalReference(IC_Utility(kStoreIC_Miss), masm->isolate());
......@@ -995,9 +995,9 @@ void StoreIC::GenerateMiss(MacroAssembler* masm) {
void StoreIC::GenerateNormal(MacroAssembler* masm) {
Label miss;
Register receiver = StoreConvention::ReceiverRegister();
Register name = StoreConvention::NameRegister();
Register value = StoreConvention::ValueRegister();
Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreDescriptor::NameRegister();
Register value = StoreDescriptor::ValueRegister();
Register dictionary = a3;
DCHECK(!AreAliased(value, receiver, name, dictionary, a4, a5));
......
......@@ -28,14 +28,12 @@ static void InitializeArrayConstructorDescriptor(
Runtime::kArrayConstructor)->entry;
if (constant_stack_parameter_count == 0) {
CallInterfaceDescriptor* call_descriptor = isolate->call_descriptor(
CallDescriptorKey::ArrayConstructorConstantArgCountCall);
ArrayConstructorConstantArgCountDescriptor call_descriptor(isolate);
descriptor->Initialize(major, call_descriptor, deopt_handler,
constant_stack_parameter_count,
JS_FUNCTION_STUB_MODE);
} else {
CallInterfaceDescriptor* call_descriptor =
isolate->call_descriptor(CallDescriptorKey::ArrayConstructorCall);
ArrayConstructorDescriptor call_descriptor(isolate);
descriptor->Initialize(major, call_descriptor, a0, deopt_handler,
constant_stack_parameter_count,
JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS);
......@@ -51,14 +49,12 @@ static void InitializeInternalArrayConstructorDescriptor(
Runtime::kInternalArrayConstructor)->entry;
if (constant_stack_parameter_count == 0) {
CallInterfaceDescriptor* call_descriptor = isolate->call_descriptor(
CallDescriptorKey::InternalArrayConstructorConstantArgCountCall);
InternalArrayConstructorConstantArgCountDescriptor call_descriptor(isolate);
descriptor->Initialize(major, call_descriptor, deopt_handler,
constant_stack_parameter_count,
JS_FUNCTION_STUB_MODE);
} else {
CallInterfaceDescriptor* call_descriptor = isolate->call_descriptor(
CallDescriptorKey::InternalArrayConstructorCall);
InternalArrayConstructorDescriptor call_descriptor(isolate);
descriptor->Initialize(major, call_descriptor, a0, deopt_handler,
constant_stack_parameter_count,
JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS);
......@@ -1715,7 +1711,7 @@ void InstanceofStub::Generate(MacroAssembler* masm) {
void FunctionPrototypeStub::Generate(MacroAssembler* masm) {
Label miss;
Register receiver = LoadConvention::ReceiverRegister();
Register receiver = LoadDescriptor::ReceiverRegister();
NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, a3,
t0, &miss);
__ bind(&miss);
......@@ -4543,14 +4539,14 @@ void StubFailureTrampolineStub::Generate(MacroAssembler* masm) {
void LoadICTrampolineStub::Generate(MacroAssembler* masm) {
EmitLoadTypeFeedbackVector(masm, FullVectorLoadConvention::VectorRegister());
EmitLoadTypeFeedbackVector(masm, VectorLoadICDescriptor::VectorRegister());
VectorLoadStub stub(isolate(), state());
__ Jump(stub.GetCode(), RelocInfo::CODE_TARGET);
}
void KeyedLoadICTrampolineStub::Generate(MacroAssembler* masm) {
EmitLoadTypeFeedbackVector(masm, FullVectorLoadConvention::VectorRegister());
EmitLoadTypeFeedbackVector(masm, VectorLoadICDescriptor::VectorRegister());
VectorKeyedLoadStub stub(isolate());
__ Jump(stub.GetCode(), RelocInfo::CODE_TARGET);
}
......
......@@ -185,17 +185,17 @@ void DebugCodegen::GenerateCallICStubDebugBreak(MacroAssembler* masm) {
void DebugCodegen::GenerateLoadICDebugBreak(MacroAssembler* masm) {
Register receiver = LoadConvention::ReceiverRegister();
Register name = LoadConvention::NameRegister();
Register receiver = LoadDescriptor::ReceiverRegister();
Register name = LoadDescriptor::NameRegister();
Generate_DebugBreakCallHelper(masm, receiver.bit() | name.bit(), 0);
}
void DebugCodegen::GenerateStoreICDebugBreak(MacroAssembler* masm) {
// Calling convention for IC store (from ic-mips.cc).
Register receiver = StoreConvention::ReceiverRegister();
Register name = StoreConvention::NameRegister();
Register value = StoreConvention::ValueRegister();
Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreDescriptor::NameRegister();
Register value = StoreDescriptor::ValueRegister();
Generate_DebugBreakCallHelper(
masm, receiver.bit() | name.bit() | value.bit(), 0);
}
......@@ -209,9 +209,9 @@ void DebugCodegen::GenerateKeyedLoadICDebugBreak(MacroAssembler* masm) {
void DebugCodegen::GenerateKeyedStoreICDebugBreak(MacroAssembler* masm) {
// Calling convention for IC keyed store call (from ic-mips.cc).
Register receiver = StoreConvention::ReceiverRegister();
Register name = StoreConvention::NameRegister();
Register value = StoreConvention::ValueRegister();
Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreDescriptor::NameRegister();
Register value = StoreDescriptor::ValueRegister();
Generate_DebugBreakCallHelper(
masm, receiver.bit() | name.bit() | value.bit(), 0);
}
......
This diff is collapsed.
This diff is collapsed.
......@@ -2892,11 +2892,11 @@ template <class T>
void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
DCHECK(FLAG_vector_ics);
Register vector = ToRegister(instr->temp_vector());
DCHECK(vector.is(FullVectorLoadConvention::VectorRegister()));
DCHECK(vector.is(VectorLoadICDescriptor::VectorRegister()));
__ li(vector, instr->hydrogen()->feedback_vector());
// No need to allocate this register.
DCHECK(FullVectorLoadConvention::SlotRegister().is(a0));
__ li(FullVectorLoadConvention::SlotRegister(),
DCHECK(VectorLoadICDescriptor::SlotRegister().is(a0));
__ li(VectorLoadICDescriptor::SlotRegister(),
Operand(Smi::FromInt(instr->hydrogen()->slot())));
}
......@@ -2904,10 +2904,10 @@ void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->global_object())
.is(LoadConvention::ReceiverRegister()));
.is(LoadDescriptor::ReceiverRegister()));
DCHECK(ToRegister(instr->result()).is(v0));
__ li(LoadConvention::NameRegister(), Operand(instr->name()));
__ li(LoadDescriptor::NameRegister(), Operand(instr->name()));
if (FLAG_vector_ics) {
EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
}
......@@ -3031,11 +3031,11 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
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));
// Name is always in a2.
__ li(LoadConvention::NameRegister(), Operand(instr->name()));
__ li(LoadDescriptor::NameRegister(), Operand(instr->name()));
if (FLAG_vector_ics) {
EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
}
......@@ -3340,8 +3340,8 @@ MemOperand LCodeGen::PrepareKeyedOperand(Register key,
void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->object()).is(LoadConvention::ReceiverRegister()));
DCHECK(ToRegister(instr->key()).is(LoadConvention::NameRegister()));
DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister()));
if (FLAG_vector_ics) {
EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
......@@ -4156,10 +4156,10 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->object()).is(StoreConvention::ReceiverRegister()));
DCHECK(ToRegister(instr->value()).is(StoreConvention::ValueRegister()));
DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
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());
CallCode(ic, RelocInfo::CODE_TARGET, instr);
}
......@@ -4387,9 +4387,9 @@ void LCodeGen::DoStoreKeyed(LStoreKeyed* instr) {
void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->object()).is(StoreConvention::ReceiverRegister()));
DCHECK(ToRegister(instr->key()).is(StoreConvention::NameRegister()));
DCHECK(ToRegister(instr->value()).is(StoreConvention::ValueRegister()));
DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister()));
DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
Handle<Code> ic = (instr->strict_mode() == STRICT)
? isolate()->builtins()->KeyedStoreIC_Initialize_Strict()
......
......@@ -1087,14 +1087,14 @@ LInstruction* LChunkBuilder::DoCallJSFunction(
LInstruction* LChunkBuilder::DoCallWithDescriptor(
HCallWithDescriptor* instr) {
const CallInterfaceDescriptor* descriptor = instr->descriptor();
CallInterfaceDescriptor descriptor = instr->descriptor();
LOperand* target = UseRegisterOrConstantAtStart(instr->target());
ZoneList<LOperand*> ops(instr->OperandCount(), zone());
ops.Add(target, zone());
for (int i = 1; i < instr->OperandCount(); i++) {
LOperand* op = UseFixed(instr->OperandAt(i),
descriptor->GetParameterRegister(i - 1));
LOperand* op =
UseFixed(instr->OperandAt(i), descriptor.GetParameterRegister(i - 1));
ops.Add(op, zone());
}
......@@ -2052,10 +2052,10 @@ LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) {
LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp);
LOperand* global_object =
UseFixed(instr->global_object(), LoadConvention::ReceiverRegister());
UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister());
LOperand* vector = NULL;
if (FLAG_vector_ics) {
vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
}
LLoadGlobalGeneric* result =
new(zone()) LLoadGlobalGeneric(context, global_object, vector);
......@@ -2111,10 +2111,10 @@ LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) {
LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp);
LOperand* object =
UseFixed(instr->object(), LoadConvention::ReceiverRegister());
UseFixed(instr->object(), LoadDescriptor::ReceiverRegister());
LOperand* vector = NULL;
if (FLAG_vector_ics) {
vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
}
LInstruction* result =
......@@ -2177,11 +2177,11 @@ LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) {
LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp);
LOperand* object =
UseFixed(instr->object(), LoadConvention::ReceiverRegister());
LOperand* key = UseFixed(instr->key(), LoadConvention::NameRegister());
UseFixed(instr->object(), LoadDescriptor::ReceiverRegister());
LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister());
LOperand* vector = NULL;
if (FLAG_vector_ics) {
vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
}
LInstruction* result =
......@@ -2238,9 +2238,9 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp);
LOperand* obj =
UseFixed(instr->object(), StoreConvention::ReceiverRegister());
LOperand* key = UseFixed(instr->key(), StoreConvention::NameRegister());
LOperand* val = UseFixed(instr->value(), StoreConvention::ValueRegister());
UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister());
LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
DCHECK(instr->object()->representation().IsTagged());
DCHECK(instr->key()->representation().IsTagged());
......@@ -2315,8 +2315,8 @@ LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp);
LOperand* obj =
UseFixed(instr->object(), StoreConvention::ReceiverRegister());
LOperand* val = UseFixed(instr->value(), StoreConvention::ValueRegister());
UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
LInstruction* result = new(zone()) LStoreNamedGeneric(context, obj, val);
return MarkAsCall(result, instr);
......
......@@ -1837,17 +1837,17 @@ class LCallJSFunction FINAL : public LTemplateInstruction<1, 1, 0> {
class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> {
public:
LCallWithDescriptor(const CallInterfaceDescriptor* descriptor,
LCallWithDescriptor(CallInterfaceDescriptor descriptor,
const ZoneList<LOperand*>& operands, Zone* zone)
: descriptor_(descriptor),
inputs_(descriptor->GetRegisterParameterCount() + 1, zone) {
DCHECK(descriptor->GetRegisterParameterCount() + 1 == operands.length());
inputs_(descriptor.GetRegisterParameterCount() + 1, zone) {
DCHECK(descriptor.GetRegisterParameterCount() + 1 == operands.length());
inputs_.AddAll(operands, zone);
}
LOperand* target() const { return inputs_[0]; }
const CallInterfaceDescriptor* descriptor() { return descriptor_; }
const CallInterfaceDescriptor descriptor() { return descriptor_; }
private:
DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor")
......@@ -1857,7 +1857,7 @@ class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> {
int arity() const { return hydrogen()->argument_count() - 1; }
const CallInterfaceDescriptor* descriptor_;
CallInterfaceDescriptor descriptor_;
ZoneList<LOperand*> inputs_;
// Iterator support.
......
......@@ -27,14 +27,12 @@ static void InitializeArrayConstructorDescriptor(
Runtime::kArrayConstructor)->entry;
if (constant_stack_parameter_count == 0) {
CallInterfaceDescriptor* call_descriptor = isolate->call_descriptor(
CallDescriptorKey::ArrayConstructorConstantArgCountCall);
ArrayConstructorConstantArgCountDescriptor call_descriptor(isolate);
descriptor->Initialize(major, call_descriptor, deopt_handler,
constant_stack_parameter_count,
JS_FUNCTION_STUB_MODE);
} else {
CallInterfaceDescriptor* call_descriptor =
isolate->call_descriptor(CallDescriptorKey::ArrayConstructorCall);
ArrayConstructorDescriptor call_descriptor(isolate);
descriptor->Initialize(major, call_descriptor, a0, deopt_handler,
constant_stack_parameter_count,
JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS);
......@@ -50,14 +48,12 @@ static void InitializeInternalArrayConstructorDescriptor(
Runtime::kInternalArrayConstructor)->entry;
if (constant_stack_parameter_count == 0) {
CallInterfaceDescriptor* call_descriptor = isolate->call_descriptor(
CallDescriptorKey::InternalArrayConstructorConstantArgCountCall);
InternalArrayConstructorConstantArgCountDescriptor call_descriptor(isolate);
descriptor->Initialize(major, call_descriptor, deopt_handler,
constant_stack_parameter_count,
JS_FUNCTION_STUB_MODE);
} else {
CallInterfaceDescriptor* call_descriptor = isolate->call_descriptor(
CallDescriptorKey::InternalArrayConstructorCall);
InternalArrayConstructorDescriptor call_descriptor(isolate);
descriptor->Initialize(major, call_descriptor, a0, deopt_handler,
constant_stack_parameter_count,
JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS);
......@@ -1712,7 +1708,7 @@ void InstanceofStub::Generate(MacroAssembler* masm) {
void FunctionPrototypeStub::Generate(MacroAssembler* masm) {
Label miss;
Register receiver = LoadConvention::ReceiverRegister();
Register receiver = LoadDescriptor::ReceiverRegister();
NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, a3,
a4, &miss);
__ bind(&miss);
......@@ -4579,14 +4575,14 @@ void StubFailureTrampolineStub::Generate(MacroAssembler* masm) {
void LoadICTrampolineStub::Generate(MacroAssembler* masm) {
EmitLoadTypeFeedbackVector(masm, FullVectorLoadConvention::VectorRegister());
EmitLoadTypeFeedbackVector(masm, VectorLoadICDescriptor::VectorRegister());
VectorLoadStub stub(isolate(), state());
__ Jump(stub.GetCode(), RelocInfo::CODE_TARGET);
}
void KeyedLoadICTrampolineStub::Generate(MacroAssembler* masm) {
EmitLoadTypeFeedbackVector(masm, FullVectorLoadConvention::VectorRegister());
EmitLoadTypeFeedbackVector(masm, VectorLoadICDescriptor::VectorRegister());
VectorKeyedLoadStub stub(isolate());
__ Jump(stub.GetCode(), RelocInfo::CODE_TARGET);
}
......
......@@ -188,16 +188,16 @@ void DebugCodegen::GenerateCallICStubDebugBreak(MacroAssembler* masm) {
void DebugCodegen::GenerateLoadICDebugBreak(MacroAssembler* masm) {
Register receiver = LoadConvention::ReceiverRegister();
Register name = LoadConvention::NameRegister();
Register receiver = LoadDescriptor::ReceiverRegister();
Register name = LoadDescriptor::NameRegister();
Generate_DebugBreakCallHelper(masm, receiver.bit() | name.bit(), 0);
}
void DebugCodegen::GenerateStoreICDebugBreak(MacroAssembler* masm) {
Register receiver = StoreConvention::ReceiverRegister();
Register name = StoreConvention::NameRegister();
Register value = StoreConvention::ValueRegister();
Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreDescriptor::NameRegister();
Register value = StoreDescriptor::ValueRegister();
Generate_DebugBreakCallHelper(
masm, receiver.bit() | name.bit() | value.bit(), 0);
}
......@@ -211,9 +211,9 @@ void DebugCodegen::GenerateKeyedLoadICDebugBreak(MacroAssembler* masm) {
void DebugCodegen::GenerateKeyedStoreICDebugBreak(MacroAssembler* masm) {
// Calling convention for IC keyed store call (from ic-mips64.cc).
Register receiver = StoreConvention::ReceiverRegister();
Register name = StoreConvention::NameRegister();
Register value = StoreConvention::ValueRegister();
Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreDescriptor::NameRegister();
Register value = StoreDescriptor::ValueRegister();
Generate_DebugBreakCallHelper(
masm, receiver.bit() | name.bit() | value.bit(), 0);
}
......
This diff is collapsed.
This diff is collapsed.
......@@ -2869,11 +2869,11 @@ template <class T>
void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
DCHECK(FLAG_vector_ics);
Register vector = ToRegister(instr->temp_vector());
DCHECK(vector.is(FullVectorLoadConvention::VectorRegister()));
DCHECK(vector.is(VectorLoadICDescriptor::VectorRegister()));
__ li(vector, instr->hydrogen()->feedback_vector());
// No need to allocate this register.
DCHECK(FullVectorLoadConvention::SlotRegister().is(a0));
__ li(FullVectorLoadConvention::SlotRegister(),
DCHECK(VectorLoadICDescriptor::SlotRegister().is(a0));
__ li(VectorLoadICDescriptor::SlotRegister(),
Operand(Smi::FromInt(instr->hydrogen()->slot())));
}
......@@ -2881,10 +2881,10 @@ void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->global_object())
.is(LoadConvention::ReceiverRegister()));
.is(LoadDescriptor::ReceiverRegister()));
DCHECK(ToRegister(instr->result()).is(v0));
__ li(LoadConvention::NameRegister(), Operand(instr->name()));
__ li(LoadDescriptor::NameRegister(), Operand(instr->name()));
if (FLAG_vector_ics) {
EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
}
......@@ -3022,11 +3022,11 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
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));
// Name is always in a2.
__ li(LoadConvention::NameRegister(), Operand(instr->name()));
__ li(LoadDescriptor::NameRegister(), Operand(instr->name()));
if (FLAG_vector_ics) {
EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
}
......@@ -3372,8 +3372,8 @@ MemOperand LCodeGen::PrepareKeyedOperand(Register key,
void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->object()).is(LoadConvention::ReceiverRegister()));
DCHECK(ToRegister(instr->key()).is(LoadConvention::NameRegister()));
DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister()));
if (FLAG_vector_ics) {
EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
......@@ -4194,10 +4194,10 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->object()).is(StoreConvention::ReceiverRegister()));
DCHECK(ToRegister(instr->value()).is(StoreConvention::ValueRegister()));
DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
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());
CallCode(ic, RelocInfo::CODE_TARGET, instr);
}
......@@ -4458,9 +4458,9 @@ void LCodeGen::DoStoreKeyed(LStoreKeyed* instr) {
void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->object()).is(StoreConvention::ReceiverRegister()));
DCHECK(ToRegister(instr->key()).is(StoreConvention::NameRegister()));
DCHECK(ToRegister(instr->value()).is(StoreConvention::ValueRegister()));
DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister()));
DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
Handle<Code> ic = (instr->strict_mode() == STRICT)
? isolate()->builtins()->KeyedStoreIC_Initialize_Strict()
......
......@@ -1087,15 +1087,15 @@ LInstruction* LChunkBuilder::DoCallJSFunction(
LInstruction* LChunkBuilder::DoCallWithDescriptor(
HCallWithDescriptor* instr) {
const CallInterfaceDescriptor* descriptor = instr->descriptor();
CallInterfaceDescriptor descriptor = instr->descriptor();
LOperand* target = UseRegisterOrConstantAtStart(instr->target());
ZoneList<LOperand*> ops(instr->OperandCount(), zone());
ops.Add(target, zone());
for (int i = 1; i < instr->OperandCount(); i++) {
LOperand* op = UseFixed(instr->OperandAt(i),
descriptor->GetParameterRegister(i - 1));
ops.Add(op, zone());
LOperand* op =
UseFixed(instr->OperandAt(i), descriptor.GetParameterRegister(i - 1));
ops.Add(op, zone());
}
LCallWithDescriptor* result = new(zone()) LCallWithDescriptor(
......@@ -2050,10 +2050,10 @@ LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) {
LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp);
LOperand* global_object =
UseFixed(instr->global_object(), LoadConvention::ReceiverRegister());
UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister());
LOperand* vector = NULL;
if (FLAG_vector_ics) {
vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
}
LLoadGlobalGeneric* result =
new(zone()) LLoadGlobalGeneric(context, global_object, vector);
......@@ -2109,10 +2109,10 @@ LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) {
LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp);
LOperand* object =
UseFixed(instr->object(), LoadConvention::ReceiverRegister());
UseFixed(instr->object(), LoadDescriptor::ReceiverRegister());
LOperand* vector = NULL;
if (FLAG_vector_ics) {
vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
}
LInstruction* result =
......@@ -2176,11 +2176,11 @@ LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) {
LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp);
LOperand* object =
UseFixed(instr->object(), LoadConvention::ReceiverRegister());
LOperand* key = UseFixed(instr->key(), LoadConvention::NameRegister());
UseFixed(instr->object(), LoadDescriptor::ReceiverRegister());
LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister());
LOperand* vector = NULL;
if (FLAG_vector_ics) {
vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
}
LInstruction* result =
......@@ -2238,9 +2238,9 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp);
LOperand* obj =
UseFixed(instr->object(), StoreConvention::ReceiverRegister());
LOperand* key = UseFixed(instr->key(), StoreConvention::NameRegister());
LOperand* val = UseFixed(instr->value(), StoreConvention::ValueRegister());
UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister());
LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
DCHECK(instr->object()->representation().IsTagged());
DCHECK(instr->key()->representation().IsTagged());
......@@ -2315,8 +2315,8 @@ LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp);
LOperand* obj =
UseFixed(instr->object(), StoreConvention::ReceiverRegister());
LOperand* val = UseFixed(instr->value(), StoreConvention::ValueRegister());
UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
LInstruction* result = new(zone()) LStoreNamedGeneric(context, obj, val);
return MarkAsCall(result, instr);
......
......@@ -1836,17 +1836,17 @@ class LCallJSFunction FINAL : public LTemplateInstruction<1, 1, 0> {
class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> {
public:
LCallWithDescriptor(const CallInterfaceDescriptor* descriptor,
LCallWithDescriptor(CallInterfaceDescriptor descriptor,
const ZoneList<LOperand*>& operands, Zone* zone)
: descriptor_(descriptor),
inputs_(descriptor->GetRegisterParameterCount() + 1, zone) {
DCHECK(descriptor->GetRegisterParameterCount() + 1 == operands.length());
inputs_(descriptor.GetRegisterParameterCount() + 1, zone) {
DCHECK(descriptor.GetRegisterParameterCount() + 1 == operands.length());
inputs_.AddAll(operands, zone);
}
LOperand* target() const { return inputs_[0]; }
const CallInterfaceDescriptor* descriptor() { return descriptor_; }
const CallInterfaceDescriptor descriptor() { return descriptor_; }
private:
DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor")
......@@ -1856,7 +1856,7 @@ class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> {
int arity() const { return hydrogen()->argument_count() - 1; }
const CallInterfaceDescriptor* descriptor_;
CallInterfaceDescriptor descriptor_;
ZoneList<LOperand*> inputs_;
// 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