| Index: pkg/compiler/lib/src/compiler.dart
|
| diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
|
| index fad4298d35af97a8d80cc6d5b4c10ba27292c562..a3a29a966f04cdf9a9600bb2cfa83fd50b5989d0 100644
|
| --- a/pkg/compiler/lib/src/compiler.dart
|
| +++ b/pkg/compiler/lib/src/compiler.dart
|
| @@ -1367,6 +1367,14 @@ abstract class Compiler implements DiagnosticListener {
|
| });
|
| }
|
|
|
| + bool irEnabled() {
|
| + // TODO(sigurdm,kmillikin): Support checked-mode checks.
|
| + return const bool.fromEnvironment('USE_NEW_BACKEND') &&
|
| + backend is DartBackend &&
|
| + enableTypeAssertions &&
|
| + enableConcreteTypeInference;
|
| + }
|
| +
|
| void computeMain() {
|
| if (mainApp == null) return;
|
|
|
| @@ -1489,8 +1497,10 @@ abstract class Compiler implements DiagnosticListener {
|
|
|
| deferredLoadTask.onResolutionComplete(mainFunction);
|
|
|
| - log('Building IR...');
|
| - irBuilder.buildNodes();
|
| + if (irEnabled()) {
|
| + log('Building IR...');
|
| + irBuilder.buildNodes();
|
| + }
|
|
|
| log('Inferring types...');
|
| typesTask.onResolutionComplete(mainFunction);
|
|
|