Index: runtime/vm/intrinsifier_ia32.cc |
diff --git a/runtime/vm/intrinsifier_ia32.cc b/runtime/vm/intrinsifier_ia32.cc |
index 2e810d9a46bead6b481e248978be4b704f09ad5c..9b5cf1d49bae04903a199a326722ba16cbd39315 100644 |
--- a/runtime/vm/intrinsifier_ia32.cc |
+++ b/runtime/vm/intrinsifier_ia32.cc |
@@ -1666,7 +1666,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(); |
// 'a_int_value' is a mask. |
ASSERT(Utils::IsUint(32, a_int_value)); |