MIPS: Move register conventions out of the IC classes.

Port r23391 (c3bf1dc)

Original commit message:
A change to a convention shouldn't require recompilation of ic.h/.cc.

BUG=
R=paul.lind@imgtec.com, vogelheim@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23420 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
balazs.kilvady@imgtec.com 2014-08-26 17:57:18 +00:00
parent 6d08761317
commit 6ff7b9ab0f
22 changed files with 399 additions and 337 deletions

View File

@ -1070,9 +1070,10 @@ source_set("v8_base") {
"src/ic/mips/handler-compiler-mips.cc",
"src/ic/mips/ic-mips.cc",
"src/ic/mips/ic-compiler-mips.cc",
"src/ic/mips/ic-conventions-mips.cc",
"src/ic/mips/stub-cache-mips.cc",
]
} else if (v8_target_arch == "mips64") {
} else if (v8_target_arch == "mips64el") {
sources += [
"src/mips64/assembler-mips64.cc",
"src/mips64/assembler-mips64.h",
@ -1106,6 +1107,7 @@ source_set("v8_base") {
"src/ic/mips64/handler-compiler-mips64.cc",
"src/ic/mips64/ic-mips64.cc",
"src/ic/mips64/ic-compiler-mips64.cc",
"src/ic/mips64/ic-conventions-mips64.cc",
"src/ic/mips64/stub-cache-mips64.cc",
]
}

View File

@ -22,8 +22,8 @@ void PropertyAccessCompiler::GenerateTailCall(MacroAssembler* masm,
Register* PropertyAccessCompiler::load_calling_convention() {
// receiver, name, scratch1, scratch2, scratch3, scratch4.
Register receiver = LoadIC::ReceiverRegister();
Register name = LoadIC::NameRegister();
Register receiver = LoadConvention::ReceiverRegister();
Register name = LoadConvention::NameRegister();
static Register registers[] = {receiver, name, 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 = StoreIC::ReceiverRegister();
Register name = StoreIC::NameRegister();
DCHECK(a3.is(KeyedStoreIC::MapRegister()));
Register receiver = StoreConvention::ReceiverRegister();
Register name = StoreConvention::NameRegister();
DCHECK(a3.is(StoreConvention::MapRegister()));
static Register registers[] = {receiver, name, a3, t0, t1};
return registers;
}

View File

@ -286,8 +286,8 @@ void ElementHandlerCompiler::GenerateLoadDictionaryElement(
// The return address is in ra.
Label slow, miss;
Register key = LoadIC::NameRegister();
Register receiver = LoadIC::ReceiverRegister();
Register key = LoadConvention::NameRegister();
Register receiver = LoadConvention::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(StoreIC::ReceiverRegister(), StoreIC::NameRegister(),
StoreIC::ValueRegister());
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
StoreConvention::ValueRegister());
// The slow case calls into the runtime to complete the store without causing
// an IC miss that would otherwise cause a transition to the generic stub.
@ -325,8 +325,8 @@ void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) {
// Push receiver, key and value for runtime call.
__ Push(StoreIC::ReceiverRegister(), StoreIC::NameRegister(),
StoreIC::ValueRegister());
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
StoreConvention::ValueRegister());
// The slow case calls into the runtime to complete the store without causing
// an IC miss that would otherwise cause a transition to the generic stub.
@ -828,7 +828,9 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor(
}
Register NamedStoreHandlerCompiler::value() { return StoreIC::ValueRegister(); }
Register NamedStoreHandlerCompiler::value() {
return StoreConvention::ValueRegister();
}
Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal(
@ -838,7 +840,7 @@ Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal(
FrontendHeader(receiver(), name, &miss);
// Get the value from the cell.
Register result = StoreIC::ValueRegister();
Register result = StoreConvention::ValueRegister();
__ li(result, Operand(cell));
__ lw(result, FieldMemOperand(result, Cell::kValueOffset));

View File

@ -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(KeyedStoreIC::MapRegister()));
map_reg.is(StoreConvention::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(StoreIC::ReceiverRegister(), StoreIC::NameRegister(),
StoreIC::ValueRegister());
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
StoreConvention::ValueRegister());
__ li(a0, Operand(Smi::FromInt(strict_mode)));
__ Push(a0);

View File

@ -0,0 +1,39 @@
// 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() {
DCHECK(FLAG_vector_ics);
return a0;
}
const Register FullVectorLoadConvention::VectorRegister() {
DCHECK(FLAG_vector_ics);
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; }
}
} // namespace v8::internal
#endif // V8_TARGET_ARCH_MIPS

View File

@ -251,8 +251,8 @@ static void GenerateKeyNameCheck(MacroAssembler* masm, Register key,
void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
// The return address is in lr.
Register receiver = ReceiverRegister();
Register name = NameRegister();
Register receiver = LoadConvention::ReceiverRegister();
Register name = LoadConvention::NameRegister();
DCHECK(receiver.is(a1));
DCHECK(name.is(a2));
@ -269,14 +269,15 @@ void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
void LoadIC::GenerateNormal(MacroAssembler* masm) {
Register dictionary = a0;
DCHECK(!dictionary.is(ReceiverRegister()));
DCHECK(!dictionary.is(NameRegister()));
DCHECK(!dictionary.is(LoadConvention::ReceiverRegister()));
DCHECK(!dictionary.is(LoadConvention::NameRegister()));
Label slow;
__ lw(dictionary,
FieldMemOperand(ReceiverRegister(), JSObject::kPropertiesOffset));
GenerateDictionaryLoad(masm, &slow, dictionary, NameRegister(), v0, a3, t0);
__ lw(dictionary, FieldMemOperand(LoadConvention::ReceiverRegister(),
JSObject::kPropertiesOffset));
GenerateDictionaryLoad(masm, &slow, dictionary,
LoadConvention::NameRegister(), v0, a3, t0);
__ Ret();
// Dictionary load failed, go slow (but don't miss).
@ -295,8 +296,8 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
__ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, t0);
__ mov(LoadIC_TempRegister(), ReceiverRegister());
__ Push(LoadIC_TempRegister(), NameRegister());
__ mov(LoadIC_TempRegister(), LoadConvention::ReceiverRegister());
__ Push(LoadIC_TempRegister(), LoadConvention::NameRegister());
// Perform tail call to the entry.
ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate);
@ -307,8 +308,8 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
// The return address is in ra.
__ mov(LoadIC_TempRegister(), ReceiverRegister());
__ Push(LoadIC_TempRegister(), NameRegister());
__ mov(LoadIC_TempRegister(), LoadConvention::ReceiverRegister());
__ Push(LoadIC_TempRegister(), LoadConvention::NameRegister());
__ TailCallRuntime(Runtime::kGetProperty, 2, 1);
}
@ -393,8 +394,8 @@ static MemOperand GenerateUnmappedArgumentsLookup(MacroAssembler* masm,
void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
// The return address is in ra.
Register receiver = ReceiverRegister();
Register key = NameRegister();
Register receiver = LoadConvention::ReceiverRegister();
Register key = LoadConvention::NameRegister();
DCHECK(receiver.is(a1));
DCHECK(key.is(a2));
@ -418,9 +419,9 @@ void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) {
Register receiver = ReceiverRegister();
Register key = NameRegister();
Register value = ValueRegister();
Register receiver = StoreConvention::ReceiverRegister();
Register key = StoreConvention::NameRegister();
Register value = StoreConvention::ValueRegister();
DCHECK(value.is(a0));
Label slow, notin;
@ -457,7 +458,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
__ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, t0);
__ Push(ReceiverRegister(), NameRegister());
__ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister());
// Perform tail call to the entry.
ExternalReference ref =
@ -467,35 +468,10 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
}
// IC register specifications
const Register LoadIC::ReceiverRegister() { return a1; }
const Register LoadIC::NameRegister() { return a2; }
const Register LoadIC::SlotRegister() {
DCHECK(FLAG_vector_ics);
return a0;
}
const Register LoadIC::VectorRegister() {
DCHECK(FLAG_vector_ics);
return a3;
}
const Register StoreIC::ReceiverRegister() { return a1; }
const Register StoreIC::NameRegister() { return a2; }
const Register StoreIC::ValueRegister() { return a0; }
const Register KeyedStoreIC::MapRegister() { return a3; }
void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
// The return address is in ra.
__ Push(ReceiverRegister(), NameRegister());
__ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister());
__ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1);
}
@ -506,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 = NameRegister();
Register receiver = ReceiverRegister();
Register key = LoadConvention::NameRegister();
Register receiver = LoadConvention::ReceiverRegister();
DCHECK(key.is(a2));
DCHECK(receiver.is(a1));
@ -666,8 +642,8 @@ void KeyedLoadIC::GenerateString(MacroAssembler* masm) {
// Return address is in ra.
Label miss;
Register receiver = ReceiverRegister();
Register index = NameRegister();
Register receiver = LoadConvention::ReceiverRegister();
Register index = LoadConvention::NameRegister();
Register scratch = a3;
Register result = v0;
DCHECK(!scratch.is(receiver) && !scratch.is(index));
@ -847,9 +823,9 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
Label array, extra, check_if_double_array;
// Register usage.
Register value = ValueRegister();
Register key = NameRegister();
Register receiver = ReceiverRegister();
Register value = StoreConvention::ValueRegister();
Register key = StoreConvention::NameRegister();
Register receiver = StoreConvention::ReceiverRegister();
DCHECK(value.is(a0));
Register receiver_map = a3;
Register elements_map = t2;
@ -933,8 +909,8 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) {
// Return address is in ra.
Label slow;
Register receiver = ReceiverRegister();
Register key = NameRegister();
Register receiver = LoadConvention::ReceiverRegister();
Register key = LoadConvention::NameRegister();
Register scratch1 = a3;
Register scratch2 = t0;
DCHECK(!scratch1.is(receiver) && !scratch1.is(key));
@ -971,7 +947,8 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) {
void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
// Push receiver, key and value for runtime call.
__ Push(ReceiverRegister(), NameRegister(), ValueRegister());
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
StoreConvention::ValueRegister());
ExternalReference ref =
ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate());
@ -980,11 +957,11 @@ void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
Register receiver = ReceiverRegister();
Register name = NameRegister();
Register receiver = StoreConvention::ReceiverRegister();
Register name = StoreConvention::NameRegister();
DCHECK(receiver.is(a1));
DCHECK(name.is(a2));
DCHECK(ValueRegister().is(a0));
DCHECK(StoreConvention::ValueRegister().is(a0));
// Get the receiver from the stack and probe the stub cache.
Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
@ -998,7 +975,8 @@ void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
void StoreIC::GenerateMiss(MacroAssembler* masm) {
__ Push(ReceiverRegister(), NameRegister(), ValueRegister());
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
StoreConvention::ValueRegister());
// Perform tail call to the entry.
ExternalReference ref =
ExternalReference(IC_Utility(kStoreIC_Miss), masm->isolate());
@ -1008,9 +986,9 @@ void StoreIC::GenerateMiss(MacroAssembler* masm) {
void StoreIC::GenerateNormal(MacroAssembler* masm) {
Label miss;
Register receiver = ReceiverRegister();
Register name = NameRegister();
Register value = ValueRegister();
Register receiver = StoreConvention::ReceiverRegister();
Register name = StoreConvention::NameRegister();
Register value = StoreConvention::ValueRegister();
Register dictionary = a3;
DCHECK(receiver.is(a1));
DCHECK(name.is(a2));

View File

@ -22,8 +22,8 @@ void PropertyAccessCompiler::GenerateTailCall(MacroAssembler* masm,
Register* PropertyAccessCompiler::load_calling_convention() {
// receiver, name, scratch1, scratch2, scratch3, scratch4.
Register receiver = LoadIC::ReceiverRegister();
Register name = LoadIC::NameRegister();
Register receiver = LoadConvention::ReceiverRegister();
Register name = LoadConvention::NameRegister();
static Register registers[] = {receiver, name, 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 = StoreIC::ReceiverRegister();
Register name = StoreIC::NameRegister();
DCHECK(a3.is(KeyedStoreIC::MapRegister()));
Register receiver = StoreConvention::ReceiverRegister();
Register name = StoreConvention::NameRegister();
DCHECK(a3.is(StoreConvention::MapRegister()));
static Register registers[] = {receiver, name, a3, a4, a5};
return registers;
}

View File

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

View File

@ -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(KeyedStoreIC::MapRegister()));
map_reg.is(StoreConvention::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(StoreIC::ReceiverRegister(), StoreIC::NameRegister(),
StoreIC::ValueRegister());
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
StoreConvention::ValueRegister());
__ li(a0, Operand(Smi::FromInt(strict_mode)));
__ Push(a0);

View File

@ -0,0 +1,39 @@
// 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() {
DCHECK(FLAG_vector_ics);
return a0;
}
const Register FullVectorLoadConvention::VectorRegister() {
DCHECK(FLAG_vector_ics);
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; }
}
} // namespace v8::internal
#endif // V8_TARGET_ARCH_MIPS64

View File

