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 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
834 // | 834 // |
835 // Calls the strict mode KeyStoreIC at FeedBackVector slot <slot> for <object> | 835 // Calls the strict mode KeyStoreIC at FeedBackVector slot <slot> for <object> |
836 // and the key <key> with the value in the accumulator. | 836 // and the key <key> with the value in the accumulator. |
837 void Interpreter::DoKeyedStoreICStrictWide( | 837 void Interpreter::DoKeyedStoreICStrictWide( |
838 compiler::InterpreterAssembler* assembler) { | 838 compiler::InterpreterAssembler* assembler) { |
839 Callable ic = | 839 Callable ic = |
840 CodeFactory::KeyedStoreICInOptimizedCode(isolate_, STRICT, UNINITIALIZED); | 840 CodeFactory::KeyedStoreICInOptimizedCode(isolate_, STRICT, UNINITIALIZED); |
841 DoKeyedStoreIC(ic, assembler); | 841 DoKeyedStoreIC(ic, assembler); |
842 } | 842 } |
843 | 843 |
| 844 // LdaInitialMap |
| 845 // |
| 846 // Loads the prototype or initial map of the JSFunction referenced by |
| 847 // the accumulator. The result is placed in the accumulator. |
| 848 void Interpreter::DoLdaInitialMap(compiler::InterpreterAssembler* assembler) { |
| 849 Node* js_function = __ GetAccumulator(); |
| 850 Node* initial_map = |
| 851 __ LoadObjectField(js_function, JSFunction::kPrototypeOrInitialMapOffset); |
| 852 __ SetAccumulator(initial_map); |
| 853 __ Dispatch(); |
| 854 } |
844 | 855 |
845 // PushContext <context> | 856 // PushContext <context> |
846 // | 857 // |
847 // Saves the current context in <context>, and pushes the accumulator as the | 858 // Saves the current context in <context>, and pushes the accumulator as the |
848 // new current context. | 859 // new current context. |
849 void Interpreter::DoPushContext(compiler::InterpreterAssembler* assembler) { | 860 void Interpreter::DoPushContext(compiler::InterpreterAssembler* assembler) { |
850 Node* reg_index = __ BytecodeOperandReg(0); | 861 Node* reg_index = __ BytecodeOperandReg(0); |
851 Node* new_context = __ GetAccumulator(); | 862 Node* new_context = __ GetAccumulator(); |
852 Node* old_context = __ GetContext(); | 863 Node* old_context = __ GetContext(); |
853 __ StoreRegister(old_context, reg_index); | 864 __ StoreRegister(old_context, reg_index); |
(...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1917 Node* index_reg = __ BytecodeOperandReg(0); | 1928 Node* index_reg = __ BytecodeOperandReg(0); |
1918 Node* index = __ LoadRegister(index_reg); | 1929 Node* index = __ LoadRegister(index_reg); |
1919 Node* result = __ CallRuntime(Runtime::kForInStep, index); | 1930 Node* result = __ CallRuntime(Runtime::kForInStep, index); |
1920 __ SetAccumulator(result); | 1931 __ SetAccumulator(result); |
1921 __ Dispatch(); | 1932 __ Dispatch(); |
1922 } | 1933 } |
1923 | 1934 |
1924 } // namespace interpreter | 1935 } // namespace interpreter |
1925 } // namespace internal | 1936 } // namespace internal |
1926 } // namespace v8 | 1937 } // namespace v8 |
OLD | NEW |