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 1679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1690 } | 1690 } |
1691 | 1691 |
1692 // DeletePropertySloppy | 1692 // DeletePropertySloppy |
1693 // | 1693 // |
1694 // Delete the property specified in the accumulator from the object | 1694 // Delete the property specified in the accumulator from the object |
1695 // referenced by the register operand following sloppy mode semantics. | 1695 // referenced by the register operand following sloppy mode semantics. |
1696 void Interpreter::DoDeletePropertySloppy(InterpreterAssembler* assembler) { | 1696 void Interpreter::DoDeletePropertySloppy(InterpreterAssembler* assembler) { |
1697 DoDelete(Runtime::kDeleteProperty_Sloppy, assembler); | 1697 DoDelete(Runtime::kDeleteProperty_Sloppy, assembler); |
1698 } | 1698 } |
1699 | 1699 |
| 1700 // GetSuperConstructor |
| 1701 // |
| 1702 // Get the super constructor from the object referenced by the accumulator. |
| 1703 void Interpreter::DoGetSuperConstructor(InterpreterAssembler* assembler) { |
| 1704 Node* active_function = __ GetAccumulator(); |
| 1705 Node* context = __ GetContext(); |
| 1706 Node* result = __ GetSuperConstructor(active_function, context); |
| 1707 __ StoreRegister(result, __ BytecodeOperandReg(0)); |
| 1708 __ Dispatch(); |
| 1709 } |
| 1710 |
1700 void Interpreter::DoJSCall(InterpreterAssembler* assembler, | 1711 void Interpreter::DoJSCall(InterpreterAssembler* assembler, |
1701 TailCallMode tail_call_mode) { | 1712 TailCallMode tail_call_mode) { |
1702 Node* function_reg = __ BytecodeOperandReg(0); | 1713 Node* function_reg = __ BytecodeOperandReg(0); |
1703 Node* function = __ LoadRegister(function_reg); | 1714 Node* function = __ LoadRegister(function_reg); |
1704 Node* receiver_reg = __ BytecodeOperandReg(1); | 1715 Node* receiver_reg = __ BytecodeOperandReg(1); |
1705 Node* receiver_arg = __ RegisterLocation(receiver_reg); | 1716 Node* receiver_arg = __ RegisterLocation(receiver_reg); |
1706 Node* receiver_args_count = __ BytecodeOperandCount(2); | 1717 Node* receiver_args_count = __ BytecodeOperandCount(2); |
1707 Node* receiver_count = __ Int32Constant(1); | 1718 Node* receiver_count = __ Int32Constant(1); |
1708 Node* args_count = __ Int32Sub(receiver_args_count, receiver_count); | 1719 Node* args_count = __ Int32Sub(receiver_args_count, receiver_count); |
1709 Node* slot_id = __ BytecodeOperandIdx(3); | 1720 Node* slot_id = __ BytecodeOperandIdx(3); |
(...skipping 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2823 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, | 2834 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, |
2824 __ SmiTag(new_state)); | 2835 __ SmiTag(new_state)); |
2825 __ SetAccumulator(old_state); | 2836 __ SetAccumulator(old_state); |
2826 | 2837 |
2827 __ Dispatch(); | 2838 __ Dispatch(); |
2828 } | 2839 } |
2829 | 2840 |
2830 } // namespace interpreter | 2841 } // namespace interpreter |
2831 } // namespace internal | 2842 } // namespace internal |
2832 } // namespace v8 | 2843 } // namespace v8 |
OLD | NEW |