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

Unified Diff: lib/src/info.dart

Issue 1169873002: dead code elimination in reify_coercions (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 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
« no previous file with comments | « lib/src/codegen/reify_coercions.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/info.dart
diff --git a/lib/src/info.dart b/lib/src/info.dart
index d235807a394a64fede651d0497e6e7cce23e426d..2c7730b5a1f332ff29da4fc6cdedb86b051c968a 100644
--- a/lib/src/info.dart
+++ b/lib/src/info.dart
@@ -653,57 +653,13 @@ class InvalidSuperInvocation extends StaticError {
"(see http://goo.gl/q1T4BB): $node";
}
-/// Calls into the runtime support library
-class RuntimeOperation extends Expression {
- final List<Expression> arguments;
- final String operation;
- Token opToken;
-
- RuntimeOperation(this.operation, this.arguments) {
- opToken = new SyntheticStringToken(TokenType.IDENTIFIER, this.operation, 0);
- }
-
- Token get beginToken => opToken;
- Token get endToken => opToken;
-
- @override
- accept(AstVisitor visitor) {
- if (visitor is ConversionVisitor) {
- return visitor.visitRuntimeOperation(this);
- } else if (visitor is AstCloner) {
- var l = arguments.map((e) => e.accept(visitor)).toList();
- return new RuntimeOperation(operation, l);
- } else {
- visitChildren(visitor);
- }
- }
-
- @override
- void visitChildren(AstVisitor visitor) {
- arguments.forEach((e) => e.accept(visitor));
- }
-
- // Use same precedence as MethodInvocation.
- int get precedence => 15;
-
- @override
- Iterable get childEntities => new ChildEntities()
- ..add(opToken)
- ..addAll(arguments);
-}
-
/// A simple generalizing visitor interface for the conversion nodes.
/// This can be mixed in to your visitor if the AST can contain these nodes.
-/// TODO(leafp): Rename to something appropriate if RuntimeOperation stays
-/// around
abstract class ConversionVisitor<R> implements AstVisitor<R> {
/// This method must be implemented. It is typically supplied by the base
/// GeneralizingAstVisitor<R>.
R visitNode(AstNode node);
- // Handle runtime operations
- R visitRuntimeOperation(RuntimeOperation node) => visitNode(node);
-
/// The catch-all for any kind of conversion
R visitConversion(Conversion node) => visitNode(node);
« no previous file with comments | « lib/src/codegen/reify_coercions.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698