| Index: src/hydrogen.cc
|
| diff --git a/src/hydrogen.cc b/src/hydrogen.cc
|
| index 57329ba726a3958f033b11467460e58d0cf6889e..88cd5bd3fbb58b04b73a01361c7421539bca17c2 100644
|
| --- a/src/hydrogen.cc
|
| +++ b/src/hydrogen.cc
|
| @@ -55,19 +55,19 @@ namespace internal {
|
| HBasicBlock::HBasicBlock(HGraph* graph)
|
| : block_id_(graph->GetNextBlockID()),
|
| graph_(graph),
|
| - phis_(4),
|
| + phis_(zone(), 4),
|
| first_(NULL),
|
| last_(NULL),
|
| end_(NULL),
|
| loop_information_(NULL),
|
| - predecessors_(2),
|
| + predecessors_(zone(), 2),
|
| dominator_(NULL),
|
| - dominated_blocks_(4),
|
| + dominated_blocks_(zone(), 4),
|
| last_environment_(NULL),
|
| argument_count_(-1),
|
| first_instruction_index_(-1),
|
| last_instruction_index_(-1),
|
| - deleted_phis_(4),
|
| + deleted_phis_(zone(), 4),
|
| parent_loop_header_(NULL),
|
| is_inline_return_target_(false),
|
| is_deoptimizing_(false) { }
|
| @@ -375,7 +375,7 @@ class ReachabilityAnalyzer BASE_EMBEDDED {
|
| int block_count,
|
| HBasicBlock* dont_visit)
|
| : visited_count_(0),
|
| - stack_(16),
|
| + stack_(ZONE, 16),
|
| reachable_(block_count),
|
| dont_visit_(dont_visit) {
|
| PushBlock(entry_block);
|
| @@ -597,8 +597,8 @@ HGraph::HGraph(CompilationInfo* info)
|
| : isolate_(info->isolate()),
|
| next_block_id_(0),
|
| entry_block_(NULL),
|
| - blocks_(8),
|
| - values_(16),
|
| + blocks_(info->zone(), 8),
|
| + values_(info->zone(), 16),
|
| phi_list_(NULL) {
|
| start_environment_ =
|
| new(zone()) HEnvironment(NULL, info->scope(), info->closure());
|
| @@ -675,7 +675,7 @@ void HGraph::OrderBlocks() {
|
| HPhase phase("Block ordering");
|
| BitVector visited(blocks_.length());
|
|
|
| - ZoneList<HBasicBlock*> reverse_result(8);
|
| + ZoneList<HBasicBlock*> reverse_result(zone(), 8);
|
| HBasicBlock* start = blocks_[0];
|
| Postorder(start, &visited, &reverse_result, NULL);
|
|
|
| @@ -764,7 +764,7 @@ void HGraph::EliminateRedundantPhis() {
|
| // Worklist of phis that can potentially be eliminated. Initialized with
|
| // all phi nodes. When elimination of a phi node modifies another phi node
|
| // the modified phi node is added to the worklist.
|
| - ZoneList<HPhi*> worklist(blocks_.length());
|
| + ZoneList<HPhi*> worklist(zone(), blocks_.length());
|
| for (int i = 0; i < blocks_.length(); ++i) {
|
| worklist.AddAll(*blocks_[i]->phis());
|
| }
|
| @@ -796,8 +796,8 @@ void HGraph::EliminateUnreachablePhis() {
|
| HPhase phase("Unreachable phi elimination", this);
|
|
|
| // Initialize worklist.
|
| - ZoneList<HPhi*> phi_list(blocks_.length());
|
| - ZoneList<HPhi*> worklist(blocks_.length());
|
| + ZoneList<HPhi*> phi_list(zone(), blocks_.length());
|
| + ZoneList<HPhi*> worklist(zone(), blocks_.length());
|
| for (int i = 0; i < blocks_.length(); ++i) {
|
| for (int j = 0; j < blocks_[i]->phis()->length(); j++) {
|
| HPhi* phi = blocks_[i]->phis()->at(j);
|
| @@ -838,7 +838,7 @@ void HGraph::EliminateUnreachablePhis() {
|
|
|
| bool HGraph::CollectPhis() {
|
| int block_count = blocks_.length();
|
| - phi_list_ = new ZoneList<HPhi*>(block_count);
|
| + phi_list_ = ZoneList<HPhi*>::New(zone(), block_count);
|
| for (int i = 0; i < block_count; ++i) {
|
| for (int j = 0; j < blocks_[i]->phis()->length(); ++j) {
|
| HPhi* phi = blocks_[i]->phis()->at(j);
|
| @@ -880,7 +880,9 @@ void HGraph::InferTypes(ZoneList<HValue*>* worklist) {
|
|
|
| class HRangeAnalysis BASE_EMBEDDED {
|
| public:
|
| - explicit HRangeAnalysis(HGraph* graph) : graph_(graph), changed_ranges_(16) {}
|
| + explicit HRangeAnalysis(HGraph* graph)
|
| + : graph_(graph),
|
| + changed_ranges_(graph->zone(), 16) {}
|
|
|
| void Analyze();
|
|
|
| @@ -1305,9 +1307,9 @@ class HGlobalValueNumberer BASE_EMBEDDED {
|
| explicit HGlobalValueNumberer(HGraph* graph, CompilationInfo* info)
|
| : graph_(graph),
|
| info_(info),
|
| - block_side_effects_(graph->blocks()->length()),
|
| - loop_side_effects_(graph->blocks()->length()),
|
| - visited_on_paths_(graph->zone(), graph->blocks()->length()) {
|
| + block_side_effects_(info->zone(), graph->blocks()->length()),
|
| + loop_side_effects_(info->zone(), graph->blocks()->length()),
|
| + visited_on_paths_(info->zone(), graph->blocks()->length()) {
|
| ASSERT(info->isolate()->heap()->allow_allocation(false));
|
| block_side_effects_.AddBlock(0, graph_->blocks()->length());
|
| loop_side_effects_.AddBlock(0, graph_->blocks()->length());
|
| @@ -1534,7 +1536,9 @@ void HGlobalValueNumberer::AnalyzeBlock(HBasicBlock* block, HValueMap* map) {
|
| class HInferRepresentation BASE_EMBEDDED {
|
| public:
|
| explicit HInferRepresentation(HGraph* graph)
|
| - : graph_(graph), worklist_(8), in_worklist_(graph->GetMaximumValueID()) {}
|
| + : graph_(graph),
|
| + worklist_(graph->zone(), 8),
|
| + in_worklist_(graph->GetMaximumValueID()) {}
|
|
|
| void Analyze();
|
|
|
| @@ -1646,7 +1650,7 @@ void HInferRepresentation::Analyze() {
|
| // bit-vector of length <number of phis>.
|
| const ZoneList<HPhi*>* phi_list = graph_->phi_list();
|
| int phi_count = phi_list->length();
|
| - ZoneList<BitVector*> connected_phis(phi_count);
|
| + ZoneList<BitVector*> connected_phis(graph_->zone(), phi_count);
|
| for (int i = 0; i < phi_count; ++i) {
|
| phi_list->at(i)->InitRealUses(i);
|
| BitVector* connected_set = new(zone()) BitVector(phi_count);
|
| @@ -1759,7 +1763,7 @@ void HGraph::InitializeInferredTypes(int from_inclusive, int to_inclusive) {
|
| i = last_back_edge->block_id();
|
| // Update phis of the loop header now after the whole loop body is
|
| // guaranteed to be processed.
|
| - ZoneList<HValue*> worklist(block->phis()->length());
|
| + ZoneList<HValue*> worklist(zone(), block->phis()->length());
|
| for (int j = 0; j < block->phis()->length(); ++j) {
|
| worklist.Add(block->phis()->at(j));
|
| }
|
| @@ -2379,7 +2383,7 @@ void HGraphBuilder::PushAndAdd(HInstruction* instr) {
|
| template <int V>
|
| HInstruction* HGraphBuilder::PreProcessCall(HCall<V>* call) {
|
| int count = call->argument_count();
|
| - ZoneList<HValue*> arguments(count);
|
| + ZoneList<HValue*> arguments(zone(), count);
|
| for (int i = 0; i < count; ++i) {
|
| arguments.Add(Pop());
|
| }
|
| @@ -6190,8 +6194,8 @@ HEnvironment::HEnvironment(HEnvironment* outer,
|
| Scope* scope,
|
| Handle<JSFunction> closure)
|
| : closure_(closure),
|
| - values_(0),
|
| - assigned_variables_(4),
|
| + values_(ZONE, 0),
|
| + assigned_variables_(ZONE, 4),
|
| parameter_count_(0),
|
| specials_count_(1),
|
| local_count_(0),
|
| @@ -6204,8 +6208,8 @@ HEnvironment::HEnvironment(HEnvironment* outer,
|
|
|
|
|
| HEnvironment::HEnvironment(const HEnvironment* other)
|
| - : values_(0),
|
| - assigned_variables_(0),
|
| + : values_(ZONE, 0),
|
| + assigned_variables_(ZONE, 0),
|
| parameter_count_(0),
|
| specials_count_(1),
|
| local_count_(0),
|
|
|