| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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_MIPS. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. |
| 6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
| 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 1650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1661 const Class& random_class = | 1661 const Class& random_class = |
| 1662 Class::Handle(math_lib.LookupClassAllowPrivate(Symbols::_Random())); | 1662 Class::Handle(math_lib.LookupClassAllowPrivate(Symbols::_Random())); |
| 1663 ASSERT(!random_class.IsNull()); | 1663 ASSERT(!random_class.IsNull()); |
| 1664 const Field& state_field = Field::ZoneHandle( | 1664 const Field& state_field = Field::ZoneHandle( |
| 1665 random_class.LookupInstanceFieldAllowPrivate(Symbols::_state())); | 1665 random_class.LookupInstanceFieldAllowPrivate(Symbols::_state())); |
| 1666 ASSERT(!state_field.IsNull()); | 1666 ASSERT(!state_field.IsNull()); |
| 1667 const Field& random_A_field = Field::ZoneHandle( | 1667 const Field& random_A_field = Field::ZoneHandle( |
| 1668 random_class.LookupStaticFieldAllowPrivate(Symbols::_A())); | 1668 random_class.LookupStaticFieldAllowPrivate(Symbols::_A())); |
| 1669 ASSERT(!random_A_field.IsNull()); | 1669 ASSERT(!random_A_field.IsNull()); |
| 1670 ASSERT(random_A_field.is_const()); | 1670 ASSERT(random_A_field.is_const()); |
| 1671 const Instance& a_value = Instance::Handle(random_A_field.StaticValue()); | 1671 Instance& a_value = Instance::Handle(random_A_field.StaticValue()); |
| 1672 if (a_value.raw() == Object::sentinel().raw() || |
| 1673 a_value.raw() == Object::transition_sentinel().raw()) { |
| 1674 random_A_field.EvaluateInitializer(); |
| 1675 a_value = random_A_field.StaticValue(); |
| 1676 } |
| 1672 const int64_t a_int_value = Integer::Cast(a_value).AsInt64Value(); | 1677 const int64_t a_int_value = Integer::Cast(a_value).AsInt64Value(); |
| 1673 // 'a_int_value' is a mask. | 1678 // 'a_int_value' is a mask. |
| 1674 ASSERT(Utils::IsUint(32, a_int_value)); | 1679 ASSERT(Utils::IsUint(32, a_int_value)); |
| 1675 int32_t a_int32_value = static_cast<int32_t>(a_int_value); | 1680 int32_t a_int32_value = static_cast<int32_t>(a_int_value); |
| 1676 | 1681 |
| 1677 // Receiver. | 1682 // Receiver. |
| 1678 __ lw(T0, Address(SP, 0 * kWordSize)); | 1683 __ lw(T0, Address(SP, 0 * kWordSize)); |
| 1679 // Field '_state'. | 1684 // Field '_state'. |
| 1680 __ lw(T1, FieldAddress(T0, state_field.Offset())); | 1685 __ lw(T1, FieldAddress(T0, state_field.Offset())); |
| 1681 | 1686 |
| (...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2412 __ lw(T0, Address(V0, TimelineStream::enabled_offset())); | 2417 __ lw(T0, Address(V0, TimelineStream::enabled_offset())); |
| 2413 __ LoadObject(V0, Bool::True()); | 2418 __ LoadObject(V0, Bool::True()); |
| 2414 __ LoadObject(V1, Bool::False()); | 2419 __ LoadObject(V1, Bool::False()); |
| 2415 __ Ret(); | 2420 __ Ret(); |
| 2416 __ delay_slot()->movz(V0, V1, T0); // V0 = (T0 == 0) ? V1 : V0. | 2421 __ delay_slot()->movz(V0, V1, T0); // V0 = (T0 == 0) ? V1 : V0. |
| 2417 } | 2422 } |
| 2418 | 2423 |
| 2419 } // namespace dart | 2424 } // namespace dart |
| 2420 | 2425 |
| 2421 #endif // defined TARGET_ARCH_MIPS | 2426 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |