51bc367806
There are uses of flags before the VM snapshot gets read, so we need to move the "snapshot sniffing" code to the very beginning of Dart::Init(). Due to the fact that FullSnapshotReader/Deserializer assume there is a [Thread] available - and we don't have a [Thread] yet when we should process the flags - this CL moves version/feature logic into a new [SnapshotHeaderReader] class which does not depend on Thread/... Change-Id: I38a45041f0696b96e44fc2b294e3442a5fba1a81 Reviewed-on: https://dart-review.googlesource.com/c/90941 Commit-Queue: Martin Kustermann <kustermann@google.com> Reviewed-by: Ryan Macnak <rmacnak@google.com>