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..df70bafe58f43c4545adce142df1d491fb05a634 100644 |
--- a/tests/compiler/dart2js/backend_dart/sexpr_unstringifier.dart |
+++ b/tests/compiler/dart2js/backend_dart/sexpr_unstringifier.dart |
@@ -134,25 +134,27 @@ class SExpressionUnstringifier { |
static const String LET_PRIM = "LetPrim"; |
static const String LET_CONT = "LetCont"; |
static const String LET_MUTABLE = "LetMutable"; |
- static const String SET_MUTABLE_VARIABLE = "SetMutableVariable"; |
static const String TYPE_CAST = "TypeCast"; |
- static const String SET_STATIC = "SetStatic"; |
static const String GET_LAZY_STATIC = "GetLazyStatic"; |
static const String UNREACHABLE = "Unreachable"; |
// Primitives |
static const String CONSTANT = "Constant"; |
static const String CREATE_FUNCTION = "CreateFunction"; |
- static const String GET_MUTABLE_VARIABLE = "GetMutableVariable"; |
+ static const String GET_MUTABLE = "GetMutable"; |
+ static const String SET_MUTABLE = "SetMutable"; |
static const String LITERAL_LIST = "LiteralList"; |
static const String LITERAL_MAP = "LiteralMap"; |
static const String REIFY_TYPE_VAR = "ReifyTypeVar"; |
static const String GET_STATIC = "GetStatic"; |
+ static const String SET_STATIC = "SetStatic"; |
static const String TYPE_TEST = "TypeTest"; |
static const String APPLY_BUILTIN_OPERATOR = "ApplyBuiltinOperator"; |
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,19 +544,16 @@ class SExpressionUnstringifier { |
return new LetMutable(local, value)..plug(body); |
} |
- /// (SetMutableVariable name value body) |
- SetMutableVariable parseSetMutableVariable() { |
- tokens.consumeStart(SET_MUTABLE_VARIABLE); |
+ /// (SetMutable name value) |
+ SetMutable parseSetMutable() { |
+ tokens.consumeStart(SET_MUTABLE); |
MutableVariable local = name2variable[tokens.read()]; |
Primitive value = name2variable[tokens.read()]; |
assert(value != null); |
- Expression body = parseExpression(); |
- |
tokens.consumeEnd(); |
- return new SetMutableVariable(local, value) |
- ..plug(body); |
+ return new SetMutable(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) |
@@ -700,8 +694,10 @@ class SExpressionUnstringifier { |
return parseConstant(); |
case CREATE_FUNCTION: |
return parseCreateFunction(); |
- case GET_MUTABLE_VARIABLE: |
- return parseGetMutableVariable(); |
+ case GET_MUTABLE: |
+ return parseGetMutable(); |
+ case SET_MUTABLE: |
+ return parseSetMutable(); |
case LITERAL_LIST: |
return parseLiteralList(); |
case LITERAL_MAP: |
@@ -710,6 +706,8 @@ class SExpressionUnstringifier { |
return parseReifyTypeVar(); |
case GET_STATIC: |
return parseGetStatic(); |
+ case SET_STATIC: |
+ return parseSetStatic(); |
case TYPE_TEST: |
return parseTypeTest(); |
case APPLY_BUILTIN_OPERATOR: |
@@ -720,6 +718,10 @@ class SExpressionUnstringifier { |
return parseGetIndex(); |
case SET_INDEX: |
return parseSetIndex(); |
+ case GET_FIELD: |
+ return parseGetField(); |
+ case SET_FIELD: |
+ return parseSetField(); |
default: |
assert(false); |
} |
@@ -803,13 +805,13 @@ class SExpressionUnstringifier { |
return variable; |
} |
- /// (GetMutableVariable name) |
- GetMutableVariable parseGetMutableVariable() { |
- tokens.consumeStart(GET_MUTABLE_VARIABLE); |
+ /// (GetMutable name) |
+ GetMutable parseGetMutable() { |
+ tokens.consumeStart(GET_MUTABLE); |
MutableVariable local = name2variable[tokens.read()]; |
tokens.consumeEnd(); |
- return new GetMutableVariable(local); |
+ return new GetMutable(local); |
} |
/// (LiteralList (values)) |
@@ -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); |
+ } |
} |