Reviewers: Benedikt Meurer,

Message:
Committed patchset #1 (id:1) manually as 24728 (presubmit successful).

Description:
[turbofan] pass zone to InstructionSequence

[email protected]

BUG=

Committed: https://code.google.com/p/v8/source/detail?r=24728

Please review this at https://codereview.chromium.org/663073002/

Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+10, -8 lines):
  M src/compiler/instruction.h
  M src/compiler/instruction.cc
  M src/compiler/pipeline.cc
  M test/cctest/compiler/test-codegen-deopt.cc
  M test/cctest/compiler/test-instruction.cc
  M test/unittests/compiler/instruction-selector-unittest.cc


Index: src/compiler/instruction.cc
diff --git a/src/compiler/instruction.cc b/src/compiler/instruction.cc
index 4efa6e8e50b3d79740b8f5acd421e29f418c40e4..0f041af989cf465e8e5afdae6bb993da2a1b7a09 100644
--- a/src/compiler/instruction.cc
+++ b/src/compiler/instruction.cc
@@ -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,
Index: src/compiler/instruction.h
diff --git a/src/compiler/instruction.h b/src/compiler/instruction.h
index c3e83fa44c5d03aaa3d07a81daea863f74edffed..7359356b11f9718cbdc5e269f388c4674e486b5a 100644
--- a/src/compiler/instruction.h
+++ b/src/compiler/instruction.h
@@ -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_++; }
Index: src/compiler/pipeline.cc
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc
index 3a3460f715ab7694306253486888f2011a84362b..f38065e411834e7e30fc592321ba3698d7478749 100644
--- a/src/compiler/pipeline.cc
+++ b/src/compiler/pipeline.cc
@@ -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.
   {
Index: test/cctest/compiler/test-codegen-deopt.cc
diff --git a/test/cctest/compiler/test-codegen-deopt.cc b/test/cctest/compiler/test-codegen-deopt.cc index 301ef7026edf730f8aa93356c241dd6ab6613bdf..d68298612918cbd46a01360fbe53f9132e95264e 100644
--- a/test/cctest/compiler/test-codegen-deopt.cc
+++ b/test/cctest/compiler/test-codegen-deopt.cc
@@ -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();
Index: test/cctest/compiler/test-instruction.cc
diff --git a/test/cctest/compiler/test-instruction.cc b/test/cctest/compiler/test-instruction.cc index 6d86bf9d9317ac004c153e83de1ec59f3b954ff9..cde475b35fd3bcff30484bf42462eedd193267cf 100644
--- a/test/cctest/compiler/test-instruction.cc
+++ b/test/cctest/compiler/test-instruction.cc
@@ -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) {
Index: test/unittests/compiler/instruction-selector-unittest.cc
diff --git a/test/unittests/compiler/instruction-selector-unittest.cc b/test/unittests/compiler/instruction-selector-unittest.cc index 97ae5b4a4d5048a402d91f7360bf5c7ef8075f00..b1288d1bf1209c16bd18058cdbde2e6d77fb1d49 100644
--- a/test/unittests/compiler/instruction-selector-unittest.cc
+++ b/test/unittests/compiler/instruction-selector-unittest.cc
@@ -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);


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to