Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Unified Diff: pkg/compiler/lib/src/compiler.dart

Issue 716823002: Set up a stub pipline for using the new cps-based ir to generate js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Move IrEnabled to compiler Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/compiler/lib/src/cps_ir/cps_ir_builder_visitor.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | pkg/compiler/lib/src/cps_ir/cps_ir_builder_visitor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698