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

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: 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 9591e18d0b00bd6d6bddc063a50d3ac362a11f4c..d6513dc35192e85ede4aa7e0850583120d15d2f9 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
@@ -1141,14 +1141,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