8186104db1
Random.Random contains the following code:
return new _Random._withState(state)
.._nextState()
.._nextState()
.._nextState()
.._nextState();
This code gets compiled into a let cascade by Fasta
return let final dynamic #t300 = new math::_Random::_withState(state) in
let final dynamic #t301 = #t300._nextState() in
let final dynamic #t302 = #t300._nextState() in
let final dynamic #t303 = #t300._nextState() in
let final dynamic #t304 = #t300._nextState() in #t300;
This means that _nextState should not return GC unsafe garbage because
its return value will be pushed onto the stack by unoptimizing compiler.
Fixes https://github.com/dart-lang/sdk/issues/31309
R=kustermann@google.com
Bug:
Change-Id: Ib44abfc66ec82c350a3899b054e4b095bbc78ea4
Reviewed-on: https://dart-review.googlesource.com/19569
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Erik Corry <erikcorry@google.com>