| 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 <fstream> | 7 #include <fstream> |
| 8 | 8 |
| 9 #include "src/ast/prettyprinter.h" | 9 #include "src/ast/prettyprinter.h" |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 1612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1623 __ CallRuntime(Runtime::kReThrow, context, exception); | 1623 __ CallRuntime(Runtime::kReThrow, context, exception); |
| 1624 // We shouldn't ever return from a throw. | 1624 // We shouldn't ever return from a throw. |
| 1625 __ Abort(kUnexpectedReturnFromThrow); | 1625 __ Abort(kUnexpectedReturnFromThrow); |
| 1626 } | 1626 } |
| 1627 | 1627 |
| 1628 | 1628 |
| 1629 // Return | 1629 // Return |
| 1630 // | 1630 // |
| 1631 // Return the value in the accumulator. | 1631 // Return the value in the accumulator. |
| 1632 void Interpreter::DoReturn(InterpreterAssembler* assembler) { | 1632 void Interpreter::DoReturn(InterpreterAssembler* assembler) { |
| 1633 __ UpdateInterruptBudgetOnReturn(); | 1633 __ InterpreterReturn(); |
| 1634 Node* accumulator = __ GetAccumulator(); | |
| 1635 __ Return(accumulator); | |
| 1636 } | 1634 } |
| 1637 | 1635 |
| 1638 // Debugger | 1636 // Debugger |
| 1639 // | 1637 // |
| 1640 // Call runtime to handle debugger statement. | 1638 // Call runtime to handle debugger statement. |
| 1641 void Interpreter::DoDebugger(InterpreterAssembler* assembler) { | 1639 void Interpreter::DoDebugger(InterpreterAssembler* assembler) { |
| 1642 Node* context = __ GetContext(); | 1640 Node* context = __ GetContext(); |
| 1643 __ CallRuntime(Runtime::kHandleDebuggerStatement, context); | 1641 __ CallRuntime(Runtime::kHandleDebuggerStatement, context); |
| 1644 __ Dispatch(); | 1642 __ Dispatch(); |
| 1645 } | 1643 } |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1829 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, | 1827 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, |
| 1830 __ SmiTag(new_state)); | 1828 __ SmiTag(new_state)); |
| 1831 __ SetAccumulator(old_state); | 1829 __ SetAccumulator(old_state); |
| 1832 | 1830 |
| 1833 __ Dispatch(); | 1831 __ Dispatch(); |
| 1834 } | 1832 } |
| 1835 | 1833 |
| 1836 } // namespace interpreter | 1834 } // namespace interpreter |
| 1837 } // namespace internal | 1835 } // namespace internal |
| 1838 } // namespace v8 | 1836 } // namespace v8 |
| OLD | NEW |