OLD | NEW |
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/common-operator.h" | 5 #include "src/compiler/common-operator.h" |
6 #include "src/compiler/generic-node-inl.h" | 6 #include "src/compiler/generic-node-inl.h" |
7 #include "src/compiler/graph.h" | 7 #include "src/compiler/graph.h" |
8 #include "src/compiler/instruction.h" | 8 #include "src/compiler/instruction.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 next_virtual_register_(0), | 428 next_virtual_register_(0), |
429 pointer_maps_(zone()), | 429 pointer_maps_(zone()), |
430 doubles_(std::less<int>(), VirtualRegisterSet::allocator_type(zone())), | 430 doubles_(std::less<int>(), VirtualRegisterSet::allocator_type(zone())), |
431 references_(std::less<int>(), VirtualRegisterSet::allocator_type(zone())), | 431 references_(std::less<int>(), VirtualRegisterSet::allocator_type(zone())), |
432 deoptimization_entries_(zone()) { | 432 deoptimization_entries_(zone()) { |
433 block_starts_.reserve(instruction_blocks_->size()); | 433 block_starts_.reserve(instruction_blocks_->size()); |
434 } | 434 } |
435 | 435 |
436 | 436 |
437 BlockStartInstruction* InstructionSequence::GetBlockStart( | 437 BlockStartInstruction* InstructionSequence::GetBlockStart( |
438 BasicBlock::RpoNumber rpo) { | 438 BasicBlock::RpoNumber rpo) const { |
439 InstructionBlock* block = InstructionBlockAt(rpo); | 439 const InstructionBlock* block = InstructionBlockAt(rpo); |
440 return BlockStartInstruction::cast(InstructionAt(block->code_start())); | 440 return BlockStartInstruction::cast(InstructionAt(block->code_start())); |
441 } | 441 } |
442 | 442 |
443 | 443 |
444 void InstructionSequence::StartBlock(BasicBlock::RpoNumber rpo) { | 444 void InstructionSequence::StartBlock(BasicBlock::RpoNumber rpo) { |
445 DCHECK(block_starts_.size() == rpo.ToSize()); | 445 DCHECK(block_starts_.size() == rpo.ToSize()); |
446 InstructionBlock* block = InstructionBlockAt(rpo); | 446 InstructionBlock* block = InstructionBlockAt(rpo); |
447 int code_start = static_cast<int>(instructions_.size()); | 447 int code_start = static_cast<int>(instructions_.size()); |
448 block->set_code_start(code_start); | 448 block->set_code_start(code_start); |
449 block_starts_.push_back(code_start); | 449 block_starts_.push_back(code_start); |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
667 os << " B" << succ_block->id(); | 667 os << " B" << succ_block->id(); |
668 } | 668 } |
669 os << "\n"; | 669 os << "\n"; |
670 } | 670 } |
671 return os; | 671 return os; |
672 } | 672 } |
673 | 673 |
674 } // namespace compiler | 674 } // namespace compiler |
675 } // namespace internal | 675 } // namespace internal |
676 } // namespace v8 | 676 } // namespace v8 |
OLD | NEW |