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 1503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1514 void BytecodeGraphBuilder::VisitJumpIfUndefinedConstantWide() { | 1514 void BytecodeGraphBuilder::VisitJumpIfUndefinedConstantWide() { |
1515 BuildJumpIfEqual(jsgraph()->UndefinedConstant()); | 1515 BuildJumpIfEqual(jsgraph()->UndefinedConstant()); |
1516 } | 1516 } |
1517 | 1517 |
1518 void BytecodeGraphBuilder::VisitReturn() { | 1518 void BytecodeGraphBuilder::VisitReturn() { |
1519 Node* control = | 1519 Node* control = |
1520 NewNode(common()->Return(), environment()->LookupAccumulator()); | 1520 NewNode(common()->Return(), environment()->LookupAccumulator()); |
1521 MergeControlToLeaveFunction(control); | 1521 MergeControlToLeaveFunction(control); |
1522 } | 1522 } |
1523 | 1523 |
| 1524 void BytecodeGraphBuilder::VisitDebugger() { |
| 1525 FrameStateBeforeAndAfter states(this); |
| 1526 Node* call = |
| 1527 NewNode(javascript()->CallRuntime(Runtime::kHandleDebuggerStatement)); |
| 1528 environment()->BindAccumulator(call, &states); |
| 1529 } |
| 1530 |
1524 void BytecodeGraphBuilder::BuildForInPrepare() { | 1531 void BytecodeGraphBuilder::BuildForInPrepare() { |
1525 FrameStateBeforeAndAfter states(this); | 1532 FrameStateBeforeAndAfter states(this); |
1526 Node* receiver = environment()->LookupAccumulator(); | 1533 Node* receiver = environment()->LookupAccumulator(); |
1527 Node* prepare = NewNode(javascript()->ForInPrepare(), receiver); | 1534 Node* prepare = NewNode(javascript()->ForInPrepare(), receiver); |
1528 environment()->BindRegistersToProjections( | 1535 environment()->BindRegistersToProjections( |
1529 bytecode_iterator().GetRegisterOperand(0), prepare, &states); | 1536 bytecode_iterator().GetRegisterOperand(0), prepare, &states); |
1530 } | 1537 } |
1531 | 1538 |
1532 void BytecodeGraphBuilder::VisitForInPrepare() { BuildForInPrepare(); } | 1539 void BytecodeGraphBuilder::VisitForInPrepare() { BuildForInPrepare(); } |
1533 | 1540 |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1828 // Phi does not exist yet, introduce one. | 1835 // Phi does not exist yet, introduce one. |
1829 value = NewPhi(inputs, value, control); | 1836 value = NewPhi(inputs, value, control); |
1830 value->ReplaceInput(inputs - 1, other); | 1837 value->ReplaceInput(inputs - 1, other); |
1831 } | 1838 } |
1832 return value; | 1839 return value; |
1833 } | 1840 } |
1834 | 1841 |
1835 } // namespace compiler | 1842 } // namespace compiler |
1836 } // namespace internal | 1843 } // namespace internal |
1837 } // namespace v8 | 1844 } // namespace v8 |
OLD | NEW |