| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1003 | 1003 |
| 1004 // We got a map in register rax. Get the enumeration cache from it. | 1004 // We got a map in register rax. Get the enumeration cache from it. |
| 1005 __ movq(rcx, FieldOperand(rax, Map::kInstanceDescriptorsOffset)); | 1005 __ movq(rcx, FieldOperand(rax, Map::kInstanceDescriptorsOffset)); |
| 1006 __ movq(rcx, FieldOperand(rcx, DescriptorArray::kEnumerationIndexOffset)); | 1006 __ movq(rcx, FieldOperand(rcx, DescriptorArray::kEnumerationIndexOffset)); |
| 1007 __ movq(rdx, FieldOperand(rcx, DescriptorArray::kEnumCacheBridgeCacheOffset)); | 1007 __ movq(rdx, FieldOperand(rcx, DescriptorArray::kEnumCacheBridgeCacheOffset)); |
| 1008 | 1008 |
| 1009 // Setup the four remaining stack slots. | 1009 // Setup the four remaining stack slots. |
| 1010 __ push(rax); // Map. | 1010 __ push(rax); // Map. |
| 1011 __ push(rdx); // Enumeration cache. | 1011 __ push(rdx); // Enumeration cache. |
| 1012 __ movq(rax, FieldOperand(rdx, FixedArray::kLengthOffset)); | 1012 __ movq(rax, FieldOperand(rdx, FixedArray::kLengthOffset)); |
| 1013 __ Integer32ToSmi(rax, rax); |
| 1013 __ push(rax); // Enumeration cache length (as smi). | 1014 __ push(rax); // Enumeration cache length (as smi). |
| 1014 __ Push(Smi::FromInt(0)); // Initial index. | 1015 __ Push(Smi::FromInt(0)); // Initial index. |
| 1015 __ jmp(&loop); | 1016 __ jmp(&loop); |
| 1016 | 1017 |
| 1017 // We got a fixed array in register rax. Iterate through that. | 1018 // We got a fixed array in register rax. Iterate through that. |
| 1018 __ bind(&fixed_array); | 1019 __ bind(&fixed_array); |
| 1019 __ Push(Smi::FromInt(0)); // Map (0) - force slow check. | 1020 __ Push(Smi::FromInt(0)); // Map (0) - force slow check. |
| 1020 __ push(rax); | 1021 __ push(rax); |
| 1021 __ movq(rax, FieldOperand(rax, FixedArray::kLengthOffset)); | 1022 __ movq(rax, FieldOperand(rax, FixedArray::kLengthOffset)); |
| 1023 __ Integer32ToSmi(rax, rax); |
| 1022 __ push(rax); // Fixed array length (as smi). | 1024 __ push(rax); // Fixed array length (as smi). |
| 1023 __ Push(Smi::FromInt(0)); // Initial index. | 1025 __ Push(Smi::FromInt(0)); // Initial index. |
| 1024 | 1026 |
| 1025 // Generate code for doing the condition check. | 1027 // Generate code for doing the condition check. |
| 1026 __ bind(&loop); | 1028 __ bind(&loop); |
| 1027 __ movq(rax, Operand(rsp, 0 * kPointerSize)); // Get the current index. | 1029 __ movq(rax, Operand(rsp, 0 * kPointerSize)); // Get the current index. |
| 1028 __ cmpq(rax, Operand(rsp, 1 * kPointerSize)); // Compare to the array length. | 1030 __ cmpq(rax, Operand(rsp, 1 * kPointerSize)); // Compare to the array length. |
| 1029 __ j(above_equal, loop_statement.break_target()); | 1031 __ j(above_equal, loop_statement.break_target()); |
| 1030 | 1032 |
| 1031 // Get the current entry of the array into register rbx. | 1033 // Get the current entry of the array into register rbx. |
| (...skipping 2178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3210 __ ret(0); | 3212 __ ret(0); |
| 3211 } | 3213 } |
| 3212 | 3214 |
| 3213 | 3215 |
| 3214 #undef __ | 3216 #undef __ |
| 3215 | 3217 |
| 3216 | 3218 |
| 3217 } } // namespace v8::internal | 3219 } } // namespace v8::internal |
| 3218 | 3220 |
| 3219 #endif // V8_TARGET_ARCH_X64 | 3221 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |