| 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/ast/ast.h" | 7 #include "src/ast/ast.h" |
| 8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
| 9 #include "src/compilation-info.h" | 9 #include "src/compilation-info.h" |
| 10 #include "src/compiler/bytecode-branch-analysis.h" | 10 #include "src/compiler/bytecode-branch-analysis.h" |
| (...skipping 1602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1613 } | 1613 } |
| 1614 | 1614 |
| 1615 void BytecodeGraphBuilder::VisitJumpIfUndefined() { | 1615 void BytecodeGraphBuilder::VisitJumpIfUndefined() { |
| 1616 BuildJumpIfEqual(jsgraph()->UndefinedConstant()); | 1616 BuildJumpIfEqual(jsgraph()->UndefinedConstant()); |
| 1617 } | 1617 } |
| 1618 | 1618 |
| 1619 void BytecodeGraphBuilder::VisitJumpIfUndefinedConstant() { | 1619 void BytecodeGraphBuilder::VisitJumpIfUndefinedConstant() { |
| 1620 BuildJumpIfEqual(jsgraph()->UndefinedConstant()); | 1620 BuildJumpIfEqual(jsgraph()->UndefinedConstant()); |
| 1621 } | 1621 } |
| 1622 | 1622 |
| 1623 void BytecodeGraphBuilder::VisitJumpLoop() { BuildJump(); } |
| 1624 |
| 1623 void BytecodeGraphBuilder::VisitStackCheck() { | 1625 void BytecodeGraphBuilder::VisitStackCheck() { |
| 1624 FrameStateBeforeAndAfter states(this); | 1626 FrameStateBeforeAndAfter states(this); |
| 1625 Node* node = NewNode(javascript()->StackCheck()); | 1627 Node* node = NewNode(javascript()->StackCheck()); |
| 1626 environment()->RecordAfterState(node, &states); | 1628 environment()->RecordAfterState(node, &states); |
| 1627 } | 1629 } |
| 1628 | 1630 |
| 1629 void BytecodeGraphBuilder::VisitOsrPoll() {} | |
| 1630 | |
| 1631 void BytecodeGraphBuilder::VisitReturn() { | 1631 void BytecodeGraphBuilder::VisitReturn() { |
| 1632 BuildLoopExitsForFunctionExit(); | 1632 BuildLoopExitsForFunctionExit(); |
| 1633 Node* control = | 1633 Node* control = |
| 1634 NewNode(common()->Return(), environment()->LookupAccumulator()); | 1634 NewNode(common()->Return(), environment()->LookupAccumulator()); |
| 1635 MergeControlToLeaveFunction(control); | 1635 MergeControlToLeaveFunction(control); |
| 1636 } | 1636 } |
| 1637 | 1637 |
| 1638 void BytecodeGraphBuilder::VisitDebugger() { | 1638 void BytecodeGraphBuilder::VisitDebugger() { |
| 1639 FrameStateBeforeAndAfter states(this); | 1639 FrameStateBeforeAndAfter states(this); |
| 1640 Node* call = | 1640 Node* call = |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2082 // Phi does not exist yet, introduce one. | 2082 // Phi does not exist yet, introduce one. |
| 2083 value = NewPhi(inputs, value, control); | 2083 value = NewPhi(inputs, value, control); |
| 2084 value->ReplaceInput(inputs - 1, other); | 2084 value->ReplaceInput(inputs - 1, other); |
| 2085 } | 2085 } |
| 2086 return value; | 2086 return value; |
| 2087 } | 2087 } |
| 2088 | 2088 |
| 2089 } // namespace compiler | 2089 } // namespace compiler |
| 2090 } // namespace internal | 2090 } // namespace internal |
| 2091 } // namespace v8 | 2091 } // namespace v8 |
| OLD | NEW |