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_COMPILER_INTERPRETER_ASSEMBLER_H_ | 5 #ifndef V8_COMPILER_INTERPRETER_ASSEMBLER_H_ |
6 #define V8_COMPILER_INTERPRETER_ASSEMBLER_H_ | 6 #define V8_COMPILER_INTERPRETER_ASSEMBLER_H_ |
7 | 7 |
8 // Clients of this interface shouldn't depend on lots of compiler internals. | 8 // Clients of this interface shouldn't depend on lots of compiler internals. |
9 // Do not include anything from src/compiler here! | 9 // Do not include anything from src/compiler here! |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
72 // Returns the location in memory of the register |reg_index| in the | 72 // Returns the location in memory of the register |reg_index| in the |
73 // interpreter register file. | 73 // interpreter register file. |
74 Node* RegisterLocation(Node* reg_index); | 74 Node* RegisterLocation(Node* reg_index); |
75 | 75 |
76 // Constants. | 76 // Constants. |
77 Node* Int32Constant(int value); | 77 Node* Int32Constant(int value); |
78 Node* IntPtrConstant(intptr_t value); | 78 Node* IntPtrConstant(intptr_t value); |
79 Node* NumberConstant(double value); | 79 Node* NumberConstant(double value); |
80 Node* HeapConstant(Handle<HeapObject> object); | 80 Node* HeapConstant(Handle<HeapObject> object); |
81 Node* BooleanConstant(bool value); | 81 Node* BooleanConstant(bool value); |
82 Node* NullConstant(); | |
83 Node* UndefinedConstant(); | |
rmcilroy
2015/10/28 13:46:22
nit - you can just use HeapConstant(factory()->und
oth
2015/10/28 22:50:40
Okay, used the more verbose form.
| |
82 | 84 |
83 // Tag and untag Smi values. | 85 // Tag and untag Smi values. |
84 Node* SmiTag(Node* value); | 86 Node* SmiTag(Node* value); |
85 Node* SmiUntag(Node* value); | 87 Node* SmiUntag(Node* value); |
86 | 88 |
87 // Basic arithmetic operations. | 89 // Basic arithmetic operations. |
88 Node* IntPtrAdd(Node* a, Node* b); | 90 Node* IntPtrAdd(Node* a, Node* b); |
89 Node* IntPtrSub(Node* a, Node* b); | 91 Node* IntPtrSub(Node* a, Node* b); |
90 Node* WordShl(Node* value, int shift); | 92 Node* WordShl(Node* value, int shift); |
91 | 93 |
92 // Load constant at |index| in the constant pool. | 94 // Load constant at |index| in the constant pool. |
93 Node* LoadConstantPoolEntry(Node* index); | 95 Node* LoadConstantPoolEntry(Node* index); |
94 | 96 |
97 // Load an element from a fixed array on the heap. | |
98 Node* LoadFixedArrayElement(Node* fixed_array, int index); | |
99 | |
95 // Load a field from an object on the heap. | 100 // Load a field from an object on the heap. |
96 Node* LoadObjectField(Node* object, int offset); | 101 Node* LoadObjectField(Node* object, int offset); |
97 | 102 |
98 // Load |slot_index| from |context|. | 103 // Load |slot_index| from |context|. |
99 Node* LoadContextSlot(Node* context, int slot_index); | 104 Node* LoadContextSlot(Node* context, int slot_index); |
100 Node* LoadContextSlot(Node* context, Node* slot_index); | 105 Node* LoadContextSlot(Node* context, Node* slot_index); |
101 // Stores |value| into |slot_index| of |context|. | 106 // Stores |value| into |slot_index| of |context|. |
102 Node* StoreContextSlot(Node* context, Node* slot_index, Node* value); | 107 Node* StoreContextSlot(Node* context, Node* slot_index, Node* value); |
103 | 108 |
104 // Load the TypeFeedbackVector for the current function. | 109 // Load the TypeFeedbackVector for the current function. |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
208 bool code_generated_; | 213 bool code_generated_; |
209 | 214 |
210 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler); | 215 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler); |
211 }; | 216 }; |
212 | 217 |
213 } // namespace compiler | 218 } // namespace compiler |
214 } // namespace internal | 219 } // namespace internal |
215 } // namespace v8 | 220 } // namespace v8 |
216 | 221 |
217 #endif // V8_COMPILER_INTERPRETER_ASSEMBLER_H_ | 222 #endif // V8_COMPILER_INTERPRETER_ASSEMBLER_H_ |
OLD | NEW |