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 <memory> | 8 #include <memory> |
9 | 9 |
10 #include "src/api.h" | 10 #include "src/api.h" |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 Handle<Script> GetScript(Handle<JSObject> instance); | 392 Handle<Script> GetScript(Handle<JSObject> instance); |
393 | 393 |
394 V8_EXPORT_PRIVATE MaybeHandle<WasmModuleObject> CreateModuleObjectFromBytes( | 394 V8_EXPORT_PRIVATE MaybeHandle<WasmModuleObject> CreateModuleObjectFromBytes( |
395 Isolate* isolate, const byte* start, const byte* end, ErrorThrower* thrower, | 395 Isolate* isolate, const byte* start, const byte* end, ErrorThrower* thrower, |
396 ModuleOrigin origin, Handle<Script> asm_js_script, | 396 ModuleOrigin origin, Handle<Script> asm_js_script, |
397 Vector<const byte> asm_offset_table); | 397 Vector<const byte> asm_offset_table); |
398 | 398 |
399 V8_EXPORT_PRIVATE Handle<JSArray> GetImports(Isolate* isolate, | 399 V8_EXPORT_PRIVATE Handle<JSArray> GetImports(Isolate* isolate, |
400 Handle<WasmModuleObject> module); | 400 Handle<WasmModuleObject> module); |
401 | 401 |
| 402 V8_EXPORT_PRIVATE Handle<JSArray> GetExports(Isolate* isolate, |
| 403 Handle<WasmModuleObject> module); |
| 404 |
402 V8_EXPORT_PRIVATE bool ValidateModuleBytes(Isolate* isolate, const byte* start, | 405 V8_EXPORT_PRIVATE bool ValidateModuleBytes(Isolate* isolate, const byte* start, |
403 const byte* end, | 406 const byte* end, |
404 ErrorThrower* thrower, | 407 ErrorThrower* thrower, |
405 ModuleOrigin origin); | 408 ModuleOrigin origin); |
406 | 409 |
407 // Get the offset of the code of a function within a module. | 410 // Get the offset of the code of a function within a module. |
408 int GetFunctionCodeOffset(Handle<WasmCompiledModule> compiled_module, | 411 int GetFunctionCodeOffset(Handle<WasmCompiledModule> compiled_module, |
409 int func_index); | 412 int func_index); |
410 | 413 |
411 // Assumed to be called with a code object associated to a wasm module instance. | 414 // Assumed to be called with a code object associated to a wasm module instance. |
(...skipping 30 matching lines...) Expand all Loading... |
442 void ValidateModuleState(Isolate* isolate, Handle<WasmModuleObject> module_obj); | 445 void ValidateModuleState(Isolate* isolate, Handle<WasmModuleObject> module_obj); |
443 void ValidateOrphanedInstance(Isolate* isolate, | 446 void ValidateOrphanedInstance(Isolate* isolate, |
444 Handle<WasmInstanceObject> instance); | 447 Handle<WasmInstanceObject> instance); |
445 | 448 |
446 } // namespace testing | 449 } // namespace testing |
447 } // namespace wasm | 450 } // namespace wasm |
448 } // namespace internal | 451 } // namespace internal |
449 } // namespace v8 | 452 } // namespace v8 |
450 | 453 |
451 #endif // V8_WASM_MODULE_H_ | 454 #endif // V8_WASM_MODULE_H_ |
OLD | NEW |