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 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 __ mov(r2, r0); |
1129 __ ldr(r1, FieldMemOperand(r2, HeapObject::kMapOffset)); | 1129 __ ldr(r1, FieldMemOperand(r2, HeapObject::kMapOffset)); |
1130 __ LoadRoot(ip, Heap::kMetaMapRootIndex); | 1130 __ LoadRoot(ip, Heap::kMetaMapRootIndex); |
1131 __ cmp(r1, ip); | 1131 __ cmp(r1, ip); |
1132 __ b(ne, &fixed_array); | 1132 __ b(ne, &fixed_array); |
1133 | 1133 |
1134 // We got a map in register r0. Get the enumeration cache from it. | 1134 // We got a map in register r0. Get the enumeration cache from it. |
1135 Label no_descriptors; | |
1135 __ bind(&use_cache); | 1136 __ bind(&use_cache); |
1136 __ LoadInstanceDescriptors(r0, r1, r2); | 1137 |
1138 __ EnumLength(r2, r0); | |
1139 __ cmp(r2, Operand(Smi::FromInt(0))); | |
1140 __ b(eq, &no_descriptors); | |
1141 | |
1142 __ LoadInstanceDescriptors(r0, r1, r4); | |
1137 __ ldr(r1, FieldMemOperand(r1, DescriptorArray::kEnumCacheOffset)); | 1143 __ ldr(r1, FieldMemOperand(r1, DescriptorArray::kEnumCacheOffset)); |
1138 __ ldr(r2, FieldMemOperand(r1, DescriptorArray::kEnumCacheBridgeCacheOffset)); | 1144 __ ldr(r1, FieldMemOperand(r1, DescriptorArray::kEnumCacheBridgeCacheOffset)); |
1139 | 1145 |
1140 // Set up the four remaining stack slots. | 1146 // Set up the four remaining stack slots. |
1141 __ push(r0); // Map. | 1147 __ push(r0); // Map. |
1142 __ ldr(r1, FieldMemOperand(r2, FixedArray::kLengthOffset)); | |
1143 __ mov(r0, Operand(Smi::FromInt(0))); | 1148 __ mov(r0, Operand(Smi::FromInt(0))); |
1144 // Push enumeration cache, enumeration cache length (as smi) and zero. | 1149 // Push enumeration cache, enumeration cache length (as smi) and zero. |
1145 __ Push(r2, r1, r0); | 1150 __ ldr(r2, FieldMemOperand(r1, FixedArray::kLengthOffset)); |
1151 __ Push(r1, r2, r0); | |
Jakob Kummerow
2012/08/28 12:24:44
Please try to keep the registers that are being pu
Toon Verwaest
2012/08/28 12:30:23
Done.
| |
1146 __ jmp(&loop); | 1152 __ jmp(&loop); |
1147 | 1153 |
1154 __ bind(&no_descriptors); | |
1155 __ Drop(1); | |
1156 __ jmp(&exit); | |
1157 | |
1148 // We got a fixed array in register r0. Iterate through that. | 1158 // We got a fixed array in register r0. Iterate through that. |
1149 Label non_proxy; | 1159 Label non_proxy; |
1150 __ bind(&fixed_array); | 1160 __ bind(&fixed_array); |
1151 | 1161 |
1152 Handle<JSGlobalPropertyCell> cell = | 1162 Handle<JSGlobalPropertyCell> cell = |
1153 isolate()->factory()->NewJSGlobalPropertyCell( | 1163 isolate()->factory()->NewJSGlobalPropertyCell( |
1154 Handle<Object>( | 1164 Handle<Object>( |
1155 Smi::FromInt(TypeFeedbackCells::kForInFastCaseMarker))); | 1165 Smi::FromInt(TypeFeedbackCells::kForInFastCaseMarker))); |
1156 RecordTypeFeedbackCell(stmt->ForInFeedbackId(), cell); | 1166 RecordTypeFeedbackCell(stmt->ForInFeedbackId(), cell); |
1157 __ LoadHeapObject(r1, cell); | 1167 __ LoadHeapObject(r1, cell); |
(...skipping 3411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4569 *context_length = 0; | 4579 *context_length = 0; |
4570 return previous_; | 4580 return previous_; |
4571 } | 4581 } |
4572 | 4582 |
4573 | 4583 |
4574 #undef __ | 4584 #undef __ |
4575 | 4585 |
4576 } } // namespace v8::internal | 4586 } } // namespace v8::internal |
4577 | 4587 |
4578 #endif // V8_TARGET_ARCH_ARM | 4588 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |