| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
| 8 | 8 |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/debug.h" | 10 #include "src/debug.h" |
| (...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 prop_fields = NoReg; | 515 prop_fields = NoReg; |
| 516 } | 516 } |
| 517 | 517 |
| 518 // Add the object tag to make the JSObject real, so that we can continue | 518 // Add the object tag to make the JSObject real, so that we can continue |
| 519 // and jump into the continuation code at any time from now on. Any | 519 // and jump into the continuation code at any time from now on. Any |
| 520 // failures need to undo the allocation, so that the heap is in a | 520 // failures need to undo the allocation, so that the heap is in a |
| 521 // consistent state and verifiable. | 521 // consistent state and verifiable. |
| 522 __ Add(new_obj, new_obj, kHeapObjectTag); | 522 __ Add(new_obj, new_obj, kHeapObjectTag); |
| 523 | 523 |
| 524 // Check if a non-empty properties array is needed. Continue with | 524 // Check if a non-empty properties array is needed. Continue with |
| 525 // allocated object if not, or fall through to runtime call if it is. | 525 // allocated object if not; allocate and initialize a FixedArray if yes. |
| 526 Register element_count = x3; | 526 Register element_count = x3; |
| 527 __ Ldrb(element_count, | 527 __ Ldrb(element_count, |
| 528 FieldMemOperand(init_map, Map::kUnusedPropertyFieldsOffset)); | 528 FieldMemOperand(init_map, Map::kUnusedPropertyFieldsOffset)); |
| 529 // The field instance sizes contains both pre-allocated property fields | 529 // The field instance sizes contains both pre-allocated property fields |
| 530 // and in-object properties. | 530 // and in-object properties. |
| 531 __ Add(element_count, element_count, prealloc_fields); | 531 __ Add(element_count, element_count, prealloc_fields); |
| 532 __ Subs(element_count, element_count, inobject_props); | 532 __ Subs(element_count, element_count, inobject_props); |
| 533 | 533 |
| 534 // Done if no extra properties are to be allocated. | 534 // Done if no extra properties are to be allocated. |
| 535 __ B(eq, &allocated); | 535 __ B(eq, &allocated); |
| (...skipping 1296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1832 } | 1832 } |
| 1833 } | 1833 } |
| 1834 | 1834 |
| 1835 | 1835 |
| 1836 #undef __ | 1836 #undef __ |
| 1837 | 1837 |
| 1838 } // namespace internal | 1838 } // namespace internal |
| 1839 } // namespace v8 | 1839 } // namespace v8 |
| 1840 | 1840 |
| 1841 #endif // V8_TARGET_ARCH_ARM | 1841 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |