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

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

Issue 437953003: Reuse the nonexistent handler frontend for transition handlers (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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/ic.cc ('k') | src/mips64/stub-cache-mips64.cc » ('j') | 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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_MIPS 7 #if V8_TARGET_ARCH_MIPS
8 8
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/ic-inl.h" 10 #include "src/ic-inl.h"
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 Register scratch, Label* miss) { 273 Register scratch, Label* miss) {
274 Handle<Cell> cell = JSGlobalObject::EnsurePropertyCell(global, name); 274 Handle<Cell> cell = JSGlobalObject::EnsurePropertyCell(global, name);
275 ASSERT(cell->value()->IsTheHole()); 275 ASSERT(cell->value()->IsTheHole());
276 __ li(scratch, Operand(cell)); 276 __ li(scratch, Operand(cell));
277 __ lw(scratch, FieldMemOperand(scratch, Cell::kValueOffset)); 277 __ lw(scratch, FieldMemOperand(scratch, Cell::kValueOffset));
278 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); 278 __ LoadRoot(at, Heap::kTheHoleValueRootIndex);
279 __ Branch(miss, ne, scratch, Operand(at)); 279 __ Branch(miss, ne, scratch, Operand(at));
280 } 280 }
281 281
282 282
283 void NamedStoreHandlerCompiler::GenerateNegativeHolderLookup(
284 MacroAssembler* masm, Handle<JSObject> holder, Register holder_reg,
285 Handle<Name> name, Label* miss) {
286 if (holder->IsJSGlobalObject()) {
287 GenerateCheckPropertyCell(
288 masm, Handle<JSGlobalObject>::cast(holder), name, scratch1(), miss);
289 } else if (!holder->HasFastProperties() && !holder->IsJSGlobalProxy()) {
290 GenerateDictionaryNegativeLookup(
291 masm, miss, holder_reg, name, scratch1(), scratch2());
292 }
293 }
294
295
296 // Generate StoreTransition code, value is passed in a0 register. 283 // Generate StoreTransition code, value is passed in a0 register.
297 // After executing generated code, the receiver_reg and name_reg 284 // After executing generated code, the receiver_reg and name_reg
298 // may be clobbered. 285 // may be clobbered.
299 void NamedStoreHandlerCompiler::GenerateStoreTransition( 286 void NamedStoreHandlerCompiler::GenerateStoreTransition(
300 MacroAssembler* masm, LookupResult* lookup, Handle<Map> transition, 287 MacroAssembler* masm, LookupResult* lookup, Handle<Map> transition,
301 Handle<Name> name, Register receiver_reg, Register storage_reg, 288 Handle<Name> name, Register receiver_reg, Register storage_reg,
302 Register value_reg, Register scratch1, Register scratch2, Register scratch3, 289 Register value_reg, Register scratch1, Register scratch2, Register scratch3,
303 Label* miss_label, Label* slow) { 290 Label* miss_label, Label* slow) {
304 // a0 : value. 291 // a0 : value.
305 Label exit; 292 Label exit;
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after
1123 // Do tail-call to the runtime system. 1110 // Do tail-call to the runtime system.
1124 ExternalReference store_ic_property = ExternalReference( 1111 ExternalReference store_ic_property = ExternalReference(
1125 IC_Utility(IC::kStorePropertyWithInterceptor), isolate()); 1112 IC_Utility(IC::kStorePropertyWithInterceptor), isolate());
1126 __ TailCallExternalReference(store_ic_property, 3, 1); 1113 __ TailCallExternalReference(store_ic_property, 3, 1);
1127 1114
1128 // Return the generated code. 1115 // Return the generated code.
1129 return GetCode(kind(), Code::FAST, name); 1116 return GetCode(kind(), Code::FAST, name);
1130 } 1117 }
1131 1118
1132 1119
1133 Handle<Code> NamedLoadHandlerCompiler::CompileLoadNonexistent(
1134 Handle<Name> name) {
1135 NonexistentFrontend(name);
1136
1137 // Return undefined if maps of the full prototype chain is still the same.
1138 __ LoadRoot(v0, Heap::kUndefinedValueRootIndex);
1139 __ Ret();
1140
1141 // Return the generated code.
1142 return GetCode(kind(), Code::FAST, name);
1143 }
1144
1145
1146 Register* PropertyAccessCompiler::load_calling_convention() { 1120 Register* PropertyAccessCompiler::load_calling_convention() {
1147 // receiver, name, scratch1, scratch2, scratch3, scratch4. 1121 // receiver, name, scratch1, scratch2, scratch3, scratch4.
1148 Register receiver = LoadIC::ReceiverRegister(); 1122 Register receiver = LoadIC::ReceiverRegister();
1149 Register name = LoadIC::NameRegister(); 1123 Register name = LoadIC::NameRegister();
1150 static Register registers[] = { receiver, name, a3, a0, t0, t1 }; 1124 static Register registers[] = { receiver, name, a3, a0, t0, t1 };
1151 return registers; 1125 return registers;
1152 } 1126 }
1153 1127
1154 1128
1155 Register* PropertyAccessCompiler::store_calling_convention() { 1129 Register* PropertyAccessCompiler::store_calling_convention() {
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
1369 1343
1370 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 1344 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
1371 } 1345 }
1372 1346
1373 1347
1374 #undef __ 1348 #undef __
1375 1349
1376 } } // namespace v8::internal 1350 } } // namespace v8::internal
1377 1351
1378 #endif // V8_TARGET_ARCH_MIPS 1352 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ic.cc ('k') | src/mips64/stub-cache-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698