| 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 875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 886 if (current_map->IsJSGlobalProxyMap()) { | 886 if (current_map->IsJSGlobalProxyMap()) { |
| 887 __ CheckAccessGlobalProxy(reg, scratch2, miss); | 887 __ CheckAccessGlobalProxy(reg, scratch2, miss); |
| 888 } else if (current_map->IsJSGlobalObjectMap()) { | 888 } else if (current_map->IsJSGlobalObjectMap()) { |
| 889 GenerateCheckPropertyCell( | 889 GenerateCheckPropertyCell( |
| 890 masm(), Handle<JSGlobalObject>::cast(current), name, | 890 masm(), Handle<JSGlobalObject>::cast(current), name, |
| 891 scratch2, miss); | 891 scratch2, miss); |
| 892 } | 892 } |
| 893 | 893 |
| 894 reg = holder_reg; // From now on the object will be in holder_reg. | 894 reg = holder_reg; // From now on the object will be in holder_reg. |
| 895 | 895 |
| 896 if (heap()->InNewSpace(*prototype)) { | 896 // Two possible reasons for loading the prototype from the map: |
| 897 // The prototype is in new space; we cannot store a reference to it | 897 // (1) Can't store references to new space in code. |
| 898 // in the code. Load it from the map. | 898 // (2) Handler is shared for all receivers with the same prototype |
| 899 // map (but not necessarily the same prototype instance). |
| 900 bool load_prototype_from_map = |
| 901 heap()->InNewSpace(*prototype) || depth == 1; |
| 902 if (load_prototype_from_map) { |
| 899 __ ldr(reg, FieldMemOperand(map_reg, Map::kPrototypeOffset)); | 903 __ ldr(reg, FieldMemOperand(map_reg, Map::kPrototypeOffset)); |
| 900 } else { | 904 } else { |
| 901 // The prototype is in old space; load it directly. | |
| 902 __ mov(reg, Operand(prototype)); | 905 __ mov(reg, Operand(prototype)); |
| 903 } | 906 } |
| 904 } | 907 } |
| 905 | 908 |
| 906 // Go to the next object in the prototype chain. | 909 // Go to the next object in the prototype chain. |
| 907 current = prototype; | 910 current = prototype; |
| 908 current_map = handle(current->map()); | 911 current_map = handle(current->map()); |
| 909 } | 912 } |
| 910 | 913 |
| 911 // Log the check depth. | 914 // Log the check depth. |
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1506 | 1509 |
| 1507 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 1510 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
| 1508 } | 1511 } |
| 1509 | 1512 |
| 1510 | 1513 |
| 1511 #undef __ | 1514 #undef __ |
| 1512 | 1515 |
| 1513 } } // namespace v8::internal | 1516 } } // namespace v8::internal |
| 1514 | 1517 |
| 1515 #endif // V8_TARGET_ARCH_ARM | 1518 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |