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 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
509 // Constructs a single function table as a FixedArray of double size, | 509 // Constructs a single function table as a FixedArray of double size, |
510 // populating it with function signature indices and function indices. | 510 // populating it with function signature indices and function indices. |
511 Handle<FixedArray> BuildFunctionTable(Isolate* isolate, uint32_t index, | 511 Handle<FixedArray> BuildFunctionTable(Isolate* isolate, uint32_t index, |
512 const WasmModule* module); | 512 const WasmModule* module); |
513 | 513 |
514 // Populates a function table by replacing function indices with handles to | 514 // Populates a function table by replacing function indices with handles to |
515 // the compiled code. | 515 // the compiled code. |
516 void PopulateFunctionTable(Handle<FixedArray> table, uint32_t table_size, | 516 void PopulateFunctionTable(Handle<FixedArray> table, uint32_t table_size, |
517 const std::vector<Handle<Code>>* code_table); | 517 const std::vector<Handle<Code>>* code_table); |
518 | 518 |
519 Handle<JSObject> CreateCompiledModuleObject(Isolate* isolate, | 519 Handle<JSObject> CreateCompiledModuleObject( |
520 Handle<FixedArray> compiled_module, | 520 Isolate* isolate, Handle<WasmCompiledModule> compiled_module, |
521 ModuleOrigin origin); | 521 ModuleOrigin origin); |
522 | 522 |
523 V8_EXPORT_PRIVATE MaybeHandle<JSObject> CreateModuleObjectFromBytes( | 523 V8_EXPORT_PRIVATE MaybeHandle<JSObject> CreateModuleObjectFromBytes( |
524 Isolate* isolate, const byte* start, const byte* end, ErrorThrower* thrower, | 524 Isolate* isolate, const byte* start, const byte* end, ErrorThrower* thrower, |
525 ModuleOrigin origin); | 525 ModuleOrigin origin); |
526 | 526 |
527 V8_EXPORT_PRIVATE bool ValidateModuleBytes(Isolate* isolate, const byte* start, | 527 V8_EXPORT_PRIVATE bool ValidateModuleBytes(Isolate* isolate, const byte* start, |
528 const byte* end, | 528 const byte* end, |
529 ErrorThrower* thrower, | 529 ErrorThrower* thrower, |
530 ModuleOrigin origin); | 530 ModuleOrigin origin); |
531 | 531 |
(...skipping 16 matching lines...) Expand all Loading... |
548 int instance_count); | 548 int instance_count); |
549 void ValidateModuleState(Isolate* isolate, Handle<JSObject> module_obj); | 549 void ValidateModuleState(Isolate* isolate, Handle<JSObject> module_obj); |
550 void ValidateOrphanedInstance(Isolate* isolate, Handle<JSObject> instance); | 550 void ValidateOrphanedInstance(Isolate* isolate, Handle<JSObject> instance); |
551 | 551 |
552 } // namespace testing | 552 } // namespace testing |
553 } // namespace wasm | 553 } // namespace wasm |
554 } // namespace internal | 554 } // namespace internal |
555 } // namespace v8 | 555 } // namespace v8 |
556 | 556 |
557 #endif // V8_WASM_MODULE_H_ | 557 #endif // V8_WASM_MODULE_H_ |
OLD | NEW |