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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 } | 200 } |
201 size_t FunctionTableSize() { | 201 size_t FunctionTableSize() { |
202 return module && module->function_table ? module->function_table->size() | 202 return module && module->function_table ? module->function_table->size() |
203 : 0; | 203 : 0; |
204 } | 204 } |
205 | 205 |
206 Handle<Code> GetFunctionCode(uint32_t index); | 206 Handle<Code> GetFunctionCode(uint32_t index); |
207 Handle<Code> GetImportCode(uint32_t index); | 207 Handle<Code> GetImportCode(uint32_t index); |
208 Handle<FixedArray> GetFunctionTable(); | 208 Handle<FixedArray> GetFunctionTable(); |
209 | 209 |
210 compiler::CallDescriptor* GetWasmCallDescriptor(Zone* zone, FunctionSig* sig); | 210 static compiler::CallDescriptor* GetWasmCallDescriptor(Zone* zone, |
| 211 FunctionSig* sig); |
211 static compiler::CallDescriptor* GetI32WasmCallDescriptor( | 212 static compiler::CallDescriptor* GetI32WasmCallDescriptor( |
212 Zone* zone, compiler::CallDescriptor* descriptor); | 213 Zone* zone, compiler::CallDescriptor* descriptor); |
213 compiler::CallDescriptor* GetCallDescriptor(Zone* zone, uint32_t index); | 214 compiler::CallDescriptor* GetCallDescriptor(Zone* zone, uint32_t index); |
214 }; | 215 }; |
215 | 216 |
216 // A helper for printing out the names of functions. | 217 // A helper for printing out the names of functions. |
217 struct WasmFunctionName { | 218 struct WasmFunctionName { |
218 const WasmFunction* function_; | 219 const WasmFunction* function_; |
219 const WasmModule* module_; | 220 const WasmModule* module_; |
220 WasmFunctionName(const WasmFunction* function, const ModuleEnv* menv) | 221 WasmFunctionName(const WasmFunction* function, const ModuleEnv* menv) |
(...skipping 14 matching lines...) Expand all Loading... |
235 | 236 |
236 // For testing. Decode, verify, and run the last exported function in the | 237 // For testing. Decode, verify, and run the last exported function in the |
237 // given decoded module. | 238 // given decoded module. |
238 int32_t CompileAndRunWasmModule(Isolate* isolate, WasmModule* module); | 239 int32_t CompileAndRunWasmModule(Isolate* isolate, WasmModule* module); |
239 | 240 |
240 } // namespace wasm | 241 } // namespace wasm |
241 } // namespace internal | 242 } // namespace internal |
242 } // namespace v8 | 243 } // namespace v8 |
243 | 244 |
244 #endif // V8_WASM_MODULE_H_ | 245 #endif // V8_WASM_MODULE_H_ |
OLD | NEW |