Skip to content
This repository was archived by the owner on Jan 26, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions benchmark/lib/report.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,22 @@ pb.Response findUpdatedResponse(pb.Report beforeRep, pb.Report afterRep) {
pb.Platform createPlatform() {
return new pb.Platform()
..dartVM = _isDartVM
..checkedMode = _checkedMode;
..checkedMode = _implicitChecksEnabled;
}

get _isDartVM => !identical(1, 1.0);

final bool _checkedMode = () {
var checked = false;
assert(() {
checked = true;
/// Returns `false` if running via dart2js and `--omit-implicit-checks` is set
final bool _implicitChecksEnabled = () {
// ignore: unused_local_variable
bool x = true;
try {
// Trigger an exception if we're in checked mode.
x = "" as dynamic;
return false;
} catch (e) {
return true;
}());
return checked;
}
}();

/// Given the contents of the pubspec.yaml and pubspec.lock files,
Expand Down
5 changes: 5 additions & 0 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ targets:
build_web_compilers|entrypoint:
generate_for:
- benchmark/*_browser.dart
options:
dart2js_args:
- --minify
#- --trust-primitives
#- --omit-implicit-checks