| 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 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "src/ast/prettyprinter.h" | 10 #include "src/ast/prettyprinter.h" |
| (...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 797 // StaNamedPropertyStrict <object> <name_index> <slot> | 797 // StaNamedPropertyStrict <object> <name_index> <slot> |
| 798 // | 798 // |
| 799 // Calls the strict mode StoreIC at FeedBackVector slot <slot> for <object> and | 799 // Calls the strict mode StoreIC at FeedBackVector slot <slot> for <object> and |
| 800 // the name in constant pool entry <name_index> with the value in the | 800 // the name in constant pool entry <name_index> with the value in the |
| 801 // accumulator. | 801 // accumulator. |
| 802 void Interpreter::DoStaNamedPropertyStrict(InterpreterAssembler* assembler) { | 802 void Interpreter::DoStaNamedPropertyStrict(InterpreterAssembler* assembler) { |
| 803 Callable ic = CodeFactory::StoreICInOptimizedCode(isolate_, STRICT); | 803 Callable ic = CodeFactory::StoreICInOptimizedCode(isolate_, STRICT); |
| 804 DoStoreIC(ic, assembler); | 804 DoStoreIC(ic, assembler); |
| 805 } | 805 } |
| 806 | 806 |
| 807 void Interpreter::DoStaDataPropertyInLiteral(InterpreterAssembler* assembler) { |
| 808 Node* object_reg_index = __ BytecodeOperandReg(0); |
| 809 Node* object = __ LoadRegister(object_reg_index); |
| 810 Node* name_reg_index = __ BytecodeOperandReg(1); |
| 811 Node* name = __ LoadRegister(name_reg_index); |
| 812 Node* attrs_reg_index = __ BytecodeOperandReg(2); |
| 813 Node* attrs = __ LoadRegister(attrs_reg_index); |
| 814 Node* set_function_name_reg_index = __ BytecodeOperandReg(3); |
| 815 Node* set_function_name = __ LoadRegister(set_function_name_reg_index); |
| 816 |
| 817 Node* value = __ GetAccumulator(); |
| 818 |
| 819 Node* context = __ GetContext(); |
| 820 |
| 821 __ CallRuntime(Runtime::kDefineDataPropertyInLiteral, context, object, name, |
| 822 value, attrs, set_function_name); |
| 823 __ Dispatch(); |
| 824 } |
| 825 |
| 807 void Interpreter::DoKeyedStoreIC(Callable ic, InterpreterAssembler* assembler) { | 826 void Interpreter::DoKeyedStoreIC(Callable ic, InterpreterAssembler* assembler) { |
| 808 typedef StoreWithVectorDescriptor Descriptor; | 827 typedef StoreWithVectorDescriptor Descriptor; |
| 809 Node* code_target = __ HeapConstant(ic.code()); | 828 Node* code_target = __ HeapConstant(ic.code()); |
| 810 Node* object_reg_index = __ BytecodeOperandReg(0); | 829 Node* object_reg_index = __ BytecodeOperandReg(0); |
| 811 Node* object = __ LoadRegister(object_reg_index); | 830 Node* object = __ LoadRegister(object_reg_index); |
| 812 Node* name_reg_index = __ BytecodeOperandReg(1); | 831 Node* name_reg_index = __ BytecodeOperandReg(1); |
| 813 Node* name = __ LoadRegister(name_reg_index); | 832 Node* name = __ LoadRegister(name_reg_index); |
| 814 Node* value = __ GetAccumulator(); | 833 Node* value = __ GetAccumulator(); |
| 815 Node* raw_slot = __ BytecodeOperandIdx(2); | 834 Node* raw_slot = __ BytecodeOperandIdx(2); |
| 816 Node* smi_slot = __ SmiTag(raw_slot); | 835 Node* smi_slot = __ SmiTag(raw_slot); |
| (...skipping 1888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2705 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, | 2724 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, |
| 2706 __ SmiTag(new_state)); | 2725 __ SmiTag(new_state)); |
| 2707 __ SetAccumulator(old_state); | 2726 __ SetAccumulator(old_state); |
| 2708 | 2727 |
| 2709 __ Dispatch(); | 2728 __ Dispatch(); |
| 2710 } | 2729 } |
| 2711 | 2730 |
| 2712 } // namespace interpreter | 2731 } // namespace interpreter |
| 2713 } // namespace internal | 2732 } // namespace internal |
| 2714 } // namespace v8 | 2733 } // namespace v8 |
| OLD | NEW |