| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1118 | 1118 |
| 1119 // Get the set of properties to enumerate. | 1119 // Get the set of properties to enumerate. |
| 1120 __ bind(&call_runtime); | 1120 __ bind(&call_runtime); |
| 1121 __ push(r0); // Duplicate the enumerable object on the stack. | 1121 __ push(r0); // Duplicate the enumerable object on the stack. |
| 1122 __ CallRuntime(Runtime::kGetPropertyNamesFast, 1); | 1122 __ CallRuntime(Runtime::kGetPropertyNamesFast, 1); |
| 1123 | 1123 |
| 1124 // If we got a map from the runtime call, we can do a fast | 1124 // If we got a map from the runtime call, we can do a fast |
| 1125 // modification check. Otherwise, we got a fixed array, and we have | 1125 // modification check. Otherwise, we got a fixed array, and we have |
| 1126 // to do a slow check. | 1126 // to do a slow check. |
| 1127 Label fixed_array; | 1127 Label fixed_array; |
| 1128 __ mov(r2, r0); | 1128 __ ldr(r2, FieldMemOperand(r0, HeapObject::kMapOffset)); |
| 1129 __ ldr(r1, FieldMemOperand(r2, HeapObject::kMapOffset)); | |
| 1130 __ LoadRoot(ip, Heap::kMetaMapRootIndex); | 1129 __ LoadRoot(ip, Heap::kMetaMapRootIndex); |
| 1131 __ cmp(r1, ip); | 1130 __ cmp(r2, ip); |
| 1132 __ b(ne, &fixed_array); | 1131 __ b(ne, &fixed_array); |
| 1133 | 1132 |
| 1134 // We got a map in register r0. Get the enumeration cache from it. | 1133 // We got a map in register r0. Get the enumeration cache from it. |
| 1134 Label no_descriptors; |
| 1135 __ bind(&use_cache); | 1135 __ bind(&use_cache); |
| 1136 __ LoadInstanceDescriptors(r0, r1, r2); | 1136 |
| 1137 __ ldr(r1, FieldMemOperand(r1, DescriptorArray::kEnumCacheOffset)); | 1137 __ EnumLength(r1, r0); |
| 1138 __ ldr(r2, FieldMemOperand(r1, DescriptorArray::kEnumCacheBridgeCacheOffset)); | 1138 __ cmp(r1, Operand(Smi::FromInt(0))); |
| 1139 __ b(eq, &no_descriptors); |
| 1140 |
| 1141 __ LoadInstanceDescriptors(r0, r2, r4); |
| 1142 __ ldr(r2, FieldMemOperand(r2, DescriptorArray::kEnumCacheOffset)); |
| 1143 __ ldr(r2, FieldMemOperand(r2, DescriptorArray::kEnumCacheBridgeCacheOffset)); |
| 1139 | 1144 |
| 1140 // Set up the four remaining stack slots. | 1145 // Set up the four remaining stack slots. |
| 1141 __ push(r0); // Map. | 1146 __ push(r0); // Map. |
| 1142 __ ldr(r1, FieldMemOperand(r2, FixedArray::kLengthOffset)); | |
| 1143 __ mov(r0, Operand(Smi::FromInt(0))); | 1147 __ mov(r0, Operand(Smi::FromInt(0))); |
| 1144 // Push enumeration cache, enumeration cache length (as smi) and zero. | 1148 // Push enumeration cache, enumeration cache length (as smi) and zero. |
| 1145 __ Push(r2, r1, r0); | 1149 __ Push(r2, r1, r0); |
| 1146 __ jmp(&loop); | 1150 __ jmp(&loop); |
| 1147 | 1151 |
| 1152 __ bind(&no_descriptors); |
| 1153 __ Drop(1); |
| 1154 __ jmp(&exit); |
| 1155 |
| 1148 // We got a fixed array in register r0. Iterate through that. | 1156 // We got a fixed array in register r0. Iterate through that. |
| 1149 Label non_proxy; | 1157 Label non_proxy; |
| 1150 __ bind(&fixed_array); | 1158 __ bind(&fixed_array); |
| 1151 | 1159 |
| 1152 Handle<JSGlobalPropertyCell> cell = | 1160 Handle<JSGlobalPropertyCell> cell = |
| 1153 isolate()->factory()->NewJSGlobalPropertyCell( | 1161 isolate()->factory()->NewJSGlobalPropertyCell( |
| 1154 Handle<Object>( | 1162 Handle<Object>( |
| 1155 Smi::FromInt(TypeFeedbackCells::kForInFastCaseMarker))); | 1163 Smi::FromInt(TypeFeedbackCells::kForInFastCaseMarker))); |
| 1156 RecordTypeFeedbackCell(stmt->ForInFeedbackId(), cell); | 1164 RecordTypeFeedbackCell(stmt->ForInFeedbackId(), cell); |
| 1157 __ LoadHeapObject(r1, cell); | 1165 __ LoadHeapObject(r1, cell); |
| (...skipping 3411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4569 *context_length = 0; | 4577 *context_length = 0; |
| 4570 return previous_; | 4578 return previous_; |
| 4571 } | 4579 } |
| 4572 | 4580 |
| 4573 | 4581 |
| 4574 #undef __ | 4582 #undef __ |
| 4575 | 4583 |
| 4576 } } // namespace v8::internal | 4584 } } // namespace v8::internal |
| 4577 | 4585 |
| 4578 #endif // V8_TARGET_ARCH_ARM | 4586 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |