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

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

Issue 1134063002: dart2js cps: Introduce GetStatic/SetStatic. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix SExpression parsing/unparsing Created 5 years, 7 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
Index: pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart
diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart
index a807214f2ed75eafc917023cbaccec617e53e723..16e247f019ca2162f858cacb37c3adbabb9b1007 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart
@@ -316,6 +316,19 @@ class IRTracer extends TracerUtil implements cps_ir.Visitor {
return 'GetField($object.$field)';
}
+ visitGetStatic(cps_ir.GetStatic node) {
+ String element = node.element.name;
+ return 'GetStatic($element)';
+ }
+
+ visitSetStatic(cps_ir.SetStatic node) {
+ String dummy = names.name(node);
+ String element = node.element.name;
+ String value = formatReference(node.value);
+ printStmt(dummy, 'SetStatic $element = $value');
+ visit(node.body);
+ }
+
visitCreateBox(cps_ir.CreateBox node) {
return 'CreateBox';
}
@@ -539,6 +552,10 @@ class BlockCollector implements cps_ir.Visitor {
visit(exp.body);
}
+ visitSetStatic(cps_ir.SetStatic exp) {
+ visit(exp.body);
+ }
+
visitDeclareFunction(cps_ir.DeclareFunction exp) {
visit(exp.body);
}
@@ -598,6 +615,9 @@ class BlockCollector implements cps_ir.Visitor {
visitGetField(cps_ir.GetField node) {
unexpectedNode(node);
}
+ visitGetStatic(cps_ir.GetStatic node) {
+ unexpectedNode(node);
+ }
visitCreateBox(cps_ir.CreateBox node) {
unexpectedNode(node);
}
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart ('k') | pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698