Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(190)

Side by Side Diff: src/mips/stub-cache-mips.cc

Issue 12374074: MIPS: Renamed "symbols" to "internalized strings" throughout the code base, in preparation of the i… (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.16
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 114
115 // Miss: fall through. 115 // Miss: fall through.
116 __ bind(&miss); 116 __ bind(&miss);
117 } 117 }
118 118
119 119
120 // Helper function used to check that the dictionary doesn't contain 120 // Helper function used to check that the dictionary doesn't contain
121 // the property. This function may return false negatives, so miss_label 121 // the property. This function may return false negatives, so miss_label
122 // must always call a backup property check that is complete. 122 // must always call a backup property check that is complete.
123 // This function is safe to call if the receiver has fast properties. 123 // This function is safe to call if the receiver has fast properties.
124 // Name must be a symbol and receiver must be a heap object. 124 // Name must be internalized and receiver must be a heap object.
125 static void GenerateDictionaryNegativeLookup(MacroAssembler* masm, 125 static void GenerateDictionaryNegativeLookup(MacroAssembler* masm,
126 Label* miss_label, 126 Label* miss_label,
127 Register receiver, 127 Register receiver,
128 Handle<String> name, 128 Handle<String> name,
129 Register scratch0, 129 Register scratch0,
130 Register scratch1) { 130 Register scratch1) {
131 ASSERT(name->IsSymbol()); 131 ASSERT(name->IsInternalizedString());
132 Counters* counters = masm->isolate()->counters(); 132 Counters* counters = masm->isolate()->counters();
133 __ IncrementCounter(counters->negative_lookups(), 1, scratch0, scratch1); 133 __ IncrementCounter(counters->negative_lookups(), 1, scratch0, scratch1);
134 __ IncrementCounter(counters->negative_lookups_miss(), 1, scratch0, scratch1); 134 __ IncrementCounter(counters->negative_lookups_miss(), 1, scratch0, scratch1);
135 135
136 Label done; 136 Label done;
137 137
138 const int kInterceptorOrAccessCheckNeededMask = 138 const int kInterceptorOrAccessCheckNeededMask =
139 (1 << Map::kHasNamedInterceptor) | (1 << Map::kIsAccessCheckNeeded); 139 (1 << Map::kHasNamedInterceptor) | (1 << Map::kIsAccessCheckNeeded);
140 140
141 // Bail out if the receiver has a named interceptor or requires access checks. 141 // Bail out if the receiver has a named interceptor or requires access checks.
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after
1096 ++depth; 1096 ++depth;
1097 1097
1098 // Only global objects and objects that do not require access 1098 // Only global objects and objects that do not require access
1099 // checks are allowed in stubs. 1099 // checks are allowed in stubs.
1100 ASSERT(current->IsJSGlobalProxy() || !current->IsAccessCheckNeeded()); 1100 ASSERT(current->IsJSGlobalProxy() || !current->IsAccessCheckNeeded());
1101 1101
1102 Handle<JSObject> prototype(JSObject::cast(current->GetPrototype())); 1102 Handle<JSObject> prototype(JSObject::cast(current->GetPrototype()));
1103 if (!current->HasFastProperties() && 1103 if (!current->HasFastProperties() &&
1104 !current->IsJSGlobalObject() && 1104 !current->IsJSGlobalObject() &&
1105 !current->IsJSGlobalProxy()) { 1105 !current->IsJSGlobalProxy()) {
1106 if (!name->IsSymbol()) { 1106 if (!name->IsInternalizedString()) {
1107 name = factory()->InternalizeString(name); 1107 name = factory()->InternalizeString(name);
1108 } 1108 }
1109 ASSERT(current->property_dictionary()->FindEntry(*name) == 1109 ASSERT(current->property_dictionary()->FindEntry(*name) ==
1110 StringDictionary::kNotFound); 1110 StringDictionary::kNotFound);
1111 1111
1112 GenerateDictionaryNegativeLookup(masm(), miss, reg, name, 1112 GenerateDictionaryNegativeLookup(masm(), miss, reg, name,
1113 scratch1, scratch2); 1113 scratch1, scratch2);
1114 1114
1115 __ lw(scratch1, FieldMemOperand(reg, HeapObject::kMapOffset)); 1115 __ lw(scratch1, FieldMemOperand(reg, HeapObject::kMapOffset));
1116 reg = holder_reg; // From now on the object will be in holder_reg. 1116 reg = holder_reg; // From now on the object will be in holder_reg.
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after
2052 STRING_INDEX_IS_NUMBER); 2052 STRING_INDEX_IS_NUMBER);
2053 generator.GenerateFast(masm()); 2053 generator.GenerateFast(masm());
2054 __ Drop(argc + 1); 2054 __ Drop(argc + 1);
2055 __ Ret(); 2055 __ Ret();
2056 2056
2057 StubRuntimeCallHelper call_helper; 2057 StubRuntimeCallHelper call_helper;
2058 generator.GenerateSlow(masm(), call_helper); 2058 generator.GenerateSlow(masm(), call_helper);
2059 2059
2060 if (index_out_of_range.is_linked()) { 2060 if (index_out_of_range.is_linked()) {
2061 __ bind(&index_out_of_range); 2061 __ bind(&index_out_of_range);
2062 __ LoadRoot(v0, Heap::kEmptyStringRootIndex); 2062 __ LoadRoot(v0, Heap::kempty_stringRootIndex);
2063 __ Drop(argc + 1); 2063 __ Drop(argc + 1);
2064 __ Ret(); 2064 __ Ret();
2065 } 2065 }
2066 2066
2067 __ bind(&miss); 2067 __ bind(&miss);
2068 // Restore function name in a2. 2068 // Restore function name in a2.
2069 __ li(a2, name); 2069 __ li(a2, name);
2070 __ bind(&name_miss); 2070 __ bind(&name_miss);
2071 GenerateMissBranch(); 2071 GenerateMissBranch();
2072 2072
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
2471 2471
2472 // Patch the receiver on the stack with the global proxy if 2472 // Patch the receiver on the stack with the global proxy if
2473 // necessary. 2473 // necessary.
2474 if (object->IsGlobalObject()) { 2474 if (object->IsGlobalObject()) {
2475 __ lw(a3, FieldMemOperand(a1, GlobalObject::kGlobalReceiverOffset)); 2475 __ lw(a3, FieldMemOperand(a1, GlobalObject::kGlobalReceiverOffset));
2476 __ sw(a3, MemOperand(sp, argc * kPointerSize)); 2476 __ sw(a3, MemOperand(sp, argc * kPointerSize));
2477 } 2477 }
2478 break; 2478 break;
2479 2479
2480 case STRING_CHECK: 2480 case STRING_CHECK:
2481 // Check that the object is a two-byte string or a symbol. 2481 // Check that the object is a string.
2482 __ GetObjectType(a1, a3, a3); 2482 __ GetObjectType(a1, a3, a3);
2483 __ Branch(&miss, Ugreater_equal, a3, Operand(FIRST_NONSTRING_TYPE)); 2483 __ Branch(&miss, Ugreater_equal, a3, Operand(FIRST_NONSTRING_TYPE));
2484 // Check that the maps starting from the prototype haven't changed. 2484 // Check that the maps starting from the prototype haven't changed.
2485 GenerateDirectLoadGlobalFunctionPrototype( 2485 GenerateDirectLoadGlobalFunctionPrototype(
2486 masm(), Context::STRING_FUNCTION_INDEX, a0, &miss); 2486 masm(), Context::STRING_FUNCTION_INDEX, a0, &miss);
2487 CheckPrototypes( 2487 CheckPrototypes(
2488 Handle<JSObject>(JSObject::cast(object->GetPrototype(isolate()))), 2488 Handle<JSObject>(JSObject::cast(object->GetPrototype(isolate()))),
2489 a0, holder, a3, a1, t0, name, &miss); 2489 a0, holder, a3, a1, t0, name, &miss);
2490 break; 2490 break;
2491 2491
(...skipping 1736 matching lines...) Expand 10 before | Expand all | Expand 10 after
4228 __ Jump(ic_slow, RelocInfo::CODE_TARGET); 4228 __ Jump(ic_slow, RelocInfo::CODE_TARGET);
4229 } 4229 }
4230 } 4230 }
4231 4231
4232 4232
4233 #undef __ 4233 #undef __
4234 4234
4235 } } // namespace v8::internal 4235 } } // namespace v8::internal
4236 4236
4237 #endif // V8_TARGET_ARCH_MIPS 4237 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698