OLD | NEW |
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 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
736 while (!current_map.is_identical_to(holder_map)) { | 736 while (!current_map.is_identical_to(holder_map)) { |
737 ++depth; | 737 ++depth; |
738 | 738 |
739 // Only global objects and objects that do not require access | 739 // Only global objects and objects that do not require access |
740 // checks are allowed in stubs. | 740 // checks are allowed in stubs. |
741 DCHECK(current_map->IsJSGlobalProxyMap() || | 741 DCHECK(current_map->IsJSGlobalProxyMap() || |
742 !current_map->is_access_check_needed()); | 742 !current_map->is_access_check_needed()); |
743 | 743 |
744 prototype = handle(JSObject::cast(current_map->prototype())); | 744 prototype = handle(JSObject::cast(current_map->prototype())); |
745 if (current_map->is_dictionary_map() && | 745 if (current_map->is_dictionary_map() && |
746 !current_map->IsJSGlobalObjectMap() && | 746 !current_map->IsJSGlobalObjectMap()) { |
747 !current_map->IsJSGlobalProxyMap()) { | 747 DCHECK(!current_map->IsJSGlobalProxyMap()); // Proxy maps are fast. |
748 if (!name->IsUniqueName()) { | 748 if (!name->IsUniqueName()) { |
749 DCHECK(name->IsString()); | 749 DCHECK(name->IsString()); |
750 name = factory()->InternalizeString(Handle<String>::cast(name)); | 750 name = factory()->InternalizeString(Handle<String>::cast(name)); |
751 } | 751 } |
752 DCHECK(current.is_null() || | 752 DCHECK(current.is_null() || |
753 current->property_dictionary()->FindEntry(name) == | 753 current->property_dictionary()->FindEntry(name) == |
754 NameDictionary::kNotFound); | 754 NameDictionary::kNotFound); |
755 | 755 |
756 GenerateDictionaryNegativeLookup(masm(), miss, reg, name, | 756 GenerateDictionaryNegativeLookup(masm(), miss, reg, name, |
757 scratch1, scratch2); | 757 scratch1, scratch2); |
(...skipping 12 matching lines...) Expand all Loading... |
770 if (depth != 1 || check == CHECK_ALL_MAPS) { | 770 if (depth != 1 || check == CHECK_ALL_MAPS) { |
771 // CheckMap implicitly loads the map of |reg| into |map_reg|. | 771 // CheckMap implicitly loads the map of |reg| into |map_reg|. |
772 __ CheckMap(reg, map_reg, current_map, miss, DONT_DO_SMI_CHECK); | 772 __ CheckMap(reg, map_reg, current_map, miss, DONT_DO_SMI_CHECK); |
773 } else { | 773 } else { |
774 __ ld(map_reg, FieldMemOperand(reg, HeapObject::kMapOffset)); | 774 __ ld(map_reg, FieldMemOperand(reg, HeapObject::kMapOffset)); |
775 } | 775 } |
776 | 776 |
777 // Check access rights to the global object. This has to happen after | 777 // Check access rights to the global object. This has to happen after |
778 // the map check so that we know that the object is actually a global | 778 // the map check so that we know that the object is actually a global |
779 // object. | 779 // object. |
| 780 // This allows us to install generated handlers for accesses to the |
| 781 // global proxy (as opposed to using slow ICs). See corresponding code |
| 782 // in LookupForRead(). |
780 if (current_map->IsJSGlobalProxyMap()) { | 783 if (current_map->IsJSGlobalProxyMap()) { |
781 __ CheckAccessGlobalProxy(reg, scratch2, miss); | 784 __ CheckAccessGlobalProxy(reg, scratch2, miss); |
782 } else if (current_map->IsJSGlobalObjectMap()) { | 785 } else if (current_map->IsJSGlobalObjectMap()) { |
783 GenerateCheckPropertyCell( | 786 GenerateCheckPropertyCell( |
784 masm(), Handle<JSGlobalObject>::cast(current), name, | 787 masm(), Handle<JSGlobalObject>::cast(current), name, |
785 scratch2, miss); | 788 scratch2, miss); |
786 } | 789 } |
787 | 790 |
788 reg = holder_reg; // From now on the object will be in holder_reg. | 791 reg = holder_reg; // From now on the object will be in holder_reg. |
789 | 792 |
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1332 | 1335 |
1333 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 1336 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
1334 } | 1337 } |
1335 | 1338 |
1336 | 1339 |
1337 #undef __ | 1340 #undef __ |
1338 | 1341 |
1339 } } // namespace v8::internal | 1342 } } // namespace v8::internal |
1340 | 1343 |
1341 #endif // V8_TARGET_ARCH_MIPS64 | 1344 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |