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

Unified Diff: pkg/compiler/lib/src/ssa/codegen.dart

Issue 2616653003: Use elements/types.dart in codegen.dart (Closed)
Patch Set: Created 3 years, 11 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/ssa/codegen.dart
diff --git a/pkg/compiler/lib/src/ssa/codegen.dart b/pkg/compiler/lib/src/ssa/codegen.dart
index 7a2b91b4b8ccaaaad1d024fb1f4827b5d339e749..ce60d470de679412128c6fd54d967e3dd6991205 100644
--- a/pkg/compiler/lib/src/ssa/codegen.dart
+++ b/pkg/compiler/lib/src/ssa/codegen.dart
@@ -21,7 +21,7 @@ import '../elements/elements.dart'
ResolvedAst,
FunctionElement;
import '../elements/entities.dart';
-import '../elements/resolution_types.dart';
+import '../elements/types.dart';
import '../io/source_information.dart';
import '../js/js.dart' as js;
import '../js_backend/backend_helpers.dart' show BackendHelpers;
@@ -2630,7 +2630,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
}
void checkTypeViaInstanceof(
- HInstruction input, DartType type, SourceInformation sourceInformation,
+ HInstruction input, InterfaceType type, SourceInformation sourceInformation,
{bool negative: false}) {
registry.registerTypeUse(new TypeUse.isCheck(type));
@@ -2649,7 +2649,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
void handleNumberOrStringSupertypeCheck(
HInstruction input,
HInstruction interceptor,
- DartType type,
+ InterfaceType type,
SourceInformation sourceInformation,
{bool negative: false}) {
assert(!identical(type.element, commonElements.listClass) &&
@@ -2675,7 +2675,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
}
void handleStringSupertypeCheck(HInstruction input, HInstruction interceptor,
- DartType type, SourceInformation sourceInformation,
+ InterfaceType type, SourceInformation sourceInformation,
{bool negative: false}) {
assert(!identical(type.element, commonElements.listClass) &&
!commonElements.isListSupertype(type.element) &&
@@ -2692,7 +2692,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
}
void handleListOrSupertypeCheck(HInstruction input, HInstruction interceptor,
- DartType type, SourceInformation sourceInformation,
+ InterfaceType type, SourceInformation sourceInformation,
{bool negative: false}) {
assert(!identical(type.element, commonElements.stringClass) &&
!commonElements.isStringOnlySupertype(type.element) &&
@@ -3018,8 +3018,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
case TypeInfoExpressionKind.INSTANCE:
// We expect only flat types for the INSTANCE representation.
- assert(
- node.dartType == (node.dartType as InterfaceType).element.thisType);
+ assert(node.dartType.treatAsRaw);
registry.registerInstantiatedClass(commonElements.listClass);
push(new js.ArrayInitializer(arguments)
.withSourceInformation(node.sourceInformation));

Powered by Google App Engine
This is Rietveld 408576698