| 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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 // Get the script of the wasm module. If the origin of the module is asm.js, the | 389 // Get the script of the wasm module. If the origin of the module is asm.js, the |
| 390 // returned Script will be a JavaScript Script of Script::TYPE_NORMAL, otherwise | 390 // returned Script will be a JavaScript Script of Script::TYPE_NORMAL, otherwise |
| 391 // it's of type TYPE_WASM. | 391 // it's of type TYPE_WASM. |
| 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, |
| 400 Handle<WasmModuleObject> module); |
| 401 |
| 399 V8_EXPORT_PRIVATE bool ValidateModuleBytes(Isolate* isolate, const byte* start, | 402 V8_EXPORT_PRIVATE bool ValidateModuleBytes(Isolate* isolate, const byte* start, |
| 400 const byte* end, | 403 const byte* end, |
| 401 ErrorThrower* thrower, | 404 ErrorThrower* thrower, |
| 402 ModuleOrigin origin); | 405 ModuleOrigin origin); |
| 403 | 406 |
| 404 // Get the offset of the code of a function within a module. | 407 // Get the offset of the code of a function within a module. |
| 405 int GetFunctionCodeOffset(Handle<WasmCompiledModule> compiled_module, | 408 int GetFunctionCodeOffset(Handle<WasmCompiledModule> compiled_module, |
| 406 int func_index); | 409 int func_index); |
| 407 | 410 |
| 408 // Assumed to be called with a code object associated to a wasm module instance. | 411 // Assumed to be called with a code object associated to a wasm module instance. |
| (...skipping 30 matching lines...) Expand all Loading... |
| 439 void ValidateModuleState(Isolate* isolate, Handle<WasmModuleObject> module_obj); | 442 void ValidateModuleState(Isolate* isolate, Handle<WasmModuleObject> module_obj); |
| 440 void ValidateOrphanedInstance(Isolate* isolate, | 443 void ValidateOrphanedInstance(Isolate* isolate, |
| 441 Handle<WasmInstanceObject> instance); | 444 Handle<WasmInstanceObject> instance); |
| 442 | 445 |
| 443 } // namespace testing | 446 } // namespace testing |
| 444 } // namespace wasm | 447 } // namespace wasm |
| 445 } // namespace internal | 448 } // namespace internal |
| 446 } // namespace v8 | 449 } // namespace v8 |
| 447 | 450 |
| 448 #endif // V8_WASM_MODULE_H_ | 451 #endif // V8_WASM_MODULE_H_ |
| OLD | NEW |