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

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

Issue 1818873003: [Interpreter] Adds support to fetch return value on break at return. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased the patch. Created 4 years, 9 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/factory.h" 10 #include "src/factory.h"
(...skipping 1465 matching lines...) Expand 10 before | Expand all | Expand 10 after
1476 // Call runtime to handle debugger statement. 1476 // Call runtime to handle debugger statement.
1477 void Interpreter::DoDebugger(InterpreterAssembler* assembler) { 1477 void Interpreter::DoDebugger(InterpreterAssembler* assembler) {
1478 Node* context = __ GetContext(); 1478 Node* context = __ GetContext();
1479 __ CallRuntime(Runtime::kHandleDebuggerStatement, context); 1479 __ CallRuntime(Runtime::kHandleDebuggerStatement, context);
1480 __ Dispatch(); 1480 __ Dispatch();
1481 } 1481 }
1482 1482
1483 // DebugBreak 1483 // DebugBreak
1484 // 1484 //
1485 // Call runtime to handle a debug break. 1485 // Call runtime to handle a debug break.
1486 #define DEBUG_BREAK(Name, ...) \ 1486 #define DEBUG_BREAK(Name, ...) \
1487 void Interpreter::Do##Name(InterpreterAssembler* assembler) { \ 1487 void Interpreter::Do##Name(InterpreterAssembler* assembler) { \
1488 Node* context = __ GetContext(); \ 1488 Node* context = __ GetContext(); \
1489 Node* original_handler = __ CallRuntime(Runtime::kDebugBreak, context); \ 1489 Node* accumulator = __ GetAccumulator(); \
1490 __ DispatchToBytecodeHandler(original_handler); \ 1490 Node* original_handler = \
1491 __ CallRuntime(Runtime::kDebugBreakOnBytecode, context, accumulator); \
1492 __ DispatchToBytecodeHandler(original_handler); \
1491 } 1493 }
1492 DEBUG_BREAK_BYTECODE_LIST(DEBUG_BREAK); 1494 DEBUG_BREAK_BYTECODE_LIST(DEBUG_BREAK);
1493 #undef DEBUG_BREAK 1495 #undef DEBUG_BREAK
1494 1496
1495 // ForInPrepare <cache_info_triple> 1497 // ForInPrepare <cache_info_triple>
1496 // 1498 //
1497 // Returns state for for..in loop execution based on the object in the 1499 // Returns state for for..in loop execution based on the object in the
1498 // accumulator. The result is output in registers |cache_info_triple| to 1500 // accumulator. The result is output in registers |cache_info_triple| to
1499 // |cache_info_triple + 2|, with the registers holding cache_type, cache_array, 1501 // |cache_info_triple + 2|, with the registers holding cache_type, cache_array,
1500 // and cache_length respectively. 1502 // and cache_length respectively.
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1606 // Illegal 1608 // Illegal
1607 // 1609 //
1608 // An invalid bytecode aborting execution if dispatched. 1610 // An invalid bytecode aborting execution if dispatched.
1609 void Interpreter::DoIllegal(InterpreterAssembler* assembler) { 1611 void Interpreter::DoIllegal(InterpreterAssembler* assembler) {
1610 __ Abort(kInvalidBytecode); 1612 __ Abort(kInvalidBytecode);
1611 } 1613 }
1612 1614
1613 } // namespace interpreter 1615 } // namespace interpreter
1614 } // namespace internal 1616 } // namespace internal
1615 } // namespace v8 1617 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698