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_WASM_COMPILER_H_ | 5 #ifndef V8_COMPILER_WASM_COMPILER_H_ |
6 #define V8_COMPILER_WASM_COMPILER_H_ | 6 #define V8_COMPILER_WASM_COMPILER_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/wasm/wasm-opcodes.h" | 10 #include "src/wasm/wasm-opcodes.h" |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 Node* FromJS(Node* node, Node* context, wasm::LocalType type); | 111 Node* FromJS(Node* node, Node* context, wasm::LocalType type); |
112 Node* Invert(Node* node); | 112 Node* Invert(Node* node); |
113 Node* FunctionTable(); | 113 Node* FunctionTable(); |
114 | 114 |
115 //----------------------------------------------------------------------- | 115 //----------------------------------------------------------------------- |
116 // Operations that concern the linear memory. | 116 // Operations that concern the linear memory. |
117 //----------------------------------------------------------------------- | 117 //----------------------------------------------------------------------- |
118 Node* MemSize(uint32_t offset); | 118 Node* MemSize(uint32_t offset); |
119 Node* LoadGlobal(uint32_t index); | 119 Node* LoadGlobal(uint32_t index); |
120 Node* StoreGlobal(uint32_t index, Node* val); | 120 Node* StoreGlobal(uint32_t index, Node* val); |
| 121 Node* BuildUnalignedLoad(wasm::LocalType type, MachineType memtype, |
| 122 Node* index, uint32_t offset); |
121 Node* LoadMem(wasm::LocalType type, MachineType memtype, Node* index, | 123 Node* LoadMem(wasm::LocalType type, MachineType memtype, Node* index, |
122 uint32_t offset); | 124 uint32_t offset, uint32_t alignment); |
123 Node* StoreMem(MachineType type, Node* index, uint32_t offset, Node* val); | 125 Node* BuildUnalignedStore(MachineType memtype, Node* index, uint32_t offset, |
| 126 uint32_t alignment, Node* val); |
| 127 Node* StoreMem(MachineType type, Node* index, uint32_t offset, |
| 128 uint32_t alignment, Node* val); |
124 | 129 |
125 static void PrintDebugName(Node* node); | 130 static void PrintDebugName(Node* node); |
126 | 131 |
127 Node* Control() { return *control_; } | 132 Node* Control() { return *control_; } |
128 Node* Effect() { return *effect_; } | 133 Node* Effect() { return *effect_; } |
129 | 134 |
130 void set_module(wasm::ModuleEnv* module) { this->module_ = module; } | 135 void set_module(wasm::ModuleEnv* module) { this->module_ = module; } |
131 | 136 |
132 void set_control_ptr(Node** control) { this->control_ = control; } | 137 void set_control_ptr(Node** control) { this->control_ = control; } |
133 | 138 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 Node** buf = Buffer(new_count); | 250 Node** buf = Buffer(new_count); |
246 if (buf != buffer) memcpy(buf, buffer, old_count * sizeof(Node*)); | 251 if (buf != buffer) memcpy(buf, buffer, old_count * sizeof(Node*)); |
247 return buf; | 252 return buf; |
248 } | 253 } |
249 }; | 254 }; |
250 } // namespace compiler | 255 } // namespace compiler |
251 } // namespace internal | 256 } // namespace internal |
252 } // namespace v8 | 257 } // namespace v8 |
253 | 258 |
254 #endif // V8_COMPILER_WASM_COMPILER_H_ | 259 #endif // V8_COMPILER_WASM_COMPILER_H_ |
OLD | NEW |