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

Side by Side Diff: src/arm64/stub-cache-arm64.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/arm/stub-cache-arm.cc ('k') | src/ia32/stub-cache-ia32.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 7 #if V8_TARGET_ARCH_ARM64
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 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 while (!current_map.is_identical_to(holder_map)) { 684 while (!current_map.is_identical_to(holder_map)) {
685 ++depth; 685 ++depth;
686 686
687 // Only global objects and objects that do not require access 687 // Only global objects and objects that do not require access
688 // checks are allowed in stubs. 688 // checks are allowed in stubs.
689 DCHECK(current_map->IsJSGlobalProxyMap() || 689 DCHECK(current_map->IsJSGlobalProxyMap() ||
690 !current_map->is_access_check_needed()); 690 !current_map->is_access_check_needed());
691 691
692 prototype = handle(JSObject::cast(current_map->prototype())); 692 prototype = handle(JSObject::cast(current_map->prototype()));
693 if (current_map->is_dictionary_map() && 693 if (current_map->is_dictionary_map() &&
694 !current_map->IsJSGlobalObjectMap() && 694 !current_map->IsJSGlobalObjectMap()) {
695 !current_map->IsJSGlobalProxyMap()) { 695 DCHECK(!current_map->IsJSGlobalProxyMap()); // Proxy maps are fast.
696 if (!name->IsUniqueName()) { 696 if (!name->IsUniqueName()) {
697 DCHECK(name->IsString()); 697 DCHECK(name->IsString());
698 name = factory()->InternalizeString(Handle<String>::cast(name)); 698 name = factory()->InternalizeString(Handle<String>::cast(name));
699 } 699 }
700 DCHECK(current.is_null() || 700 DCHECK(current.is_null() ||
701 (current->property_dictionary()->FindEntry(name) == 701 (current->property_dictionary()->FindEntry(name) ==
702 NameDictionary::kNotFound)); 702 NameDictionary::kNotFound));
703 703
704 GenerateDictionaryNegativeLookup(masm(), miss, reg, name, 704 GenerateDictionaryNegativeLookup(masm(), miss, reg, name,
705 scratch1, scratch2); 705 scratch1, scratch2);
(...skipping 11 matching lines...) Expand all
717 Register map_reg = scratch1; 717 Register map_reg = scratch1;
718 __ Ldr(map_reg, FieldMemOperand(reg, HeapObject::kMapOffset)); 718 __ Ldr(map_reg, FieldMemOperand(reg, HeapObject::kMapOffset));
719 719
720 if (depth != 1 || check == CHECK_ALL_MAPS) { 720 if (depth != 1 || check == CHECK_ALL_MAPS) {
721 __ CheckMap(map_reg, current_map, miss, DONT_DO_SMI_CHECK); 721 __ CheckMap(map_reg, current_map, miss, DONT_DO_SMI_CHECK);
722 } 722 }
723 723
724 // Check access rights to the global object. This has to happen after 724 // Check access rights to the global object. This has to happen after
725 // the map check so that we know that the object is actually a global 725 // the map check so that we know that the object is actually a global
726 // object. 726 // object.
727 // This allows us to install generated handlers for accesses to the
728 // global proxy (as opposed to using slow ICs). See corresponding code
729 // in LookupForRead().
727 if (current_map->IsJSGlobalProxyMap()) { 730 if (current_map->IsJSGlobalProxyMap()) {
728 UseScratchRegisterScope temps(masm()); 731 UseScratchRegisterScope temps(masm());
729 __ CheckAccessGlobalProxy(reg, scratch2, temps.AcquireX(), miss); 732 __ CheckAccessGlobalProxy(reg, scratch2, temps.AcquireX(), miss);
730 } else if (current_map->IsJSGlobalObjectMap()) { 733 } else if (current_map->IsJSGlobalObjectMap()) {
731 GenerateCheckPropertyCell( 734 GenerateCheckPropertyCell(
732 masm(), Handle<JSGlobalObject>::cast(current), name, 735 masm(), Handle<JSGlobalObject>::cast(current), name,
733 scratch2, miss); 736 scratch2, miss);
734 } 737 }
735 738
736 reg = holder_reg; // From now on the object will be in holder_reg. 739 reg = holder_reg; // From now on the object will be in holder_reg.
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
1298 1301
1299 // Miss case, call the runtime. 1302 // Miss case, call the runtime.
1300 __ Bind(&miss); 1303 __ Bind(&miss);
1301 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 1304 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
1302 } 1305 }
1303 1306
1304 1307
1305 } } // namespace v8::internal 1308 } } // namespace v8::internal
1306 1309
1307 #endif // V8_TARGET_ARCH_ARM64 1310 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698