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

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

Issue 2975203002: Revert "dart2ks-kernel: constant types and constant lists with type parameters" (Closed)
Patch Set: Created 3 years, 5 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 | « no previous file | 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 24a284f402608741b39933f278217baf675e13e3..4d2a9590e3973cd41ac524692653c1eea16babff 100644
--- a/pkg/compiler/lib/src/js_backend/constant_emitter.dart
+++ b/pkg/compiler/lib/src/js_backend/constant_emitter.dart
@@ -6,7 +6,7 @@ import '../common.dart';
import '../common_elements.dart';
import '../constants/values.dart';
import '../elements/elements.dart';
-import '../elements/types.dart' show DartType, InterfaceType, TypeVariableType;
+import '../elements/types.dart' show TypeVariableType;
import '../elements/entities.dart';
import '../elements/resolution_types.dart';
import '../io/code_output.dart';
@@ -274,13 +274,13 @@ class ConstantEmitter implements ConstantValueVisitor<jsAst.Expression, Null> {
return value;
}
- jsAst.PropertyAccess getHelperProperty(FunctionEntity helper) {
+ jsAst.PropertyAccess getHelperProperty(MethodElement helper) {
return _emitter.staticFunctionAccess(helper);
}
@override
jsAst.Expression visitType(TypeConstantValue constant, [_]) {
- DartType type = constant.representedType;
+ ResolutionDartType type = constant.representedType;
jsAst.Name typeName = _namer.runtimeTypeName(type.element);
return new jsAst.Call(getHelperProperty(_commonElements.createRuntimeType),
[js.quoteName(typeName)]);
@@ -333,8 +333,8 @@ class ConstantEmitter implements ConstantValueVisitor<jsAst.Expression, Null> {
}
jsAst.Expression maybeAddTypeArguments(
- InterfaceType type, jsAst.Expression value) {
- if (type is InterfaceType &&
+ ResolutionInterfaceType type, jsAst.Expression value) {
+ if (type is ResolutionInterfaceType &&
!type.treatAsRaw &&
_rtiNeed.classNeedsRti(type.element)) {
return new jsAst.Call(
@@ -344,8 +344,9 @@ class ConstantEmitter implements ConstantValueVisitor<jsAst.Expression, Null> {
return value;
}
- jsAst.Expression _reifiedTypeArguments(InterfaceType type) {
- jsAst.Expression unexpected(TypeVariableType variable) {
+ jsAst.Expression _reifiedTypeArguments(ResolutionInterfaceType type) {
+ jsAst.Expression unexpected(TypeVariableType _variable) {
+ ResolutionTypeVariableType variable = _variable;
throw new SpannableAssertionFailure(
NO_LOCATION_SPANNABLE,
"Unexpected type variable '${variable.getStringAsDeclared(null)}'"
@@ -353,7 +354,7 @@ class ConstantEmitter implements ConstantValueVisitor<jsAst.Expression, Null> {
}
List<jsAst.Expression> arguments = <jsAst.Expression>[];
- for (DartType argument in type.typeArguments) {
+ for (ResolutionDartType argument in type.typeArguments) {
arguments.add(
_rtiEncoder.getTypeRepresentation(_emitter, argument, unexpected));
}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_backend/namer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698