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/interpreter/interpreter.h" | 5 #include "src/interpreter/interpreter.h" |
6 | 6 |
7 #include "src/ast/prettyprinter.h" | 7 #include "src/ast/prettyprinter.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/compiler.h" | 9 #include "src/compiler.h" |
10 #include "src/factory.h" | 10 #include "src/factory.h" |
(...skipping 1780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1791 // Call runtime to handle debugger statement. | 1791 // Call runtime to handle debugger statement. |
1792 void Interpreter::DoDebugger(InterpreterAssembler* assembler) { | 1792 void Interpreter::DoDebugger(InterpreterAssembler* assembler) { |
1793 Node* context = __ GetContext(); | 1793 Node* context = __ GetContext(); |
1794 __ CallRuntime(Runtime::kHandleDebuggerStatement, context); | 1794 __ CallRuntime(Runtime::kHandleDebuggerStatement, context); |
1795 __ Dispatch(); | 1795 __ Dispatch(); |
1796 } | 1796 } |
1797 | 1797 |
1798 // DebugBreak | 1798 // DebugBreak |
1799 // | 1799 // |
1800 // Call runtime to handle a debug break. | 1800 // Call runtime to handle a debug break. |
1801 #define DEBUG_BREAK(Name, ...) \ | 1801 #define DEBUG_BREAK(Name, ...) \ |
1802 void Interpreter::Do##Name(InterpreterAssembler* assembler) { \ | 1802 void Interpreter::Do##Name(InterpreterAssembler* assembler) { \ |
1803 Node* context = __ GetContext(); \ | 1803 Node* context = __ GetContext(); \ |
1804 Node* original_handler = __ CallRuntime(Runtime::kDebugBreak, context); \ | 1804 Node* accumulator = __ GetAccumulator(); \ |
1805 __ DispatchToBytecodeHandler(original_handler); \ | 1805 Node* original_handler = \ |
| 1806 __ CallRuntime(Runtime::kDebugBreak, context, accumulator); \ |
| 1807 __ DispatchToBytecodeHandler(original_handler); \ |
1806 } | 1808 } |
1807 DEBUG_BREAK_BYTECODE_LIST(DEBUG_BREAK); | 1809 DEBUG_BREAK_BYTECODE_LIST(DEBUG_BREAK); |
1808 #undef DEBUG_BREAK | 1810 #undef DEBUG_BREAK |
1809 | 1811 |
1810 // ForInPrepare <cache_info_triple> | 1812 // ForInPrepare <cache_info_triple> |
1811 // | 1813 // |
1812 // Returns state for for..in loop execution based on the object in the | 1814 // Returns state for for..in loop execution based on the object in the |
1813 // accumulator. The result is output in registers |cache_info_triple| to | 1815 // accumulator. The result is output in registers |cache_info_triple| to |
1814 // |cache_info_triple + 2|, with the registers holding cache_type, cache_array, | 1816 // |cache_info_triple + 2|, with the registers holding cache_type, cache_array, |
1815 // and cache_length respectively. | 1817 // and cache_length respectively. |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1922 Node* index = __ LoadRegister(index_reg); | 1924 Node* index = __ LoadRegister(index_reg); |
1923 Node* one = __ SmiConstant(Smi::FromInt(1)); | 1925 Node* one = __ SmiConstant(Smi::FromInt(1)); |
1924 Node* result = __ SmiAdd(index, one); | 1926 Node* result = __ SmiAdd(index, one); |
1925 __ SetAccumulator(result); | 1927 __ SetAccumulator(result); |
1926 __ Dispatch(); | 1928 __ Dispatch(); |
1927 } | 1929 } |
1928 | 1930 |
1929 } // namespace interpreter | 1931 } // namespace interpreter |
1930 } // namespace internal | 1932 } // namespace internal |
1931 } // namespace v8 | 1933 } // namespace v8 |
OLD | NEW |