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

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

Issue 446523002: Restore performance of accesses to JSGlobalProxy after r22802 (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/mips64/stub-cache-mips64.cc ('k') | src/x87/stub-cache-x87.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_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/arguments.h" 9 #include "src/arguments.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 while (!current_map.is_identical_to(holder_map)) { 644 while (!current_map.is_identical_to(holder_map)) {
645 ++depth; 645 ++depth;
646 646
647 // Only global objects and objects that do not require access 647 // Only global objects and objects that do not require access
648 // checks are allowed in stubs. 648 // checks are allowed in stubs.
649 DCHECK(current_map->IsJSGlobalProxyMap() || 649 DCHECK(current_map->IsJSGlobalProxyMap() ||
650 !current_map->is_access_check_needed()); 650 !current_map->is_access_check_needed());
651 651
652 prototype = handle(JSObject::cast(current_map->prototype())); 652 prototype = handle(JSObject::cast(current_map->prototype()));
653 if (current_map->is_dictionary_map() && 653 if (current_map->is_dictionary_map() &&
654 !current_map->IsJSGlobalObjectMap() && 654 !current_map->IsJSGlobalObjectMap()) {
655 !current_map->IsJSGlobalProxyMap()) { 655 DCHECK(!current_map->IsJSGlobalProxyMap()); // Proxy maps are fast.
656 if (!name->IsUniqueName()) { 656 if (!name->IsUniqueName()) {
657 DCHECK(name->IsString()); 657 DCHECK(name->IsString());
658 name = factory()->InternalizeString(Handle<String>::cast(name)); 658 name = factory()->InternalizeString(Handle<String>::cast(name));
659 } 659 }
660 DCHECK(current.is_null() || 660 DCHECK(current.is_null() ||
661 current->property_dictionary()->FindEntry(name) == 661 current->property_dictionary()->FindEntry(name) ==
662 NameDictionary::kNotFound); 662 NameDictionary::kNotFound);
663 663
664 GenerateDictionaryNegativeLookup(masm(), miss, reg, name, 664 GenerateDictionaryNegativeLookup(masm(), miss, reg, name,
665 scratch1, scratch2); 665 scratch1, scratch2);
(...skipping 12 matching lines...) Expand all
678 // Save the map in scratch1 for later. 678 // Save the map in scratch1 for later.
679 __ movp(scratch1, FieldOperand(reg, HeapObject::kMapOffset)); 679 __ movp(scratch1, FieldOperand(reg, HeapObject::kMapOffset));
680 } 680 }
681 if (depth != 1 || check == CHECK_ALL_MAPS) { 681 if (depth != 1 || check == CHECK_ALL_MAPS) {
682 __ CheckMap(reg, current_map, miss, DONT_DO_SMI_CHECK); 682 __ CheckMap(reg, current_map, miss, DONT_DO_SMI_CHECK);
683 } 683 }
684 684
685 // Check access rights to the global object. This has to happen after 685 // Check access rights to the global object. This has to happen after
686 // the map check so that we know that the object is actually a global 686 // the map check so that we know that the object is actually a global
687 // object. 687 // object.
688 // This allows us to install generated handlers for accesses to the
689 // global proxy (as opposed to using slow ICs). See corresponding code
690 // in LookupForRead().
688 if (current_map->IsJSGlobalProxyMap()) { 691 if (current_map->IsJSGlobalProxyMap()) {
689 __ CheckAccessGlobalProxy(reg, scratch2, miss); 692 __ CheckAccessGlobalProxy(reg, scratch2, miss);
690 } else if (current_map->IsJSGlobalObjectMap()) { 693 } else if (current_map->IsJSGlobalObjectMap()) {
691 GenerateCheckPropertyCell( 694 GenerateCheckPropertyCell(
692 masm(), Handle<JSGlobalObject>::cast(current), name, 695 masm(), Handle<JSGlobalObject>::cast(current), name,
693 scratch2, miss); 696 scratch2, miss);
694 } 697 }
695 reg = holder_reg; // From now on the object will be in holder_reg. 698 reg = holder_reg; // From now on the object will be in holder_reg.
696 699
697 if (load_prototype_from_map) { 700 if (load_prototype_from_map) {
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
1267 // ----------------------------------- 1270 // -----------------------------------
1268 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 1271 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
1269 } 1272 }
1270 1273
1271 1274
1272 #undef __ 1275 #undef __
1273 1276
1274 } } // namespace v8::internal 1277 } } // namespace v8::internal
1275 1278
1276 #endif // V8_TARGET_ARCH_X64 1279 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/mips64/stub-cache-mips64.cc ('k') | src/x87/stub-cache-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698