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 7296ce5fa31485805663a8970bab65c1900a7e91..08376c88790cd70b57f4e0c3b0998e1f49fd448a 100644 |
--- a/pkg/compiler/lib/src/js_backend/constant_emitter.dart |
+++ b/pkg/compiler/lib/src/js_backend/constant_emitter.dart |
@@ -5,13 +5,15 @@ |
import '../common.dart'; |
import '../common_elements.dart'; |
import '../constants/values.dart'; |
-import '../elements/resolution_types.dart'; |
import '../elements/elements.dart'; |
+import '../elements/entities.dart'; |
+import '../elements/resolution_types.dart'; |
import '../io/code_output.dart'; |
import '../js/js.dart' as jsAst; |
import '../js/js.dart' show js; |
import '../js_emitter/code_emitter_task.dart'; |
import '../options.dart'; |
+import '../universe/world_builder.dart'; |
import 'constant_system_javascript.dart'; |
import 'js_backend.dart'; |
import 'namer.dart'; |
@@ -36,6 +38,7 @@ class ConstantEmitter implements ConstantValueVisitor<jsAst.Expression, Null> { |
final CompilerOptions _options; |
final CommonElements _commonElements; |
+ final CodegenWorldBuilder _worldBuilder; |
final RuntimeTypesNeed _rtiNeed; |
final RuntimeTypesEncoder _rtiEncoder; |
final Namer _namer; |
@@ -51,6 +54,7 @@ class ConstantEmitter implements ConstantValueVisitor<jsAst.Expression, Null> { |
ConstantEmitter( |
this._options, |
this._commonElements, |
+ this._worldBuilder, |
this._rtiNeed, |
this._rtiEncoder, |
this._namer, |
@@ -283,7 +287,7 @@ class ConstantEmitter implements ConstantValueVisitor<jsAst.Expression, Null> { |
@override |
jsAst.Expression visitInterceptor(InterceptorConstantValue constant, [_]) { |
- ClassElement interceptorClass = constant.cls; |
+ ClassEntity interceptorClass = constant.cls; |
return _task.interceptorPrototypeAccess(interceptorClass); |
} |
@@ -304,7 +308,7 @@ class ConstantEmitter implements ConstantValueVisitor<jsAst.Expression, Null> { |
@override |
jsAst.Expression visitConstructed(ConstructedConstantValue constant, [_]) { |
- ClassElement element = constant.type.element; |
+ ClassEntity element = constant.type.element; |
if (element == _commonElements.jsConstClass) { |
StringConstantValue str = constant.fields.values.single; |
String value = str.primitiveValue; |
@@ -313,9 +317,9 @@ class ConstantEmitter implements ConstantValueVisitor<jsAst.Expression, Null> { |
jsAst.Expression constructor = |
_emitter.constructorAccess(constant.type.element); |
List<jsAst.Expression> fields = <jsAst.Expression>[]; |
- element.forEachInstanceField((_, FieldElement field) { |
+ _worldBuilder.forEachInstanceField(element, (_, FieldEntity field) { |
fields.add(constantReferenceGenerator(constant.fields[field])); |
- }, includeSuperAndInjectedMembers: true); |
+ }); |
if (_rtiNeed.classNeedsRtiField(constant.type.element)) { |
fields.add(_reifiedTypeArguments(constant.type)); |
} |