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_X64 | 5 #if V8_TARGET_ARCH_X64 |
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 2053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2064 __ Push(rax); | 2064 __ Push(rax); |
2065 __ CallRuntime(Runtime::kCreateListFromArrayLike); | 2065 __ CallRuntime(Runtime::kCreateListFromArrayLike); |
2066 __ Pop(rdx); | 2066 __ Pop(rdx); |
2067 __ Pop(rdi); | 2067 __ Pop(rdi); |
2068 __ SmiToInteger32(rbx, FieldOperand(rax, FixedArray::kLengthOffset)); | 2068 __ SmiToInteger32(rbx, FieldOperand(rax, FixedArray::kLengthOffset)); |
2069 } | 2069 } |
2070 __ jmp(&done_create); | 2070 __ jmp(&done_create); |
2071 | 2071 |
2072 // Try to create the list from an arguments object. | 2072 // Try to create the list from an arguments object. |
2073 __ bind(&create_arguments); | 2073 __ bind(&create_arguments); |
2074 __ movp(rbx, | 2074 __ movp(rbx, FieldOperand(rax, JSArgumentsObject::kLengthOffset)); |
2075 FieldOperand(rax, JSObject::kHeaderSize + | |
2076 Heap::kArgumentsLengthIndex * kPointerSize)); | |
2077 __ movp(rcx, FieldOperand(rax, JSObject::kElementsOffset)); | 2075 __ movp(rcx, FieldOperand(rax, JSObject::kElementsOffset)); |
2078 __ cmpp(rbx, FieldOperand(rcx, FixedArray::kLengthOffset)); | 2076 __ cmpp(rbx, FieldOperand(rcx, FixedArray::kLengthOffset)); |
2079 __ j(not_equal, &create_runtime); | 2077 __ j(not_equal, &create_runtime); |
2080 __ SmiToInteger32(rbx, rbx); | 2078 __ SmiToInteger32(rbx, rbx); |
2081 __ movp(rax, rcx); | 2079 __ movp(rax, rcx); |
2082 __ jmp(&done_create); | 2080 __ jmp(&done_create); |
2083 | 2081 |
2084 // Try to create the list from a JSArray object. | 2082 // Try to create the list from a JSArray object. |
2085 __ bind(&create_array); | 2083 __ bind(&create_array); |
2086 __ movzxbp(rcx, FieldOperand(rcx, Map::kBitField2Offset)); | 2084 __ movzxbp(rcx, FieldOperand(rcx, Map::kBitField2Offset)); |
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2852 __ ret(0); | 2850 __ ret(0); |
2853 } | 2851 } |
2854 | 2852 |
2855 | 2853 |
2856 #undef __ | 2854 #undef __ |
2857 | 2855 |
2858 } // namespace internal | 2856 } // namespace internal |
2859 } // namespace v8 | 2857 } // namespace v8 |
2860 | 2858 |
2861 #endif // V8_TARGET_ARCH_X64 | 2859 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |