Index: src/mips/stub-cache-mips.cc |
diff --git a/src/mips/stub-cache-mips.cc b/src/mips/stub-cache-mips.cc |
index e931240639531be388afeaaec4ea7e08963bc4bc..ac6185d7411557b1f4709df1f7e3b3abdf29df20 100644 |
--- a/src/mips/stub-cache-mips.cc |
+++ b/src/mips/stub-cache-mips.cc |
@@ -121,14 +121,14 @@ static void ProbeTable(Isolate* isolate, |
// the property. This function may return false negatives, so miss_label |
// must always call a backup property check that is complete. |
// This function is safe to call if the receiver has fast properties. |
-// Name must be internalized and receiver must be a heap object. |
+// Name must be unique and receiver must be a heap object. |
static void GenerateDictionaryNegativeLookup(MacroAssembler* masm, |
Label* miss_label, |
Register receiver, |
- Handle<String> name, |
+ Handle<Name> name, |
Register scratch0, |
Register scratch1) { |
- ASSERT(name->IsInternalizedString()); |
+ ASSERT(name->IsUniqueName()); |
Counters* counters = masm->isolate()->counters(); |
__ IncrementCounter(counters->negative_lookups(), 1, scratch0, scratch1); |
__ IncrementCounter(counters->negative_lookups_miss(), 1, scratch0, scratch1); |
@@ -162,13 +162,13 @@ static void GenerateDictionaryNegativeLookup(MacroAssembler* masm, |
__ lw(properties, FieldMemOperand(receiver, JSObject::kPropertiesOffset)); |
- StringDictionaryLookupStub::GenerateNegativeLookup(masm, |
- miss_label, |
- &done, |
- receiver, |
- properties, |
- name, |
- scratch1); |
+ NameDictionaryLookupStub::GenerateNegativeLookup(masm, |
+ miss_label, |
+ &done, |
+ receiver, |
+ properties, |
+ name, |
+ scratch1); |
__ bind(&done); |
__ DecrementCounter(counters->negative_lookups_miss(), 1, scratch0, scratch1); |
} |
@@ -217,7 +217,7 @@ void StubCache::GenerateProbe(MacroAssembler* masm, |
__ JumpIfSmi(receiver, &miss); |
// Get the map of the receiver and compute the hash. |
- __ lw(scratch, FieldMemOperand(name, String::kHashFieldOffset)); |
+ __ lw(scratch, FieldMemOperand(name, Name::kHashFieldOffset)); |
__ lw(at, FieldMemOperand(receiver, HeapObject::kMapOffset)); |
__ Addu(scratch, scratch, at); |
uint32_t mask = kPrimaryTableSize - 1; |
@@ -430,7 +430,7 @@ void StubCompiler::GenerateStoreField(MacroAssembler* masm, |
Handle<JSObject> object, |
int index, |
Handle<Map> transition, |
- Handle<String> name, |
+ Handle<Name> name, |
Register receiver_reg, |
Register name_reg, |
Register scratch1, |
@@ -766,7 +766,7 @@ class CallInterceptorCompiler BASE_EMBEDDED { |
void Compile(MacroAssembler* masm, |
Handle<JSObject> object, |
Handle<JSObject> holder, |
- Handle<String> name, |
+ Handle<Name> name, |
LookupResult* lookup, |
Register receiver, |
Register scratch1, |
@@ -797,7 +797,7 @@ class CallInterceptorCompiler BASE_EMBEDDED { |
Register scratch3, |
Handle<JSObject> interceptor_holder, |
LookupResult* lookup, |
- Handle<String> name, |
+ Handle<Name> name, |
const CallOptimization& optimization, |
Label* miss_label) { |
ASSERT(optimization.is_constant_call()); |
@@ -952,7 +952,7 @@ class CallInterceptorCompiler BASE_EMBEDDED { |
// property. |
static void GenerateCheckPropertyCell(MacroAssembler* masm, |
Handle<GlobalObject> global, |
- Handle<String> name, |
+ Handle<Name> name, |
Register scratch, |
Label* miss) { |
Handle<JSGlobalPropertyCell> cell = |
@@ -971,7 +971,7 @@ static void GenerateCheckPropertyCell(MacroAssembler* masm, |
static void GenerateCheckPropertyCells(MacroAssembler* masm, |
Handle<JSObject> object, |
Handle<JSObject> holder, |
- Handle<String> name, |
+ Handle<Name> name, |
Register scratch, |
Label* miss) { |
Handle<JSObject> current = object; |
@@ -1079,7 +1079,7 @@ Register StubCompiler::CheckPrototypes(Handle<JSObject> object, |
Register holder_reg, |
Register scratch1, |
Register scratch2, |
- Handle<String> name, |
+ Handle<Name> name, |
int save_at_depth, |
Label* miss, |
PrototypeCheckType check) { |
@@ -1111,11 +1111,12 @@ Register StubCompiler::CheckPrototypes(Handle<JSObject> object, |
if (!current->HasFastProperties() && |
!current->IsJSGlobalObject() && |
!current->IsJSGlobalProxy()) { |
- if (!name->IsInternalizedString()) { |
- name = factory()->InternalizeString(name); |
+ if (!name->IsUniqueName()) { |
+ ASSERT(name->IsString()); |
+ name = factory()->InternalizeString(Handle<String>::cast(name)); |
} |
ASSERT(current->property_dictionary()->FindEntry(*name) == |
- StringDictionary::kNotFound); |
+ NameDictionary::kNotFound); |
GenerateDictionaryNegativeLookup(masm(), miss, reg, name, |
scratch1, scratch2); |
@@ -1198,7 +1199,7 @@ Register BaseLoadStubCompiler::CallbackHandlerFrontend( |
Handle<JSObject> object, |
Register object_reg, |
Handle<JSObject> holder, |
- Handle<String> name, |
+ Handle<Name> name, |
Label* success, |
Handle<ExecutableAccessorInfo> callback) { |
Label miss; |
@@ -1216,20 +1217,20 @@ Register BaseLoadStubCompiler::CallbackHandlerFrontend( |
// Probe the dictionary. |
Label probe_done; |
- StringDictionaryLookupStub::GeneratePositiveLookup(masm(), |
- &miss, |
- &probe_done, |
- dictionary, |
- this->name(), |
- scratch2(), |
- scratch3()); |
+ NameDictionaryLookupStub::GeneratePositiveLookup(masm(), |
+ &miss, |
+ &probe_done, |
+ dictionary, |
+ this->name(), |
+ scratch2(), |
+ scratch3()); |
__ bind(&probe_done); |
// If probing finds an entry in the dictionary, scratch3 contains the |
// pointer into the dictionary. Check that the value is the callback. |
Register pointer = scratch3(); |
- const int kElementsStartOffset = StringDictionary::kHeaderSize + |
- StringDictionary::kElementsStartIndex * kPointerSize; |
+ const int kElementsStartOffset = NameDictionary::kHeaderSize + |
+ NameDictionary::kElementsStartIndex * kPointerSize; |
const int kValueOffset = kElementsStartOffset + kPointerSize; |
__ lw(scratch2(), FieldMemOperand(pointer, kValueOffset)); |
__ Branch(&miss, ne, scratch2(), Operand(callback)); |
@@ -1243,7 +1244,7 @@ Register BaseLoadStubCompiler::CallbackHandlerFrontend( |
void BaseLoadStubCompiler::NonexistentHandlerFrontend( |
Handle<JSObject> object, |
Handle<JSObject> last, |
- Handle<String> name, |
+ Handle<Name> name, |
Label* success, |
Handle<GlobalObject> global) { |
Label miss; |
@@ -1305,7 +1306,7 @@ void BaseLoadStubCompiler::GenerateLoadCallback( |
__ sw(name(), MemOperand(sp, 0 * kPointerSize)); |
__ mov(a2, scratch2()); // Saved in case scratch2 == a1. |
- __ mov(a1, sp); // a1 (first argument - see note below) = Handle<String> |
+ __ mov(a1, sp); // a1 (first argument - see note below) = Handle<Name> |
// NOTE: the O32 abi requires a0 to hold a special pointer when returning a |
// struct from the function (which is currently the case). This means we pass |
@@ -1338,7 +1339,7 @@ void BaseLoadStubCompiler::GenerateLoadInterceptor( |
Handle<JSObject> object, |
Handle<JSObject> interceptor_holder, |
LookupResult* lookup, |
- Handle<String> name) { |
+ Handle<Name> name) { |
ASSERT(interceptor_holder->HasNamedInterceptor()); |
ASSERT(!interceptor_holder->GetNamedInterceptor()->getter()->IsUndefined()); |
@@ -1419,7 +1420,7 @@ void BaseLoadStubCompiler::GenerateLoadInterceptor( |
} |
-void CallStubCompiler::GenerateNameCheck(Handle<String> name, Label* miss) { |
+void CallStubCompiler::GenerateNameCheck(Handle<Name> name, Label* miss) { |
if (kind_ == Code::KEYED_CALL_IC) { |
__ Branch(miss, ne, a2, Operand(name)); |
} |
@@ -1428,7 +1429,7 @@ void CallStubCompiler::GenerateNameCheck(Handle<String> name, Label* miss) { |
void CallStubCompiler::GenerateGlobalReceiverCheck(Handle<JSObject> object, |
Handle<JSObject> holder, |
- Handle<String> name, |
+ Handle<Name> name, |
Label* miss) { |
ASSERT(holder->IsGlobalObject()); |
@@ -1485,7 +1486,7 @@ void CallStubCompiler::GenerateMissBranch() { |
Handle<Code> CallStubCompiler::CompileCallField(Handle<JSObject> object, |
Handle<JSObject> holder, |
PropertyIndex index, |
- Handle<String> name) { |
+ Handle<Name> name) { |
// ----------- S t a t e ------------- |
// -- a2 : name |
// -- ra : return address |
@@ -2395,7 +2396,7 @@ Handle<Code> CallStubCompiler::CompileFastApiCall( |
void CallStubCompiler::CompileHandlerFrontend(Handle<Object> object, |
Handle<JSObject> holder, |
- Handle<String> name, |
+ Handle<Name> name, |
CheckType check, |
Label* success) { |
// ----------- S t a t e ------------- |
@@ -2500,13 +2501,13 @@ void CallStubCompiler::CompileHandlerBackend(Handle<JSFunction> function) { |
Handle<Code> CallStubCompiler::CompileCallConstant( |
Handle<Object> object, |
Handle<JSObject> holder, |
- Handle<String> name, |
+ Handle<Name> name, |
CheckType check, |
Handle<JSFunction> function) { |
if (HasCustomCallGenerator(function)) { |
Handle<Code> code = CompileCustomCall(object, holder, |
Handle<JSGlobalPropertyCell>::null(), |
- function, name); |
+ function, Handle<String>::cast(name)); |
// A null handle means bail out to the regular compiler code below. |
if (!code.is_null()) return code; |
} |
@@ -2524,7 +2525,7 @@ Handle<Code> CallStubCompiler::CompileCallConstant( |
Handle<Code> CallStubCompiler::CompileCallInterceptor(Handle<JSObject> object, |
Handle<JSObject> holder, |
- Handle<String> name) { |
+ Handle<Name> name) { |
// ----------- S t a t e ------------- |
// -- a2 : name |
// -- ra : return address |
@@ -2567,14 +2568,15 @@ Handle<Code> CallStubCompiler::CompileCallGlobal( |
Handle<GlobalObject> holder, |
Handle<JSGlobalPropertyCell> cell, |
Handle<JSFunction> function, |
- Handle<String> name) { |
+ Handle<Name> name) { |
// ----------- S t a t e ------------- |
// -- a2 : name |
// -- ra : return address |
// ----------------------------------- |
if (HasCustomCallGenerator(function)) { |
- Handle<Code> code = CompileCustomCall(object, holder, cell, function, name); |
+ Handle<Code> code = CompileCustomCall( |
+ object, holder, cell, function, Handle<String>::cast(name)); |
// A null handle means bail out to the regular compiler code below. |
if (!code.is_null()) return code; |
} |
@@ -2624,7 +2626,7 @@ Handle<Code> CallStubCompiler::CompileCallGlobal( |
Handle<Code> StoreStubCompiler::CompileStoreField(Handle<JSObject> object, |
int index, |
Handle<Map> transition, |
- Handle<String> name) { |
+ Handle<Name> name) { |
// ----------- S t a t e ------------- |
// -- a0 : value |
// -- a1 : receiver |
@@ -2654,7 +2656,7 @@ Handle<Code> StoreStubCompiler::CompileStoreField(Handle<JSObject> object, |
Handle<Code> StoreStubCompiler::CompileStoreCallback( |
- Handle<String> name, |
+ Handle<Name> name, |
Handle<JSObject> receiver, |
Handle<JSObject> holder, |
Handle<ExecutableAccessorInfo> callback) { |
@@ -2740,7 +2742,7 @@ void StoreStubCompiler::GenerateStoreViaSetter( |
Handle<Code> StoreStubCompiler::CompileStoreViaSetter( |
- Handle<String> name, |
+ Handle<Name> name, |
Handle<JSObject> receiver, |
Handle<JSObject> holder, |
Handle<JSFunction> setter) { |
@@ -2769,7 +2771,7 @@ Handle<Code> StoreStubCompiler::CompileStoreViaSetter( |
Handle<Code> StoreStubCompiler::CompileStoreInterceptor( |
Handle<JSObject> receiver, |
- Handle<String> name) { |
+ Handle<Name> name) { |
// ----------- S t a t e ------------- |
// -- a0 : value |
// -- a1 : receiver |
@@ -2815,7 +2817,7 @@ Handle<Code> StoreStubCompiler::CompileStoreInterceptor( |
Handle<Code> StoreStubCompiler::CompileStoreGlobal( |
Handle<GlobalObject> object, |
Handle<JSGlobalPropertyCell> cell, |
- Handle<String> name) { |
+ Handle<Name> name) { |
// ----------- S t a t e ------------- |
// -- a0 : value |
// -- a1 : receiver |
@@ -2860,7 +2862,7 @@ Handle<Code> StoreStubCompiler::CompileStoreGlobal( |
Handle<Code> LoadStubCompiler::CompileLoadNonexistent( |
Handle<JSObject> object, |
Handle<JSObject> last, |
- Handle<String> name, |
+ Handle<Name> name, |
Handle<GlobalObject> global) { |
Label success; |
@@ -2890,7 +2892,7 @@ Register* KeyedLoadStubCompiler::registers() { |
} |
-void KeyedLoadStubCompiler::GenerateNameCheck(Handle<String> name, |
+void KeyedLoadStubCompiler::GenerateNameCheck(Handle<Name> name, |
Register name_reg, |
Label* miss) { |
__ Branch(miss, ne, name_reg, Operand(name)); |
@@ -2938,7 +2940,7 @@ Handle<Code> LoadStubCompiler::CompileLoadGlobal( |
Handle<JSObject> object, |
Handle<GlobalObject> global, |
Handle<JSGlobalPropertyCell> cell, |
- Handle<String> name, |
+ Handle<Name> name, |
bool is_dont_delete) { |
Label success, miss; |
@@ -3001,7 +3003,7 @@ Handle<Code> KeyedLoadStubCompiler::CompileLoadElement( |
Handle<Code> BaseLoadStubCompiler::CompilePolymorphicIC( |
MapHandleList* receiver_maps, |
CodeHandleList* handlers, |
- Handle<String> name, |
+ Handle<Name> name, |
Code::StubType type, |
IcCheckType check) { |
Label miss; |
@@ -3033,7 +3035,7 @@ Handle<Code> BaseLoadStubCompiler::CompilePolymorphicIC( |
Handle<Code> KeyedStoreStubCompiler::CompileStoreField(Handle<JSObject> object, |
int index, |
Handle<Map> transition, |
- Handle<String> name) { |
+ Handle<Name> name) { |
// ----------- S t a t e ------------- |
// -- a0 : value |
// -- a1 : key |