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

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

Issue 1842683002: [Interpreter] Adds support to fetch return value on break at return. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed failures on linux-nosnap-dbg Created 4 years, 8 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/debug/x87/debug-x87.cc ('k') | src/runtime/runtime.h » ('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/factory.h" 10 #include "src/factory.h"
(...skipping 1467 matching lines...) Expand 10 before | Expand all | Expand 10 after
1478 // Call runtime to handle debugger statement. 1478 // Call runtime to handle debugger statement.
1479 void Interpreter::DoDebugger(InterpreterAssembler* assembler) { 1479 void Interpreter::DoDebugger(InterpreterAssembler* assembler) {
1480 Node* context = __ GetContext(); 1480 Node* context = __ GetContext();
1481 __ CallRuntime(Runtime::kHandleDebuggerStatement, context); 1481 __ CallRuntime(Runtime::kHandleDebuggerStatement, context);
1482 __ Dispatch(); 1482 __ Dispatch();
1483 } 1483 }
1484 1484
1485 // DebugBreak 1485 // DebugBreak
1486 // 1486 //
1487 // Call runtime to handle a debug break. 1487 // Call runtime to handle a debug break.
1488 #define DEBUG_BREAK(Name, ...) \ 1488 #define DEBUG_BREAK(Name, ...) \
1489 void Interpreter::Do##Name(InterpreterAssembler* assembler) { \ 1489 void Interpreter::Do##Name(InterpreterAssembler* assembler) { \
1490 Node* context = __ GetContext(); \ 1490 Node* context = __ GetContext(); \
1491 Node* original_handler = __ CallRuntime(Runtime::kDebugBreak, context); \ 1491 Node* accumulator = __ GetAccumulator(); \
1492 __ DispatchToBytecodeHandler(original_handler); \ 1492 Node* original_handler = \
1493 __ CallRuntime(Runtime::kDebugBreakOnBytecode, context, accumulator); \
1494 __ DispatchToBytecodeHandler(original_handler); \
1493 } 1495 }
1494 DEBUG_BREAK_BYTECODE_LIST(DEBUG_BREAK); 1496 DEBUG_BREAK_BYTECODE_LIST(DEBUG_BREAK);
1495 #undef DEBUG_BREAK 1497 #undef DEBUG_BREAK
1496 1498
1497 // ForInPrepare <cache_info_triple> 1499 // ForInPrepare <cache_info_triple>
1498 // 1500 //
1499 // Returns state for for..in loop execution based on the object in the 1501 // Returns state for for..in loop execution based on the object in the
1500 // accumulator. The result is output in registers |cache_info_triple| to 1502 // accumulator. The result is output in registers |cache_info_triple| to
1501 // |cache_info_triple + 2|, with the registers holding cache_type, cache_array, 1503 // |cache_info_triple + 2|, with the registers holding cache_type, cache_array,
1502 // and cache_length respectively. 1504 // and cache_length respectively.
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
1619 // Illegal 1621 // Illegal
1620 // 1622 //
1621 // An invalid bytecode aborting execution if dispatched. 1623 // An invalid bytecode aborting execution if dispatched.
1622 void Interpreter::DoIllegal(InterpreterAssembler* assembler) { 1624 void Interpreter::DoIllegal(InterpreterAssembler* assembler) {
1623 __ Abort(kInvalidBytecode); 1625 __ Abort(kInvalidBytecode);
1624 } 1626 }
1625 1627
1626 } // namespace interpreter 1628 } // namespace interpreter
1627 } // namespace internal 1629 } // namespace internal
1628 } // namespace v8 1630 } // namespace v8
OLDNEW
« no previous file with comments | « src/debug/x87/debug-x87.cc ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698