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

Unified Diff: runtime/vm/intermediate_language.h

Issue 12310040: Fix broken use lists in branch instructions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove debugging code. Created 7 years, 10 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 | « runtime/vm/flow_graph_optimizer.h ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.h
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index d4d057193d20e751085d60c876f6de3068997fb4..2e0b26f4344959ec2c0316921e62411774227f16 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -1676,7 +1676,7 @@ class BranchInstr : public ControlInstruction {
virtual bool HasSideEffect() const;
ComparisonInstr* comparison() const { return comparison_; }
- void set_comparison(ComparisonInstr* value) { comparison_ = value; }
+ void SetComparison(ComparisonInstr* comp);
bool is_checked() const { return is_checked_; }
@@ -1684,11 +1684,13 @@ class BranchInstr : public ControlInstruction {
virtual intptr_t DeoptimizationTarget() const;
virtual Representation RequiredInputRepresentation(intptr_t i) const;
- // Replace the comparison with another, leaving the branch intact.
+ // A misleadingly named function for use in template functions that also
+ // replace definitions. In this case, leave the branch intact and replace
+ // its comparison with another comparison that has been removed from the
+ // graph but still has uses properly linked into their definition's use
+ // list.
void ReplaceWith(ComparisonInstr* other,
- ForwardInstructionIterator* ignored) {
- comparison_ = other;
- }
+ ForwardInstructionIterator* ignored);
virtual Instruction* Canonicalize(FlowGraphOptimizer* optimizer);
« no previous file with comments | « runtime/vm/flow_graph_optimizer.h ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698