| 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 bf5f024f21d075fe58fb37728b40ab5341319f32..be67d0258600db0ff0bbb6b786919f7b891d0f42 100644
|
| --- a/tests/compiler/dart2js/backend_dart/sexpr_unstringifier.dart
|
| +++ b/tests/compiler/dart2js/backend_dart/sexpr_unstringifier.dart
|
| @@ -125,6 +125,7 @@ class SExpressionUnstringifier {
|
| static const String INVOKE_METHOD = "InvokeMethod";
|
| static const String LET_PRIM = "LetPrim";
|
| static const String LET_CONT = "LetCont";
|
| + static const String LET_CONT_RECURSIVE = "LetCont*";
|
| static const String SET_CLOSURE_VARIABLE = "SetClosureVariable";
|
| static const String TYPE_OPERATOR = "TypeOperator";
|
|
|
| @@ -232,7 +233,9 @@ class SExpressionUnstringifier {
|
| case LET_PRIM:
|
| return parseLetPrim();
|
| case LET_CONT:
|
| - return parseLetCont();
|
| + return parseLetCont(false);
|
| + case LET_CONT_RECURSIVE:
|
| + return parseLetCont(true);
|
| case SET_CLOSURE_VARIABLE:
|
| return parseSetClosureVariable();
|
| case TYPE_OPERATOR:
|
| @@ -454,13 +457,13 @@ class SExpressionUnstringifier {
|
| return new InvokeSuperMethod(selector, cont, args);
|
| }
|
|
|
| - // (rec? name (args) body)
|
| - Continuation parseContinuation() {
|
| - // (rec? name
|
| + /// (LetCont (name (args) cont_body) body)
|
| + LetCont parseLetCont(bool recursive) {
|
| + tokens.consumeStart(recursive ? LET_CONT_RECURSIVE : LET_CONT);
|
| +
|
| + // (name
|
| tokens.consumeStart();
|
| String name = tokens.read();
|
| - bool isRecursive = name == "rec";
|
| - if (isRecursive) name = tokens.read();
|
|
|
| // (args)
|
| tokens.consumeStart();
|
| @@ -476,28 +479,16 @@ class SExpressionUnstringifier {
|
| Continuation cont = new Continuation(params);
|
| name2variable[name] = cont;
|
|
|
| - cont.isRecursive = isRecursive;
|
| + cont.isRecursive = recursive;
|
| // cont_body
|
| cont.body = parseExpression();
|
| tokens.consumeEnd();
|
| - return cont;
|
| - }
|
| -
|
| - /// (LetCont (continuations) body)
|
| - LetCont parseLetCont() {
|
| - tokens.consumeStart(LET_CONT);
|
| - tokens.consumeStart();
|
| - List<Continuation> continuations = <Continuation>[];
|
| - while (tokens.current != ")") {
|
| - continuations.add(parseContinuation());
|
| - }
|
| - tokens.consumeEnd();
|
|
|
| // body)
|
| Expression body = parseExpression();
|
| tokens.consumeEnd();
|
|
|
| - return new LetCont(continuations, body);
|
| + return new LetCont(cont, body);
|
| }
|
|
|
| /// (SetClosureVariable name value body)
|
|
|