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

Unified Diff: pkg/compiler/lib/src/ssa/nodes.dart

Issue 2844383007: Add HCreateBox (Closed)
Patch Set: Created 3 years, 8 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/ssa/locals_handler.dart ('k') | pkg/compiler/lib/src/ssa/ssa_tracer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/nodes.dart
diff --git a/pkg/compiler/lib/src/ssa/nodes.dart b/pkg/compiler/lib/src/ssa/nodes.dart
index 5714e73ba9c2d92bfcfc567e8fba7aaf286e9f3d..cfee3948caee0c1f3f23a606a37a095332983cab 100644
--- a/pkg/compiler/lib/src/ssa/nodes.dart
+++ b/pkg/compiler/lib/src/ssa/nodes.dart
@@ -38,6 +38,7 @@ abstract class HVisitor<R> {
R visitConstant(HConstant node);
R visitContinue(HContinue node);
R visitCreate(HCreate node);
+ R visitCreateBox(HCreateBox node);
R visitDivide(HDivide node);
R visitExit(HExit node);
R visitExitTry(HExitTry node);
@@ -395,6 +396,7 @@ class HBaseVisitor extends HGraphVisitor implements HVisitor {
visitCheck(HCheck node) => visitInstruction(node);
visitConstant(HConstant node) => visitInstruction(node);
visitCreate(HCreate node) => visitInstruction(node);
+ visitCreateBox(HCreateBox node) => visitInstruction(node);
visitDivide(HDivide node) => visitBinaryArithmetic(node);
visitExit(HExit node) => visitControlFlow(node);
visitExitTry(HExitTry node) => visitControlFlow(node);
@@ -1649,6 +1651,17 @@ class HCreate extends HInstruction {
String toString() => 'HCreate($element, ${instantiatedTypes})';
}
+// Allocates a box to hold mutated captured variables.
+class HCreateBox extends HInstruction {
+ HCreateBox(TypeMask type) : super(<HInstruction>[], type);
+
+ bool get isAllocation => true;
+
+ accept(HVisitor visitor) => visitor.visitCreateBox(this);
+
+ String toString() => 'HCreateBox()';
+}
+
abstract class HInvoke extends HInstruction {
/**
* The first argument must be the target: either an [HStatic] node, or
« no previous file with comments | « pkg/compiler/lib/src/ssa/locals_handler.dart ('k') | pkg/compiler/lib/src/ssa/ssa_tracer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698