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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 __ mov(edx, factory->undefined_value()); | 217 __ mov(edx, factory->undefined_value()); |
218 __ lea(ecx, Operand(ebx, JSObject::kHeaderSize)); | 218 __ lea(ecx, Operand(ebx, JSObject::kHeaderSize)); |
219 if (!is_api_function) { | 219 if (!is_api_function) { |
220 Label no_inobject_slack_tracking; | 220 Label no_inobject_slack_tracking; |
221 | 221 |
222 // Check if slack tracking is enabled. | 222 // Check if slack tracking is enabled. |
223 __ cmp(esi, Map::kSlackTrackingCounterEnd); | 223 __ cmp(esi, Map::kSlackTrackingCounterEnd); |
224 __ j(less, &no_inobject_slack_tracking); | 224 __ j(less, &no_inobject_slack_tracking); |
225 | 225 |
226 // Allocate object with a slack. | 226 // Allocate object with a slack. |
227 __ movzx_b(esi, FieldOperand(eax, Map::kInObjectPropertiesOffset)); | 227 __ movzx_b( |
| 228 esi, |
| 229 FieldOperand( |
| 230 eax, Map::kInObjectPropertiesOrConstructorFunctionIndexOffset)); |
228 __ movzx_b(eax, FieldOperand(eax, Map::kUnusedPropertyFieldsOffset)); | 231 __ movzx_b(eax, FieldOperand(eax, Map::kUnusedPropertyFieldsOffset)); |
229 __ sub(esi, eax); | 232 __ sub(esi, eax); |
230 __ lea(esi, | 233 __ lea(esi, |
231 Operand(ebx, esi, times_pointer_size, JSObject::kHeaderSize)); | 234 Operand(ebx, esi, times_pointer_size, JSObject::kHeaderSize)); |
232 // esi: offset of first field after pre-allocated fields | 235 // esi: offset of first field after pre-allocated fields |
233 if (FLAG_debug_code) { | 236 if (FLAG_debug_code) { |
234 __ cmp(esi, edi); | 237 __ cmp(esi, edi); |
235 __ Assert(less_equal, | 238 __ Assert(less_equal, |
236 kUnexpectedNumberOfPreAllocatedPropertyFields); | 239 kUnexpectedNumberOfPreAllocatedPropertyFields); |
237 } | 240 } |
(...skipping 1524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1762 | 1765 |
1763 __ bind(&ok); | 1766 __ bind(&ok); |
1764 __ ret(0); | 1767 __ ret(0); |
1765 } | 1768 } |
1766 | 1769 |
1767 #undef __ | 1770 #undef __ |
1768 } // namespace internal | 1771 } // namespace internal |
1769 } // namespace v8 | 1772 } // namespace v8 |
1770 | 1773 |
1771 #endif // V8_TARGET_ARCH_IA32 | 1774 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |