Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(502)

Side by Side Diff: src/interpreter/interpreter.cc

Issue 1667073002: [interpreter, debugger] implement debugger statement. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@sourcepositiontable
Patch Set: fix test expectation Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/interpreter/bytecodes.h ('k') | test/cctest/cctest.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/compiler/interpreter-assembler.h" 10 #include "src/compiler/interpreter-assembler.h"
(...skipping 1806 matching lines...) Expand 10 before | Expand all | Expand 10 after
1817 } 1817 }
1818 1818
1819 1819
1820 // Return 1820 // Return
1821 // 1821 //
1822 // Return the value in the accumulator. 1822 // Return the value in the accumulator.
1823 void Interpreter::DoReturn(compiler::InterpreterAssembler* assembler) { 1823 void Interpreter::DoReturn(compiler::InterpreterAssembler* assembler) {
1824 __ Return(); 1824 __ Return();
1825 } 1825 }
1826 1826
1827 // Debugger
1828 //
1829 // Call runtime to handle debugger statement.
1830 void Interpreter::DoDebugger(compiler::InterpreterAssembler* assembler) {
1831 __ CallRuntime(Runtime::kHandleDebuggerStatement);
1832 __ Dispatch();
1833 }
1827 1834
1828 // ForInPrepare <cache_info_triple> 1835 // ForInPrepare <cache_info_triple>
1829 // 1836 //
1830 // Returns state for for..in loop execution based on the object in the 1837 // Returns state for for..in loop execution based on the object in the
1831 // accumulator. The result is output in registers |cache_info_triple| to 1838 // accumulator. The result is output in registers |cache_info_triple| to
1832 // |cache_info_triple + 2|, with the registers holding cache_type, cache_array, 1839 // |cache_info_triple + 2|, with the registers holding cache_type, cache_array,
1833 // and cache_length respectively. 1840 // and cache_length respectively.
1834 void Interpreter::DoForInPrepare(compiler::InterpreterAssembler* assembler) { 1841 void Interpreter::DoForInPrepare(compiler::InterpreterAssembler* assembler) {
1835 Node* object = __ GetAccumulator(); 1842 Node* object = __ GetAccumulator();
1836 Node* result_triple = __ CallRuntime(Runtime::kForInPrepare, object); 1843 Node* result_triple = __ CallRuntime(Runtime::kForInPrepare, object);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
1910 Node* index_reg = __ BytecodeOperandReg(0); 1917 Node* index_reg = __ BytecodeOperandReg(0);
1911 Node* index = __ LoadRegister(index_reg); 1918 Node* index = __ LoadRegister(index_reg);
1912 Node* result = __ CallRuntime(Runtime::kForInStep, index); 1919 Node* result = __ CallRuntime(Runtime::kForInStep, index);
1913 __ SetAccumulator(result); 1920 __ SetAccumulator(result);
1914 __ Dispatch(); 1921 __ Dispatch();
1915 } 1922 }
1916 1923
1917 } // namespace interpreter 1924 } // namespace interpreter
1918 } // namespace internal 1925 } // namespace internal
1919 } // namespace v8 1926 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecodes.h ('k') | test/cctest/cctest.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698