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/compiler-source-position-table.h" | 10 #include "src/compiler/compiler-source-position-table.h" |
(...skipping 1801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1812 void BytecodeGraphBuilder::VisitReturn() { | 1812 void BytecodeGraphBuilder::VisitReturn() { |
1813 BuildLoopExitsForFunctionExit(); | 1813 BuildLoopExitsForFunctionExit(); |
1814 Node* pop_node = jsgraph()->ZeroConstant(); | 1814 Node* pop_node = jsgraph()->ZeroConstant(); |
1815 Node* control = | 1815 Node* control = |
1816 NewNode(common()->Return(), pop_node, environment()->LookupAccumulator()); | 1816 NewNode(common()->Return(), pop_node, environment()->LookupAccumulator()); |
1817 MergeControlToLeaveFunction(control); | 1817 MergeControlToLeaveFunction(control); |
1818 } | 1818 } |
1819 | 1819 |
1820 void BytecodeGraphBuilder::VisitDebugger() { | 1820 void BytecodeGraphBuilder::VisitDebugger() { |
1821 PrepareEagerCheckpoint(); | 1821 PrepareEagerCheckpoint(); |
1822 Node* call = | 1822 Node* call = NewNode(javascript()->Debugger()); |
1823 NewNode(javascript()->CallRuntime(Runtime::kHandleDebuggerStatement)); | 1823 environment()->RecordAfterState(call, Environment::kAttachFrameState); |
1824 environment()->BindAccumulator(call, Environment::kAttachFrameState); | |
1825 } | 1824 } |
1826 | 1825 |
1827 // We cannot create a graph from the debugger copy of the bytecode array. | 1826 // We cannot create a graph from the debugger copy of the bytecode array. |
1828 #define DEBUG_BREAK(Name, ...) \ | 1827 #define DEBUG_BREAK(Name, ...) \ |
1829 void BytecodeGraphBuilder::Visit##Name() { UNREACHABLE(); } | 1828 void BytecodeGraphBuilder::Visit##Name() { UNREACHABLE(); } |
1830 DEBUG_BREAK_BYTECODE_LIST(DEBUG_BREAK); | 1829 DEBUG_BREAK_BYTECODE_LIST(DEBUG_BREAK); |
1831 #undef DEBUG_BREAK | 1830 #undef DEBUG_BREAK |
1832 | 1831 |
1833 void BytecodeGraphBuilder::BuildForInPrepare() { | 1832 void BytecodeGraphBuilder::BuildForInPrepare() { |
1834 PrepareEagerCheckpoint(); | 1833 PrepareEagerCheckpoint(); |
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2300 it->source_position().ScriptOffset(), start_position_.InliningId())); | 2299 it->source_position().ScriptOffset(), start_position_.InliningId())); |
2301 it->Advance(); | 2300 it->Advance(); |
2302 } else { | 2301 } else { |
2303 DCHECK_GT(it->code_offset(), offset); | 2302 DCHECK_GT(it->code_offset(), offset); |
2304 } | 2303 } |
2305 } | 2304 } |
2306 | 2305 |
2307 } // namespace compiler | 2306 } // namespace compiler |
2308 } // namespace internal | 2307 } // namespace internal |
2309 } // namespace v8 | 2308 } // namespace v8 |
OLD | NEW |