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

Unified Diff: pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart

Issue 1240263002: dart2js cps: Streamline expressions and primitives. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Rename Get/SetMutableVariable -> Get/SetMutable Created 5 years, 5 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 | « pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart ('k') | pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart
diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart
index 8383af08dcac576f9382aef117f84b1294d5f130..c6cdfc57b946c925396e378192224e8adb4757c4 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart
@@ -218,15 +218,13 @@ class SExpressionStringifier extends Indentation implements Visitor<String> {
return '(Unexpected Continuation)';
}
- String visitGetMutableVariable(GetMutableVariable node) {
- return '(GetMutableVariable ${access(node.variable)})';
+ String visitGetMutable(GetMutable node) {
+ return '(GetMutable ${access(node.variable)})';
}
- String visitSetMutableVariable(SetMutableVariable node) {
+ String visitSetMutable(SetMutable node) {
String value = access(node.value);
- String body = indentBlock(() => visit(node.body));
- return '$indentation(SetMutableVariable ${access(node.variable)} '
- '$value\n$body)';
+ return '(SetMutable ${access(node.variable)} $value)';
}
String visitTypeCast(TypeCast node) {
@@ -262,8 +260,7 @@ class SExpressionStringifier extends Indentation implements Visitor<String> {
String object = access(node.object);
String field = node.field.name;
String value = access(node.value);
- String body = indentBlock(() => visit(node.body));
- return '$indentation(SetField $object $field $value)\n$body';
+ return '(SetField $object $field $value)';
}
String visitGetField(GetField node) {
@@ -280,8 +277,7 @@ class SExpressionStringifier extends Indentation implements Visitor<String> {
String visitSetStatic(SetStatic node) {
String element = node.element.name;
String value = access(node.value);
- String body = indentBlock(() => visit(node.body));
- return '$indentation(SetStatic $element $value\n$body)';
+ return '(SetStatic $element $value)';
}
String visitGetLazyStatic(GetLazyStatic node) {
@@ -335,7 +331,6 @@ class SExpressionStringifier extends Indentation implements Visitor<String> {
return '(ApplyBuiltinOperator $operator ($args))';
}
- @override
String visitForeignCode(ForeignCode node) {
String arguments = node.arguments.map(access).join(' ');
String continuation = node.continuation == null ? ''
@@ -343,20 +338,17 @@ class SExpressionStringifier extends Indentation implements Visitor<String> {
return '(JS ${node.type} ${node.codeTemplate} ($arguments)$continuation)';
}
- @override
String visitGetLength(GetLength node) {
String object = access(node.object);
return '(GetLength $object)';
}
- @override
String visitGetIndex(GetIndex node) {
String object = access(node.object);
String index = access(node.index);
return '(GetIndex $object $index)';
}
- @override
String visitSetIndex(SetIndex node) {
String object = access(node.object);
String index = access(node.index);
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart ('k') | pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698