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

Unified Diff: src/compiler/code-generator-impl.h

Issue 606403003: Refactor BasicBlock, no inheritance from GenericNode (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Attempt n+1 to address the size_t madness Created 6 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 | « src/compiler/code-generator.cc ('k') | src/compiler/instruction.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/code-generator-impl.h
diff --git a/src/compiler/code-generator-impl.h b/src/compiler/code-generator-impl.h
index a3f7e4c11d5e6972a2ac6cb3c42cd1b153c20b5d..318b7e96abb3d8362f227eecf0af92be02405f79 100644
--- a/src/compiler/code-generator-impl.h
+++ b/src/compiler/code-generator-impl.h
@@ -65,11 +65,8 @@ class InstructionOperandConverter {
}
BasicBlock* InputBlock(int index) {
- NodeId block_id = static_cast<NodeId>(InputInt32(index));
- // operand should be a block id.
- DCHECK(block_id >= 0);
- DCHECK(block_id < gen_->schedule()->BasicBlockCount());
- return gen_->schedule()->GetBlockById(block_id);
+ int block_id = InputInt32(index);
+ return gen_->schedule()->GetBlockById(BasicBlock::Id::FromInt(block_id));
}
Register OutputRegister(int index = 0) {
« no previous file with comments | « src/compiler/code-generator.cc ('k') | src/compiler/instruction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698