| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 |
| 11 // with the distribution. | 11 // with the distribution. |
| (...skipping 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1012 StringDictionary::kNotFound); | 1012 StringDictionary::kNotFound); |
| 1013 | 1013 |
| 1014 GenerateDictionaryNegativeLookup(masm(), miss, reg, name, | 1014 GenerateDictionaryNegativeLookup(masm(), miss, reg, name, |
| 1015 scratch1, scratch2); | 1015 scratch1, scratch2); |
| 1016 | 1016 |
| 1017 __ ldr(scratch1, FieldMemOperand(reg, HeapObject::kMapOffset)); | 1017 __ ldr(scratch1, FieldMemOperand(reg, HeapObject::kMapOffset)); |
| 1018 reg = holder_reg; // From now on the object will be in holder_reg. | 1018 reg = holder_reg; // From now on the object will be in holder_reg. |
| 1019 __ ldr(reg, FieldMemOperand(scratch1, Map::kPrototypeOffset)); | 1019 __ ldr(reg, FieldMemOperand(scratch1, Map::kPrototypeOffset)); |
| 1020 } else { | 1020 } else { |
| 1021 Handle<Map> current_map(current->map()); | 1021 Handle<Map> current_map(current->map()); |
| 1022 __ CheckMap(reg, scratch1, current_map, miss, DONT_DO_SMI_CHECK, | 1022 __ ldr(scratch1, FieldMemOperand(reg, HeapObject::kMapOffset)); |
| 1023 ALLOW_ELEMENT_TRANSITION_MAPS); | 1023 __ cmp(scratch1, Operand(current_map)); |
| 1024 | 1024 // Branch on the result of the map check. |
| 1025 __ b(ne, miss); |
| 1025 // Check access rights to the global object. This has to happen after | 1026 // Check access rights to the global object. This has to happen after |
| 1026 // the map check so that we know that the object is actually a global | 1027 // the map check so that we know that the object is actually a global |
| 1027 // object. | 1028 // object. |
| 1028 if (current->IsJSGlobalProxy()) { | 1029 if (current->IsJSGlobalProxy()) { |
| 1029 __ CheckAccessGlobalProxy(reg, scratch2, miss); | 1030 __ CheckAccessGlobalProxy(reg, scratch2, miss); |
| 1030 } | 1031 } |
| 1031 reg = holder_reg; // From now on the object will be in holder_reg. | 1032 reg = holder_reg; // From now on the object will be in holder_reg. |
| 1032 | 1033 |
| 1033 if (heap()->InNewSpace(*prototype)) { | 1034 if (heap()->InNewSpace(*prototype)) { |
| 1034 // The prototype is in new space; we cannot store a reference to it | 1035 // The prototype is in new space; we cannot store a reference to it |
| (...skipping 10 matching lines...) Expand all Loading... |
| 1045 } | 1046 } |
| 1046 | 1047 |
| 1047 // Go to the next object in the prototype chain. | 1048 // Go to the next object in the prototype chain. |
| 1048 current = prototype; | 1049 current = prototype; |
| 1049 } | 1050 } |
| 1050 | 1051 |
| 1051 // Log the check depth. | 1052 // Log the check depth. |
| 1052 LOG(masm()->isolate(), IntEvent("check-maps-depth", depth + 1)); | 1053 LOG(masm()->isolate(), IntEvent("check-maps-depth", depth + 1)); |
| 1053 | 1054 |
| 1054 // Check the holder map. | 1055 // Check the holder map. |
| 1055 __ CheckMap(reg, scratch1, Handle<Map>(current->map()), miss, | 1056 __ ldr(scratch1, FieldMemOperand(reg, HeapObject::kMapOffset)); |
| 1056 DONT_DO_SMI_CHECK, ALLOW_ELEMENT_TRANSITION_MAPS); | 1057 __ cmp(scratch1, Operand(Handle<Map>(current->map()))); |
| 1058 __ b(ne, miss); |
| 1057 | 1059 |
| 1058 // Perform security check for access to the global object. | 1060 // Perform security check for access to the global object. |
| 1059 ASSERT(holder->IsJSGlobalProxy() || !holder->IsAccessCheckNeeded()); | 1061 ASSERT(holder->IsJSGlobalProxy() || !holder->IsAccessCheckNeeded()); |
| 1060 if (holder->IsJSGlobalProxy()) { | 1062 if (holder->IsJSGlobalProxy()) { |
| 1061 __ CheckAccessGlobalProxy(reg, scratch1, miss); | 1063 __ CheckAccessGlobalProxy(reg, scratch1, miss); |
| 1062 } | 1064 } |
| 1063 | 1065 |
| 1064 // If we've skipped any global objects, it's not enough to verify that | 1066 // If we've skipped any global objects, it's not enough to verify that |
| 1065 // their maps haven't changed. We also need to check that the property | 1067 // their maps haven't changed. We also need to check that the property |
| 1066 // cell for the property is still empty. | 1068 // cell for the property is still empty. |
| (...skipping 3157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4224 Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss(); | 4226 Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss(); |
| 4225 __ Jump(ic_miss, RelocInfo::CODE_TARGET); | 4227 __ Jump(ic_miss, RelocInfo::CODE_TARGET); |
| 4226 } | 4228 } |
| 4227 | 4229 |
| 4228 | 4230 |
| 4229 #undef __ | 4231 #undef __ |
| 4230 | 4232 |
| 4231 } } // namespace v8::internal | 4233 } } // namespace v8::internal |
| 4232 | 4234 |
| 4233 #endif // V8_TARGET_ARCH_ARM | 4235 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |