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

Unified Diff: sdk/lib/_internal/compiler/implementation/dart_backend/backend_ast_nodes.dart

Issue 574683002: Use ConstExp for storing constants. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 years, 3 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: sdk/lib/_internal/compiler/implementation/dart_backend/backend_ast_nodes.dart
diff --git a/sdk/lib/_internal/compiler/implementation/dart_backend/backend_ast_nodes.dart b/sdk/lib/_internal/compiler/implementation/dart_backend/backend_ast_nodes.dart
index 82839d5354081845a431e8a7b0c030d441be0532..f47de50e727f2c5ac46197dac1affa5e9b6e1c7b 100644
--- a/sdk/lib/_internal/compiler/implementation/dart_backend/backend_ast_nodes.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart_backend/backend_ast_nodes.dart
@@ -828,7 +828,9 @@ class Unparser {
write(v.toString());
}
} else {
- write(e.value.toString());
+ // TODO(sigurdm): Use [ConstExp] to generate valid code for any
+ // constant.
+ write(e.value.unparse());
}
} else if (e is LiteralList) {
if (e.isConst) {

Powered by Google App Engine
This is Rietveld 408576698