d77fff7307
Core snapshots should be agnostic to the sound null safety mode (so they can be used both in weak and strong modes), and snapshot writer verifies that. Snapshot::kFull was previously used both for core snapshots and app snapshots on ia32. However, app snapshots are not guaranteed to be agnostic, which appeared as failures on a few test on ia32. Also, VM should be able to detect null safety mode from app snapshots, even if they do not contain code, but null safety mode was not written into features string of kFull snapshots. In order to disambiguate core snapshots, a new Snapshot::Kind is added. Snapshot::kFullCore works exactly as Snapshot::kFull, except for verification of agnostic null safety and snapshot features string omitting null safety mode. All snapshots except kFullCore now have null safety mode included into their features string. Fixes https://github.com/dart-lang/sdk/issues/43626 Issue https://github.com/dart-lang/sdk/issues/43613 Change-Id: I8cd3b049ef4e428dd5e1ce666d4c7aa3b596d70c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166308 Reviewed-by: Régis Crelier <regis@google.com> Commit-Queue: Alexander Markov <alexmarkov@google.com>