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. | 77 // Load a field from an object on the heap. |
71 compiler::Node* LoadObjectField(compiler::Node* object, int offset); | 78 compiler::Node* LoadObjectField(compiler::Node* object, int offset); |
79 compiler::Node* LoadObjectFieldInt32(compiler::Node* object, int offset); | |
80 | |
81 // Store into a field of an object on the heap. | |
82 compiler::Node* StoreObjectField(compiler::Node* object, int offset, | |
83 compiler::Node* value); | |
rmcilroy
2016/04/21 10:21:32
Should these live in CodeStubAssembler instead (th
neis
2016/04/21 11:30:15
Agreed, removed them from here.
| |
72 | 84 |
73 // Load |slot_index| from |context|. | 85 // Load |slot_index| from |context|. |
74 compiler::Node* LoadContextSlot(compiler::Node* context, int slot_index); | 86 compiler::Node* LoadContextSlot(compiler::Node* context, int slot_index); |
75 compiler::Node* LoadContextSlot(compiler::Node* context, | 87 compiler::Node* LoadContextSlot(compiler::Node* context, |
76 compiler::Node* slot_index); | 88 compiler::Node* slot_index); |
77 // Stores |value| into |slot_index| of |context|. | 89 // Stores |value| into |slot_index| of |context|. |
78 compiler::Node* StoreContextSlot(compiler::Node* context, | 90 compiler::Node* StoreContextSlot(compiler::Node* context, |
79 compiler::Node* slot_index, | 91 compiler::Node* slot_index, |
80 compiler::Node* value); | 92 compiler::Node* value); |
81 | 93 |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
235 compiler::Node* stack_pointer_before_call_; | 247 compiler::Node* stack_pointer_before_call_; |
236 | 248 |
237 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler); | 249 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler); |
238 }; | 250 }; |
239 | 251 |
240 } // namespace interpreter | 252 } // namespace interpreter |
241 } // namespace internal | 253 } // namespace internal |
242 } // namespace v8 | 254 } // namespace v8 |
243 | 255 |
244 #endif // V8_INTERPRETER_INTERPRETER_ASSEMBLER_H_ | 256 #endif // V8_INTERPRETER_INTERPRETER_ASSEMBLER_H_ |
OLD | NEW |