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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 10879041: Validate well-formedness of the use lists in debug mode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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
« runtime/vm/flow_graph.cc ('K') | « runtime/vm/flow_graph_optimizer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.cc
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
index 7479d4afed9096330234ea17d4e9269e05cc87bf..2feac05d8c30c8ecb13a06571aacd8c67d812802 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -395,6 +395,7 @@ void UseVal::AddToEnvUseList() {
void Definition::ReplaceUsesWith(Definition* other) {
ASSERT(other != NULL);
+ ASSERT(this != other);
while (input_use_list_ != NULL) {
UseVal* current = input_use_list_;
input_use_list_ = input_use_list_->next_use();
@@ -1534,10 +1535,7 @@ Environment* Environment::Copy() const {
fixed_parameter_count());
GrowableArray<Value*>* values_copy = copy->values_ptr();
for (intptr_t i = 0; i < values().length(); ++i) {
- Value* val = values()[i];
- values_copy->Add(val->IsUse()
- ? UseDefinition(values()[i]->AsUse()->definition())
- : val);
+ values_copy->Add(values()[i]->CopyValue());
}
return copy;
}
« runtime/vm/flow_graph.cc ('K') | « runtime/vm/flow_graph_optimizer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698