ffc36db613
where --enable experiment is accepted Adds --enable-experiment support for: - dart compile aot-snapshot - dart compile jit-snapshot - dart compile js - dart compile exe - dart compile kernel Also changes --enable-experiment from a top level CLI flag to a per-command flag. --enable-experiment flags will now only be interpreted by the VM if: 1) They are provided before a CLI command (e.g., dart --enable-experiment=non-nullable analyze) or 2) They are provided with an explicit or implicit run command (e.g., dart --enable-experiment=non-nullable foo.dart or dart --enable-experiment=non-nullable run foo.dart or dart run --enable-experiment=non-nullable foo.dart) This should make it more generally clear where --enable-experiment is accepted and what subcommands can accept the flag. Prior to this change, providing --enable-experiment anywhere, even for commands without experiment support, would not raise an error. Fixes https://github.com/dart-lang/sdk/issues/43623 Change-Id: I5ec48b2dd2bb6db5526185dae2edbca95ef24d9f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169902 Commit-Queue: Ben Konyi <bkonyi@google.com> Reviewed-by: Sigurd Meldgaard <sigurdm@google.com> Reviewed-by: Jonas Jensen <jonasfj@google.com>