| 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/code-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/compiler.h" | 8 #include "src/compiler.h" |
| 9 #include "src/compiler/interpreter-assembler.h" | 9 #include "src/compiler/interpreter-assembler.h" |
| 10 #include "src/factory.h" | 10 #include "src/factory.h" |
| (...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 809 void Interpreter::DoKeyedStoreICStrictWide( | 809 void Interpreter::DoKeyedStoreICStrictWide( |
| 810 compiler::InterpreterAssembler* assembler) { | 810 compiler::InterpreterAssembler* assembler) { |
| 811 Callable ic = | 811 Callable ic = |
| 812 CodeFactory::KeyedStoreICInOptimizedCode(isolate_, STRICT, UNINITIALIZED); | 812 CodeFactory::KeyedStoreICInOptimizedCode(isolate_, STRICT, UNINITIALIZED); |
| 813 DoKeyedStoreIC(ic, assembler); | 813 DoKeyedStoreIC(ic, assembler); |
| 814 } | 814 } |
| 815 | 815 |
| 816 | 816 |
| 817 // PushContext <context> | 817 // PushContext <context> |
| 818 // | 818 // |
| 819 // Pushes the accumulator as the current context, and saves it in <context> | 819 // Saves the current context in <context>, and pushes the accumulator as the |
| 820 // new current context. |
| 820 void Interpreter::DoPushContext(compiler::InterpreterAssembler* assembler) { | 821 void Interpreter::DoPushContext(compiler::InterpreterAssembler* assembler) { |
| 821 Node* reg_index = __ BytecodeOperandReg(0); | 822 Node* reg_index = __ BytecodeOperandReg(0); |
| 822 Node* context = __ GetAccumulator(); | 823 Node* new_context = __ GetAccumulator(); |
| 823 __ SetContext(context); | 824 Node* old_context = __ GetContext(); |
| 824 __ StoreRegister(context, reg_index); | 825 __ StoreRegister(old_context, reg_index); |
| 826 __ SetContext(new_context); |
| 825 __ Dispatch(); | 827 __ Dispatch(); |
| 826 } | 828 } |
| 827 | 829 |
| 828 | 830 |
| 829 // PopContext <context> | 831 // PopContext <context> |
| 830 // | 832 // |
| 831 // Pops the current context and sets <context> as the new context. | 833 // Pops the current context and sets <context> as the new context. |
| 832 void Interpreter::DoPopContext(compiler::InterpreterAssembler* assembler) { | 834 void Interpreter::DoPopContext(compiler::InterpreterAssembler* assembler) { |
| 833 Node* reg_index = __ BytecodeOperandReg(0); | 835 Node* reg_index = __ BytecodeOperandReg(0); |
| 834 Node* context = __ LoadRegister(reg_index); | 836 Node* context = __ LoadRegister(reg_index); |
| (...skipping 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1855 Node* index_reg = __ BytecodeOperandReg(0); | 1857 Node* index_reg = __ BytecodeOperandReg(0); |
| 1856 Node* index = __ LoadRegister(index_reg); | 1858 Node* index = __ LoadRegister(index_reg); |
| 1857 Node* result = __ CallRuntime(Runtime::kForInStep, index); | 1859 Node* result = __ CallRuntime(Runtime::kForInStep, index); |
| 1858 __ SetAccumulator(result); | 1860 __ SetAccumulator(result); |
| 1859 __ Dispatch(); | 1861 __ Dispatch(); |
| 1860 } | 1862 } |
| 1861 | 1863 |
| 1862 } // namespace interpreter | 1864 } // namespace interpreter |
| 1863 } // namespace internal | 1865 } // namespace internal |
| 1864 } // namespace v8 | 1866 } // namespace v8 |
| OLD | NEW |