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

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

Issue 1458703007: dart2js cps: Refactor CallExpressions into Primitives. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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
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 79164b513284bfd983b04a3eef9e896e64451277..2dfa25a713387081c717f5fa39c0ca2d3a6242df 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
@@ -125,26 +125,23 @@ class SExpressionStringifier extends Indentation implements Visitor<String> {
String visitInvokeStatic(InvokeStatic node) {
String name = node.target.name;
- String cont = access(node.continuation);
String args = formatArguments(node.selector.callStructure, node.arguments);
- return '$indentation(InvokeStatic $name $args $cont)';
+ return '(InvokeStatic $name $args)';
}
String visitInvokeMethod(InvokeMethod node) {
String name = node.selector.name;
String rcv = access(node.receiver);
- String cont = access(node.continuation);
String args = formatArguments(node.selector.callStructure, node.arguments,
isIntercepted: node.receiverIsIntercepted);
- return '$indentation(InvokeMethod $rcv $name $args $cont)';
+ return '(InvokeMethod $rcv $name $args)';
}
String visitInvokeMethodDirectly(InvokeMethodDirectly node) {
String receiver = access(node.receiver);
String name = node.selector.name;
- String cont = access(node.continuation);
String args = formatArguments(node.selector.callStructure, node.arguments);
- return '$indentation(InvokeMethodDirectly $receiver $name $args $cont)';
+ return '(InvokeMethodDirectly $receiver $name $args)';
}
String visitInvokeConstructor(InvokeConstructor node) {
@@ -164,9 +161,8 @@ class SExpressionStringifier extends Indentation implements Visitor<String> {
} else {
callName = '${className}.${node.target.name}';
}
- String cont = access(node.continuation);
String args = formatArguments(node.selector.callStructure, node.arguments);
- return '$indentation(InvokeConstructor $callName $args $cont)';
+ return '(InvokeConstructor $callName $args)';
}
String visitInvokeContinuation(InvokeContinuation node) {
@@ -232,10 +228,8 @@ class SExpressionStringifier extends Indentation implements Visitor<String> {
String visitTypeCast(TypeCast node) {
String value = access(node.value);
- String cont = access(node.continuation);
String typeArguments = node.typeArguments.map(access).join(' ');
- return '$indentation(TypeCast $value ${node.dartType}'
- ' ($typeArguments) $cont)';
+ return '(TypeCast $value ${node.dartType} ($typeArguments))';
}
String visitTypeTest(TypeTest node) {
@@ -289,8 +283,7 @@ class SExpressionStringifier extends Indentation implements Visitor<String> {
String visitGetLazyStatic(GetLazyStatic node) {
String element = node.element.name;
- String cont = access(node.continuation);
- return '$indentation(GetLazyStatic $element $cont)';
+ return '(GetLazyStatic $element)';
}
String visitCreateBox(CreateBox node) {
@@ -342,10 +335,7 @@ class SExpressionStringifier extends Indentation implements Visitor<String> {
String visitForeignCode(ForeignCode node) {
String arguments = node.arguments.map(access).join(' ');
- String continuation = node.continuation == null ? ''
- : ' ${access(node.continuation)}';
- return '$indentation(JS "${node.codeTemplate.source}"'
- ' ($arguments)$continuation)';
+ return '(JS "${node.codeTemplate.source}" ($arguments))';
}
String visitGetLength(GetLength node) {
@@ -369,15 +359,13 @@ class SExpressionStringifier extends Indentation implements Visitor<String> {
@override
String visitAwait(Await node) {
String value = access(node.input);
- String continuation = access(node.continuation);
- return '(Await $value $continuation)';
+ return '(Await $value)';
}
@override
String visitYield(Yield node) {
String value = access(node.input);
- String continuation = access(node.continuation);
- return '(Yield $value $continuation)';
+ return '(Yield $value)';
}
String visitRefinement(Refinement node) {

Powered by Google App Engine
This is Rietveld 408576698