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