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

Unified Diff: vm/intermediate_language.cc

Issue 10825198: Simplify BlockEntryInstr::DiscoverBlocks a bit. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/intermediate_language.cc
===================================================================
--- vm/intermediate_language.cc (revision 10277)
+++ vm/intermediate_language.cc (working copy)
@@ -561,21 +561,18 @@
// 5. Iterate straight-line successors until a branch instruction or
// another basic block entry instruction, and visit that instruction.
ASSERT(next() != NULL);
+ ASSERT(!next()->IsBlockEntry());
Instruction* next_instr = next();
- if (next_instr->IsBlockEntry()) {
- set_last_instruction(this);
- } else {
- while ((next_instr != NULL) &&
- !next_instr->IsBlockEntry() &&
- !next_instr->IsBranch()) {
- if (vars != NULL) {
- next_instr->RecordAssignedVars(vars, fixed_parameter_count);
- }
- set_last_instruction(next_instr);
- GotoInstr* goto_instr = next_instr->AsGoto();
- next_instr =
- (goto_instr != NULL) ? goto_instr->successor() : next_instr->next();
+ while ((next_instr != NULL) &&
+ !next_instr->IsBlockEntry() &&
+ !next_instr->IsBranch()) {
+ if (vars != NULL) {
+ next_instr->RecordAssignedVars(vars, fixed_parameter_count);
}
+ set_last_instruction(next_instr);
+ GotoInstr* goto_instr = next_instr->AsGoto();
+ next_instr =
+ (goto_instr != NULL) ? goto_instr->successor() : next_instr->next();
}
if (next_instr != NULL) {
next_instr->DiscoverBlocks(this, preorder, postorder,
« 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