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

Unified Diff: sdk/lib/_internal/compiler/implementation/js_backend/backend.dart

Issue 22909056: Support general expressions as keys in literal maps. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 7 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/js_backend/backend.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
index 6d32001cb0a370a711e4981779f0a1706432fb77..b84a19b1ca3507611a0fa17656a5e55d2a92c1c8 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
@@ -1144,14 +1144,17 @@ class JavaScriptBackend extends Backend {
}
void registerConstantMap(TreeElements elements) {
- Element e = compiler.findHelper(const SourceString('ConstantMap'));
- if (e != null) {
- enqueueClass(compiler.enqueuer.resolution, e, elements);
- }
- e = compiler.findHelper(const SourceString('ConstantProtoMap'));
- if (e != null) {
- enqueueClass(compiler.enqueuer.resolution, e, elements);
+ void enqueue(SourceString name) {
+ Element e = compiler.findHelper(name);
+ if (e != null) {
+ enqueueClass(compiler.enqueuer.resolution, e, elements);
+ }
}
+
+ enqueue(MapConstant.DART_CLASS);
+ enqueue(MapConstant.DART_PROTO_CLASS);
+ enqueue(MapConstant.DART_STRING_CLASS);
+ enqueue(MapConstant.DART_GENERAL_CLASS);
}
void codegen(CodegenWorkItem work) {

Powered by Google App Engine
This is Rietveld 408576698