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 1754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1765 // | 1765 // |
1766 // Creates a new unmapped arguments object. | 1766 // Creates a new unmapped arguments object. |
1767 void Interpreter::DoCreateUnmappedArguments( | 1767 void Interpreter::DoCreateUnmappedArguments( |
1768 compiler::InterpreterAssembler* assembler) { | 1768 compiler::InterpreterAssembler* assembler) { |
1769 Node* closure = __ LoadRegister(Register::function_closure()); | 1769 Node* closure = __ LoadRegister(Register::function_closure()); |
1770 Node* result = __ CallRuntime(Runtime::kNewStrictArguments_Generic, closure); | 1770 Node* result = __ CallRuntime(Runtime::kNewStrictArguments_Generic, closure); |
1771 __ SetAccumulator(result); | 1771 __ SetAccumulator(result); |
1772 __ Dispatch(); | 1772 __ Dispatch(); |
1773 } | 1773 } |
1774 | 1774 |
1775 // CreateRestArguments | 1775 // CreateRestParameter |
1776 // | 1776 // |
1777 // Creates a new rest arguments object starting at |rest_index|. | 1777 // Creates a new rest parameter array. |
1778 void Interpreter::DoCreateRestArguments( | 1778 void Interpreter::DoCreateRestParameter( |
1779 compiler::InterpreterAssembler* assembler) { | 1779 compiler::InterpreterAssembler* assembler) { |
| 1780 // TODO(ignition): Use FastNewRestParameterStub here. |
1780 Node* closure = __ LoadRegister(Register::function_closure()); | 1781 Node* closure = __ LoadRegister(Register::function_closure()); |
1781 Node* constant_pool_index = __ BytecodeOperandIdx(0); | 1782 Node* result = __ CallRuntime(Runtime::kNewRestParameter, closure); |
1782 Node* rest_index = __ LoadConstantPoolEntry(constant_pool_index); | |
1783 Node* result = | |
1784 __ CallRuntime(Runtime::kNewRestArguments_Generic, closure, rest_index); | |
1785 __ SetAccumulator(result); | 1783 __ SetAccumulator(result); |
1786 __ Dispatch(); | 1784 __ Dispatch(); |
1787 } | 1785 } |
1788 | 1786 |
1789 // StackCheck | 1787 // StackCheck |
1790 // | 1788 // |
1791 // Performs a stack guard check. | 1789 // Performs a stack guard check. |
1792 void Interpreter::DoStackCheck(compiler::InterpreterAssembler* assembler) { | 1790 void Interpreter::DoStackCheck(compiler::InterpreterAssembler* assembler) { |
1793 __ StackCheck(); | 1791 __ StackCheck(); |
1794 __ Dispatch(); | 1792 __ Dispatch(); |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1916 Node* index_reg = __ BytecodeOperandReg(0); | 1914 Node* index_reg = __ BytecodeOperandReg(0); |
1917 Node* index = __ LoadRegister(index_reg); | 1915 Node* index = __ LoadRegister(index_reg); |
1918 Node* result = __ CallRuntime(Runtime::kForInStep, index); | 1916 Node* result = __ CallRuntime(Runtime::kForInStep, index); |
1919 __ SetAccumulator(result); | 1917 __ SetAccumulator(result); |
1920 __ Dispatch(); | 1918 __ Dispatch(); |
1921 } | 1919 } |
1922 | 1920 |
1923 } // namespace interpreter | 1921 } // namespace interpreter |
1924 } // namespace internal | 1922 } // namespace internal |
1925 } // namespace v8 | 1923 } // namespace v8 |
OLD | NEW |