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

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

Issue 1175973005: dart2js cps: Introduce some built-in operators in type propagation. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Status files 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 | « tests/co19/co19-dart2js.status ('k') | tests/compiler/dart2js/js_backend_cps_ir_closures_test.dart » ('j') | 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 491a930641732a68649842c994b84e3a381a6765..809aa99b9871b73b6c9a9979fa3c7b04102cae18 100644
--- a/tests/compiler/dart2js/backend_dart/sexpr_unstringifier.dart
+++ b/tests/compiler/dart2js/backend_dart/sexpr_unstringifier.dart
@@ -149,6 +149,7 @@ class SExpressionUnstringifier {
static const String REIFY_TYPE_VAR = "ReifyTypeVar";
static const String GET_STATIC = "GetStatic";
static const String TYPE_TEST = "TypeTest";
+ static const String APPLY_BUILTIN_OPERATOR = "ApplyBuiltinOperator";
// Other
static const String FUNCTION_DEFINITION = "FunctionDefinition";
@@ -590,6 +591,25 @@ class SExpressionUnstringifier {
return new TypeTest(value, type, typeArguments);
}
+ /// (ApplyBuiltinOperator operator args)
+ ApplyBuiltinOperator parseApplyBuiltinOperator() {
+ tokens.consumeStart(APPLY_BUILTIN_OPERATOR);
+
+ String operatorName = tokens.read();
+ BuiltinOperator operator;
+ for (BuiltinOperator op in BuiltinOperator.values) {
+ if (op.toString() == operatorName) {
+ operator = op;
+ break;
+ }
+ }
+ assert(operator != null);
+ List<ir.Primitive> arguments = parsePrimitiveList();
+
+ tokens.consumeEnd();
+ return new ApplyBuiltinOperator(operator, arguments);
+ }
+
/// (SetStatic field value body)
SetStatic parseSetStatic() {
tokens.consumeStart(SET_STATIC);
@@ -662,6 +682,8 @@ class SExpressionUnstringifier {
return parseGetStatic();
case TYPE_TEST:
return parseTypeTest();
+ case APPLY_BUILTIN_OPERATOR:
+ return parseApplyBuiltinOperator();
default:
assert(false);
}
« no previous file with comments | « tests/co19/co19-dart2js.status ('k') | tests/compiler/dart2js/js_backend_cps_ir_closures_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698