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

Side by Side Diff: src/compiler/instruction.cc

Issue 663073002: [turbofan] pass zone to InstructionSequence (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/compiler/instruction.h ('k') | src/compiler/pipeline.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/instruction.h" 5 #include "src/compiler/instruction.h"
6 6
7 #include "src/compiler/common-operator.h" 7 #include "src/compiler/common-operator.h"
8 #include "src/compiler/generic-node-inl.h" 8 #include "src/compiler/generic-node-inl.h"
9 #include "src/compiler/graph.h" 9 #include "src/compiler/graph.h"
10 10
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 size_t rpo_number = 0; 373 size_t rpo_number = 0;
374 for (BasicBlockVector::const_iterator it = schedule->rpo_order()->begin(); 374 for (BasicBlockVector::const_iterator it = schedule->rpo_order()->begin();
375 it != schedule->rpo_order()->end(); ++it, ++rpo_number) { 375 it != schedule->rpo_order()->end(); ++it, ++rpo_number) {
376 DCHECK_EQ(NULL, (*blocks)[rpo_number]); 376 DCHECK_EQ(NULL, (*blocks)[rpo_number]);
377 DCHECK((*it)->GetRpoNumber().ToSize() == rpo_number); 377 DCHECK((*it)->GetRpoNumber().ToSize() == rpo_number);
378 (*blocks)[rpo_number] = new (zone) InstructionBlock(zone, *it); 378 (*blocks)[rpo_number] = new (zone) InstructionBlock(zone, *it);
379 } 379 }
380 } 380 }
381 381
382 382
383 InstructionSequence::InstructionSequence(Linkage* linkage, const Graph* graph, 383 InstructionSequence::InstructionSequence(Zone* instruction_zone,
384 Linkage* linkage, const Graph* graph,
384 const Schedule* schedule) 385 const Schedule* schedule)
385 : zone_(schedule->zone()), 386 : zone_(instruction_zone),
386 node_count_(graph->NodeCount()), 387 node_count_(graph->NodeCount()),
387 node_map_(zone()->NewArray<int>(node_count_)), 388 node_map_(zone()->NewArray<int>(node_count_)),
388 instruction_blocks_(static_cast<int>(schedule->rpo_order()->size()), NULL, 389 instruction_blocks_(static_cast<int>(schedule->rpo_order()->size()), NULL,
389 zone()), 390 zone()),
390 linkage_(linkage), 391 linkage_(linkage),
391 constants_(ConstantMap::key_compare(), 392 constants_(ConstantMap::key_compare(),
392 ConstantMap::allocator_type(zone())), 393 ConstantMap::allocator_type(zone())),
393 immediates_(zone()), 394 immediates_(zone()),
394 instructions_(zone()), 395 instructions_(zone()),
395 next_virtual_register_(0), 396 next_virtual_register_(0),
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 os << " B" << succ_block->id(); 651 os << " B" << succ_block->id();
651 } 652 }
652 os << "\n"; 653 os << "\n";
653 } 654 }
654 return os; 655 return os;
655 } 656 }
656 657
657 } // namespace compiler 658 } // namespace compiler
658 } // namespace internal 659 } // namespace internal
659 } // namespace v8 660 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction.h ('k') | src/compiler/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698