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

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

Issue 1109393012: Allow use of deferred type-literals in non-constant contexts. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review Created 5 years, 8 months 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
Index: pkg/compiler/lib/src/dart_backend/backend.dart
diff --git a/pkg/compiler/lib/src/dart_backend/backend.dart b/pkg/compiler/lib/src/dart_backend/backend.dart
index 763e2e3c95f22e7619367b5f662a15414dcef821..90ae82eebdc1ae985b2a566c9b82c4f30b5c722c 100644
--- a/pkg/compiler/lib/src/dart_backend/backend.dart
+++ b/pkg/compiler/lib/src/dart_backend/backend.dart
@@ -521,9 +521,11 @@ class DartConstantTask extends ConstantCompilerTask
});
}
- ConstantExpression compileNode(Node node, TreeElements elements) {
+ ConstantExpression compileNode(Node node, TreeElements elements,
+ {bool enforceConst: true}) {
return measure(() {
- return constantCompiler.compileNodeWithDefinitions(node, elements);
+ return constantCompiler.compileNodeWithDefinitions(node, elements,
+ isConst: enforceConst);
});
}
« no previous file with comments | « pkg/compiler/lib/src/constants/expressions.dart ('k') | pkg/compiler/lib/src/dart_backend/backend_ast_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698