| 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/bytecode-branch-analysis.h" | 7 #include "src/compiler/bytecode-branch-analysis.h" |
| 8 #include "src/compiler/linkage.h" | 8 #include "src/compiler/linkage.h" |
| 9 #include "src/compiler/operator-properties.h" | 9 #include "src/compiler/operator-properties.h" |
| 10 #include "src/interpreter/bytecodes.h" | 10 #include "src/interpreter/bytecodes.h" |
| (...skipping 1659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1670 if (current_offset < current_end) break; // Still covered by range. | 1670 if (current_offset < current_end) break; // Still covered by range. |
| 1671 exception_handlers_.pop(); | 1671 exception_handlers_.pop(); |
| 1672 } | 1672 } |
| 1673 | 1673 |
| 1674 // Potentially enter exception handlers. | 1674 // Potentially enter exception handlers. |
| 1675 while (current_exception_handler_ < num_entries) { | 1675 while (current_exception_handler_ < num_entries) { |
| 1676 int next_start = table->GetRangeStart(current_exception_handler_); | 1676 int next_start = table->GetRangeStart(current_exception_handler_); |
| 1677 if (current_offset < next_start) break; // Not yet covered by range. | 1677 if (current_offset < next_start) break; // Not yet covered by range. |
| 1678 int next_end = table->GetRangeEnd(current_exception_handler_); | 1678 int next_end = table->GetRangeEnd(current_exception_handler_); |
| 1679 int next_handler = table->GetRangeHandler(current_exception_handler_); | 1679 int next_handler = table->GetRangeHandler(current_exception_handler_); |
| 1680 // TODO(mstarzinger): We are hijacking the "depth" field in the exception | 1680 int context_register = table->GetRangeData(current_exception_handler_); |
| 1681 // handler table to hold the context register. We should rename the field. | |
| 1682 int context_register = table->GetRangeDepth(current_exception_handler_); | |
| 1683 exception_handlers_.push( | 1681 exception_handlers_.push( |
| 1684 {next_start, next_end, next_handler, context_register}); | 1682 {next_start, next_end, next_handler, context_register}); |
| 1685 current_exception_handler_++; | 1683 current_exception_handler_++; |
| 1686 } | 1684 } |
| 1687 } | 1685 } |
| 1688 | 1686 |
| 1689 Node* BytecodeGraphBuilder::MakeNode(const Operator* op, int value_input_count, | 1687 Node* BytecodeGraphBuilder::MakeNode(const Operator* op, int value_input_count, |
| 1690 Node** value_inputs, bool incomplete) { | 1688 Node** value_inputs, bool incomplete) { |
| 1691 DCHECK_EQ(op->ValueInputCount(), value_input_count); | 1689 DCHECK_EQ(op->ValueInputCount(), value_input_count); |
| 1692 | 1690 |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1837 // Phi does not exist yet, introduce one. | 1835 // Phi does not exist yet, introduce one. |
| 1838 value = NewPhi(inputs, value, control); | 1836 value = NewPhi(inputs, value, control); |
| 1839 value->ReplaceInput(inputs - 1, other); | 1837 value->ReplaceInput(inputs - 1, other); |
| 1840 } | 1838 } |
| 1841 return value; | 1839 return value; |
| 1842 } | 1840 } |
| 1843 | 1841 |
| 1844 } // namespace compiler | 1842 } // namespace compiler |
| 1845 } // namespace internal | 1843 } // namespace internal |
| 1846 } // namespace v8 | 1844 } // namespace v8 |
| OLD | NEW |