diff --git a/pkg/dart2wasm/README.md b/pkg/dart2wasm/README.md index 3e0c04c102b8..23af95f6130c 100644 --- a/pkg/dart2wasm/README.md +++ b/pkg/dart2wasm/README.md @@ -38,7 +38,6 @@ where *options* include: | `--`[`no-`]`print-kernel` | no | Print IR for each function before compiling it. | `--`[`no-`]`print-wasm` | no | Print Wasm instructions of each compiled function. | `--`[`no-`]`enable-asserts` | no | Enable assertions at runtime. -| `--`[`no-`]`constant-branch-pruning` | yes | Avoid emitting code for dead branches of conditionals based on constants. | `--shared-memory-max-pages` *pagecount* | | Max size of the imported memory buffer. If `--shared-import-memory` is specified, this must also be specified. | `--watch` *offset* | | Print stack trace leading to the byte at offset *offset* in the `.wasm` output file. Can be specified multiple times. diff --git a/pkg/dart2wasm/lib/compile.dart b/pkg/dart2wasm/lib/compile.dart index 127ce150eb58..1c6bf9638f16 100644 --- a/pkg/dart2wasm/lib/compile.dart +++ b/pkg/dart2wasm/lib/compile.dart @@ -58,7 +58,7 @@ Future compileToModule(compiler.CompilerOptions options, } final WasmTarget target = - WasmTarget(constantBranchPruning: options.constantBranchPruning); + WasmTarget(removeAsserts: !options.translatorOptions.enableAsserts); CompilerOptions compilerOptions = CompilerOptions() ..target = target ..sdkRoot = options.sdkPath diff --git a/pkg/dart2wasm/lib/compiler_options.dart b/pkg/dart2wasm/lib/compiler_options.dart index 4ebc311dfc60..a1d52872d030 100644 --- a/pkg/dart2wasm/lib/compiler_options.dart +++ b/pkg/dart2wasm/lib/compiler_options.dart @@ -22,7 +22,6 @@ class CompilerOptions { Map feExperimentalFlags = const {}; String? multiRootScheme; List multiRoots = const []; - bool constantBranchPruning = true; factory CompilerOptions.defaultOptions() => CompilerOptions(mainUri: Uri(), outputFile: ''); diff --git a/pkg/dart2wasm/lib/dart2wasm.dart b/pkg/dart2wasm/lib/dart2wasm.dart index 727a425f5722..0c343adf26b4 100644 --- a/pkg/dart2wasm/lib/dart2wasm.dart +++ b/pkg/dart2wasm/lib/dart2wasm.dart @@ -37,8 +37,6 @@ final List