Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(604)

Side by Side Diff: runtime/vm/intrinsifier_mips.cc

Issue 2485993002: VM: Support bootstrapping core libraries from Kernel binaries instead of source. (Closed)
Patch Set: Done Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1625 matching lines...) Expand 10 before | Expand all | Expand 10 after
1636 const Class& random_class = Class::Handle( 1636 const Class& random_class = Class::Handle(
1637 math_lib.LookupClassAllowPrivate(Symbols::_Random())); 1637 math_lib.LookupClassAllowPrivate(Symbols::_Random()));
1638 ASSERT(!random_class.IsNull()); 1638 ASSERT(!random_class.IsNull());
1639 const Field& state_field = Field::ZoneHandle( 1639 const Field& state_field = Field::ZoneHandle(
1640 random_class.LookupInstanceFieldAllowPrivate(Symbols::_state())); 1640 random_class.LookupInstanceFieldAllowPrivate(Symbols::_state()));
1641 ASSERT(!state_field.IsNull()); 1641 ASSERT(!state_field.IsNull());
1642 const Field& random_A_field = Field::ZoneHandle( 1642 const Field& random_A_field = Field::ZoneHandle(
1643 random_class.LookupStaticFieldAllowPrivate(Symbols::_A())); 1643 random_class.LookupStaticFieldAllowPrivate(Symbols::_A()));
1644 ASSERT(!random_A_field.IsNull()); 1644 ASSERT(!random_A_field.IsNull());
1645 ASSERT(random_A_field.is_const()); 1645 ASSERT(random_A_field.is_const());
1646 const Instance& a_value = Instance::Handle(random_A_field.StaticValue()); 1646 Instance& a_value = Instance::Handle(random_A_field.StaticValue());
1647 if (a_value.raw() == Object::sentinel().raw() ||
hausner 2016/11/09 00:42:49 Why is this additional check needed now?
Vyacheslav Egorov (Google) 2016/11/09 14:43:16 Due to front-end differences issues we might arriv
1648 a_value.raw() == Object::transition_sentinel().raw()) {
1649 random_A_field.EvaluateInitializer();
1650 a_value = random_A_field.StaticValue();
1651 }
1647 const int64_t a_int_value = Integer::Cast(a_value).AsInt64Value(); 1652 const int64_t a_int_value = Integer::Cast(a_value).AsInt64Value();
1648 // 'a_int_value' is a mask. 1653 // 'a_int_value' is a mask.
1649 ASSERT(Utils::IsUint(32, a_int_value)); 1654 ASSERT(Utils::IsUint(32, a_int_value));
1650 int32_t a_int32_value = static_cast<int32_t>(a_int_value); 1655 int32_t a_int32_value = static_cast<int32_t>(a_int_value);
1651 1656
1652 // Receiver. 1657 // Receiver.
1653 __ lw(T0, Address(SP, 0 * kWordSize)); 1658 __ lw(T0, Address(SP, 0 * kWordSize));
1654 // Field '_state'. 1659 // Field '_state'.
1655 __ lw(T1, FieldAddress(T0, state_field.Offset())); 1660 __ lw(T1, FieldAddress(T0, state_field.Offset()));
1656 1661
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
2405 __ lw(T0, Address(V0, TimelineStream::enabled_offset())); 2410 __ lw(T0, Address(V0, TimelineStream::enabled_offset()));
2406 __ LoadObject(V0, Bool::True()); 2411 __ LoadObject(V0, Bool::True());
2407 __ LoadObject(V1, Bool::False()); 2412 __ LoadObject(V1, Bool::False());
2408 __ Ret(); 2413 __ Ret();
2409 __ delay_slot()->movz(V0, V1, T0); // V0 = (T0 == 0) ? V1 : V0. 2414 __ delay_slot()->movz(V0, V1, T0); // V0 = (T0 == 0) ? V1 : V0.
2410 } 2415 }
2411 2416
2412 } // namespace dart 2417 } // namespace dart
2413 2418
2414 #endif // defined TARGET_ARCH_MIPS 2419 #endif // defined TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698