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 #ifndef V8_INTERPRETER_INTERPRETER_ASSEMBLER_H_ | 5 #ifndef V8_INTERPRETER_INTERPRETER_ASSEMBLER_H_ |
6 #define V8_INTERPRETER_INTERPRETER_ASSEMBLER_H_ | 6 #define V8_INTERPRETER_INTERPRETER_ASSEMBLER_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/base/smart-pointers.h" | 9 #include "src/base/smart-pointers.h" |
10 #include "src/builtins.h" | 10 #include "src/builtins.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 compiler::Node* BytecodeOperandRuntimeId(int operand_index); | 43 compiler::Node* BytecodeOperandRuntimeId(int operand_index); |
44 | 44 |
45 // Accumulator. | 45 // Accumulator. |
46 compiler::Node* GetAccumulator(); | 46 compiler::Node* GetAccumulator(); |
47 void SetAccumulator(compiler::Node* value); | 47 void SetAccumulator(compiler::Node* value); |
48 | 48 |
49 // Context. | 49 // Context. |
50 compiler::Node* GetContext(); | 50 compiler::Node* GetContext(); |
51 void SetContext(compiler::Node* value); | 51 void SetContext(compiler::Node* value); |
52 | 52 |
| 53 // Number of registers. |
| 54 compiler::Node* RegisterCount(); |
| 55 |
| 56 // Backup/restore register file to/from a fixed array. |
| 57 compiler::Node* ExportRegisterFile(); |
| 58 compiler::Node* ImportRegisterFile(compiler::Node* array); |
| 59 |
53 // Loads from and stores to the interpreter register file. | 60 // Loads from and stores to the interpreter register file. |
54 compiler::Node* LoadRegister(Register reg); | 61 compiler::Node* LoadRegister(Register reg); |
55 compiler::Node* LoadRegister(compiler::Node* reg_index); | 62 compiler::Node* LoadRegister(compiler::Node* reg_index); |
56 compiler::Node* StoreRegister(compiler::Node* value, Register reg); | 63 compiler::Node* StoreRegister(compiler::Node* value, Register reg); |
57 compiler::Node* StoreRegister(compiler::Node* value, | 64 compiler::Node* StoreRegister(compiler::Node* value, |
58 compiler::Node* reg_index); | 65 compiler::Node* reg_index); |
59 | 66 |
60 // Returns the next consecutive register. | 67 // Returns the next consecutive register. |
61 compiler::Node* NextRegister(compiler::Node* reg_index); | 68 compiler::Node* NextRegister(compiler::Node* reg_index); |
62 | 69 |
63 // Returns the location in memory of the register |reg_index| in the | 70 // Returns the location in memory of the register |reg_index| in the |
64 // interpreter register file. | 71 // interpreter register file. |
65 compiler::Node* RegisterLocation(compiler::Node* reg_index); | 72 compiler::Node* RegisterLocation(compiler::Node* reg_index); |
66 | 73 |
67 // Load constant at |index| in the constant pool. | 74 // Load constant at |index| in the constant pool. |
68 compiler::Node* LoadConstantPoolEntry(compiler::Node* index); | 75 compiler::Node* LoadConstantPoolEntry(compiler::Node* index); |
69 | 76 |
70 // Load a field from an object on the heap. | |
71 compiler::Node* LoadObjectField(compiler::Node* object, int offset); | |
72 | |
73 // Load |slot_index| from |context|. | 77 // Load |slot_index| from |context|. |
74 compiler::Node* LoadContextSlot(compiler::Node* context, int slot_index); | 78 compiler::Node* LoadContextSlot(compiler::Node* context, int slot_index); |
75 compiler::Node* LoadContextSlot(compiler::Node* context, | 79 compiler::Node* LoadContextSlot(compiler::Node* context, |
76 compiler::Node* slot_index); | 80 compiler::Node* slot_index); |
77 // Stores |value| into |slot_index| of |context|. | 81 // Stores |value| into |slot_index| of |context|. |
78 compiler::Node* StoreContextSlot(compiler::Node* context, | 82 compiler::Node* StoreContextSlot(compiler::Node* context, |
79 compiler::Node* slot_index, | 83 compiler::Node* slot_index, |
80 compiler::Node* value); | 84 compiler::Node* value); |
81 | 85 |
82 // Load the TypeFeedbackVector for the current function. | 86 // Load the TypeFeedbackVector for the current function. |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 compiler::Node* stack_pointer_before_call_; | 239 compiler::Node* stack_pointer_before_call_; |
236 | 240 |
237 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler); | 241 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler); |
238 }; | 242 }; |
239 | 243 |
240 } // namespace interpreter | 244 } // namespace interpreter |
241 } // namespace internal | 245 } // namespace internal |
242 } // namespace v8 | 246 } // namespace v8 |
243 | 247 |
244 #endif // V8_INTERPRETER_INTERPRETER_ASSEMBLER_H_ | 248 #endif // V8_INTERPRETER_INTERPRETER_ASSEMBLER_H_ |
OLD | NEW |