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

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

Issue 1223813006: dart2js cps: Direct access on JS arrays. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Update unit tests and remove unused functions 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 528edc268f3e2ddd8ac62e11d07695463ac71541..e20007188ea40389cbfc4b6e67e0917be91ca588 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
@@ -340,6 +340,27 @@ class SExpressionStringifier extends Indentation implements Visitor<String> {
: ' ${access(node.continuation)}';
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);
+ String value = access(node.value);
+ return '(SetIndex $object $index $value)';
+ }
}
class ConstantStringifier extends ConstantValueVisitor<String, Null> {
« 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