@ -250,8 +250,8 @@ static void GenerateKeyNameCheck(MacroAssembler* masm, Register key,
void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
// The return address is in lr.
Register receiver = ReceiverRegister();
Register name = NameRegister();
Register receiver = LoadConvention::ReceiverRegister();
Register name = LoadConvention::NameRegister();
DCHECK(receiver.is(a1));
DCHECK(name.is(a2));
@ -268,13 +268,14 @@ void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
void LoadIC::GenerateNormal(MacroAssembler* masm) {
Register dictionary = a0;
DCHECK(!dictionary.is(ReceiverRegister()));
DCHECK(!dictionary.is(NameRegister()));
DCHECK(!dictionary.is(LoadConvention::ReceiverRegister()));
DCHECK(!dictionary.is(LoadConvention::NameRegister()));
Label slow;
__ ld(dictionary,
FieldMemOperand(ReceiverRegister(), JSObject::kPropertiesOffset));
GenerateDictionaryLoad(masm, &slow, dictionary, NameRegister(), v0, a3, a4);
__ ld(dictionary, FieldMemOperand(LoadConvention::ReceiverRegister(),
JSObject::kPropertiesOffset));
GenerateDictionaryLoad(masm, &slow, dictionary,
LoadConvention::NameRegister(), v0, a3, a4);
__ Ret();
// Dictionary load failed, go slow (but don't miss).
@ -293,8 +294,8 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
__ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, a4);
__ mov(LoadIC_TempRegister(), ReceiverRegister());
__ Push(LoadIC_TempRegister(), NameRegister());
__ mov(LoadIC_TempRegister(), LoadConvention::ReceiverRegister());
__ Push(LoadIC_TempRegister(), LoadConvention::NameRegister());
// Perform tail call to the entry.
ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate);
@ -305,8 +306,8 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
// The return address is in ra.
__ mov(LoadIC_TempRegister(), ReceiverRegister());
__ Push(LoadIC_TempRegister(), NameRegister());
__ mov(LoadIC_TempRegister(), LoadConvention::ReceiverRegister());
__ Push(LoadIC_TempRegister(), LoadConvention::NameRegister());
__ TailCallRuntime(Runtime::kGetProperty, 2, 1);
}
@ -391,8 +392,8 @@ static MemOperand GenerateUnmappedArgumentsLookup(MacroAssembler* masm,
void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
// The return address is in ra.
Register receiver = ReceiverRegister();
Register key = NameRegister();
Register receiver = LoadConvention::ReceiverRegister();
Register key = LoadConvention::NameRegister();
DCHECK(receiver.is(a1));
DCHECK(key.is(a2));
@ -416,9 +417,9 @@ void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) {
Register receiver = ReceiverRegister();
Register key = NameRegister();
Register value = ValueRegister();
Register receiver = StoreConvention::ReceiverRegister();
Register key = StoreConvention::NameRegister();
Register value = StoreConvention::ValueRegister();
DCHECK(value.is(a0));
Label slow, notin;
@ -455,7 +456,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
__ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, a4);
__ Push(ReceiverRegister(), NameRegister());
__ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister());
// Perform tail call to the entry.
ExternalReference ref =
@ -465,35 +466,10 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
}
// IC register specifications
const Register LoadIC::ReceiverRegister() { return a1; }
const Register LoadIC::NameRegister() { return a2; }
const Register LoadIC::SlotRegister() {
DCHECK(FLAG_vector_ics);
return a0;
}
const Register LoadIC::VectorRegister() {
DCHECK(FLAG_vector_ics);
return a3;
}
const Register StoreIC::ReceiverRegister() { return a1; }
const Register StoreIC::NameRegister() { return a2; }
const Register StoreIC::ValueRegister() { return a0; }
const Register KeyedStoreIC::MapRegister() { return a3; }
void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
// The return address is in ra.
__ Push(ReceiverRegister(), NameRegister());
__ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister());
__ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1);
}
@ -504,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 = NameRegister();
Register receiver = ReceiverRegister();
Register key = LoadConvention::NameRegister();
Register receiver = LoadConvention::ReceiverRegister();
DCHECK(key.is(a2));
DCHECK(receiver.is(a1));
@ -671,8 +647,8 @@ void KeyedLoadIC::GenerateString(MacroAssembler* masm) {
// Return address is in ra.
Label miss;
Register receiver = ReceiverRegister();
Register index = NameRegister();
Register receiver = LoadConvention::ReceiverRegister();
Register index = LoadConvention::NameRegister();
Register scratch = a3;
Register result = v0;
DCHECK(!scratch.is(receiver) && !scratch.is(index));
@ -856,9 +832,9 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
Label array, extra, check_if_double_array;
// Register usage.
Register value = ValueRegister();
Register key = NameRegister();
Register receiver = ReceiverRegister();
Register value = StoreConvention::ValueRegister();
Register key = StoreConvention::NameRegister();
Register receiver = StoreConvention::ReceiverRegister();
DCHECK(value.is(a0));
Register receiver_map = a3;
Register elements_map = a6;
@ -942,8 +918,8 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) {
// Return address is in ra.
Label slow;
Register receiver = ReceiverRegister();
Register key = NameRegister();
Register receiver = LoadConvention::ReceiverRegister();
Register key = LoadConvention::NameRegister();
Register scratch1 = a3;
Register scratch2 = a4;
DCHECK(!scratch1.is(receiver) && !scratch1.is(key));
@ -980,7 +956,8 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) {
void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
// Push receiver, key and value for runtime call.
__ Push(ReceiverRegister(), NameRegister(), ValueRegister());
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
StoreConvention::ValueRegister());
ExternalReference ref =
ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate());
@ -989,11 +966,11 @@ void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
Register receiver = ReceiverRegister();
Register name = NameRegister();
Register receiver = StoreConvention::ReceiverRegister();
Register name = StoreConvention::NameRegister();
DCHECK(receiver.is(a1));
DCHECK(name.is(a2));
DCHECK(ValueRegister().is(a0));
DCHECK(StoreConvention::ValueRegister().is(a0));
// Get the receiver from the stack and probe the stub cache.
Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
@ -1007,7 +984,8 @@ void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
void StoreIC::GenerateMiss(MacroAssembler* masm) {
__ Push(ReceiverRegister(), NameRegister(), ValueRegister());
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
StoreConvention::ValueRegister());
// Perform tail call to the entry.
ExternalReference ref =
ExternalReference(IC_Utility(kStoreIC_Miss), masm->isolate());
@ -1017,9 +995,9 @@ void StoreIC::GenerateMiss(MacroAssembler* masm) {
void StoreIC::GenerateNormal(MacroAssembler* masm) {
Label miss;
Register receiver = ReceiverRegister();
Register name = NameRegister();
Register value = ValueRegister();
Register receiver = StoreConvention::ReceiverRegister();
Register name = StoreConvention::NameRegister();
Register value = StoreConvention::ValueRegister();
Register dictionary = a3;
DCHECK(!AreAliased(value, receiver, name, dictionary, a4, a5));

View File

@ -1954,7 +1954,7 @@ void InstanceofStub::Generate(MacroAssembler* masm) {
void FunctionPrototypeStub::Generate(MacroAssembler* masm) {
Label miss;
Register receiver = LoadIC::ReceiverRegister();
Register receiver = LoadConvention::ReceiverRegister();
NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, a3,
t0, &miss);
__ bind(&miss);

View File

@ -185,17 +185,17 @@ void DebugCodegen::GenerateCallICStubDebugBreak(MacroAssembler* masm) {
void DebugCodegen::GenerateLoadICDebugBreak(MacroAssembler* masm) {
Register receiver = LoadIC::ReceiverRegister();
Register name = LoadIC::NameRegister();
Register receiver = LoadConvention::ReceiverRegister();
Register name = LoadConvention::NameRegister();
Generate_DebugBreakCallHelper(masm, receiver.bit() | name.bit(), 0);
}
void DebugCodegen::GenerateStoreICDebugBreak(MacroAssembler* masm) {
// Calling convention for IC store (from ic-mips.cc).
Register receiver = StoreIC::ReceiverRegister();
Register name = StoreIC::NameRegister();
Register value = StoreIC::ValueRegister();
Register receiver = StoreConvention::ReceiverRegister();
Register name = StoreConvention::NameRegister();
Register value = StoreConvention::ValueRegister();
Generate_DebugBreakCallHelper(
masm, receiver.bit() | name.bit() | value.bit(), 0);
}
@ -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 = KeyedStoreIC::ReceiverRegister();
Register name = KeyedStoreIC::NameRegister();
Register value = KeyedStoreIC::ValueRegister();
Register receiver = StoreConvention::ReceiverRegister();
Register name = StoreConvention::NameRegister();
Register value = StoreConvention::ValueRegister();
Generate_DebugBreakCallHelper(
masm, receiver.bit() | name.bit() | value.bit(), 0);
}

View File

@ -1386,10 +1386,10 @@ void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy,
__ bind(&fast);
}
__ lw(LoadIC::ReceiverRegister(), GlobalObjectOperand());
__ li(LoadIC::NameRegister(), Operand(proxy->var()->name()));
__ lw(LoadConvention::ReceiverRegister(), GlobalObjectOperand());
__ li(LoadConvention::NameRegister(), Operand(proxy->var()->name()));
if (FLAG_vector_ics) {
__ li(LoadIC::SlotRegister(),
__ li(VectorLoadConvention::SlotRegister(),
Operand(Smi::FromInt(proxy->VariableFeedbackSlot())));
}
@ -1475,10 +1475,10 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
switch (var->location()) {
case Variable::UNALLOCATED: {
Comment cmnt(masm_, "[ Global variable");
__ lw(LoadIC::ReceiverRegister(), GlobalObjectOperand());
__ li(LoadIC::NameRegister(), Operand(var->name()));
__ lw(LoadConvention::ReceiverRegister(), GlobalObjectOperand());
__ li(LoadConvention::NameRegister(), Operand(var->name()));
if (FLAG_vector_ics) {
__ li(LoadIC::SlotRegister(),
__ li(VectorLoadConvention::SlotRegister(),
Operand(Smi::FromInt(proxy->VariableFeedbackSlot())));
}
CallLoadIC(CONTEXTUAL);
@ -1688,10 +1688,10 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
if (key->value()->IsInternalizedString()) {
if (property->emit_store()) {
VisitForAccumulatorValue(value);
__ mov(StoreIC::ValueRegister(), result_register());
DCHECK(StoreIC::ValueRegister().is(a0));
__ li(StoreIC::NameRegister(), Operand(key->value()));
__ lw(StoreIC::ReceiverRegister(), MemOperand(sp));
__ mov(StoreConvention::ValueRegister(), result_register());
DCHECK(StoreConvention::ValueRegister().is(a0));
__ li(StoreConvention::NameRegister(), Operand(key->value()));
__ lw(StoreConvention::ReceiverRegister(), MemOperand(sp));
CallStoreIC(key->LiteralFeedbackId());
PrepareForBailoutForId(key->id(), NO_REGISTERS);
} else {
@ -1873,7 +1873,7 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) {
if (expr->is_compound()) {
// We need the receiver both on the stack and in the register.
VisitForStackValue(property->obj());
__ lw(LoadIC::ReceiverRegister(), MemOperand(sp, 0));
__ lw(LoadConvention::ReceiverRegister(), MemOperand(sp, 0));
} else {
VisitForStackValue(property->obj());
}
@ -1883,8 +1883,9 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) {
if (expr->is_compound()) {
VisitForStackValue(property->obj());
VisitForStackValue(property->key());
__ lw(LoadIC::ReceiverRegister(), MemOperand(sp, 1 * kPointerSize));
__ lw(LoadIC::NameRegister(), MemOperand(sp, 0));
__ lw(LoadConvention::ReceiverRegister(),
MemOperand(sp, 1 * kPointerSize));
__ lw(LoadConvention::NameRegister(), MemOperand(sp, 0));
} else {
VisitForStackValue(property->obj());
VisitForStackValue(property->key());
@ -2022,8 +2023,8 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
Label l_catch, l_try, l_suspend, l_continuation, l_resume;
Label l_next, l_call;
Register load_receiver = LoadIC::ReceiverRegister();
Register load_name = LoadIC::NameRegister();
Register load_receiver = LoadConvention::ReceiverRegister();
Register load_name = LoadConvention::NameRegister();
// Initial send value is undefined.
__ LoadRoot(a0, Heap::kUndefinedValueRootIndex);
@ -2081,7 +2082,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ lw(load_receiver, MemOperand(sp, kPointerSize));
__ lw(load_name, MemOperand(sp, 2 * kPointerSize));
if (FLAG_vector_ics) {
__ li(LoadIC::SlotRegister(),
__ li(VectorLoadConvention::SlotRegister(),
Operand(Smi::FromInt(expr->KeyedLoadFeedbackSlot())));
}
Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
@ -2101,7 +2102,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ push(load_receiver); // save result
__ LoadRoot(load_name, Heap::kdone_stringRootIndex); // "done"
if (FLAG_vector_ics) {
__ li(LoadIC::SlotRegister(),
__ li(VectorLoadConvention::SlotRegister(),
Operand(Smi::FromInt(expr->DoneFeedbackSlot())));
}
CallLoadIC(NOT_CONTEXTUAL); // v0=result.done
@ -2114,7 +2115,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ pop(load_receiver); // result
__ LoadRoot(load_name, Heap::kvalue_stringRootIndex); // "value"
if (FLAG_vector_ics) {
__ li(LoadIC::SlotRegister(),
__ li(VectorLoadConvention::SlotRegister(),
Operand(Smi::FromInt(expr->ValueFeedbackSlot())));
}
CallLoadIC(NOT_CONTEXTUAL); // v0=result.value
@ -2279,9 +2280,9 @@ void FullCodeGenerator::EmitCreateIteratorResult(bool done) {
void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
SetSourcePosition(prop->position());
Literal* key = prop->key()->AsLiteral();
__ li(LoadIC::NameRegister(), Operand(key->value()));
__ li(LoadConvention::NameRegister(), Operand(key->value()));
if (FLAG_vector_ics) {
__ li(LoadIC::SlotRegister(),
__ li(VectorLoadConvention::SlotRegister(),
Operand(Smi::FromInt(prop->PropertyFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL);
} else {
@ -2294,7 +2295,7 @@ void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
SetSourcePosition(prop->position());
Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
if (FLAG_vector_ics) {
__ li(LoadIC::SlotRegister(),
__ li(VectorLoadConvention::SlotRegister(),
Operand(Smi::FromInt(prop->PropertyFeedbackSlot())));
CallIC(ic);
} else {
@ -2433,9 +2434,9 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) {
case NAMED_PROPERTY: {
__ push(result_register()); // Preserve value.
VisitForAccumulatorValue(prop->obj());
__ mov(StoreIC::ReceiverRegister(), result_register());
__ pop(StoreIC::ValueRegister()); // Restore value.
__ li(StoreIC::NameRegister(),
__ mov(StoreConvention::ReceiverRegister(), result_register());
__ pop(StoreConvention::ValueRegister()); // Restore value.
__ li(StoreConvention::NameRegister(),
Operand(prop->key()->AsLiteral()->value()));
CallStoreIC();
break;
@ -2444,8 +2445,9 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) {
__ push(result_register()); // Preserve value.
VisitForStackValue(prop->obj());
VisitForAccumulatorValue(prop->key());
__ mov(KeyedStoreIC::NameRegister(), result_register());
__ Pop(KeyedStoreIC::ValueRegister(), KeyedStoreIC::ReceiverRegister());
__ mov(StoreConvention::NameRegister(), result_register());
__ Pop(StoreConvention::ValueRegister(),
StoreConvention::ReceiverRegister());
Handle<Code> ic = strict_mode() == SLOPPY
? isolate()->builtins()->KeyedStoreIC_Initialize()
: isolate()->builtins()->KeyedStoreIC_Initialize_Strict();
@ -2473,9 +2475,9 @@ void FullCodeGenerator::EmitStoreToStackLocalOrContextSlot(
void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op) {
if (var->IsUnallocated()) {
// Global var, const, or let.
__ mov(StoreIC::ValueRegister(), result_register());
__ li(StoreIC::NameRegister(), Operand(var->name()));
__ lw(StoreIC::ReceiverRegister(), GlobalObjectOperand());
__ mov(StoreConvention::ValueRegister(), result_register());
__ li(StoreConvention::NameRegister(), Operand(var->name()));
__ lw(StoreConvention::ReceiverRegister(), GlobalObjectOperand());
CallStoreIC();
} else if (op == Token::INIT_CONST_LEGACY) {
@ -2545,9 +2547,10 @@ void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) {
// Record source code position before IC call.
SetSourcePosition(expr->position());
__ mov(StoreIC::ValueRegister(), result_register());
__ li(StoreIC::NameRegister(), Operand(prop->key()->AsLiteral()->value()));
__ pop(StoreIC::ReceiverRegister());
__ mov(StoreConvention::ValueRegister(), result_register());
__ li(StoreConvention::NameRegister(),
Operand(prop->key()->AsLiteral()->value()));
__ pop(StoreConvention::ReceiverRegister());
CallStoreIC(expr->AssignmentFeedbackId());
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG);
@ -2565,9 +2568,9 @@ void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) {
// - a0 is the value,
// - a1 is the key,
// - a2 is the receiver.
__ mov(KeyedStoreIC::ValueRegister(), result_register());
__ Pop(KeyedStoreIC::ReceiverRegister(), KeyedStoreIC::NameRegister());
DCHECK(KeyedStoreIC::ValueRegister().is(a0));
__ mov(StoreConvention::ValueRegister(), result_register());
__ Pop(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister());
DCHECK(StoreConvention::ValueRegister().is(a0));
Handle<Code> ic = strict_mode() == SLOPPY
? isolate()->builtins()->KeyedStoreIC_Initialize()
@ -2585,15 +2588,15 @@ void FullCodeGenerator::VisitProperty(Property* expr) {
if (key->IsPropertyName()) {
VisitForAccumulatorValue(expr->obj());
__ Move(LoadIC::ReceiverRegister(), v0);
__ Move(LoadConvention::ReceiverRegister(), v0);
EmitNamedPropertyLoad(expr);
PrepareForBailoutForId(expr->LoadId(), TOS_REG);
context()->Plug(v0);
} else {
VisitForStackValue(expr->obj());
VisitForAccumulatorValue(expr->key());
__ Move(LoadIC::NameRegister(), v0);
__ pop(LoadIC::ReceiverRegister());
__ Move(LoadConvention::NameRegister(), v0);
__ pop(LoadConvention::ReceiverRegister());
EmitKeyedPropertyLoad(expr);
context()->Plug(v0);
}
@ -2627,7 +2630,7 @@ void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) {
} else {
// Load the function from the receiver.
DCHECK(callee->IsProperty());
__ lw(LoadIC::ReceiverRegister(), MemOperand(sp, 0));
__ lw(LoadConvention::ReceiverRegister(), MemOperand(sp, 0));
EmitNamedPropertyLoad(callee->AsProperty());
PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG);
// Push the target function under the receiver.
@ -2650,8 +2653,8 @@ void FullCodeGenerator::EmitKeyedCallWithLoadIC(Call* expr,
// Load the function from the receiver.
DCHECK(callee->IsProperty());
__ lw(LoadIC::ReceiverRegister(), MemOperand(sp, 0));
__ Move(LoadIC::NameRegister(), v0);
__ lw(LoadConvention::ReceiverRegister(), MemOperand(sp, 0));
__ Move(LoadConvention::NameRegister(), v0);
EmitKeyedPropertyLoad(callee->AsProperty());
PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG);
@ -4095,15 +4098,15 @@ void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) {
if (expr->is_jsruntime()) {
// Push the builtins object as the receiver.
Register receiver = LoadIC::ReceiverRegister();
Register receiver = LoadConvention::ReceiverRegister();
__ lw(receiver, GlobalObjectOperand());
__ lw(receiver, FieldMemOperand(receiver, GlobalObject::kBuiltinsOffset));
__ push(receiver);
// Load the function from the receiver.
__ li(LoadIC::NameRegister(), Operand(expr->name()));
__ li(LoadConvention::NameRegister(), Operand(expr->name()));
if (FLAG_vector_ics) {
__ li(LoadIC::SlotRegister(),
__ li(VectorLoadConvention::SlotRegister(),
Operand(Smi::FromInt(expr->CallRuntimeFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL);
} else {
@ -4286,13 +4289,14 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
if (assign_type == NAMED_PROPERTY) {
// Put the object both on the stack and in the register.
VisitForStackValue(prop->obj());
__ lw(LoadIC::ReceiverRegister(), MemOperand(sp, 0));
__ lw(LoadConvention::ReceiverRegister(), MemOperand(sp, 0));
EmitNamedPropertyLoad(prop);
} else {
VisitForStackValue(prop->obj());
VisitForStackValue(prop->key());
__ lw(LoadIC::ReceiverRegister(), MemOperand(sp, 1 * kPointerSize));
__ lw(LoadIC::NameRegister(), MemOperand(sp, 0));
__ lw(LoadConvention::ReceiverRegister(),
MemOperand(sp, 1 * kPointerSize));
__ lw(LoadConvention::NameRegister(), MemOperand(sp, 0));
EmitKeyedPropertyLoad(prop);
}
}
@ -4403,10 +4407,10 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
}
break;
case NAMED_PROPERTY: {
__ mov(StoreIC::ValueRegister(), result_register());
__ li(StoreIC::NameRegister(),
__ mov(StoreConvention::ValueRegister(), result_register());
__ li(StoreConvention::NameRegister(),
Operand(prop->key()->AsLiteral()->value()));
__ pop(StoreIC::ReceiverRegister());
__ pop(StoreConvention::ReceiverRegister());
CallStoreIC(expr->CountStoreFeedbackId());
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG);
if (expr->is_postfix()) {
@ -4419,8 +4423,9 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
break;
}
case KEYED_PROPERTY: {
__ mov(KeyedStoreIC::ValueRegister(), result_register());
__ Pop(KeyedStoreIC::ReceiverRegister(), KeyedStoreIC::NameRegister());
__ mov(StoreConvention::ValueRegister(), result_register());
__ Pop(StoreConvention::ReceiverRegister(),
StoreConvention::NameRegister());
Handle<Code> ic = strict_mode() == SLOPPY
? isolate()->builtins()->KeyedStoreIC_Initialize()
: isolate()->builtins()->KeyedStoreIC_Initialize_Strict();
@ -4445,10 +4450,10 @@ void FullCodeGenerator::VisitForTypeofValue(Expression* expr) {
VariableProxy* proxy = expr->AsVariableProxy();
if (proxy != NULL && proxy->var()->IsUnallocated()) {
Comment cmnt(masm_, "[ Global variable");
__ lw(LoadIC::ReceiverRegister(), GlobalObjectOperand());
__ li(LoadIC::NameRegister(), Operand(proxy->name()));
__ lw(LoadConvention::ReceiverRegister(), GlobalObjectOperand());
__ li(LoadConvention::NameRegister(), Operand(proxy->name()));
if (FLAG_vector_ics) {
__ li(LoadIC::SlotRegister(),
__ li(VectorLoadConvention::SlotRegister(),
Operand(Smi::FromInt(proxy->VariableFeedbackSlot())));
}
// Use a regular load, not a contextual load, to avoid a reference

View File

@ -2891,21 +2891,22 @@ template <class T>
void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
DCHECK(FLAG_vector_ics);
Register vector = ToRegister(instr->temp_vector());
DCHECK(vector.is(LoadIC::VectorRegister()));
DCHECK(vector.is(FullVectorLoadConvention::VectorRegister()));
__ li(vector, instr->hydrogen()->feedback_vector());
// No need to allocate this register.
DCHECK(LoadIC::SlotRegister().is(a0));
__ li(LoadIC::SlotRegister(),
DCHECK(FullVectorLoadConvention::SlotRegister().is(a0));
__ li(FullVectorLoadConvention::SlotRegister(),
Operand(Smi::FromInt(instr->hydrogen()->slot())));
}
void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->global_object()).is(LoadIC::ReceiverRegister()));
DCHECK(ToRegister(instr->global_object())
.is(LoadConvention::ReceiverRegister()));
DCHECK(ToRegister(instr->result()).is(v0));
__ li(LoadIC::NameRegister(), Operand(instr->name()));
__ li(LoadConvention::NameRegister(), Operand(instr->name()));
if (FLAG_vector_ics) {
EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
}
@ -3029,11 +3030,11 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->object()).is(LoadIC::ReceiverRegister()));
DCHECK(ToRegister(instr->object()).is(LoadConvention::ReceiverRegister()));
DCHECK(ToRegister(instr->result()).is(v0));
// Name is always in a2.
__ li(LoadIC::NameRegister(), Operand(instr->name()));
__ li(LoadConvention::NameRegister(), Operand(instr->name()));
if (FLAG_vector_ics) {
EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
}
@ -3338,8 +3339,8 @@ MemOperand LCodeGen::PrepareKeyedOperand(Register key,
void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->object()).is(LoadIC::ReceiverRegister()));
DCHECK(ToRegister(instr->key()).is(LoadIC::NameRegister()));
DCHECK(ToRegister(instr->object()).is(LoadConvention::ReceiverRegister()));
DCHECK(ToRegister(instr->key()).is(LoadConvention::NameRegister()));
if (FLAG_vector_ics) {
EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
@ -4154,10 +4155,10 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->object()).is(StoreIC::ReceiverRegister()));
DCHECK(ToRegister(instr->value()).is(StoreIC::ValueRegister()));
DCHECK(ToRegister(instr->object()).is(StoreConvention::ReceiverRegister()));
DCHECK(ToRegister(instr->value()).is(StoreConvention::ValueRegister()));
__ li(StoreIC::NameRegister(), Operand(instr->name()));
__ li(StoreConvention::NameRegister(), Operand(instr->name()));
Handle<Code> ic = StoreIC::initialize_stub(isolate(), instr->strict_mode());
CallCode(ic, RelocInfo::CODE_TARGET, instr);
}
@ -4385,9 +4386,9 @@ void LCodeGen::DoStoreKeyed(LStoreKeyed* instr) {
void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->object()).is(KeyedStoreIC::ReceiverRegister()));
DCHECK(ToRegister(instr->key()).is(KeyedStoreIC::NameRegister()));
DCHECK(ToRegister(instr->value()).is(KeyedStoreIC::ValueRegister()));
DCHECK(ToRegister(instr->object()).is(StoreConvention::ReceiverRegister()));
DCHECK(ToRegister(instr->key()).is(StoreConvention::NameRegister()));
DCHECK(ToRegister(instr->value()).is(StoreConvention::ValueRegister()));
Handle<Code> ic = (instr->strict_mode() == STRICT)
? isolate()->builtins()->KeyedStoreIC_Initialize_Strict()

View File

@ -2051,11 +2051,11 @@ LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) {
LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp);
LOperand* global_object = UseFixed(instr->global_object(),
LoadIC::ReceiverRegister());
LOperand* global_object =
UseFixed(instr->global_object(), LoadConvention::ReceiverRegister());
LOperand* vector = NULL;
if (FLAG_vector_ics) {
vector = FixedTemp(LoadIC::VectorRegister());
vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
}
LLoadGlobalGeneric* result =
new(zone()) LLoadGlobalGeneric(context, global_object, vector);
@ -2110,10 +2110,11 @@ LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) {
LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp);
LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister());
LOperand* object =
UseFixed(instr->object(), LoadConvention::ReceiverRegister());
LOperand* vector = NULL;
if (FLAG_vector_ics) {
vector = FixedTemp(LoadIC::VectorRegister());
vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
}
LInstruction* result =
@ -2175,11 +2176,12 @@ LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) {
LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp);
LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister());
LOperand* key = UseFixed(instr->key(), LoadIC::NameRegister());
LOperand* object =
UseFixed(instr->object(), LoadConvention::ReceiverRegister());
LOperand* key = UseFixed(instr->key(), LoadConvention::NameRegister());
LOperand* vector = NULL;
if (FLAG_vector_ics) {
vector = FixedTemp(LoadIC::VectorRegister());
vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
}
LInstruction* result =
@ -2235,9 +2237,10 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp);
LOperand* obj = UseFixed(instr->object(), KeyedStoreIC::ReceiverRegister());
LOperand* key = UseFixed(instr->key(), KeyedStoreIC::NameRegister());
LOperand* val = UseFixed(instr->value(), KeyedStoreIC::ValueRegister());
LOperand* obj =
UseFixed(instr->object(), StoreConvention::ReceiverRegister());
LOperand* key = UseFixed(instr->key(), StoreConvention::NameRegister());
LOperand* val = UseFixed(instr->value(), StoreConvention::ValueRegister());
DCHECK(instr->object()->representation().IsTagged());
DCHECK(instr->key()->representation().IsTagged());
@ -2311,8 +2314,9 @@ LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp);
LOperand* obj = UseFixed(instr->object(), StoreIC::ReceiverRegister());
LOperand* val = UseFixed(instr->value(), StoreIC::ValueRegister());
LOperand* obj =
UseFixed(instr->object(), StoreConvention::ReceiverRegister());
LOperand* val = UseFixed(instr->value(), StoreConvention::ValueRegister());
LInstruction* result = new(zone()) LStoreNamedGeneric(context, obj, val);
return MarkAsCall(result, instr);

View File

@ -1952,7 +1952,7 @@ void InstanceofStub::Generate(MacroAssembler* masm) {
void FunctionPrototypeStub::Generate(MacroAssembler* masm) {
Label miss;
Register receiver = LoadIC::ReceiverRegister();
Register receiver = LoadConvention::ReceiverRegister();
NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, a3,
a4, &miss);
__ bind(&miss);

View File

@ -188,16 +188,16 @@ void DebugCodegen::GenerateCallICStubDebugBreak(MacroAssembler* masm) {
void DebugCodegen::GenerateLoadICDebugBreak(MacroAssembler* masm) {
Register receiver = LoadIC::ReceiverRegister();
Register name = LoadIC::NameRegister();
Register receiver = LoadConvention::ReceiverRegister();
Register name = LoadConvention::NameRegister();
Generate_DebugBreakCallHelper(masm, receiver.bit() | name.bit(), 0);
}
void DebugCodegen::GenerateStoreICDebugBreak(MacroAssembler* masm) {
Register receiver = StoreIC::ReceiverRegister();
Register name = StoreIC::NameRegister();
Register value = StoreIC::ValueRegister();
Register receiver = StoreConvention::ReceiverRegister();
Register name = StoreConvention::NameRegister();
Register value = StoreConvention::ValueRegister();
Generate_DebugBreakCallHelper(
masm, receiver.bit() | name.bit() | value.bit(), 0);
}
@ -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 = KeyedStoreIC::ReceiverRegister();
Register name = KeyedStoreIC::NameRegister();
Register value = KeyedStoreIC::ValueRegister();
Register receiver = StoreConvention::ReceiverRegister();
Register name = StoreConvention::NameRegister();
Register value = StoreConvention::ValueRegister();
Generate_DebugBreakCallHelper(
masm, receiver.bit() | name.bit() | value.bit(), 0);
}

View File

@ -1381,10 +1381,10 @@ void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy,
__ bind(&fast);
}
__ ld(LoadIC::ReceiverRegister(), GlobalObjectOperand());
__ li(LoadIC::NameRegister(), Operand(proxy->var()->name()));
__ ld(LoadConvention::ReceiverRegister(), GlobalObjectOperand());
__ li(LoadConvention::NameRegister(), Operand(proxy->var()->name()));
if (FLAG_vector_ics) {
__ li(LoadIC::SlotRegister(),
__ li(VectorLoadConvention::SlotRegister(),
Operand(Smi::FromInt(proxy->VariableFeedbackSlot())));
}
@ -1472,10 +1472,10 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
Comment cmnt(masm_, "[ Global variable");
// Use inline caching. Variable name is passed in a2 and the global
// object (receiver) in a0.
__ ld(LoadIC::ReceiverRegister(), GlobalObjectOperand());
__ li(LoadIC::NameRegister(), Operand(var->name()));
__ ld(LoadConvention::ReceiverRegister(), GlobalObjectOperand());
__ li(LoadConvention::NameRegister(), Operand(var->name()));
if (FLAG_vector_ics) {
__ li(LoadIC::SlotRegister(),
__ li(VectorLoadConvention::SlotRegister(),
Operand(Smi::FromInt(proxy->VariableFeedbackSlot())));
}
CallLoadIC(CONTEXTUAL);
@ -1685,10 +1685,10 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
if (key->value()->IsInternalizedString()) {
if (property->emit_store()) {
VisitForAccumulatorValue(value);
__ mov(StoreIC::ValueRegister(), result_register());
DCHECK(StoreIC::ValueRegister().is(a0));
__ li(StoreIC::NameRegister(), Operand(key->value()));
__ ld(StoreIC::ReceiverRegister(), MemOperand(sp));
__ mov(StoreConvention::ValueRegister(), result_register());
DCHECK(StoreConvention::ValueRegister().is(a0));
__ li(StoreConvention::NameRegister(), Operand(key->value()));
__ ld(StoreConvention::ReceiverRegister(), MemOperand(sp));
CallStoreIC(key->LiteralFeedbackId());
PrepareForBailoutForId(key->id(), NO_REGISTERS);
} else {
@ -1870,7 +1870,7 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) {
if (expr->is_compound()) {
// We need the receiver both on the stack and in the register.
VisitForStackValue(property->obj());
__ ld(LoadIC::ReceiverRegister(), MemOperand(sp, 0));
__ ld(LoadConvention::ReceiverRegister(), MemOperand(sp, 0));
} else {
VisitForStackValue(property->obj());
}
@ -1880,8 +1880,9 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) {
if (expr->is_compound()) {
VisitForStackValue(property->obj());
VisitForStackValue(property->key());
__ ld(LoadIC::ReceiverRegister(), MemOperand(sp, 1 * kPointerSize));
__ ld(LoadIC::NameRegister(), MemOperand(sp, 0));
__ ld(LoadConvention::ReceiverRegister(),
MemOperand(sp, 1 * kPointerSize));
__ ld(LoadConvention::NameRegister(), MemOperand(sp, 0));
} else {
VisitForStackValue(property->obj());
VisitForStackValue(property->key());
@ -2019,8 +2020,8 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
Label l_catch, l_try, l_suspend, l_continuation, l_resume;
Label l_next, l_call;
Register load_receiver = LoadIC::ReceiverRegister();
Register load_name = LoadIC::NameRegister();
Register load_receiver = LoadConvention::ReceiverRegister();
Register load_name = LoadConvention::NameRegister();
// Initial send value is undefined.
__ LoadRoot(a0, Heap::kUndefinedValueRootIndex);
__ Branch(&l_next);
@ -2076,7 +2077,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ ld(load_receiver, MemOperand(sp, kPointerSize));
__ ld(load_name, MemOperand(sp, 2 * kPointerSize));
if (FLAG_vector_ics) {
__ li(LoadIC::SlotRegister(),
__ li(VectorLoadConvention::SlotRegister(),
Operand(Smi::FromInt(expr->KeyedLoadFeedbackSlot())));
}
Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
@ -2096,7 +2097,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ push(load_receiver); // save result
__ LoadRoot(load_name, Heap::kdone_stringRootIndex); // "done"
if (FLAG_vector_ics) {
__ li(LoadIC::SlotRegister(),
__ li(VectorLoadConvention::SlotRegister(),
Operand(Smi::FromInt(expr->DoneFeedbackSlot())));
}
CallLoadIC(NOT_CONTEXTUAL); // v0=result.done
@ -2109,7 +2110,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ pop(load_receiver); // result
__ LoadRoot(load_name, Heap::kvalue_stringRootIndex); // "value"
if (FLAG_vector_ics) {
__ li(LoadIC::SlotRegister(),
__ li(VectorLoadConvention::SlotRegister(),
Operand(Smi::FromInt(expr->ValueFeedbackSlot())));
}
CallLoadIC(NOT_CONTEXTUAL); // v0=result.value
@ -2276,9 +2277,9 @@ void FullCodeGenerator::EmitCreateIteratorResult(bool done) {
void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
SetSourcePosition(prop->position());
Literal* key = prop->key()->AsLiteral();
__ li(LoadIC::NameRegister(), Operand(key->value()));
__ li(LoadConvention::NameRegister(), Operand(key->value()));
if (FLAG_vector_ics) {
__ li(LoadIC::SlotRegister(),
__ li(VectorLoadConvention::SlotRegister(),
Operand(Smi::FromInt(prop->PropertyFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL);
} else {
@ -2292,7 +2293,7 @@ void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
// Call keyed load IC. It has register arguments receiver and key.
Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
if (FLAG_vector_ics) {
__ li(LoadIC::SlotRegister(),
__ li(VectorLoadConvention::SlotRegister(),
Operand(Smi::FromInt(prop->PropertyFeedbackSlot())));
CallIC(ic);
} else {
@ -2430,9 +2431,9 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) {
case NAMED_PROPERTY: {
__ push(result_register()); // Preserve value.
VisitForAccumulatorValue(prop->obj());
__ mov(StoreIC::ReceiverRegister(), result_register());
__ pop(StoreIC::ValueRegister()); // Restore value.
__ li(StoreIC::NameRegister(),
__ mov(StoreConvention::ReceiverRegister(), result_register());
__ pop(StoreConvention::ValueRegister()); // Restore value.
__ li(StoreConvention::NameRegister(),
Operand(prop->key()->AsLiteral()->value()));
CallStoreIC();
break;
@ -2441,8 +2442,9 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) {
__ push(result_register()); // Preserve value.
VisitForStackValue(prop->obj());
VisitForAccumulatorValue(prop->key());
__ Move(KeyedStoreIC::NameRegister(), result_register());
__ Pop(KeyedStoreIC::ValueRegister(), KeyedStoreIC::ReceiverRegister());
__ Move(StoreConvention::NameRegister(), result_register());
__ Pop(StoreConvention::ValueRegister(),
StoreConvention::ReceiverRegister());
Handle<Code> ic = strict_mode() == SLOPPY
? isolate()->builtins()->KeyedStoreIC_Initialize()
: isolate()->builtins()->KeyedStoreIC_Initialize_Strict();
@ -2470,9 +2472,9 @@ void FullCodeGenerator::EmitStoreToStackLocalOrContextSlot(
void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op) {
if (var->IsUnallocated()) {
// Global var, const, or let.
__ mov(StoreIC::ValueRegister(), result_register());
__ li(StoreIC::NameRegister(), Operand(var->name()));
__ ld(StoreIC::ReceiverRegister(), GlobalObjectOperand());
__ mov(StoreConvention::ValueRegister(), result_register());
__ li(StoreConvention::NameRegister(), Operand(var->name()));
__ ld(StoreConvention::ReceiverRegister(), GlobalObjectOperand());
CallStoreIC();
} else if (op == Token::INIT_CONST_LEGACY) {
// Const initializers need a write barrier.
@ -2545,9 +2547,10 @@ void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) {
// Record source code position before IC call.
SetSourcePosition(expr->position());
__ mov(StoreIC::ValueRegister(), result_register());
__ li(StoreIC::NameRegister(), Operand(prop->key()->AsLiteral()->value()));
__ pop(StoreIC::ReceiverRegister());
__ mov(StoreConvention::ValueRegister(), result_register());
__ li(StoreConvention::NameRegister(),
Operand(prop->key()->AsLiteral()->value()));
__ pop(StoreConvention::ReceiverRegister());
CallStoreIC(expr->AssignmentFeedbackId());
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG);
@ -2565,9 +2568,9 @@ void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) {
// - a0 is the value,
// - a1 is the key,
// - a2 is the receiver.
__ mov(KeyedStoreIC::ValueRegister(), result_register());
__ Pop(KeyedStoreIC::ReceiverRegister(), KeyedStoreIC::NameRegister());
DCHECK(KeyedStoreIC::ValueRegister().is(a0));
__ mov(StoreConvention::ValueRegister(), result_register());
__ Pop(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister());
DCHECK(StoreConvention::ValueRegister().is(a0));
Handle<Code> ic = strict_mode() == SLOPPY
? isolate()->builtins()->KeyedStoreIC_Initialize()
@ -2585,15 +2588,15 @@ void FullCodeGenerator::VisitProperty(Property* expr) {
if (key->IsPropertyName()) {
VisitForAccumulatorValue(expr->obj());
__ Move(LoadIC::ReceiverRegister(), v0);
__ Move(LoadConvention::ReceiverRegister(), v0);
EmitNamedPropertyLoad(expr);
PrepareForBailoutForId(expr->LoadId(), TOS_REG);
context()->Plug(v0);
} else {
VisitForStackValue(expr->obj());
VisitForAccumulatorValue(expr->key());
__ Move(LoadIC::NameRegister(), v0);
__ pop(LoadIC::ReceiverRegister());
__ Move(LoadConvention::NameRegister(), v0);
__ pop(LoadConvention::ReceiverRegister());
EmitKeyedPropertyLoad(expr);
context()->Plug(v0);
}
@ -2627,7 +2630,7 @@ void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) {
} else {
// Load the function from the receiver.
DCHECK(callee->IsProperty());
__ ld(LoadIC::ReceiverRegister(), MemOperand(sp, 0));
__ ld(LoadConvention::ReceiverRegister(), MemOperand(sp, 0));
EmitNamedPropertyLoad(callee->AsProperty());
PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG);
// Push the target function under the receiver.
@ -2650,8 +2653,8 @@ void FullCodeGenerator::EmitKeyedCallWithLoadIC(Call* expr,
// Load the function from the receiver.
DCHECK(callee->IsProperty());
__ ld(LoadIC::ReceiverRegister(), MemOperand(sp, 0));
__ Move(LoadIC::NameRegister(), v0);
__ ld(LoadConvention::ReceiverRegister(), MemOperand(sp, 0));
__ Move(LoadConvention::NameRegister(), v0);
EmitKeyedPropertyLoad(callee->AsProperty());
PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG);
@ -4095,15 +4098,15 @@ void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) {
if (expr->is_jsruntime()) {
// Push the builtins object as the receiver.
Register receiver = LoadIC::ReceiverRegister();
Register receiver = LoadConvention::ReceiverRegister();
__ ld(receiver, GlobalObjectOperand());
__ ld(receiver, FieldMemOperand(receiver, GlobalObject::kBuiltinsOffset));
__ push(receiver);
// Load the function from the receiver.
__ li(LoadIC::NameRegister(), Operand(expr->name()));
__ li(LoadConvention::NameRegister(), Operand(expr->name()));
if (FLAG_vector_ics) {
__ li(LoadIC::SlotRegister(),
__ li(VectorLoadConvention::SlotRegister(),
Operand(Smi::FromInt(expr->CallRuntimeFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL);
} else {
@ -4286,13 +4289,14 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
if (assign_type == NAMED_PROPERTY) {
// Put the object both on the stack and in the register.
VisitForStackValue(prop->obj());
__ ld(LoadIC::ReceiverRegister(), MemOperand(sp, 0));
__ ld(LoadConvention::ReceiverRegister(), MemOperand(sp, 0));
EmitNamedPropertyLoad(prop);
} else {
VisitForStackValue(prop->obj());
VisitForStackValue(prop->key());
__ ld(LoadIC::ReceiverRegister(), MemOperand(sp, 1 * kPointerSize));
__ ld(LoadIC::NameRegister(), MemOperand(sp, 0));
__ ld(LoadConvention::ReceiverRegister(),
MemOperand(sp, 1 * kPointerSize));
__ ld(LoadConvention::NameRegister(), MemOperand(sp, 0));
EmitKeyedPropertyLoad(prop);
}
}
@ -4403,10 +4407,10 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
}
break;
case NAMED_PROPERTY: {
__ mov(StoreIC::ValueRegister(), result_register());
__ li(StoreIC::NameRegister(),
__ mov(StoreConvention::ValueRegister(), result_register());
__ li(StoreConvention::NameRegister(),
Operand(prop->key()->AsLiteral()->value()));
__ pop(StoreIC::ReceiverRegister());
__ pop(StoreConvention::ReceiverRegister());
CallStoreIC(expr->CountStoreFeedbackId());
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG);
if (expr->is_postfix()) {
@ -4419,8 +4423,9 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
break;
}
case KEYED_PROPERTY: {
__ mov(KeyedStoreIC::ValueRegister(), result_register());
__ Pop(KeyedStoreIC::ReceiverRegister(), KeyedStoreIC::NameRegister());
__ mov(StoreConvention::ValueRegister(), result_register());
__ Pop(StoreConvention::ReceiverRegister(),
StoreConvention::NameRegister());
Handle<Code> ic = strict_mode() == SLOPPY
? isolate()->builtins()->KeyedStoreIC_Initialize()
: isolate()->builtins()->KeyedStoreIC_Initialize_Strict();
@ -4445,10 +4450,10 @@ void FullCodeGenerator::VisitForTypeofValue(Expression* expr) {
VariableProxy* proxy = expr->AsVariableProxy();
if (proxy != NULL && proxy->var()->IsUnallocated()) {
Comment cmnt(masm_, "[ Global variable");
__ ld(LoadIC::ReceiverRegister(), GlobalObjectOperand());
__ li(LoadIC::NameRegister(), Operand(proxy->name()));
__ ld(LoadConvention::ReceiverRegister(), GlobalObjectOperand());
__ li(LoadConvention::NameRegister(), Operand(proxy->name()));
if (FLAG_vector_ics) {
__ li(LoadIC::SlotRegister(),
__ li(VectorLoadConvention::SlotRegister(),
Operand(Smi::FromInt(proxy->VariableFeedbackSlot())));
}
// Use a regular load, not a contextual load, to avoid a reference

View File

@ -2869,21 +2869,22 @@ template <class T>
void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
DCHECK(FLAG_vector_ics);
Register vector = ToRegister(instr->temp_vector());
DCHECK(vector.is(LoadIC::VectorRegister()));
DCHECK(vector.is(FullVectorLoadConvention::VectorRegister()));
__ li(vector, instr->hydrogen()->feedback_vector());
// No need to allocate this register.
DCHECK(LoadIC::SlotRegister().is(a0));
__ li(LoadIC::SlotRegister(),
DCHECK(FullVectorLoadConvention::SlotRegister().is(a0));
__ li(FullVectorLoadConvention::SlotRegister(),
Operand(Smi::FromInt(instr->hydrogen()->slot())));
}
void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->global_object()).is(LoadIC::ReceiverRegister()));
DCHECK(ToRegister(instr->global_object())
.is(LoadConvention::ReceiverRegister()));
DCHECK(ToRegister(instr->result()).is(v0));
__ li(LoadIC::NameRegister(), Operand(instr->name()));
__ li(LoadConvention::NameRegister(), Operand(instr->name()));
if (FLAG_vector_ics) {
EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
}
@ -3021,11 +3022,11 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->object()).is(LoadIC::ReceiverRegister()));
DCHECK(ToRegister(instr->object()).is(LoadConvention::ReceiverRegister()));
DCHECK(ToRegister(instr->result()).is(v0));
// Name is always in a2.
__ li(LoadIC::NameRegister(), Operand(instr->name()));
__ li(LoadConvention::NameRegister(), Operand(instr->name()));
if (FLAG_vector_ics) {
EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
}
@ -3371,8 +3372,8 @@ MemOperand LCodeGen::PrepareKeyedOperand(Register key,
void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->object()).is(LoadIC::ReceiverRegister()));
DCHECK(ToRegister(instr->key()).is(LoadIC::NameRegister()));
DCHECK(ToRegister(instr->object()).is(LoadConvention::ReceiverRegister()));
DCHECK(ToRegister(instr->key()).is(LoadConvention::NameRegister()));
if (FLAG_vector_ics) {
EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
@ -4193,10 +4194,10 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->object()).is(StoreIC::ReceiverRegister()));
DCHECK(ToRegister(instr->value()).is(StoreIC::ValueRegister()));
DCHECK(ToRegister(instr->object()).is(StoreConvention::ReceiverRegister()));
DCHECK(ToRegister(instr->value()).is(StoreConvention::ValueRegister()));
__ li(StoreIC::NameRegister(), Operand(instr->name()));
__ li(StoreConvention::NameRegister(), Operand(instr->name()));
Handle<Code> ic = StoreIC::initialize_stub(isolate(), instr->strict_mode());
CallCode(ic, RelocInfo::CODE_TARGET, instr);
}
@ -4457,9 +4458,9 @@ void LCodeGen::DoStoreKeyed(LStoreKeyed* instr) {
void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->object()).is(KeyedStoreIC::ReceiverRegister()));
DCHECK(ToRegister(instr->key()).is(KeyedStoreIC::NameRegister()));
DCHECK(ToRegister(instr->value()).is(KeyedStoreIC::ValueRegister()));
DCHECK(ToRegister(instr->object()).is(StoreConvention::ReceiverRegister()));
DCHECK(ToRegister(instr->key()).is(StoreConvention::NameRegister()));
DCHECK(ToRegister(instr->value()).is(StoreConvention::ValueRegister()));
Handle<Code> ic = (instr->strict_mode() == STRICT)
? isolate()->builtins()->KeyedStoreIC_Initialize_Strict()

View File

@ -2049,11 +2049,11 @@ LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) {
LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp);
LOperand* global_object = UseFixed(instr->global_object(),
LoadIC::ReceiverRegister());
LOperand* global_object =
UseFixed(instr->global_object(), LoadConvention::ReceiverRegister());
LOperand* vector = NULL;
if (FLAG_vector_ics) {
vector = FixedTemp(LoadIC::VectorRegister());
vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
}
LLoadGlobalGeneric* result =
new(zone()) LLoadGlobalGeneric(context, global_object, vector);
@ -2108,10 +2108,11 @@ LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) {
LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp);
LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister());
LOperand* object =
UseFixed(instr->object(), LoadConvention::ReceiverRegister());
LOperand* vector = NULL;
if (FLAG_vector_ics) {
vector = FixedTemp(LoadIC::VectorRegister());
vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
}
LInstruction* result =
@ -2174,11 +2175,12 @@ LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) {
LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp);
LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister());
LOperand* key = UseFixed(instr->key(), LoadIC::NameRegister());
LOperand* object =
UseFixed(instr->object(), LoadConvention::ReceiverRegister());
LOperand* key = UseFixed(instr->key(), LoadConvention::NameRegister());
LOperand* vector = NULL;
if (FLAG_vector_ics) {
vector = FixedTemp(LoadIC::VectorRegister());
vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
}
LInstruction* result =
@ -2235,9 +2237,10 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp);
LOperand* obj = UseFixed(instr->object(), KeyedStoreIC::ReceiverRegister());
LOperand* key = UseFixed(instr->key(), KeyedStoreIC::NameRegister());
LOperand* val = UseFixed(instr->value(), KeyedStoreIC::ValueRegister());
LOperand* obj =
UseFixed(instr->object(), StoreConvention::ReceiverRegister());
LOperand* key = UseFixed(instr->key(), StoreConvention::NameRegister());
LOperand* val = UseFixed(instr->value(), StoreConvention::ValueRegister());
DCHECK(instr->object()->representation().IsTagged());
DCHECK(instr->key()->representation().IsTagged());
@ -2311,8 +2314,9 @@ LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp);
LOperand* obj = UseFixed(instr->object(), StoreIC::ReceiverRegister());
LOperand* val = UseFixed(instr->value(), StoreIC::ValueRegister());
LOperand* obj =
UseFixed(instr->object(), StoreConvention::ReceiverRegister());
LOperand* val = UseFixed(instr->value(), StoreConvention::ValueRegister());
LInstruction* result = new(zone()) LStoreNamedGeneric(context, obj, val);
return MarkAsCall(result, instr);

View File

@ -966,6 +966,7 @@
'../../src/ic/mips/handler-compiler-mips.cc',
'../../src/ic/mips/ic-mips.cc',
'../../src/ic/mips/ic-compiler-mips.cc',
'../../src/ic/mips/ic-conventions-mips.cc',
'../../src/ic/mips/stub-cache-mips.cc',
],
}],
@ -1003,6 +1004,7 @@
'../../src/ic/mips64/handler-compiler-mips64.cc',
'../../src/ic/mips64/ic-mips64.cc',
'../../src/ic/mips64/ic-compiler-mips64.cc',
'../../src/ic/mips64/ic-conventions-mips64.cc',
'../../src/ic/mips64/stub-cache-mips64.cc',
],
}],