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 "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 1752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1763 // | 1763 // |
1764 // Creates a new unmapped arguments object. | 1764 // Creates a new unmapped arguments object. |
1765 void Interpreter::DoCreateUnmappedArguments( | 1765 void Interpreter::DoCreateUnmappedArguments( |
1766 compiler::InterpreterAssembler* assembler) { | 1766 compiler::InterpreterAssembler* assembler) { |
1767 Node* closure = __ LoadRegister(Register::function_closure()); | 1767 Node* closure = __ LoadRegister(Register::function_closure()); |
1768 Node* result = __ CallRuntime(Runtime::kNewStrictArguments_Generic, closure); | 1768 Node* result = __ CallRuntime(Runtime::kNewStrictArguments_Generic, closure); |
1769 __ SetAccumulator(result); | 1769 __ SetAccumulator(result); |
1770 __ Dispatch(); | 1770 __ Dispatch(); |
1771 } | 1771 } |
1772 | 1772 |
| 1773 // StackCheck |
| 1774 // |
| 1775 // Performs a stack guard check. |
| 1776 void Interpreter::DoStackCheck(compiler::InterpreterAssembler* assembler) { |
| 1777 __ StackCheck(); |
| 1778 __ Dispatch(); |
| 1779 } |
1773 | 1780 |
1774 // Throw | 1781 // Throw |
1775 // | 1782 // |
1776 // Throws the exception in the accumulator. | 1783 // Throws the exception in the accumulator. |
1777 void Interpreter::DoThrow(compiler::InterpreterAssembler* assembler) { | 1784 void Interpreter::DoThrow(compiler::InterpreterAssembler* assembler) { |
1778 Node* exception = __ GetAccumulator(); | 1785 Node* exception = __ GetAccumulator(); |
1779 __ CallRuntime(Runtime::kThrow, exception); | 1786 __ CallRuntime(Runtime::kThrow, exception); |
1780 // We shouldn't ever return from a throw. | 1787 // We shouldn't ever return from a throw. |
1781 __ Abort(kUnexpectedReturnFromThrow); | 1788 __ Abort(kUnexpectedReturnFromThrow); |
1782 } | 1789 } |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1886 Node* index_reg = __ BytecodeOperandReg(0); | 1893 Node* index_reg = __ BytecodeOperandReg(0); |
1887 Node* index = __ LoadRegister(index_reg); | 1894 Node* index = __ LoadRegister(index_reg); |
1888 Node* result = __ CallRuntime(Runtime::kForInStep, index); | 1895 Node* result = __ CallRuntime(Runtime::kForInStep, index); |
1889 __ SetAccumulator(result); | 1896 __ SetAccumulator(result); |
1890 __ Dispatch(); | 1897 __ Dispatch(); |
1891 } | 1898 } |
1892 | 1899 |
1893 } // namespace interpreter | 1900 } // namespace interpreter |
1894 } // namespace internal | 1901 } // namespace internal |
1895 } // namespace v8 | 1902 } // namespace v8 |
OLD | NEW |