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 1744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1755 void BytecodeGraphBuilder::VisitJumpLoop() { BuildJump(); } | 1755 void BytecodeGraphBuilder::VisitJumpLoop() { BuildJump(); } |
1756 | 1756 |
1757 void BytecodeGraphBuilder::VisitStackCheck() { | 1757 void BytecodeGraphBuilder::VisitStackCheck() { |
1758 PrepareEagerCheckpoint(); | 1758 PrepareEagerCheckpoint(); |
1759 Node* node = NewNode(javascript()->StackCheck()); | 1759 Node* node = NewNode(javascript()->StackCheck()); |
1760 environment()->RecordAfterState(node, Environment::kAttachFrameState); | 1760 environment()->RecordAfterState(node, Environment::kAttachFrameState); |
1761 } | 1761 } |
1762 | 1762 |
1763 void BytecodeGraphBuilder::VisitReturn() { | 1763 void BytecodeGraphBuilder::VisitReturn() { |
1764 BuildLoopExitsForFunctionExit(); | 1764 BuildLoopExitsForFunctionExit(); |
| 1765 Node* pop_node = jsgraph()->Int32Constant(0); |
1765 Node* control = | 1766 Node* control = |
1766 NewNode(common()->Return(), environment()->LookupAccumulator()); | 1767 NewNode(common()->Return(), pop_node, environment()->LookupAccumulator()); |
1767 MergeControlToLeaveFunction(control); | 1768 MergeControlToLeaveFunction(control); |
1768 } | 1769 } |
1769 | 1770 |
1770 void BytecodeGraphBuilder::VisitDebugger() { | 1771 void BytecodeGraphBuilder::VisitDebugger() { |
1771 PrepareEagerCheckpoint(); | 1772 PrepareEagerCheckpoint(); |
1772 Node* call = | 1773 Node* call = |
1773 NewNode(javascript()->CallRuntime(Runtime::kHandleDebuggerStatement)); | 1774 NewNode(javascript()->CallRuntime(Runtime::kHandleDebuggerStatement)); |
1774 environment()->BindAccumulator(call, Environment::kAttachFrameState); | 1775 environment()->BindAccumulator(call, Environment::kAttachFrameState); |
1775 environment()->MarkAllRegistersLive(); | 1776 environment()->MarkAllRegistersLive(); |
1776 } | 1777 } |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2233 source_positions_->set_current_position(it->source_position()); | 2234 source_positions_->set_current_position(it->source_position()); |
2234 it->Advance(); | 2235 it->Advance(); |
2235 } else { | 2236 } else { |
2236 DCHECK_GT(it->code_offset(), offset); | 2237 DCHECK_GT(it->code_offset(), offset); |
2237 } | 2238 } |
2238 } | 2239 } |
2239 | 2240 |
2240 } // namespace compiler | 2241 } // namespace compiler |
2241 } // namespace internal | 2242 } // namespace internal |
2242 } // namespace v8 | 2243 } // namespace v8 |
OLD | NEW |