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

Unified Diff: tests/compiler/dart2js/backend_dart/sexpr_unstringifier.dart

Issue 864293004: Add a shrinking reduction for dead continuation parameters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Incorporated review comments. Created 5 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 | « tests/compiler/dart2js/backend_dart/opt_shrinking_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/backend_dart/sexpr_unstringifier.dart
diff --git a/tests/compiler/dart2js/backend_dart/sexpr_unstringifier.dart b/tests/compiler/dart2js/backend_dart/sexpr_unstringifier.dart
index 0e203de2ade792aa4a00794f7f13a2a2f69a7a76..7e525852f412e9e267b4d73ac5c372e9e0ad19ba 100644
--- a/tests/compiler/dart2js/backend_dart/sexpr_unstringifier.dart
+++ b/tests/compiler/dart2js/backend_dart/sexpr_unstringifier.dart
@@ -119,7 +119,6 @@ class SExpressionUnstringifier {
static const String DECLARE_FUNCTION = "DeclareFunction";
static const String INVOKE_CONSTRUCTOR = "InvokeConstructor";
static const String INVOKE_CONTINUATION = "InvokeContinuation";
- static const String INVOKE_CONTINUATION_RECURSIVE = "InvokeContinuation*";
static const String INVOKE_STATIC = "InvokeStatic";
static const String INVOKE_METHOD_DIRECTLY = "InvokeMethodDirectly";
static const String INVOKE_METHOD = "InvokeMethod";
@@ -220,9 +219,7 @@ class SExpressionUnstringifier {
case INVOKE_CONSTRUCTOR:
return parseInvokeConstructor();
case INVOKE_CONTINUATION:
- return parseInvokeContinuation(false);
- case INVOKE_CONTINUATION_RECURSIVE:
- return parseInvokeContinuation(true);
+ return parseInvokeContinuation();
case INVOKE_METHOD:
return parseInvokeMethod();
case INVOKE_STATIC:
@@ -387,18 +384,20 @@ class SExpressionUnstringifier {
return new InvokeConstructor(type, element, selector, cont, args);
}
- /// (InvokeContinuation name (args))
- InvokeContinuation parseInvokeContinuation(bool recursive) {
- tokens.consumeStart(recursive
- ? INVOKE_CONTINUATION_RECURSIVE : INVOKE_CONTINUATION);
-
- Continuation cont = name2variable[tokens.read()];
+ /// (InvokeContinuation rec? name (args))
+ InvokeContinuation parseInvokeContinuation() {
+ tokens.consumeStart(INVOKE_CONTINUATION);
+ String name = tokens.read();
+ bool isRecursive = name == "rec";
+ if (isRecursive) name = tokens.read();
+
+ Continuation cont = name2variable[name];
assert(cont != null);
List<Primitive> args = parsePrimitiveList();
tokens.consumeEnd();
- return new InvokeContinuation(cont, args, recursive: recursive);
+ return new InvokeContinuation(cont, args, recursive: isRecursive);
}
/// (InvokeMethod receiver method (args) cont)
« no previous file with comments | « tests/compiler/dart2js/backend_dart/opt_shrinking_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698