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

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

Issue 2927093002: Support user class in compile_from_dill_test (Closed)
Patch Set: Updated cf. comments 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/ssa/optimize.dart
diff --git a/pkg/compiler/lib/src/ssa/optimize.dart b/pkg/compiler/lib/src/ssa/optimize.dart
index 0aac7e17aa6f7de2c374ed2a132013a4439c8776..b4a059b286d4761d57ce362392f18afde944994c 100644
--- a/pkg/compiler/lib/src/ssa/optimize.dart
+++ b/pkg/compiler/lib/src/ssa/optimize.dart
@@ -13,6 +13,7 @@ import '../elements/elements.dart'
show ClassElement, FieldElement, MethodElement;
import '../elements/entities.dart';
import '../elements/resolution_types.dart';
+import '../elements/types.dart';
import '../js/js.dart' as js;
import '../js_backend/backend.dart';
import '../js_backend/native_data.dart' show NativeData;
@@ -779,7 +780,7 @@ class SsaInstructionSimplifier extends HBaseVisitor
}
HInstruction visitIs(HIs node) {
- ResolutionDartType type = node.typeExpression;
+ DartType type = node.typeExpression;
if (!node.isRawCheck) {
return node;
@@ -789,10 +790,10 @@ class SsaInstructionSimplifier extends HBaseVisitor
return node;
}
- if (type.isObject || type.treatAsDynamic) {
+ if (type == commonElements.objectType || type.treatAsDynamic) {
return _graph.addConstantBool(true, _closedWorld);
}
- ResolutionInterfaceType interfaceType = type;
+ InterfaceType interfaceType = type;
ClassEntity element = interfaceType.element;
HInstruction expression = node.expression;
if (expression.isInteger(_closedWorld)) {
@@ -2322,13 +2323,13 @@ class SsaTypeConversionInserter extends HBaseVisitor
}
void visitIs(HIs instruction) {
- ResolutionDartType type = instruction.typeExpression;
+ DartType type = instruction.typeExpression;
if (!instruction.isRawCheck) {
return;
} else if (type.isTypedef) {
return;
}
- ResolutionInterfaceType interfaceType = type;
+ InterfaceType interfaceType = type;
ClassEntity cls = interfaceType.element;
List<HBasicBlock> trueTargets = <HBasicBlock>[];
« no previous file with comments | « pkg/compiler/lib/src/ssa/locals_handler.dart ('k') | pkg/compiler/lib/src/universe/resolution_world_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698