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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 // Internal helper methods. | 159 // Internal helper methods. |
160 JSGraph* jsgraph() { return jsgraph_; } | 160 JSGraph* jsgraph() { return jsgraph_; } |
161 Graph* graph(); | 161 Graph* graph(); |
162 | 162 |
163 Node* String(const char* string); | 163 Node* String(const char* string); |
164 Node* MemBuffer(uint32_t offset); | 164 Node* MemBuffer(uint32_t offset); |
165 void BoundsCheckMem(MachineType memtype, Node* index, uint32_t offset); | 165 void BoundsCheckMem(MachineType memtype, Node* index, uint32_t offset); |
166 | 166 |
167 Node* BuildCCall(MachineSignature* sig, Node** args); | 167 Node* BuildCCall(MachineSignature* sig, Node** args); |
168 Node* BuildWasmCall(wasm::FunctionSig* sig, Node** args); | 168 Node* BuildWasmCall(wasm::FunctionSig* sig, Node** args); |
| 169 |
169 Node* BuildF32Neg(Node* input); | 170 Node* BuildF32Neg(Node* input); |
170 Node* BuildF64Neg(Node* input); | 171 Node* BuildF64Neg(Node* input); |
171 Node* BuildF32CopySign(Node* left, Node* right); | 172 Node* BuildF32CopySign(Node* left, Node* right); |
172 Node* BuildF64CopySign(Node* left, Node* right); | 173 Node* BuildF64CopySign(Node* left, Node* right); |
173 Node* BuildF32Min(Node* left, Node* right); | 174 Node* BuildF32Min(Node* left, Node* right); |
174 Node* BuildF32Max(Node* left, Node* right); | 175 Node* BuildF32Max(Node* left, Node* right); |
175 Node* BuildF64Min(Node* left, Node* right); | 176 Node* BuildF64Min(Node* left, Node* right); |
176 Node* BuildF64Max(Node* left, Node* right); | 177 Node* BuildF64Max(Node* left, Node* right); |
177 Node* BuildI32SConvertF32(Node* input); | 178 Node* BuildI32SConvertF32(Node* input); |
178 Node* BuildI32SConvertF64(Node* input); | 179 Node* BuildI32SConvertF64(Node* input); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 | 219 |
219 Node* BuildFloatToIntConversionInstruction( | 220 Node* BuildFloatToIntConversionInstruction( |
220 Node* input, ExternalReference ref, | 221 Node* input, ExternalReference ref, |
221 MachineRepresentation parameter_representation, | 222 MachineRepresentation parameter_representation, |
222 const MachineType result_type); | 223 const MachineType result_type); |
223 Node* BuildI64SConvertF32(Node* input); | 224 Node* BuildI64SConvertF32(Node* input); |
224 Node* BuildI64UConvertF32(Node* input); | 225 Node* BuildI64UConvertF32(Node* input); |
225 Node* BuildI64SConvertF64(Node* input); | 226 Node* BuildI64SConvertF64(Node* input); |
226 Node* BuildI64UConvertF64(Node* input); | 227 Node* BuildI64UConvertF64(Node* input); |
227 | 228 |
| 229 Node* BuildI32DivS(Node* left, Node* right); |
| 230 Node* BuildI32RemS(Node* left, Node* right); |
| 231 Node* BuildI32DivU(Node* left, Node* right); |
| 232 Node* BuildI32RemU(Node* left, Node* right); |
| 233 |
228 Node* BuildI64DivS(Node* left, Node* right); | 234 Node* BuildI64DivS(Node* left, Node* right); |
229 Node* BuildI64RemS(Node* left, Node* right); | 235 Node* BuildI64RemS(Node* left, Node* right); |
230 Node* BuildI64DivU(Node* left, Node* right); | 236 Node* BuildI64DivU(Node* left, Node* right); |
231 Node* BuildI64RemU(Node* left, Node* right); | 237 Node* BuildI64RemU(Node* left, Node* right); |
232 Node* BuildDiv64Call(Node* left, Node* right, ExternalReference ref, | 238 Node* BuildDiv64Call(Node* left, Node* right, ExternalReference ref, |
233 MachineType result_type, int trap_zero); | 239 MachineType result_type, int trap_zero); |
234 | 240 |
235 Node** Realloc(Node** buffer, size_t old_count, size_t new_count) { | 241 Node** Realloc(Node** buffer, size_t old_count, size_t new_count) { |
236 Node** buf = Buffer(new_count); | 242 Node** buf = Buffer(new_count); |
237 if (buf != buffer) memcpy(buf, buffer, old_count * sizeof(Node*)); | 243 if (buf != buffer) memcpy(buf, buffer, old_count * sizeof(Node*)); |
238 return buf; | 244 return buf; |
239 } | 245 } |
240 }; | 246 }; |
241 } // namespace compiler | 247 } // namespace compiler |
242 } // namespace internal | 248 } // namespace internal |
243 } // namespace v8 | 249 } // namespace v8 |
244 | 250 |
245 #endif // V8_COMPILER_WASM_COMPILER_H_ | 251 #endif // V8_COMPILER_WASM_COMPILER_H_ |
OLD | NEW |