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 885 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
896 } | 896 } |
897 | 897 |
898 if (depth != 1 || check == CHECK_ALL_MAPS) { | 898 if (depth != 1 || check == CHECK_ALL_MAPS) { |
899 __ CheckMap(map_reg, current_map, miss, DONT_DO_SMI_CHECK); | 899 __ CheckMap(map_reg, current_map, miss, DONT_DO_SMI_CHECK); |
900 } | 900 } |
901 | 901 |
902 // Check access rights to the global object. This has to happen after | 902 // Check access rights to the global object. This has to happen after |
903 // the map check so that we know that the object is actually a global | 903 // the map check so that we know that the object is actually a global |
904 // object. | 904 // object. |
905 if (current_map->IsJSGlobalProxyMap()) { | 905 if (current_map->IsJSGlobalProxyMap()) { |
906 __ CheckAccessGlobalProxy(reg, scratch2, miss); | 906 UseScratchRegisterScope temps(masm()); |
| 907 __ CheckAccessGlobalProxy(reg, scratch2, temps.AcquireX(), miss); |
907 } else if (current_map->IsJSGlobalObjectMap()) { | 908 } else if (current_map->IsJSGlobalObjectMap()) { |
908 GenerateCheckPropertyCell( | 909 GenerateCheckPropertyCell( |
909 masm(), Handle<JSGlobalObject>::cast(current), name, | 910 masm(), Handle<JSGlobalObject>::cast(current), name, |
910 scratch2, miss); | 911 scratch2, miss); |
911 } | 912 } |
912 | 913 |
913 reg = holder_reg; // From now on the object will be in holder_reg. | 914 reg = holder_reg; // From now on the object will be in holder_reg. |
914 | 915 |
915 if (heap()->InNewSpace(*prototype)) { | 916 if (heap()->InNewSpace(*prototype)) { |
916 // The prototype is in new space; we cannot store a reference to it | 917 // The prototype is in new space; we cannot store a reference to it |
(...skipping 16 matching lines...) Expand all Loading... |
933 // Check the holder map. | 934 // Check the holder map. |
934 if (depth != 0 || check == CHECK_ALL_MAPS) { | 935 if (depth != 0 || check == CHECK_ALL_MAPS) { |
935 // Check the holder map. | 936 // Check the holder map. |
936 __ CheckMap(reg, scratch1, current_map, miss, DONT_DO_SMI_CHECK); | 937 __ CheckMap(reg, scratch1, current_map, miss, DONT_DO_SMI_CHECK); |
937 } | 938 } |
938 | 939 |
939 // Perform security check for access to the global object. | 940 // Perform security check for access to the global object. |
940 ASSERT(current_map->IsJSGlobalProxyMap() || | 941 ASSERT(current_map->IsJSGlobalProxyMap() || |
941 !current_map->is_access_check_needed()); | 942 !current_map->is_access_check_needed()); |
942 if (current_map->IsJSGlobalProxyMap()) { | 943 if (current_map->IsJSGlobalProxyMap()) { |
943 __ CheckAccessGlobalProxy(reg, scratch1, miss); | 944 __ CheckAccessGlobalProxy(reg, scratch1, scratch2, miss); |
944 } | 945 } |
945 | 946 |
946 // Return the register containing the holder. | 947 // Return the register containing the holder. |
947 return reg; | 948 return reg; |
948 } | 949 } |
949 | 950 |
950 | 951 |
951 void LoadStubCompiler::HandlerFrontendFooter(Handle<Name> name, Label* miss) { | 952 void LoadStubCompiler::HandlerFrontendFooter(Handle<Name> name, Label* miss) { |
952 if (!miss->is_unused()) { | 953 if (!miss->is_unused()) { |
953 Label success; | 954 Label success; |
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1539 | 1540 |
1540 // Miss case, call the runtime. | 1541 // Miss case, call the runtime. |
1541 __ Bind(&miss); | 1542 __ Bind(&miss); |
1542 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 1543 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
1543 } | 1544 } |
1544 | 1545 |
1545 | 1546 |
1546 } } // namespace v8::internal | 1547 } } // namespace v8::internal |
1547 | 1548 |
1548 #endif // V8_TARGET_ARCH_A64 | 1549 #endif // V8_TARGET_ARCH_A64 |
OLD | NEW |