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 1417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1428 MergeControlToLeaveFunction(control); | 1428 MergeControlToLeaveFunction(control); |
1429 } | 1429 } |
1430 | 1430 |
1431 void BytecodeGraphBuilder::VisitDebugger() { | 1431 void BytecodeGraphBuilder::VisitDebugger() { |
1432 FrameStateBeforeAndAfter states(this); | 1432 FrameStateBeforeAndAfter states(this); |
1433 Node* call = | 1433 Node* call = |
1434 NewNode(javascript()->CallRuntime(Runtime::kHandleDebuggerStatement)); | 1434 NewNode(javascript()->CallRuntime(Runtime::kHandleDebuggerStatement)); |
1435 environment()->BindAccumulator(call, &states); | 1435 environment()->BindAccumulator(call, &states); |
1436 } | 1436 } |
1437 | 1437 |
| 1438 // We cannot create a graph from the debugger copy of the bytecode array. |
| 1439 #define DEBUG_BREAK(Name, ...) \ |
| 1440 void BytecodeGraphBuilder::Visit##Name() { UNREACHABLE(); } |
| 1441 DEBUG_BREAK_BYTECODE_LIST(DEBUG_BREAK); |
| 1442 #undef DEBUG_BREAK |
| 1443 |
1438 void BytecodeGraphBuilder::BuildForInPrepare() { | 1444 void BytecodeGraphBuilder::BuildForInPrepare() { |
1439 FrameStateBeforeAndAfter states(this); | 1445 FrameStateBeforeAndAfter states(this); |
1440 Node* receiver = environment()->LookupAccumulator(); | 1446 Node* receiver = environment()->LookupAccumulator(); |
1441 Node* prepare = NewNode(javascript()->ForInPrepare(), receiver); | 1447 Node* prepare = NewNode(javascript()->ForInPrepare(), receiver); |
1442 environment()->BindRegistersToProjections( | 1448 environment()->BindRegistersToProjections( |
1443 bytecode_iterator().GetRegisterOperand(0), prepare, &states); | 1449 bytecode_iterator().GetRegisterOperand(0), prepare, &states); |
1444 } | 1450 } |
1445 | 1451 |
1446 void BytecodeGraphBuilder::VisitForInPrepare() { BuildForInPrepare(); } | 1452 void BytecodeGraphBuilder::VisitForInPrepare() { BuildForInPrepare(); } |
1447 | 1453 |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1751 // Phi does not exist yet, introduce one. | 1757 // Phi does not exist yet, introduce one. |
1752 value = NewPhi(inputs, value, control); | 1758 value = NewPhi(inputs, value, control); |
1753 value->ReplaceInput(inputs - 1, other); | 1759 value->ReplaceInput(inputs - 1, other); |
1754 } | 1760 } |
1755 return value; | 1761 return value; |
1756 } | 1762 } |
1757 | 1763 |
1758 } // namespace compiler | 1764 } // namespace compiler |
1759 } // namespace internal | 1765 } // namespace internal |
1760 } // namespace v8 | 1766 } // namespace v8 |
OLD | NEW |