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

Side by Side Diff: src/ia32/stub-cache-ia32.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/arm64/stub-cache-arm64.cc ('k') | src/ic.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_IA32 7 #if V8_TARGET_ARCH_IA32
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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 403
404 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, 404 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label,
405 Handle<Name> name) { 405 Handle<Name> name) {
406 if (!label->is_unused()) { 406 if (!label->is_unused()) {
407 __ bind(label); 407 __ bind(label);
408 __ mov(this->name(), Immediate(name)); 408 __ mov(this->name(), Immediate(name));
409 } 409 }
410 } 410 }
411 411
412 412
413 void NamedStoreHandlerCompiler::GenerateNegativeHolderLookup(
414 Register holder_reg, Handle<Name> name, Label* miss) {
415 if (holder()->IsJSGlobalObject()) {
416 GenerateCheckPropertyCell(masm(), Handle<JSGlobalObject>::cast(holder()),
417 name, scratch1(), miss);
418 } else if (!holder()->HasFastProperties()) {
419 GenerateDictionaryNegativeLookup(masm(), miss, holder_reg, name, scratch1(),
420 scratch2());
421 }
422 }
423
424
425 // Receiver_reg is preserved on jumps to miss_label, but may be destroyed if 413 // Receiver_reg is preserved on jumps to miss_label, but may be destroyed if
426 // store is successful. 414 // store is successful.
427 void NamedStoreHandlerCompiler::GenerateStoreTransition( 415 void NamedStoreHandlerCompiler::GenerateStoreTransition(
428 Handle<Map> transition, Handle<Name> name, Register receiver_reg, 416 Handle<Map> transition, Handle<Name> name, Register receiver_reg,
429 Register storage_reg, Register value_reg, Register scratch1, 417 Register storage_reg, Register value_reg, Register scratch1,
430 Register scratch2, Register unused, Label* miss_label, Label* slow) { 418 Register scratch2, Register unused, Label* miss_label, Label* slow) {
431 int descriptor = transition->LastAdded(); 419 int descriptor = transition->LastAdded();
432 DescriptorArray* descriptors = transition->instance_descriptors(); 420 DescriptorArray* descriptors = transition->instance_descriptors();
433 PropertyDetails details = descriptors->GetDetails(descriptor); 421 PropertyDetails details = descriptors->GetDetails(descriptor);
434 Representation representation = details.representation(); 422 Representation representation = details.representation();
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
1144 } 1132 }
1145 } 1133 }
1146 __ bind(&miss); 1134 __ bind(&miss);
1147 TailCallBuiltin(masm(), MissBuiltin(kind())); 1135 TailCallBuiltin(masm(), MissBuiltin(kind()));
1148 1136
1149 // Return the generated code. 1137 // Return the generated code.
1150 return GetCode(kind(), Code::NORMAL, factory()->empty_string(), POLYMORPHIC); 1138 return GetCode(kind(), Code::NORMAL, factory()->empty_string(), POLYMORPHIC);
1151 } 1139 }
1152 1140
1153 1141
1154 Handle<Code> NamedLoadHandlerCompiler::CompileLoadNonexistent(
1155 Handle<Name> name) {
1156 NonexistentFrontend(name);
1157
1158 // Return undefined if maps of the full prototype chain are still the
1159 // same and no global property with this name contains a value.
1160 __ mov(eax, isolate()->factory()->undefined_value());
1161 __ ret(0);
1162
1163 // Return the generated code.
1164 return GetCode(kind(), Code::FAST, name);
1165 }
1166
1167
1168 Register* PropertyAccessCompiler::load_calling_convention() { 1142 Register* PropertyAccessCompiler::load_calling_convention() {
1169 // receiver, name, scratch1, scratch2, scratch3, scratch4. 1143 // receiver, name, scratch1, scratch2, scratch3, scratch4.
1170 Register receiver = LoadIC::ReceiverRegister(); 1144 Register receiver = LoadIC::ReceiverRegister();
1171 Register name = LoadIC::NameRegister(); 1145 Register name = LoadIC::NameRegister();
1172 static Register registers[] = { receiver, name, ebx, eax, edi, no_reg }; 1146 static Register registers[] = { receiver, name, ebx, eax, edi, no_reg };
1173 return registers; 1147 return registers;
1174 } 1148 }
1175 1149
1176 1150
1177 Register* PropertyAccessCompiler::store_calling_convention() { 1151 Register* PropertyAccessCompiler::store_calling_convention() {
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
1364 // ----------------------------------- 1338 // -----------------------------------
1365 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 1339 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
1366 } 1340 }
1367 1341
1368 1342
1369 #undef __ 1343 #undef __
1370 1344
1371 } } // namespace v8::internal 1345 } } // namespace v8::internal
1372 1346
1373 #endif // V8_TARGET_ARCH_IA32 1347 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm64/stub-cache-arm64.cc ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698