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

Unified Diff: runtime/vm/flow_graph_builder.cc

Issue 9961019: Implement context cloning in new compiler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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 | runtime/vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_builder.cc
===================================================================
--- runtime/vm/flow_graph_builder.cc (revision 6205)
+++ runtime/vm/flow_graph_builder.cc (working copy)
@@ -1267,7 +1267,12 @@
void EffectGraphVisitor::VisitCloneContextNode(CloneContextNode* node) {
- Bailout("EffectGraphVisitor::VisitCloneContextNode");
+ AddInstruction(new BindInstr(temp_index(), new CurrentContextComp()));
+ TempVal* ctx = new TempVal(temp_index());
+ AddInstruction(new BindInstr(temp_index(),
+ new CloneContextComp(node->id(), node->token_index(), ctx)));
+ TempVal* cloned_ctx = new TempVal(temp_index());
+ ReturnComputation(new StoreContextComp(cloned_ctx));
}
@@ -2130,6 +2135,13 @@
}
+void FlowGraphPrinter::VisitCloneContext(CloneContextComp* comp) {
+ OS::Print("CloneContext(");
+ comp->context_value()->Accept(this);
+ OS::Print(")");
+}
+
+
void FlowGraphPrinter::VisitStoreContext(StoreContextComp* comp) {
OS::Print("StoreContext(");
comp->value()->Accept(this);
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698