| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. |
| 6 #if defined(TARGET_ARCH_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
| 7 | 7 |
| 8 #include "vm/intrinsifier.h" | 8 #include "vm/intrinsifier.h" |
| 9 | 9 |
| 10 #include "vm/assembler.h" | 10 #include "vm/assembler.h" |
| (...skipping 1607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1618 const Class& random_class = | 1618 const Class& random_class = |
| 1619 Class::Handle(math_lib.LookupClassAllowPrivate(Symbols::_Random())); | 1619 Class::Handle(math_lib.LookupClassAllowPrivate(Symbols::_Random())); |
| 1620 ASSERT(!random_class.IsNull()); | 1620 ASSERT(!random_class.IsNull()); |
| 1621 const Field& state_field = Field::ZoneHandle( | 1621 const Field& state_field = Field::ZoneHandle( |
| 1622 random_class.LookupInstanceFieldAllowPrivate(Symbols::_state())); | 1622 random_class.LookupInstanceFieldAllowPrivate(Symbols::_state())); |
| 1623 ASSERT(!state_field.IsNull()); | 1623 ASSERT(!state_field.IsNull()); |
| 1624 const Field& random_A_field = Field::ZoneHandle( | 1624 const Field& random_A_field = Field::ZoneHandle( |
| 1625 random_class.LookupStaticFieldAllowPrivate(Symbols::_A())); | 1625 random_class.LookupStaticFieldAllowPrivate(Symbols::_A())); |
| 1626 ASSERT(!random_A_field.IsNull()); | 1626 ASSERT(!random_A_field.IsNull()); |
| 1627 ASSERT(random_A_field.is_const()); | 1627 ASSERT(random_A_field.is_const()); |
| 1628 const Instance& a_value = Instance::Handle(random_A_field.StaticValue()); | 1628 Instance& a_value = Instance::Handle(random_A_field.StaticValue()); |
| 1629 if (a_value.raw() == Object::sentinel().raw() || |
| 1630 a_value.raw() == Object::transition_sentinel().raw()) { |
| 1631 random_A_field.EvaluateInitializer(); |
| 1632 a_value = random_A_field.StaticValue(); |
| 1633 } |
| 1629 const int64_t a_int_value = Integer::Cast(a_value).AsInt64Value(); | 1634 const int64_t a_int_value = Integer::Cast(a_value).AsInt64Value(); |
| 1630 | 1635 |
| 1631 // Receiver. | 1636 // Receiver. |
| 1632 __ ldr(R0, Address(SP, 0 * kWordSize)); | 1637 __ ldr(R0, Address(SP, 0 * kWordSize)); |
| 1633 // Field '_state'. | 1638 // Field '_state'. |
| 1634 __ ldr(R1, FieldAddress(R0, state_field.Offset())); | 1639 __ ldr(R1, FieldAddress(R0, state_field.Offset())); |
| 1635 | 1640 |
| 1636 // Addresses of _state[0]. | 1641 // Addresses of _state[0]. |
| 1637 const int64_t disp = | 1642 const int64_t disp = |
| 1638 Instance::DataOffsetFor(kTypedDataUint32ArrayCid) - kHeapObjectTag; | 1643 Instance::DataOffsetFor(kTypedDataUint32ArrayCid) - kHeapObjectTag; |
| (...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2356 __ cmp(R0, Operand(0)); | 2361 __ cmp(R0, Operand(0)); |
| 2357 __ LoadObject(R0, Bool::False()); | 2362 __ LoadObject(R0, Bool::False()); |
| 2358 __ LoadObject(TMP, Bool::True()); | 2363 __ LoadObject(TMP, Bool::True()); |
| 2359 __ csel(R0, TMP, R0, NE); | 2364 __ csel(R0, TMP, R0, NE); |
| 2360 __ ret(); | 2365 __ ret(); |
| 2361 } | 2366 } |
| 2362 | 2367 |
| 2363 } // namespace dart | 2368 } // namespace dart |
| 2364 | 2369 |
| 2365 #endif // defined TARGET_ARCH_ARM64 | 2370 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |