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

Side by Side Diff: runtime/vm/flow_graph.cc

Issue 12317043: Weaken a bogus assertion in use list verification. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/flow_graph.h" 5 #include "vm/flow_graph.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/flow_graph_builder.h" 8 #include "vm/flow_graph_builder.h"
9 #include "vm/intermediate_language.h" 9 #include "vm/intermediate_language.h"
10 #include "vm/longjump.h" 10 #include "vm/longjump.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 return count; 124 return count;
125 } 125 }
126 126
127 127
128 static void VerifyUseListsInInstruction(Instruction* instr) { 128 static void VerifyUseListsInInstruction(Instruction* instr) {
129 ASSERT(instr != NULL); 129 ASSERT(instr != NULL);
130 ASSERT(!instr->IsJoinEntry()); 130 ASSERT(!instr->IsJoinEntry());
131 for (intptr_t i = 0; i < instr->InputCount(); ++i) { 131 for (intptr_t i = 0; i < instr->InputCount(); ++i) {
132 Value* use = instr->InputAt(i); 132 Value* use = instr->InputAt(i);
133 ASSERT(use->definition() != NULL); 133 ASSERT(use->definition() != NULL);
134 ASSERT(use->definition() != instr); 134 ASSERT((use->definition() != instr) || use->definition()->IsPhi());
135 ASSERT(use->instruction() == instr); 135 ASSERT(use->instruction() == instr);
136 ASSERT(use->use_index() == i); 136 ASSERT(use->use_index() == i);
137 ASSERT(!FLAG_verify_compiler || 137 ASSERT(!FLAG_verify_compiler ||
138 (1 == MembershipCount(use, use->definition()->input_use_list()))); 138 (1 == MembershipCount(use, use->definition()->input_use_list())));
139 } 139 }
140 if (instr->env() != NULL) { 140 if (instr->env() != NULL) {
141 intptr_t use_index = 0; 141 intptr_t use_index = 0;
142 for (Environment::DeepIterator it(instr->env()); !it.Done(); it.Advance()) { 142 for (Environment::DeepIterator it(instr->env()); !it.Done(); it.Advance()) {
143 Value* use = it.CurrentValue(); 143 Value* use = it.CurrentValue();
144 ASSERT(use->definition() != NULL); 144 ASSERT(use->definition() != NULL);
145 ASSERT(use->definition() != instr); 145 ASSERT((use->definition() != instr) || use->definition()->IsPhi());
146 ASSERT(use->instruction() == instr); 146 ASSERT(use->instruction() == instr);
147 ASSERT(use->use_index() == use_index++); 147 ASSERT(use->use_index() == use_index++);
148 ASSERT(!FLAG_verify_compiler || 148 ASSERT(!FLAG_verify_compiler ||
149 (1 == MembershipCount(use, use->definition()->env_use_list()))); 149 (1 == MembershipCount(use, use->definition()->env_use_list())));
150 } 150 }
151 } 151 }
152 Definition* defn = instr->AsDefinition(); 152 Definition* defn = instr->AsDefinition();
153 if (defn != NULL) { 153 if (defn != NULL) {
154 Value* prev = NULL; 154 Value* prev = NULL;
155 Value* curr = defn->input_use_list(); 155 Value* curr = defn->input_use_list();
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 !it.Done(); 700 !it.Done();
701 it.Advance()) { 701 it.Advance()) {
702 ++size; 702 ++size;
703 } 703 }
704 } 704 }
705 return size; 705 return size;
706 } 706 }
707 707
708 708
709 } // namespace dart 709 } // namespace dart
OLDNEW
« 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