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

Unified Diff: pkg/kernel/lib/clone.dart

Issue 2874973004: [kernel] Add support for cloning Vector nodes and ClosureCreation (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/lib/clone.dart
diff --git a/pkg/kernel/lib/clone.dart b/pkg/kernel/lib/clone.dart
index a0db5fa2b2ac1703d1a2a5aef1e2821924dab7f2..6ad1936bb5e48445e1ef44aa75c86065605f24d9 100644
--- a/pkg/kernel/lib/clone.dart
+++ b/pkg/kernel/lib/clone.dart
@@ -227,6 +227,30 @@ class CloneVisitor extends TreeVisitor {
return new Let(newVariable, clone(node.body));
}
+ visitVectorCreation(VectorCreation node) {
+ return new VectorCreation(node.length);
+ }
+
+ visitClosureCreation(ClosureCreation node) {
+ return new ClosureCreation.byReference(
+ node.topLevelFunctionReference,
+ cloneOptional(node.contextVector),
+ visitOptionalType(node.functionType));
+ }
+
+ visitVectorSet(VectorSet node) {
+ return new VectorSet(
+ clone(node.vectorExpression), node.index, clone(node.value));
+ }
+
+ visitVectorGet(VectorGet node) {
+ return new VectorGet(clone(node.vectorExpression), node.index);
+ }
+
+ visitVectorCopy(VectorCopy node) {
+ return new VectorCopy(clone(node.vectorExpression));
+ }
+
// Statements
visitInvalidStatement(InvalidStatement node) {
return new InvalidStatement();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698