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

Side by Side Diff: runtime/vm/intrinsifier_x64.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_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
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 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after
1526 const Class& random_class = 1526 const Class& random_class =
1527 Class::Handle(math_lib.LookupClassAllowPrivate(Symbols::_Random())); 1527 Class::Handle(math_lib.LookupClassAllowPrivate(Symbols::_Random()));
1528 ASSERT(!random_class.IsNull()); 1528 ASSERT(!random_class.IsNull());
1529 const Field& state_field = Field::ZoneHandle( 1529 const Field& state_field = Field::ZoneHandle(
1530 random_class.LookupInstanceFieldAllowPrivate(Symbols::_state())); 1530 random_class.LookupInstanceFieldAllowPrivate(Symbols::_state()));
1531 ASSERT(!state_field.IsNull()); 1531 ASSERT(!state_field.IsNull());
1532 const Field& random_A_field = Field::ZoneHandle( 1532 const Field& random_A_field = Field::ZoneHandle(
1533 random_class.LookupStaticFieldAllowPrivate(Symbols::_A())); 1533 random_class.LookupStaticFieldAllowPrivate(Symbols::_A()));
1534 ASSERT(!random_A_field.IsNull()); 1534 ASSERT(!random_A_field.IsNull());
1535 ASSERT(random_A_field.is_const()); 1535 ASSERT(random_A_field.is_const());
1536 const Instance& a_value = Instance::Handle(random_A_field.StaticValue()); 1536 Instance& a_value = Instance::Handle(random_A_field.StaticValue());
1537 if (a_value.raw() == Object::sentinel().raw() ||
1538 a_value.raw() == Object::transition_sentinel().raw()) {
1539 random_A_field.EvaluateInitializer();
1540 a_value = random_A_field.StaticValue();
1541 }
1537 const int64_t a_int_value = Integer::Cast(a_value).AsInt64Value(); 1542 const int64_t a_int_value = Integer::Cast(a_value).AsInt64Value();
1538 // Receiver. 1543 // Receiver.
1539 __ movq(RAX, Address(RSP, +1 * kWordSize)); 1544 __ movq(RAX, Address(RSP, +1 * kWordSize));
1540 // Field '_state'. 1545 // Field '_state'.
1541 __ movq(RBX, FieldAddress(RAX, state_field.Offset())); 1546 __ movq(RBX, FieldAddress(RAX, state_field.Offset()));
1542 // Addresses of _state[0] and _state[1]. 1547 // Addresses of _state[0] and _state[1].
1543 const intptr_t scale = Instance::ElementSizeFor(kTypedDataUint32ArrayCid); 1548 const intptr_t scale = Instance::ElementSizeFor(kTypedDataUint32ArrayCid);
1544 const intptr_t offset = Instance::DataOffsetFor(kTypedDataUint32ArrayCid); 1549 const intptr_t offset = Instance::DataOffsetFor(kTypedDataUint32ArrayCid);
1545 Address addr_0 = FieldAddress(RBX, 0 * scale + offset); 1550 Address addr_0 = FieldAddress(RBX, 0 * scale + offset);
1546 Address addr_1 = FieldAddress(RBX, 1 * scale + offset); 1551 Address addr_1 = FieldAddress(RBX, 1 * scale + offset);
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
2271 __ Bind(&true_label); 2276 __ Bind(&true_label);
2272 __ LoadObject(RAX, Bool::True()); 2277 __ LoadObject(RAX, Bool::True());
2273 __ ret(); 2278 __ ret();
2274 } 2279 }
2275 2280
2276 #undef __ 2281 #undef __
2277 2282
2278 } // namespace dart 2283 } // namespace dart
2279 2284
2280 #endif // defined TARGET_ARCH_X64 2285 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698