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

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

Issue 951553005: [turbofan] remove dependence of InstructionBlock on BasicBlock (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 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 61776e440072931473aa94d4f9bacfd1df71183d..c534d33d68e69287c628e8814088c320551c5016 100644
--- a/src/compiler/code-generator.cc
+++ b/src/compiler/code-generator.cc
@@ -37,7 +37,7 @@ CodeGenerator::CodeGenerator(Frame* frame, Linkage* linkage,
code_(code),
info_(info),
labels_(zone()->NewArray<Label>(code->InstructionBlockCount())),
- current_block_(BasicBlock::RpoNumber::Invalid()),
+ current_block_(RpoNumber::Invalid()),
current_source_position_(SourcePosition::Invalid()),
masm_(info->isolate(), NULL, 0),
resolver_(this),
@@ -85,7 +85,7 @@ Handle<Code> CodeGenerator::GenerateCode() {
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->id().ToInt());
+ SNPrintF(buffer, "-- B%d start --", block->rpo_number().ToInt());
masm()->RecordComment(buffer.start());
}
masm()->bind(GetLabel(current_block_));
@@ -159,7 +159,7 @@ Handle<Code> CodeGenerator::GenerateCode() {
}
-bool CodeGenerator::IsNextInAssemblyOrder(BasicBlock::RpoNumber block) const {
+bool CodeGenerator::IsNextInAssemblyOrder(RpoNumber block) const {
return code()->InstructionBlockAt(current_block_)->ao_number().IsNext(
code()->InstructionBlockAt(block)->ao_number());
}
@@ -199,8 +199,8 @@ void CodeGenerator::AssembleInstruction(Instruction* instr) {
if (mode == kFlags_branch) {
// Assemble a branch after this instruction.
InstructionOperandConverter i(this, instr);
- BasicBlock::RpoNumber true_rpo = i.InputRpo(instr->InputCount() - 2);
- BasicBlock::RpoNumber false_rpo = i.InputRpo(instr->InputCount() - 1);
+ RpoNumber true_rpo = i.InputRpo(instr->InputCount() - 2);
+ RpoNumber false_rpo = i.InputRpo(instr->InputCount() - 1);
if (true_rpo == false_rpo) {
// redundant branch.
@@ -343,7 +343,7 @@ void CodeGenerator::RecordCallPosition(Instruction* instr) {
if (flags & CallDescriptor::kHasExceptionHandler) {
InstructionOperandConverter i(this, instr);
- BasicBlock::RpoNumber handler_rpo =
+ RpoNumber handler_rpo =
i.InputRpo(static_cast<int>(instr->InputCount()) - 1);
handlers_.push_back({GetLabel(handler_rpo), masm()->pc_offset()});
}
@@ -592,9 +592,7 @@ void CodeGenerator::AssembleArchBoolean(Instruction* instr,
}
-void CodeGenerator::AssembleArchJump(BasicBlock::RpoNumber target) {
- UNIMPLEMENTED();
-}
+void CodeGenerator::AssembleArchJump(RpoNumber target) { UNIMPLEMENTED(); }
void CodeGenerator::AssembleDeoptimizerCall(int deoptimization_id) {
« 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