| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/bytecode-graph-builder.h" | 5 #include "src/compiler/bytecode-graph-builder.h" |
| 6 | 6 |
| 7 #include "src/compiler/linkage.h" | 7 #include "src/compiler/linkage.h" |
| 8 #include "src/compiler/operator-properties.h" | 8 #include "src/compiler/operator-properties.h" |
| 9 #include "src/interpreter/bytecode-array-iterator.h" | 9 #include "src/interpreter/bytecode-array-iterator.h" |
| 10 | 10 |
| (...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 651 | 651 |
| 652 | 652 |
| 653 void BytecodeGraphBuilder::VisitReturn( | 653 void BytecodeGraphBuilder::VisitReturn( |
| 654 const interpreter::BytecodeArrayIterator& iterator) { | 654 const interpreter::BytecodeArrayIterator& iterator) { |
| 655 Node* control = | 655 Node* control = |
| 656 NewNode(common()->Return(), environment()->LookupAccumulator()); | 656 NewNode(common()->Return(), environment()->LookupAccumulator()); |
| 657 UpdateControlDependencyToLeaveFunction(control); | 657 UpdateControlDependencyToLeaveFunction(control); |
| 658 } | 658 } |
| 659 | 659 |
| 660 | 660 |
| 661 void BytecodeGraphBuilder::VisitForInPrepare( |
| 662 const interpreter::BytecodeArrayIterator& iterator) { |
| 663 UNIMPLEMENTED(); |
| 664 } |
| 665 |
| 666 |
| 667 void BytecodeGraphBuilder::VisitForInNext( |
| 668 const interpreter::BytecodeArrayIterator& iterator) { |
| 669 UNIMPLEMENTED(); |
| 670 } |
| 671 |
| 672 |
| 673 void BytecodeGraphBuilder::VisitForInDone( |
| 674 const interpreter::BytecodeArrayIterator& iterator) { |
| 675 UNIMPLEMENTED(); |
| 676 } |
| 677 |
| 678 |
| 661 Node** BytecodeGraphBuilder::EnsureInputBufferSize(int size) { | 679 Node** BytecodeGraphBuilder::EnsureInputBufferSize(int size) { |
| 662 if (size > input_buffer_size_) { | 680 if (size > input_buffer_size_) { |
| 663 size = size + kInputBufferSizeIncrement + input_buffer_size_; | 681 size = size + kInputBufferSizeIncrement + input_buffer_size_; |
| 664 input_buffer_ = local_zone()->NewArray<Node*>(size); | 682 input_buffer_ = local_zone()->NewArray<Node*>(size); |
| 665 input_buffer_size_ = size; | 683 input_buffer_size_ = size; |
| 666 } | 684 } |
| 667 return input_buffer_; | 685 return input_buffer_; |
| 668 } | 686 } |
| 669 | 687 |
| 670 | 688 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 754 | 772 |
| 755 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) { | 773 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) { |
| 756 if (environment()->IsMarkedAsUnreachable()) return; | 774 if (environment()->IsMarkedAsUnreachable()) return; |
| 757 environment()->MarkAsUnreachable(); | 775 environment()->MarkAsUnreachable(); |
| 758 exit_controls_.push_back(exit); | 776 exit_controls_.push_back(exit); |
| 759 } | 777 } |
| 760 | 778 |
| 761 } // namespace compiler | 779 } // namespace compiler |
| 762 } // namespace internal | 780 } // namespace internal |
| 763 } // namespace v8 | 781 } // namespace v8 |
| OLD | NEW |