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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 // If no debug info exists yet, it is created automatically. | 364 // If no debug info exists yet, it is created automatically. |
365 Handle<WasmDebugInfo> GetDebugInfo(Handle<JSObject> wasm); | 365 Handle<WasmDebugInfo> GetDebugInfo(Handle<JSObject> wasm); |
366 | 366 |
367 // Return the number of functions in the given wasm object. | 367 // Return the number of functions in the given wasm object. |
368 int GetNumberOfFunctions(JSObject* wasm); | 368 int GetNumberOfFunctions(JSObject* wasm); |
369 | 369 |
370 // Create and export JSFunction | 370 // Create and export JSFunction |
371 Handle<JSFunction> WrapExportCodeAsJSFunction(Isolate* isolate, | 371 Handle<JSFunction> WrapExportCodeAsJSFunction(Isolate* isolate, |
372 Handle<Code> export_code, | 372 Handle<Code> export_code, |
373 Handle<String> name, int arity, | 373 Handle<String> name, int arity, |
| 374 MaybeHandle<ByteArray> signature, |
374 Handle<JSObject> module_instance); | 375 Handle<JSObject> module_instance); |
375 | 376 |
376 // Check whether the given object is a wasm object. | 377 // Check whether the given object is a wasm object. |
377 // This checks the number and type of internal fields, so it's not 100 percent | 378 // This checks the number and type of internal fields, so it's not 100 percent |
378 // secure. If it turns out that we need more complete checks, we could add a | 379 // secure. If it turns out that we need more complete checks, we could add a |
379 // special marker as internal field, which will definitely never occur anywhere | 380 // special marker as internal field, which will definitely never occur anywhere |
380 // else. | 381 // else. |
381 bool IsWasmObject(Object* object); | 382 bool IsWasmObject(Object* object); |
382 | 383 |
383 // Update memory references of code objects associated with the module | 384 // Update memory references of code objects associated with the module |
(...skipping 17 matching lines...) Expand all Loading... |
401 // given encoded module. The module should have no imports. | 402 // given encoded module. The module should have no imports. |
402 int32_t CompileAndRunWasmModule(Isolate* isolate, const byte* module_start, | 403 int32_t CompileAndRunWasmModule(Isolate* isolate, const byte* module_start, |
403 const byte* module_end, bool asm_js = false); | 404 const byte* module_end, bool asm_js = false); |
404 | 405 |
405 } // namespace testing | 406 } // namespace testing |
406 } // namespace wasm | 407 } // namespace wasm |
407 } // namespace internal | 408 } // namespace internal |
408 } // namespace v8 | 409 } // namespace v8 |
409 | 410 |
410 #endif // V8_WASM_MODULE_H_ | 411 #endif // V8_WASM_MODULE_H_ |
OLD | NEW |