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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/optimize.dart

Issue 304153014: Remove element from DynamicType. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix infinite loop. Created 6 years, 7 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: sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart b/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
index c0068066daf30258dc83e1025a58b21128e94d94..e92034c28025f7b9c670521bce6df63238e27344 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
@@ -577,7 +577,7 @@ class SsaInstructionSimplifier extends HBaseVisitor
if (!node.isRawCheck) {
return node;
- } else if (element.isTypedef) {
+ } else if (type.isTypedef) {
return node;
} else if (element == compiler.functionClass) {
return node;
@@ -646,15 +646,15 @@ class SsaInstructionSimplifier extends HBaseVisitor
HInstruction value = node.inputs[0];
DartType type = node.typeExpression;
if (type != null) {
- if (type.kind == TypeKind.MALFORMED_TYPE) {
+ if (type.isMalformed) {
// Malformed types are treated as dynamic statically, but should
// throw a type error at runtime.
return node;
}
- if (!type.treatAsRaw || type.kind == TypeKind.TYPE_VARIABLE) {
+ if (!type.treatAsRaw || type.isTypeVariable) {
return node;
}
- if (type.kind == TypeKind.FUNCTION) {
+ if (type.isFunctionType) {
// TODO(johnniwinther): Optimize function type conversions.
return node;
}
@@ -770,7 +770,7 @@ class SsaInstructionSimplifier extends HBaseVisitor
HInstruction value = node.inputs.last;
if (compiler.enableTypeAssertions) {
DartType type = field.type;
- if (!type.treatAsRaw || type.kind == TypeKind.TYPE_VARIABLE) {
+ if (!type.treatAsRaw || type.isTypeVariable) {
// We cannot generate the correct type representation here, so don't
// inline this access.
return node;
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/nodes.dart ('k') | sdk/lib/_internal/compiler/implementation/typechecker.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698