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/compiler.h" | 10 #include "src/compiler.h" |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 Node* JITSingleFunction(Node* base, Node* length, Node* index, | 157 Node* JITSingleFunction(Node* base, Node* length, Node* index, |
158 uint32_t sig_index, wasm::FunctionSig* sig, | 158 uint32_t sig_index, wasm::FunctionSig* sig, |
159 wasm::WasmCodePosition position); | 159 wasm::WasmCodePosition position); |
160 void BuildJSToWasmWrapper(Handle<Code> wasm_code, wasm::FunctionSig* sig); | 160 void BuildJSToWasmWrapper(Handle<Code> wasm_code, wasm::FunctionSig* sig); |
161 void BuildWasmToJSWrapper(Handle<JSFunction> function, | 161 void BuildWasmToJSWrapper(Handle<JSFunction> function, |
162 wasm::FunctionSig* sig); | 162 wasm::FunctionSig* sig); |
163 | 163 |
164 Node* ToJS(Node* node, Node* context, wasm::LocalType type); | 164 Node* ToJS(Node* node, Node* context, wasm::LocalType type); |
165 Node* FromJS(Node* node, Node* context, wasm::LocalType type); | 165 Node* FromJS(Node* node, Node* context, wasm::LocalType type); |
166 Node* Invert(Node* node); | 166 Node* Invert(Node* node); |
167 Node* FunctionTable(); | 167 Node* FunctionTable(uint32_t index); |
168 Node* ChangeToRuntimeCall(Node* node, Runtime::FunctionId function_id, | 168 Node* ChangeToRuntimeCall(Node* node, Runtime::FunctionId function_id, |
169 Signature<Conversion>* signature); | 169 Signature<Conversion>* signature); |
170 | 170 |
171 //----------------------------------------------------------------------- | 171 //----------------------------------------------------------------------- |
172 // Operations that concern the linear memory. | 172 // Operations that concern the linear memory. |
173 //----------------------------------------------------------------------- | 173 //----------------------------------------------------------------------- |
174 Node* MemSize(uint32_t offset); | 174 Node* MemSize(uint32_t offset); |
175 Node* LoadGlobal(uint32_t index); | 175 Node* LoadGlobal(uint32_t index); |
176 Node* StoreGlobal(uint32_t index, Node* val); | 176 Node* StoreGlobal(uint32_t index, Node* val); |
177 Node* LoadMem(wasm::LocalType type, MachineType memtype, Node* index, | 177 Node* LoadMem(wasm::LocalType type, MachineType memtype, Node* index, |
(...skipping 26 matching lines...) Expand all Loading... |
204 | 204 |
205 private: | 205 private: |
206 static const int kDefaultBufferSize = 16; | 206 static const int kDefaultBufferSize = 16; |
207 friend class WasmTrapHelper; | 207 friend class WasmTrapHelper; |
208 | 208 |
209 Zone* zone_; | 209 Zone* zone_; |
210 JSGraph* jsgraph_; | 210 JSGraph* jsgraph_; |
211 wasm::ModuleEnv* module_; | 211 wasm::ModuleEnv* module_; |
212 Node* mem_buffer_; | 212 Node* mem_buffer_; |
213 Node* mem_size_; | 213 Node* mem_size_; |
214 Node* function_table_; | 214 NodeVector function_tables_; |
215 Node** control_; | 215 Node** control_; |
216 Node** effect_; | 216 Node** effect_; |
217 Node** cur_buffer_; | 217 Node** cur_buffer_; |
218 size_t cur_bufsize_; | 218 size_t cur_bufsize_; |
219 Node* def_buffer_[kDefaultBufferSize]; | 219 Node* def_buffer_[kDefaultBufferSize]; |
220 | 220 |
221 WasmTrapHelper* trap_; | 221 WasmTrapHelper* trap_; |
222 wasm::FunctionSig* function_signature_; | 222 wasm::FunctionSig* function_signature_; |
223 SetOncePointer<const Operator> allocate_heap_number_operator_; | 223 SetOncePointer<const Operator> allocate_heap_number_operator_; |
224 | 224 |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 } | 350 } |
351 | 351 |
352 // Simd helper functions | 352 // Simd helper functions |
353 MachineOperatorBuilder* simd(); | 353 MachineOperatorBuilder* simd(); |
354 }; | 354 }; |
355 } // namespace compiler | 355 } // namespace compiler |
356 } // namespace internal | 356 } // namespace internal |
357 } // namespace v8 | 357 } // namespace v8 |
358 | 358 |
359 #endif // V8_COMPILER_WASM_COMPILER_H_ | 359 #endif // V8_COMPILER_WASM_COMPILER_H_ |
OLD | NEW |