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 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1104 // modification check. Otherwise, we got a fixed array, and we have | 1104 // modification check. Otherwise, we got a fixed array, and we have |
1105 // to do a slow check. | 1105 // to do a slow check. |
1106 Label fixed_array; | 1106 Label fixed_array; |
1107 __ CompareRoot(FieldOperand(rax, HeapObject::kMapOffset), | 1107 __ CompareRoot(FieldOperand(rax, HeapObject::kMapOffset), |
1108 Heap::kMetaMapRootIndex); | 1108 Heap::kMetaMapRootIndex); |
1109 __ j(not_equal, &fixed_array, Label::kNear); | 1109 __ j(not_equal, &fixed_array, Label::kNear); |
1110 | 1110 |
1111 // We got a map in register rax. Get the enumeration cache from it. | 1111 // We got a map in register rax. Get the enumeration cache from it. |
1112 __ bind(&use_cache); | 1112 __ bind(&use_cache); |
1113 __ LoadInstanceDescriptors(rax, rcx); | 1113 __ LoadInstanceDescriptors(rax, rcx); |
1114 __ movq(rcx, FieldOperand(rcx, DescriptorArray::kLastAddedOffset)); | 1114 __ movq(rcx, FieldOperand(rcx, DescriptorArray::kEnumCacheOffset)); |
1115 __ movq(rdx, FieldOperand(rcx, DescriptorArray::kEnumCacheBridgeCacheOffset)); | 1115 __ movq(rdx, FieldOperand(rcx, DescriptorArray::kEnumCacheBridgeCacheOffset)); |
1116 | 1116 |
1117 // Set up the four remaining stack slots. | 1117 // Set up the four remaining stack slots. |
1118 __ push(rax); // Map. | 1118 __ push(rax); // Map. |
1119 __ push(rdx); // Enumeration cache. | 1119 __ push(rdx); // Enumeration cache. |
1120 __ movq(rax, FieldOperand(rdx, FixedArray::kLengthOffset)); | 1120 __ movq(rax, FieldOperand(rdx, FixedArray::kLengthOffset)); |
1121 __ push(rax); // Enumeration cache length (as smi). | 1121 __ push(rax); // Enumeration cache length (as smi). |
1122 __ Push(Smi::FromInt(0)); // Initial index. | 1122 __ Push(Smi::FromInt(0)); // Initial index. |
1123 __ jmp(&loop); | 1123 __ jmp(&loop); |
1124 | 1124 |
(...skipping 3422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4547 *context_length = 0; | 4547 *context_length = 0; |
4548 return previous_; | 4548 return previous_; |
4549 } | 4549 } |
4550 | 4550 |
4551 | 4551 |
4552 #undef __ | 4552 #undef __ |
4553 | 4553 |
4554 } } // namespace v8::internal | 4554 } } // namespace v8::internal |
4555 | 4555 |
4556 #endif // V8_TARGET_ARCH_X64 | 4556 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |