Chromium Code Reviews| 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 8b7b7cd38442b34282540c4fc6a3e709480d8f96..b44a1e7024f521bb9a9e5ea4411a4b6388d7cf61 100644 |
| --- a/tests/compiler/dart2js/backend_dart/sexpr_unstringifier.dart |
| +++ b/tests/compiler/dart2js/backend_dart/sexpr_unstringifier.dart |
| @@ -153,6 +153,8 @@ class SExpressionUnstringifier { |
| static const String GET_LENGTH = "GetLength"; |
| static const String GET_INDEX = "GetIndex"; |
| static const String SET_INDEX = "SetIndex"; |
| + static const String GET_FIELD = "GetField"; |
| + static const String SET_FIELD = "SetField"; |
| // Other |
| static const String FUNCTION_DEFINITION = "FunctionDefinition"; |
| @@ -251,12 +253,8 @@ class SExpressionUnstringifier { |
| return parseLetCont(); |
| case LET_MUTABLE: |
| return parseLetMutable(); |
| - case SET_MUTABLE_VARIABLE: |
| - return parseSetMutableVariable(); |
| case TYPE_CAST: |
| return parseTypeCast(); |
| - case SET_STATIC: |
| - return parseSetStatic(); |
| case GET_LAZY_STATIC: |
| return parseGetLazyStatic(); |
| case UNREACHABLE: |
| @@ -546,7 +544,7 @@ class SExpressionUnstringifier { |
| return new LetMutable(local, value)..plug(body); |
| } |
| - /// (SetMutableVariable name value body) |
| + /// (SetMutableVariable name value) |
| SetMutableVariable parseSetMutableVariable() { |
| tokens.consumeStart(SET_MUTABLE_VARIABLE); |
| @@ -554,11 +552,8 @@ class SExpressionUnstringifier { |
| Primitive value = name2variable[tokens.read()]; |
| assert(value != null); |
| - Expression body = parseExpression(); |
| - |
| tokens.consumeEnd(); |
| - return new SetMutableVariable(local, value) |
| - ..plug(body); |
| + return new SetMutableVariable(local, value); |
| } |
| /// (TypeCast value type args cont) |
| @@ -640,17 +635,16 @@ class SExpressionUnstringifier { |
| return new SetIndex(object, index, value); |
| } |
| - /// (SetStatic field value body) |
| + /// (SetStatic field value) |
| SetStatic parseSetStatic() { |
| tokens.consumeStart(SET_STATIC); |
| Element fieldElement = new DummyElement(tokens.read()); |
| Primitive value = name2variable[tokens.read()]; |
| assert(value != null); |
| - Expression body = parseExpression(); |
| tokens.consumeEnd(); |
| - return new SetStatic(fieldElement, value, null)..plug(body); |
| + return new SetStatic(fieldElement, value, null); |
| } |
| /// (GetLazyStatic field cont) |
| @@ -720,6 +714,14 @@ class SExpressionUnstringifier { |
| return parseGetIndex(); |
| case SET_INDEX: |
| return parseSetIndex(); |
| + case SET_MUTABLE_VARIABLE: |
| + return parseSetMutableVariable(); |
| + case SET_STATIC: |
| + return parseSetStatic(); |
| + case GET_FIELD: |
| + return parseGetField(); |
| + case SET_FIELD: |
| + return parseSetField(); |
| default: |
| assert(false); |
| } |
| @@ -855,4 +857,27 @@ class SExpressionUnstringifier { |
| tokens.consumeEnd(); |
| return new GetStatic(field, null); |
| } |
| + |
| + /// (GetField object field) |
| + GetField parseGetField() { |
| + tokens.consumeStart(GET_FIELD); |
| + |
| + Primitive object = name2variable[tokens.read()]; |
| + Element field = new DummyElement(tokens.read()); |
| + |
| + tokens.consumeEnd(); |
| + return new GetField(object, field); |
| + } |
| + |
| + /// (SetField object field value) |
| + SetField parseSetField() { |
| + tokens.consumeStart(SET_FIELD); |
| + |
| + Primitive object = name2variable[tokens.read()]; |
| + Element field = new DummyElement(tokens.read()); |
| + Primitive value = name2variable[tokens.read()]; |
| + |
| + tokens.consumeEnd(); |
| + return new SetField(object, field, value); |
| + } |
|
asgerf
2015/07/20 13:35:23
These cases we simply missing from the parser befo
|
| } |