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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 __ leap(rcx, Operand(rbx, JSObject::kHeaderSize)); | 218 __ leap(rcx, Operand(rbx, JSObject::kHeaderSize)); |
219 __ LoadRoot(rdx, Heap::kUndefinedValueRootIndex); | 219 __ LoadRoot(rdx, Heap::kUndefinedValueRootIndex); |
220 if (!is_api_function) { | 220 if (!is_api_function) { |
221 Label no_inobject_slack_tracking; | 221 Label no_inobject_slack_tracking; |
222 | 222 |
223 // Check if slack tracking is enabled. | 223 // Check if slack tracking is enabled. |
224 __ cmpl(rsi, Immediate(Map::kSlackTrackingCounterEnd)); | 224 __ cmpl(rsi, Immediate(Map::kSlackTrackingCounterEnd)); |
225 __ j(less, &no_inobject_slack_tracking); | 225 __ j(less, &no_inobject_slack_tracking); |
226 | 226 |
227 // Allocate object with a slack. | 227 // Allocate object with a slack. |
228 __ movzxbp(rsi, FieldOperand(rax, Map::kInObjectPropertiesOffset)); | 228 __ movzxbp( |
| 229 rsi, |
| 230 FieldOperand( |
| 231 rax, Map::kInObjectPropertiesOrConstructorFunctionIndexOffset)); |
229 __ movzxbp(rax, FieldOperand(rax, Map::kUnusedPropertyFieldsOffset)); | 232 __ movzxbp(rax, FieldOperand(rax, Map::kUnusedPropertyFieldsOffset)); |
230 __ subp(rsi, rax); | 233 __ subp(rsi, rax); |
231 __ leap(rsi, | 234 __ leap(rsi, |
232 Operand(rbx, rsi, times_pointer_size, JSObject::kHeaderSize)); | 235 Operand(rbx, rsi, times_pointer_size, JSObject::kHeaderSize)); |
233 // rsi: offset of first field after pre-allocated fields | 236 // rsi: offset of first field after pre-allocated fields |
234 if (FLAG_debug_code) { | 237 if (FLAG_debug_code) { |
235 __ cmpp(rsi, rdi); | 238 __ cmpp(rsi, rdi); |
236 __ Assert(less_equal, | 239 __ Assert(less_equal, |
237 kUnexpectedNumberOfPreAllocatedPropertyFields); | 240 kUnexpectedNumberOfPreAllocatedPropertyFields); |
238 } | 241 } |
(...skipping 1596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1835 __ ret(0); | 1838 __ ret(0); |
1836 } | 1839 } |
1837 | 1840 |
1838 | 1841 |
1839 #undef __ | 1842 #undef __ |
1840 | 1843 |
1841 } // namespace internal | 1844 } // namespace internal |
1842 } // namespace v8 | 1845 } // namespace v8 |
1843 | 1846 |
1844 #endif // V8_TARGET_ARCH_X64 | 1847 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |