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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 wasm::FunctionSig* function_signature_; | 152 wasm::FunctionSig* function_signature_; |
153 | 153 |
154 // Internal helper methods. | 154 // Internal helper methods. |
155 JSGraph* jsgraph() { return jsgraph_; } | 155 JSGraph* jsgraph() { return jsgraph_; } |
156 Graph* graph(); | 156 Graph* graph(); |
157 | 157 |
158 Node* String(const char* string); | 158 Node* String(const char* string); |
159 Node* MemBuffer(uint32_t offset); | 159 Node* MemBuffer(uint32_t offset); |
160 void BoundsCheckMem(MachineType memtype, Node* index, uint32_t offset); | 160 void BoundsCheckMem(MachineType memtype, Node* index, uint32_t offset); |
161 | 161 |
| 162 Node* BuildCCall(MachineSignature* sig, Node** args); |
162 Node* BuildWasmCall(wasm::FunctionSig* sig, Node** args); | 163 Node* BuildWasmCall(wasm::FunctionSig* sig, Node** args); |
163 Node* BuildF32Neg(Node* input); | 164 Node* BuildF32Neg(Node* input); |
164 Node* BuildF64Neg(Node* input); | 165 Node* BuildF64Neg(Node* input); |
165 Node* BuildF32CopySign(Node* left, Node* right); | 166 Node* BuildF32CopySign(Node* left, Node* right); |
166 Node* BuildF64CopySign(Node* left, Node* right); | 167 Node* BuildF64CopySign(Node* left, Node* right); |
167 Node* BuildF32Min(Node* left, Node* right); | 168 Node* BuildF32Min(Node* left, Node* right); |
168 Node* BuildF32Max(Node* left, Node* right); | 169 Node* BuildF32Max(Node* left, Node* right); |
169 Node* BuildF64Min(Node* left, Node* right); | 170 Node* BuildF64Min(Node* left, Node* right); |
170 Node* BuildF64Max(Node* left, Node* right); | 171 Node* BuildF64Max(Node* left, Node* right); |
171 Node* BuildI32SConvertF32(Node* input); | 172 Node* BuildI32SConvertF32(Node* input); |
172 Node* BuildI32SConvertF64(Node* input); | 173 Node* BuildI32SConvertF64(Node* input); |
173 Node* BuildI32UConvertF32(Node* input); | 174 Node* BuildI32UConvertF32(Node* input); |
174 Node* BuildI32UConvertF64(Node* input); | 175 Node* BuildI32UConvertF64(Node* input); |
175 Node* BuildI32Ctz(Node* input); | 176 Node* BuildI32Ctz(Node* input); |
176 Node* BuildI32Popcnt(Node* input); | 177 Node* BuildI32Popcnt(Node* input); |
177 Node* BuildI64Ctz(Node* input); | 178 Node* BuildI64Ctz(Node* input); |
178 Node* BuildI64Popcnt(Node* input); | 179 Node* BuildI64Popcnt(Node* input); |
179 Node* BuildF32Trunc(Node* input); | 180 Node* BuildF32Trunc(Node* input); |
| 181 Node* BuildF64Trunc(Node* input); |
180 | 182 |
181 Node** Realloc(Node** buffer, size_t count) { | 183 Node** Realloc(Node** buffer, size_t count) { |
182 Node** buf = Buffer(count); | 184 Node** buf = Buffer(count); |
183 if (buf != buffer) memcpy(buf, buffer, count * sizeof(Node*)); | 185 if (buf != buffer) memcpy(buf, buffer, count * sizeof(Node*)); |
184 return buf; | 186 return buf; |
185 } | 187 } |
186 }; | 188 }; |
187 } // namespace compiler | 189 } // namespace compiler |
188 } // namespace internal | 190 } // namespace internal |
189 } // namespace v8 | 191 } // namespace v8 |
190 | 192 |
191 #endif // V8_COMPILER_WASM_COMPILER_H_ | 193 #endif // V8_COMPILER_WASM_COMPILER_H_ |
OLD | NEW |