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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/intrinsifier_x64.cc
diff --git a/runtime/vm/intrinsifier_x64.cc b/runtime/vm/intrinsifier_x64.cc
index 288d5e40edabf7420aaccbab36a7636ecee77ffb..54664d539656ea5827876941b312a54a1f3948e9 100644
--- a/runtime/vm/intrinsifier_x64.cc
+++ b/runtime/vm/intrinsifier_x64.cc
@@ -1534,7 +1534,12 @@ void Intrinsifier::Random_nextState(Assembler* assembler) {
random_class.LookupStaticFieldAllowPrivate(Symbols::_A()));
ASSERT(!random_A_field.IsNull());
ASSERT(random_A_field.is_const());
- const Instance& a_value = Instance::Handle(random_A_field.StaticValue());
+ Instance& a_value = Instance::Handle(random_A_field.StaticValue());
+ if (a_value.raw() == Object::sentinel().raw() ||
+ a_value.raw() == Object::transition_sentinel().raw()) {
+ random_A_field.EvaluateInitializer();
+ a_value = random_A_field.StaticValue();
+ }
const int64_t a_int_value = Integer::Cast(a_value).AsInt64Value();
// Receiver.
__ movq(RAX, Address(RSP, + 1 * kWordSize));

Powered by Google App Engine
This is Rietveld 408576698