OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
881 (current->property_dictionary()->FindEntry(*name) == | 881 (current->property_dictionary()->FindEntry(*name) == |
882 NameDictionary::kNotFound)); | 882 NameDictionary::kNotFound)); |
883 | 883 |
884 GenerateDictionaryNegativeLookup(masm(), miss, reg, name, | 884 GenerateDictionaryNegativeLookup(masm(), miss, reg, name, |
885 scratch1, scratch2); | 885 scratch1, scratch2); |
886 | 886 |
887 __ Ldr(scratch1, FieldMemOperand(reg, HeapObject::kMapOffset)); | 887 __ Ldr(scratch1, FieldMemOperand(reg, HeapObject::kMapOffset)); |
888 reg = holder_reg; // From now on the object will be in holder_reg. | 888 reg = holder_reg; // From now on the object will be in holder_reg. |
889 __ Ldr(reg, FieldMemOperand(scratch1, Map::kPrototypeOffset)); | 889 __ Ldr(reg, FieldMemOperand(scratch1, Map::kPrototypeOffset)); |
890 } else { | 890 } else { |
891 Register map_reg = scratch1; | 891 bool need_map = (depth != 1 || check == CHECK_ALL_MAPS) || |
892 // TODO(jbramley): Skip this load when we don't need the map. | 892 heap()->InNewSpace(*prototype); |
893 __ Ldr(map_reg, FieldMemOperand(reg, HeapObject::kMapOffset)); | 893 Register map_reg = NoReg; |
| 894 if (need_map) { |
| 895 map_reg = scratch1; |
| 896 __ Ldr(map_reg, FieldMemOperand(reg, HeapObject::kMapOffset)); |
| 897 } |
894 | 898 |
895 if (depth != 1 || check == CHECK_ALL_MAPS) { | 899 if (depth != 1 || check == CHECK_ALL_MAPS) { |
896 __ CheckMap(map_reg, current_map, miss, DONT_DO_SMI_CHECK); | 900 __ CheckMap(map_reg, current_map, miss, DONT_DO_SMI_CHECK); |
897 } | 901 } |
898 | 902 |
899 // Check access rights to the global object. This has to happen after | 903 // Check access rights to the global object. This has to happen after |
900 // the map check so that we know that the object is actually a global | 904 // the map check so that we know that the object is actually a global |
901 // object. | 905 // object. |
902 if (current_map->IsJSGlobalProxyMap()) { | 906 if (current_map->IsJSGlobalProxyMap()) { |
903 __ CheckAccessGlobalProxy(reg, scratch2, miss); | 907 __ CheckAccessGlobalProxy(reg, scratch2, miss); |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1535 | 1539 |
1536 // Miss case, call the runtime. | 1540 // Miss case, call the runtime. |
1537 __ Bind(&miss); | 1541 __ Bind(&miss); |
1538 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 1542 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
1539 } | 1543 } |
1540 | 1544 |
1541 | 1545 |
1542 } } // namespace v8::internal | 1546 } } // namespace v8::internal |
1543 | 1547 |
1544 #endif // V8_TARGET_ARCH_A64 | 1548 #endif // V8_TARGET_ARCH_A64 |
OLD | NEW |