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

Unified Diff: src/compiler/code-generator.cc

Issue 646393002: [turbofan] remove some of the dependency of Instruction on Schedule (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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.h ('k') | src/compiler/code-generator-impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/code-generator.cc
diff --git a/src/compiler/code-generator.cc b/src/compiler/code-generator.cc
index fc62119cd6c2bc32a1a1c5237ed5a4cea2ec16f9..bb0ef1bc19473a2dad38431234a43c71ff1a6ef0 100644
--- a/src/compiler/code-generator.cc
+++ b/src/compiler/code-generator.cc
@@ -14,7 +14,7 @@ namespace compiler {
CodeGenerator::CodeGenerator(InstructionSequence* code)
: code_(code),
- current_block_(NULL),
+ current_block_(BasicBlock::RpoNumber::Invalid()),
current_source_position_(SourcePosition::Invalid()),
masm_(code->zone()->isolate(), NULL, 0),
resolver_(this),
@@ -103,11 +103,12 @@ void CodeGenerator::AssembleInstruction(Instruction* instr) {
if (instr->IsBlockStart()) {
// Bind a label for a block start and handle parallel moves.
BlockStartInstruction* block_start = BlockStartInstruction::cast(instr);
- current_block_ = block_start->block();
+ current_block_ = block_start->rpo_number();
if (FLAG_code_comments) {
// TODO(titzer): these code comments are a giant memory leak.
Vector<char> buffer = Vector<char>::New(32);
- SNPrintF(buffer, "-- B%d start --", block_start->block()->id().ToInt());
+ // TODO(dcarney): should not be rpo number there
+ SNPrintF(buffer, "-- B%d (rpo) start --", current_block_.ToInt());
masm()->RecordComment(buffer.start());
}
masm()->bind(block_start->label());
« no previous file with comments | « src/compiler/code-generator.h ('k') | src/compiler/code-generator-impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698