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

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

Issue 2938193003: Revert "Towards compiling Hello World!" and "Compile and run Hello World!" (Closed)
Patch Set: Created 3 years, 6 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: 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 08376c88790cd70b57f4e0c3b0998e1f49fd448a..7296ce5fa31485805663a8970bab65c1900a7e91 100644
--- a/pkg/compiler/lib/src/js_backend/constant_emitter.dart
+++ b/pkg/compiler/lib/src/js_backend/constant_emitter.dart
@@ -5,15 +5,13 @@
import '../common.dart';
import '../common_elements.dart';
import '../constants/values.dart';
-import '../elements/elements.dart';
-import '../elements/entities.dart';
import '../elements/resolution_types.dart';
+import '../elements/elements.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';
@@ -38,7 +36,6 @@ 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;
@@ -54,7 +51,6 @@ class ConstantEmitter implements ConstantValueVisitor<jsAst.Expression, Null> {
ConstantEmitter(
this._options,
this._commonElements,
- this._worldBuilder,
this._rtiNeed,
this._rtiEncoder,
this._namer,
@@ -287,7 +283,7 @@ class ConstantEmitter implements ConstantValueVisitor<jsAst.Expression, Null> {
@override
jsAst.Expression visitInterceptor(InterceptorConstantValue constant, [_]) {
- ClassEntity interceptorClass = constant.cls;
+ ClassElement interceptorClass = constant.cls;
return _task.interceptorPrototypeAccess(interceptorClass);
}
@@ -308,7 +304,7 @@ class ConstantEmitter implements ConstantValueVisitor<jsAst.Expression, Null> {
@override
jsAst.Expression visitConstructed(ConstructedConstantValue constant, [_]) {
- ClassEntity element = constant.type.element;
+ ClassElement element = constant.type.element;
if (element == _commonElements.jsConstClass) {
StringConstantValue str = constant.fields.values.single;
String value = str.primitiveValue;
@@ -317,9 +313,9 @@ class ConstantEmitter implements ConstantValueVisitor<jsAst.Expression, Null> {
jsAst.Expression constructor =
_emitter.constructorAccess(constant.type.element);
List<jsAst.Expression> fields = <jsAst.Expression>[];
- _worldBuilder.forEachInstanceField(element, (_, FieldEntity field) {
+ element.forEachInstanceField((_, FieldElement field) {
fields.add(constantReferenceGenerator(constant.fields[field]));
- });
+ }, includeSuperAndInjectedMembers: true);
if (_rtiNeed.classNeedsRtiField(constant.type.element)) {
fields.add(_reifiedTypeArguments(constant.type));
}
« no previous file with comments | « pkg/compiler/lib/src/elements/types.dart ('k') | pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698