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_WASM_MODULE_H_ | 5 #ifndef V8_WASM_MODULE_H_ |
6 #define V8_WASM_MODULE_H_ | 6 #define V8_WASM_MODULE_H_ |
7 | 7 |
8 #include "src/wasm/wasm-opcodes.h" | 8 #include "src/wasm/wasm-opcodes.h" |
9 #include "src/wasm/wasm-result.h" | 9 #include "src/wasm/wasm-result.h" |
10 | 10 |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 } | 184 } |
185 size_t FunctionTableSize() { | 185 size_t FunctionTableSize() { |
186 return module && module->function_table ? module->function_table->size() | 186 return module && module->function_table ? module->function_table->size() |
187 : 0; | 187 : 0; |
188 } | 188 } |
189 | 189 |
190 Handle<Code> GetFunctionCode(uint32_t index); | 190 Handle<Code> GetFunctionCode(uint32_t index); |
191 Handle<FixedArray> GetFunctionTable(); | 191 Handle<FixedArray> GetFunctionTable(); |
192 | 192 |
193 compiler::CallDescriptor* GetWasmCallDescriptor(Zone* zone, FunctionSig* sig); | 193 compiler::CallDescriptor* GetWasmCallDescriptor(Zone* zone, FunctionSig* sig); |
| 194 static compiler::CallDescriptor* GetI32WasmCallDescriptor( |
| 195 Zone* zone, compiler::CallDescriptor* descriptor); |
194 compiler::CallDescriptor* GetCallDescriptor(Zone* zone, uint32_t index); | 196 compiler::CallDescriptor* GetCallDescriptor(Zone* zone, uint32_t index); |
195 }; | 197 }; |
196 | 198 |
197 // A helper for printing out the names of functions. | 199 // A helper for printing out the names of functions. |
198 struct WasmFunctionName { | 200 struct WasmFunctionName { |
199 const WasmFunction* function_; | 201 const WasmFunction* function_; |
200 const WasmModule* module_; | 202 const WasmModule* module_; |
201 WasmFunctionName(const WasmFunction* function, const ModuleEnv* menv) | 203 WasmFunctionName(const WasmFunction* function, const ModuleEnv* menv) |
202 : function_(function), module_(menv ? menv->module : nullptr) {} | 204 : function_(function), module_(menv ? menv->module : nullptr) {} |
203 }; | 205 }; |
(...skipping 12 matching lines...) Expand all Loading... |
216 | 218 |
217 // For testing. Decode, verify, and run the last exported function in the | 219 // For testing. Decode, verify, and run the last exported function in the |
218 // given decoded module. | 220 // given decoded module. |
219 int32_t CompileAndRunWasmModule(Isolate* isolate, WasmModule* module); | 221 int32_t CompileAndRunWasmModule(Isolate* isolate, WasmModule* module); |
220 | 222 |
221 } // namespace wasm | 223 } // namespace wasm |
222 } // namespace internal | 224 } // namespace internal |
223 } // namespace v8 | 225 } // namespace v8 |
224 | 226 |
225 #endif // V8_WASM_MODULE_H_ | 227 #endif // V8_WASM_MODULE_H_ |
OLD | NEW |