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

Unified Diff: runtime/vm/flow_graph_builder.h

Issue 10905182: Refactor building of StoreStaticField and StoreLocal to manually preserve value. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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_builder.cc » ('j') | runtime/vm/flow_graph_builder.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_builder.h
diff --git a/runtime/vm/flow_graph_builder.h b/runtime/vm/flow_graph_builder.h
index d800699b97bc3a460acb383fa27d35f8be07a8b9..1fb97e5d309d0ad2306fd4428fd4fb34a49bd11e 100644
--- a/runtime/vm/flow_graph_builder.h
+++ b/runtime/vm/flow_graph_builder.h
@@ -161,9 +161,13 @@ class EffectGraphVisitor : public AstNodeVisitor {
}
protected:
- Definition* BuildStoreLocal(const LocalVariable& local, Value* value);
+ Definition* BuildStoreLocal(const LocalVariable& local,
+ Value* value,
+ bool result_is_needed);
Definition* BuildLoadLocal(const LocalVariable& local);
+ void VisitStoreLocal(StoreLocalNode* node, bool result_is_needed);
+
// Helpers for translating parts of the AST.
void TranslateArgumentList(const ArgumentListNode& node,
ZoneGrowableArray<Value*>* values);
@@ -206,10 +210,8 @@ class EffectGraphVisitor : public AstNodeVisitor {
const AbstractType& dst_type,
const String& dst_name);
- enum ResultKind {
- kResultNotNeeded,
- kResultNeeded
- };
+ static const bool kResultNeeded = true;
+ static const bool kResultNotNeeded = false;
Definition* BuildStoreIndexedValues(StoreIndexedNode* node,
bool result_is_needed);
@@ -244,6 +246,8 @@ class EffectGraphVisitor : public AstNodeVisitor {
void BuildThrowNode(ThrowNode* node);
void BuildStaticSetter(StaticSetterNode* node, bool result_is_needed);
+ Definition* BuildStoreStaticField(StoreStaticFieldNode* node,
+ bool result_is_needed);
ClosureCallInstr* BuildClosureCall(ClosureCallNode* node);
@@ -291,12 +295,14 @@ class ValueGraphVisitor : public EffectGraphVisitor {
virtual void VisitBinaryOpNode(BinaryOpNode* node);
virtual void VisitConditionalExprNode(ConditionalExprNode* node);
virtual void VisitLoadLocalNode(LoadLocalNode* node);
+ virtual void VisitStoreLocalNode(StoreLocalNode* node);
virtual void VisitStoreIndexedNode(StoreIndexedNode* node);
virtual void VisitStoreInstanceFieldNode(StoreInstanceFieldNode* node);
virtual void VisitInstanceSetterNode(InstanceSetterNode* node);
virtual void VisitThrowNode(ThrowNode* node);
virtual void VisitClosureCallNode(ClosureCallNode* node);
virtual void VisitStaticSetterNode(StaticSetterNode* node);
+ virtual void VisitStoreStaticFieldNode(StoreStaticFieldNode* node);
Value* value() const { return value_; }
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.cc » ('j') | runtime/vm/flow_graph_builder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698