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

Side by Side Diff: src/mips64/stub-cache-mips64.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/mips/stub-cache-mips.cc ('k') | src/stub-cache.h » ('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_MIPS64 7 #if V8_TARGET_ARCH_MIPS64
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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 Register scratch, Label* miss) { 274 Register scratch, Label* miss) {
275 Handle<Cell> cell = JSGlobalObject::EnsurePropertyCell(global, name); 275 Handle<Cell> cell = JSGlobalObject::EnsurePropertyCell(global, name);
276 ASSERT(cell->value()->IsTheHole()); 276 ASSERT(cell->value()->IsTheHole());
277 __ li(scratch, Operand(cell)); 277 __ li(scratch, Operand(cell));
278 __ ld(scratch, FieldMemOperand(scratch, Cell::kValueOffset)); 278 __ ld(scratch, FieldMemOperand(scratch, Cell::kValueOffset));
279 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); 279 __ LoadRoot(at, Heap::kTheHoleValueRootIndex);
280 __ Branch(miss, ne, scratch, Operand(at)); 280 __ Branch(miss, ne, scratch, Operand(at));
281 } 281 }
282 282
283 283
284 void NamedStoreHandlerCompiler::GenerateNegativeHolderLookup(
285 MacroAssembler* masm, Handle<JSObject> holder, Register holder_reg,
286 Handle<Name> name, Label* miss) {
287 if (holder->IsJSGlobalObject()) {
288 GenerateCheckPropertyCell(
289 masm, Handle<JSGlobalObject>::cast(holder), name, scratch1(), miss);
290 } else if (!holder->HasFastProperties() && !holder->IsJSGlobalProxy()) {
291 GenerateDictionaryNegativeLookup(
292 masm, miss, holder_reg, name, scratch1(), scratch2());
293 }
294 }
295
296
297 // Generate StoreTransition code, value is passed in a0 register. 284 // Generate StoreTransition code, value is passed in a0 register.
298 // After executing generated code, the receiver_reg and name_reg 285 // After executing generated code, the receiver_reg and name_reg
299 // may be clobbered. 286 // may be clobbered.
300 void NamedStoreHandlerCompiler::GenerateStoreTransition( 287 void NamedStoreHandlerCompiler::GenerateStoreTransition(
301 MacroAssembler* masm, LookupResult* lookup, Handle<Map> transition, 288 MacroAssembler* masm, LookupResult* lookup, Handle<Map> transition,
302 Handle<Name> name, Register receiver_reg, Register storage_reg, 289 Handle<Name> name, Register receiver_reg, Register storage_reg,
303 Register value_reg, Register scratch1, Register scratch2, Register scratch3, 290 Register value_reg, Register scratch1, Register scratch2, Register scratch3,
304 Label* miss_label, Label* slow) { 291 Label* miss_label, Label* slow) {
305 // a0 : value. 292 // a0 : value.
306 Label exit; 293 Label exit;
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after
1124 // Do tail-call to the runtime system. 1111 // Do tail-call to the runtime system.
1125 ExternalReference store_ic_property = ExternalReference( 1112 ExternalReference store_ic_property = ExternalReference(
1126 IC_Utility(IC::kStorePropertyWithInterceptor), isolate()); 1113 IC_Utility(IC::kStorePropertyWithInterceptor), isolate());
1127 __ TailCallExternalReference(store_ic_property, 3, 1); 1114 __ TailCallExternalReference(store_ic_property, 3, 1);
1128 1115
1129 // Return the generated code. 1116 // Return the generated code.
1130 return GetCode(kind(), Code::FAST, name); 1117 return GetCode(kind(), Code::FAST, name);
1131 } 1118 }
1132 1119
1133 1120
1134 Handle<Code> NamedLoadHandlerCompiler::CompileLoadNonexistent(
1135 Handle<Name> name) {
1136 NonexistentFrontend(name);
1137
1138 // Return undefined if maps of the full prototype chain is still the same.
1139 __ LoadRoot(v0, Heap::kUndefinedValueRootIndex);
1140 __ Ret();
1141
1142 // Return the generated code.
1143 return GetCode(kind(), Code::FAST, name);
1144 }
1145
1146
1147 Register* PropertyAccessCompiler::load_calling_convention() { 1121 Register* PropertyAccessCompiler::load_calling_convention() {
1148 // receiver, name, scratch1, scratch2, scratch3, scratch4. 1122 // receiver, name, scratch1, scratch2, scratch3, scratch4.
1149 Register receiver = LoadIC::ReceiverRegister(); 1123 Register receiver = LoadIC::ReceiverRegister();
1150 Register name = LoadIC::NameRegister(); 1124 Register name = LoadIC::NameRegister();
1151 static Register registers[] = { receiver, name, a3, a0, a4, a5 }; 1125 static Register registers[] = { receiver, name, a3, a0, a4, a5 };
1152 return registers; 1126 return registers;
1153 } 1127 }
1154 1128
1155 1129
1156 Register* PropertyAccessCompiler::store_calling_convention() { 1130 Register* PropertyAccessCompiler::store_calling_convention() {
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
1371 1345
1372 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 1346 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
1373 } 1347 }
1374 1348
1375 1349
1376 #undef __ 1350 #undef __
1377 1351
1378 } } // namespace v8::internal 1352 } } // namespace v8::internal
1379 1353
1380 #endif // V8_TARGET_ARCH_MIPS64 1354 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/stub-cache-mips.cc ('k') | src/stub-cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698