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

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: 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
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 1786 matching lines...) Expand 10 before | Expand all | Expand 10 after
1797 } 1797 }
1798 1798
1799 1799
1800 // Return 1800 // Return
1801 // 1801 //
1802 // Return the value in the accumulator. 1802 // Return the value in the accumulator.
1803 void Interpreter::DoReturn(compiler::InterpreterAssembler* assembler) { 1803 void Interpreter::DoReturn(compiler::InterpreterAssembler* assembler) {
1804 __ Return(); 1804 __ Return();
1805 } 1805 }
1806 1806
1807 // Debugger statement
Michael Starzinger 2016/02/04 11:45:38 nit: Drop "statement".
Yang 2016/02/04 13:47:06 Done.
1808 //
1809 // Call runtime to handle debugger statement.
1810 void Interpreter::DoDebugger(compiler::InterpreterAssembler* assembler) {
1811 __ CallRuntime(Runtime::kHandleDebuggerStatement);
1812 __ Dispatch();
1813 }
1807 1814
1808 // ForInPrepare <cache_info_triple> 1815 // ForInPrepare <cache_info_triple>
1809 // 1816 //
1810 // Returns state for for..in loop execution based on the object in the 1817 // Returns state for for..in loop execution based on the object in the
1811 // accumulator. The result is output in registers |cache_info_triple| to 1818 // accumulator. The result is output in registers |cache_info_triple| to
1812 // |cache_info_triple + 2|, with the registers holding cache_type, cache_array, 1819 // |cache_info_triple + 2|, with the registers holding cache_type, cache_array,
1813 // and cache_length respectively. 1820 // and cache_length respectively.
1814 void Interpreter::DoForInPrepare(compiler::InterpreterAssembler* assembler) { 1821 void Interpreter::DoForInPrepare(compiler::InterpreterAssembler* assembler) {
1815 Node* object = __ GetAccumulator(); 1822 Node* object = __ GetAccumulator();
1816 Node* result_triple = __ CallRuntime(Runtime::kForInPrepare, object); 1823 Node* result_triple = __ CallRuntime(Runtime::kForInPrepare, object);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
1890 Node* index_reg = __ BytecodeOperandReg(0); 1897 Node* index_reg = __ BytecodeOperandReg(0);
1891 Node* index = __ LoadRegister(index_reg); 1898 Node* index = __ LoadRegister(index_reg);
1892 Node* result = __ CallRuntime(Runtime::kForInStep, index); 1899 Node* result = __ CallRuntime(Runtime::kForInStep, index);
1893 __ SetAccumulator(result); 1900 __ SetAccumulator(result);
1894 __ Dispatch(); 1901 __ Dispatch();
1895 } 1902 }
1896 1903
1897 } // namespace interpreter 1904 } // namespace interpreter
1898 } // namespace internal 1905 } // namespace internal
1899 } // namespace v8 1906 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698