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

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

Issue 2616653003: Use elements/types.dart in codegen.dart (Closed)
Patch Set: dartfmt 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
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/ssa/kernel_impact.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..7370c423f145b3066f401cfdad7101bbdbb05e80 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;
@@ -2629,8 +2629,8 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
}
}
- void checkTypeViaInstanceof(
- HInstruction input, DartType type, SourceInformation sourceInformation,
+ void checkTypeViaInstanceof(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,8 @@ 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 as InterfaceType).typeArguments.length ==
+ arguments.length);
registry.registerInstantiatedClass(commonElements.listClass);
push(new js.ArrayInitializer(arguments)
.withSourceInformation(node.sourceInformation));
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/ssa/kernel_impact.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698