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

Unified Diff: sdk/lib/_internal/compiler/implementation/ir/ir_builder.dart

Issue 374413002: Dart2dart rename unresolved getters & Make IsCheck not be a primitive (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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
Index: sdk/lib/_internal/compiler/implementation/ir/ir_builder.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ir/ir_builder.dart b/sdk/lib/_internal/compiler/implementation/ir/ir_builder.dart
index 8be198d422ccc5ae3c20badfb08d514a7b43897d..872eea186e5a85e0f2915d5e034dc25f789ca708 100644
--- a/sdk/lib/_internal/compiler/implementation/ir/ir_builder.dart
+++ b/sdk/lib/_internal/compiler/implementation/ir/ir_builder.dart
@@ -1262,20 +1262,13 @@ class IrBuilder extends ResolvedVisitor<ir.Primitive> {
assert(node.arguments.tail.isEmpty);
return buildNegation(visitDynamicSend(node));
}
- if (op.source == "is") {
+ if (op.source == "is" || op.source == "as") {
DartType type = elements.getType(node.typeAnnotationFromIsCheckOrCast);
ir.Primitive receiver = visit(node.receiver);
- ir.IsCheck isCheck = new ir.IsCheck(receiver, type);
- add(new ir.LetPrim(isCheck));
+ ir.Primitive isCheck = continueWithExpression(
floitsch 2014/07/09 19:24:03 s/isCheck/check
sigurdm 2014/07/10 09:03:18 Done.
+ (k) => new ir.TypeOperator(op.source, receiver, type, k));
return node.isIsNotCheck ? buildNegation(isCheck) : isCheck;
}
- if (op.source == "as") {
- DartType type = elements.getType(node.typeAnnotationFromIsCheckOrCast);
- ir.Primitive receiver = visit(node.receiver);
- return continueWithExpression(
- (k) => new ir.AsCast(receiver, type, k));
- }
- compiler.internalError(node, "Unknown operator '${op.source}'");
}
// Build(StaticSend(f, arguments), C) = C[C'[InvokeStatic(f, xs)]]

Powered by Google App Engine
This is Rietveld 408576698