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 1716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1727 void BytecodeGraphBuilder::VisitJumpLoop() { BuildJump(); } | 1727 void BytecodeGraphBuilder::VisitJumpLoop() { BuildJump(); } |
1728 | 1728 |
1729 void BytecodeGraphBuilder::VisitStackCheck() { | 1729 void BytecodeGraphBuilder::VisitStackCheck() { |
1730 PrepareEagerCheckpoint(); | 1730 PrepareEagerCheckpoint(); |
1731 Node* node = NewNode(javascript()->StackCheck()); | 1731 Node* node = NewNode(javascript()->StackCheck()); |
1732 environment()->RecordAfterState(node, Environment::kAttachFrameState); | 1732 environment()->RecordAfterState(node, Environment::kAttachFrameState); |
1733 } | 1733 } |
1734 | 1734 |
1735 void BytecodeGraphBuilder::VisitReturn() { | 1735 void BytecodeGraphBuilder::VisitReturn() { |
1736 BuildLoopExitsForFunctionExit(); | 1736 BuildLoopExitsForFunctionExit(); |
1737 Node* pop_node = jsgraph()->Int32Constant(0); | 1737 Node* pop_node = jsgraph()->ZeroConstant(); |
1738 Node* control = | 1738 Node* control = |
1739 NewNode(common()->Return(), pop_node, environment()->LookupAccumulator()); | 1739 NewNode(common()->Return(), pop_node, environment()->LookupAccumulator()); |
1740 MergeControlToLeaveFunction(control); | 1740 MergeControlToLeaveFunction(control); |
1741 } | 1741 } |
1742 | 1742 |
1743 void BytecodeGraphBuilder::VisitDebugger() { | 1743 void BytecodeGraphBuilder::VisitDebugger() { |
1744 PrepareEagerCheckpoint(); | 1744 PrepareEagerCheckpoint(); |
1745 Node* call = | 1745 Node* call = |
1746 NewNode(javascript()->CallRuntime(Runtime::kHandleDebuggerStatement)); | 1746 NewNode(javascript()->CallRuntime(Runtime::kHandleDebuggerStatement)); |
1747 environment()->BindAccumulator(call, Environment::kAttachFrameState); | 1747 environment()->BindAccumulator(call, Environment::kAttachFrameState); |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2206 source_positions_->set_current_position(it->source_position()); | 2206 source_positions_->set_current_position(it->source_position()); |
2207 it->Advance(); | 2207 it->Advance(); |
2208 } else { | 2208 } else { |
2209 DCHECK_GT(it->code_offset(), offset); | 2209 DCHECK_GT(it->code_offset(), offset); |
2210 } | 2210 } |
2211 } | 2211 } |
2212 | 2212 |
2213 } // namespace compiler | 2213 } // namespace compiler |
2214 } // namespace internal | 2214 } // namespace internal |
2215 } // namespace v8 | 2215 } // namespace v8 |
OLD | NEW |