Commit 32161089 authored by dcarney@chromium.org's avatar dcarney@chromium.org

[turbofan] pass zone to InstructionSequence

R=bmeurer@chromium.org

BUG=

Review URL: https://codereview.chromium.org/663073002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24728 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent e82b3c76
......@@ -380,9 +380,10 @@ static void InitializeInstructionBlocks(Zone* zone, const Schedule* schedule,
}
InstructionSequence::InstructionSequence(Linkage* linkage, const Graph* graph,
InstructionSequence::InstructionSequence(Zone* instruction_zone,
Linkage* linkage, const Graph* graph,
const Schedule* schedule)
: zone_(schedule->zone()),
: zone_(instruction_zone),
node_count_(graph->NodeCount()),
node_map_(zone()->NewArray<int>(node_count_)),
instruction_blocks_(static_cast<int>(schedule->rpo_order()->size()), NULL,
......
......@@ -844,7 +844,7 @@ typedef ZoneVector<InstructionBlock*> InstructionBlocks;
// TODO(titzer): s/IsDouble/IsFloat64/
class InstructionSequence FINAL {
public:
InstructionSequence(Linkage* linkage, const Graph* graph,
InstructionSequence(Zone* zone, Linkage* linkage, const Graph* graph,
const Schedule* schedule);
int NextVirtualRegister() { return next_virtual_register_++; }
......
......@@ -453,7 +453,8 @@ Handle<Code> Pipeline::GenerateCode(Linkage* linkage, Graph* graph,
profiler_data = BasicBlockInstrumentor::Instrument(info_, graph, schedule);
}
InstructionSequence sequence(linkage, graph, schedule);
Zone* instruction_zone = schedule->zone();
InstructionSequence sequence(instruction_zone, linkage, graph, schedule);
// Select and schedule instructions covering the scheduled graph.
{
......
......@@ -65,8 +65,8 @@ class DeoptCodegenTester {
// Initialize the codegen and generate code.
Linkage* linkage = new (scope_->main_zone()) Linkage(&info);
code = new v8::internal::compiler::InstructionSequence(linkage, graph,
schedule);
code = new v8::internal::compiler::InstructionSequence(
scope_->main_zone(), linkage, graph, schedule);
SourcePositionTable source_positions(graph);
InstructionSelector selector(code, schedule, &source_positions);
selector.SelectInstructions();
......
......@@ -54,7 +54,7 @@ class InstructionTester : public HandleAndZoneScope {
Scheduler::ComputeSpecialRPO(&schedule);
DCHECK(schedule.rpo_order()->size() > 0);
}
code = new TestInstrSeq(&linkage, &graph, &schedule);
code = new TestInstrSeq(main_zone(), &linkage, &graph, &schedule);
}
Node* Int32Constant(int32_t val) {
......
......@@ -38,7 +38,7 @@ InstructionSelectorTest::Stream InstructionSelectorTest::StreamBuilder::Build(
int initial_node_count = graph()->NodeCount();
CompilationInfo info(test_->isolate(), test_->zone());
Linkage linkage(&info, call_descriptor());
InstructionSequence sequence(&linkage, graph(), schedule);
InstructionSequence sequence(test_->zone(), &linkage, graph(), schedule);
SourcePositionTable source_position_table(graph());
InstructionSelector selector(&sequence, schedule, &source_position_table,
features);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment