| 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 Node* Invert(Node* node); | 134 Node* Invert(Node* node); |
| 135 Node* FunctionTable(); | 135 Node* FunctionTable(); |
| 136 | 136 |
| 137 //----------------------------------------------------------------------- | 137 //----------------------------------------------------------------------- |
| 138 // Operations that concern the linear memory. | 138 // Operations that concern the linear memory. |
| 139 //----------------------------------------------------------------------- | 139 //----------------------------------------------------------------------- |
| 140 Node* MemSize(uint32_t offset); | 140 Node* MemSize(uint32_t offset); |
| 141 Node* LoadGlobal(uint32_t index); | 141 Node* LoadGlobal(uint32_t index); |
| 142 Node* StoreGlobal(uint32_t index, Node* val); | 142 Node* StoreGlobal(uint32_t index, Node* val); |
| 143 Node* LoadMem(wasm::LocalType type, MachineType memtype, Node* index, | 143 Node* LoadMem(wasm::LocalType type, MachineType memtype, Node* index, |
| 144 uint32_t offset, wasm::WasmCodePosition position); | 144 uint32_t offset, uint32_t alignment, |
| 145 Node* StoreMem(MachineType type, Node* index, uint32_t offset, Node* val, | 145 wasm::WasmCodePosition position); |
| 146 Node* StoreMem(MachineType type, Node* index, uint32_t offset, |
| 147 uint32_t alignment, Node* val, |
| 146 wasm::WasmCodePosition position); | 148 wasm::WasmCodePosition position); |
| 147 | 149 |
| 148 static void PrintDebugName(Node* node); | 150 static void PrintDebugName(Node* node); |
| 149 | 151 |
| 150 Node* Control() { return *control_; } | 152 Node* Control() { return *control_; } |
| 151 Node* Effect() { return *effect_; } | 153 Node* Effect() { return *effect_; } |
| 152 | 154 |
| 153 void set_module(wasm::ModuleEnv* module) { this->module_ = module; } | 155 void set_module(wasm::ModuleEnv* module) { this->module_ = module; } |
| 154 | 156 |
| 155 void set_control_ptr(Node** control) { this->control_ = control; } | 157 void set_control_ptr(Node** control) { this->control_ = control; } |
| (...skipping 30 matching lines...) Expand all Loading... |
| 186 | 188 |
| 187 // Internal helper methods. | 189 // Internal helper methods. |
| 188 JSGraph* jsgraph() { return jsgraph_; } | 190 JSGraph* jsgraph() { return jsgraph_; } |
| 189 Graph* graph(); | 191 Graph* graph(); |
| 190 | 192 |
| 191 Node* String(const char* string); | 193 Node* String(const char* string); |
| 192 Node* MemBuffer(uint32_t offset); | 194 Node* MemBuffer(uint32_t offset); |
| 193 void BoundsCheckMem(MachineType memtype, Node* index, uint32_t offset, | 195 void BoundsCheckMem(MachineType memtype, Node* index, uint32_t offset, |
| 194 wasm::WasmCodePosition position); | 196 wasm::WasmCodePosition position); |
| 195 | 197 |
| 198 MachineType GetTypeForUnalignedAccess(uint32_t alignment, |
| 199 bool signExtend = false); |
| 200 |
| 201 Node* BuildUnalignedLoad(wasm::LocalType type, MachineType memtype, |
| 202 Node* index, uint32_t offset, uint32_t alignment); |
| 203 Node* BuildUnalignedStore(MachineType memtype, Node* index, uint32_t offset, |
| 204 uint32_t alignment, Node* val); |
| 205 |
| 196 Node* MaskShiftCount32(Node* node); | 206 Node* MaskShiftCount32(Node* node); |
| 197 Node* MaskShiftCount64(Node* node); | 207 Node* MaskShiftCount64(Node* node); |
| 198 | 208 |
| 199 Node* BuildCCall(MachineSignature* sig, Node** args); | 209 Node* BuildCCall(MachineSignature* sig, Node** args); |
| 200 Node* BuildWasmCall(wasm::FunctionSig* sig, Node** args, | 210 Node* BuildWasmCall(wasm::FunctionSig* sig, Node** args, |
| 201 wasm::WasmCodePosition position); | 211 wasm::WasmCodePosition position); |
| 202 | 212 |
| 203 Node* BuildF32Neg(Node* input); | 213 Node* BuildF32Neg(Node* input); |
| 204 Node* BuildF64Neg(Node* input); | 214 Node* BuildF64Neg(Node* input); |
| 205 Node* BuildF32CopySign(Node* left, Node* right); | 215 Node* BuildF32CopySign(Node* left, Node* right); |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 Node** buf = Buffer(new_count); | 305 Node** buf = Buffer(new_count); |
| 296 if (buf != buffer) memcpy(buf, buffer, old_count * sizeof(Node*)); | 306 if (buf != buffer) memcpy(buf, buffer, old_count * sizeof(Node*)); |
| 297 return buf; | 307 return buf; |
| 298 } | 308 } |
| 299 }; | 309 }; |
| 300 } // namespace compiler | 310 } // namespace compiler |
| 301 } // namespace internal | 311 } // namespace internal |
| 302 } // namespace v8 | 312 } // namespace v8 |
| 303 | 313 |
| 304 #endif // V8_COMPILER_WASM_COMPILER_H_ | 314 #endif // V8_COMPILER_WASM_COMPILER_H_ |
| OLD | NEW |