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

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

Issue 1108913003: Use Map<FieldElement, ConstantValue> for fields in ConstructedConstantValue. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
« no previous file with comments | « pkg/compiler/lib/src/deferred_load.dart ('k') | pkg/compiler/lib/src/js_backend/namer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_backend/constant_emitter.dart
diff --git a/pkg/compiler/lib/src/js_backend/constant_emitter.dart b/pkg/compiler/lib/src/js_backend/constant_emitter.dart
index 8f5738f96e59a80118faf0807c066028ced1dee8..1b3e95fed7efa0b9fb1b0a6ff69d9d1e2ac6fc74 100644
--- a/pkg/compiler/lib/src/js_backend/constant_emitter.dart
+++ b/pkg/compiler/lib/src/js_backend/constant_emitter.dart
@@ -272,14 +272,15 @@ class ConstantEmitter
Element element = constant.type.element;
if (element.isForeign(backend)
&& element.name == 'JS_CONST') {
- StringConstantValue str = constant.fields[0];
+ StringConstantValue str = constant.fields.values.single;
String value = str.primitiveValue.slowToString();
return new jsAst.LiteralExpression(stripComments(value));
}
jsAst.Expression constructor =
backend.emitter.constructorAccess(constant.type.element);
List<jsAst.Expression> fields =
- constant.fields.map(constantReferenceGenerator).toList(growable: false);
+ constant.fields.values.map(constantReferenceGenerator)
+ .toList(growable: false);
jsAst.New instantiation = new jsAst.New(constructor, fields);
return maybeAddTypeArguments(constant.type, instantiation);
}
« no previous file with comments | « pkg/compiler/lib/src/deferred_load.dart ('k') | pkg/compiler/lib/src/js_backend/namer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698