| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #if V8_TARGET_ARCH_X87 | 5 #if V8_TARGET_ARCH_X87 |
| 6 | 6 |
| 7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
| 9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
| 10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
| (...skipping 1865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1876 __ CallRuntime(Runtime::kCreateListFromArrayLike); | 1876 __ CallRuntime(Runtime::kCreateListFromArrayLike); |
| 1877 __ Pop(edx); | 1877 __ Pop(edx); |
| 1878 __ Pop(edi); | 1878 __ Pop(edi); |
| 1879 __ mov(ebx, FieldOperand(eax, FixedArray::kLengthOffset)); | 1879 __ mov(ebx, FieldOperand(eax, FixedArray::kLengthOffset)); |
| 1880 __ SmiUntag(ebx); | 1880 __ SmiUntag(ebx); |
| 1881 } | 1881 } |
| 1882 __ jmp(&done_create); | 1882 __ jmp(&done_create); |
| 1883 | 1883 |
| 1884 // Try to create the list from an arguments object. | 1884 // Try to create the list from an arguments object. |
| 1885 __ bind(&create_arguments); | 1885 __ bind(&create_arguments); |
| 1886 __ mov(ebx, | 1886 __ mov(ebx, FieldOperand(eax, JSArgumentsObject::kLengthOffset)); |
| 1887 FieldOperand(eax, JSObject::kHeaderSize + | |
| 1888 Heap::kArgumentsLengthIndex * kPointerSize)); | |
| 1889 __ mov(ecx, FieldOperand(eax, JSObject::kElementsOffset)); | 1887 __ mov(ecx, FieldOperand(eax, JSObject::kElementsOffset)); |
| 1890 __ cmp(ebx, FieldOperand(ecx, FixedArray::kLengthOffset)); | 1888 __ cmp(ebx, FieldOperand(ecx, FixedArray::kLengthOffset)); |
| 1891 __ j(not_equal, &create_runtime); | 1889 __ j(not_equal, &create_runtime); |
| 1892 __ SmiUntag(ebx); | 1890 __ SmiUntag(ebx); |
| 1893 __ mov(eax, ecx); | 1891 __ mov(eax, ecx); |
| 1894 __ jmp(&done_create); | 1892 __ jmp(&done_create); |
| 1895 | 1893 |
| 1896 // Try to create the list from a JSArray object. | 1894 // Try to create the list from a JSArray object. |
| 1897 __ bind(&create_array); | 1895 __ bind(&create_array); |
| 1898 __ mov(ecx, FieldOperand(ecx, Map::kBitField2Offset)); | 1896 __ mov(ecx, FieldOperand(ecx, Map::kBitField2Offset)); |
| (...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2798 | 2796 |
| 2799 __ bind(&ok); | 2797 __ bind(&ok); |
| 2800 __ ret(0); | 2798 __ ret(0); |
| 2801 } | 2799 } |
| 2802 | 2800 |
| 2803 #undef __ | 2801 #undef __ |
| 2804 } // namespace internal | 2802 } // namespace internal |
| 2805 } // namespace v8 | 2803 } // namespace v8 |
| 2806 | 2804 |
| 2807 #endif // V8_TARGET_ARCH_X87 | 2805 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |