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 1500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1511 Node* node = NewNode(javascript()->StackCheck()); | 1511 Node* node = NewNode(javascript()->StackCheck()); |
1512 environment()->RecordAfterState(node, &states); | 1512 environment()->RecordAfterState(node, &states); |
1513 } | 1513 } |
1514 | 1514 |
1515 void BytecodeGraphBuilder::VisitReturn() { | 1515 void BytecodeGraphBuilder::VisitReturn() { |
1516 Node* control = | 1516 Node* control = |
1517 NewNode(common()->Return(), environment()->LookupAccumulator()); | 1517 NewNode(common()->Return(), environment()->LookupAccumulator()); |
1518 MergeControlToLeaveFunction(control); | 1518 MergeControlToLeaveFunction(control); |
1519 } | 1519 } |
1520 | 1520 |
| 1521 void BytecodeGraphBuilder::VisitDebugger() { |
| 1522 FrameStateBeforeAndAfter states(this); |
| 1523 Node* call = |
| 1524 NewNode(javascript()->CallRuntime(Runtime::kHandleDebuggerStatement)); |
| 1525 environment()->BindAccumulator(call, &states); |
| 1526 } |
| 1527 |
1521 void BytecodeGraphBuilder::BuildForInPrepare() { | 1528 void BytecodeGraphBuilder::BuildForInPrepare() { |
1522 FrameStateBeforeAndAfter states(this); | 1529 FrameStateBeforeAndAfter states(this); |
1523 Node* receiver = environment()->LookupAccumulator(); | 1530 Node* receiver = environment()->LookupAccumulator(); |
1524 Node* prepare = NewNode(javascript()->ForInPrepare(), receiver); | 1531 Node* prepare = NewNode(javascript()->ForInPrepare(), receiver); |
1525 environment()->BindRegistersToProjections( | 1532 environment()->BindRegistersToProjections( |
1526 bytecode_iterator().GetRegisterOperand(0), prepare, &states); | 1533 bytecode_iterator().GetRegisterOperand(0), prepare, &states); |
1527 } | 1534 } |
1528 | 1535 |
1529 void BytecodeGraphBuilder::VisitForInPrepare() { BuildForInPrepare(); } | 1536 void BytecodeGraphBuilder::VisitForInPrepare() { BuildForInPrepare(); } |
1530 | 1537 |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1815 // Phi does not exist yet, introduce one. | 1822 // Phi does not exist yet, introduce one. |
1816 value = NewPhi(inputs, value, control); | 1823 value = NewPhi(inputs, value, control); |
1817 value->ReplaceInput(inputs - 1, other); | 1824 value->ReplaceInput(inputs - 1, other); |
1818 } | 1825 } |
1819 return value; | 1826 return value; |
1820 } | 1827 } |
1821 | 1828 |
1822 } // namespace compiler | 1829 } // namespace compiler |
1823 } // namespace internal | 1830 } // namespace internal |
1824 } // namespace v8 | 1831 } // namespace v8 |
OLD | NEW |