| 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" |
| 11 #include "src/debug/debug-interface.h" | 11 #include "src/debug/debug-interface.h" |
| 12 #include "src/globals.h" | 12 #include "src/globals.h" |
| 13 #include "src/handles.h" | 13 #include "src/handles.h" |
| 14 #include "src/parsing/preparse-data.h" | 14 #include "src/parsing/preparse-data.h" |
| 15 | 15 |
| 16 #include "src/wasm/managed.h" | 16 #include "src/wasm/managed.h" |
| 17 #include "src/wasm/signature-map.h" | 17 #include "src/wasm/signature-map.h" |
| 18 #include "src/wasm/wasm-opcodes.h" | 18 #include "src/wasm/wasm-opcodes.h" |
| 19 | 19 |
| 20 namespace v8 { | 20 namespace v8 { |
| 21 namespace internal { | 21 namespace internal { |
| 22 | 22 |
| 23 class WasmCompiledModule; | 23 class WasmCompiledModule; |
| 24 class WasmDebugInfo; | 24 class WasmDebugInfo; |
| 25 class WasmModuleObject; | 25 class WasmModuleObject; |
| 26 class WasmInstanceObject; | 26 class WasmInstanceObject; |
| 27 class WasmMemoryObject; |
| 27 | 28 |
| 28 namespace compiler { | 29 namespace compiler { |
| 29 class CallDescriptor; | 30 class CallDescriptor; |
| 30 class WasmCompilationUnit; | 31 class WasmCompilationUnit; |
| 31 } | 32 } |
| 32 | 33 |
| 33 namespace wasm { | 34 namespace wasm { |
| 34 class ErrorThrower; | 35 class ErrorThrower; |
| 35 | 36 |
| 36 const uint32_t kWasmMagic = 0x6d736100; | 37 const uint32_t kWasmMagic = 0x6d736100; |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 | 426 |
| 426 int32_t GetInstanceMemorySize(Isolate* isolate, | 427 int32_t GetInstanceMemorySize(Isolate* isolate, |
| 427 Handle<WasmInstanceObject> instance); | 428 Handle<WasmInstanceObject> instance); |
| 428 | 429 |
| 429 int32_t GrowInstanceMemory(Isolate* isolate, | 430 int32_t GrowInstanceMemory(Isolate* isolate, |
| 430 Handle<WasmInstanceObject> instance, uint32_t pages); | 431 Handle<WasmInstanceObject> instance, uint32_t pages); |
| 431 | 432 |
| 432 Handle<JSArrayBuffer> NewArrayBuffer(Isolate* isolate, size_t size, | 433 Handle<JSArrayBuffer> NewArrayBuffer(Isolate* isolate, size_t size, |
| 433 bool enable_guard_regions); | 434 bool enable_guard_regions); |
| 434 | 435 |
| 435 int32_t GrowWebAssemblyMemory(Isolate* isolate, Handle<Object> receiver, | 436 int32_t GrowWebAssemblyMemory(Isolate* isolate, |
| 437 Handle<WasmMemoryObject> receiver, |
| 436 uint32_t pages); | 438 uint32_t pages); |
| 437 | 439 |
| 438 int32_t GrowMemory(Isolate* isolate, Handle<WasmInstanceObject> instance, | 440 int32_t GrowMemory(Isolate* isolate, Handle<WasmInstanceObject> instance, |
| 439 uint32_t pages); | 441 uint32_t pages); |
| 440 | 442 |
| 441 void UpdateDispatchTables(Isolate* isolate, Handle<FixedArray> dispatch_tables, | 443 void UpdateDispatchTables(Isolate* isolate, Handle<FixedArray> dispatch_tables, |
| 442 int index, Handle<JSFunction> js_function); | 444 int index, Handle<JSFunction> js_function); |
| 443 | 445 |
| 444 void GrowDispatchTables(Isolate* isolate, Handle<FixedArray> dispatch_tables, | 446 void GrowDispatchTables(Isolate* isolate, Handle<FixedArray> dispatch_tables, |
| 445 uint32_t old_size, uint32_t count); | 447 uint32_t old_size, uint32_t count); |
| 446 | 448 |
| 447 namespace testing { | 449 namespace testing { |
| 448 | 450 |
| 449 void ValidateInstancesChain(Isolate* isolate, | 451 void ValidateInstancesChain(Isolate* isolate, |
| 450 Handle<WasmModuleObject> module_obj, | 452 Handle<WasmModuleObject> module_obj, |
| 451 int instance_count); | 453 int instance_count); |
| 452 void ValidateModuleState(Isolate* isolate, Handle<WasmModuleObject> module_obj); | 454 void ValidateModuleState(Isolate* isolate, Handle<WasmModuleObject> module_obj); |
| 453 void ValidateOrphanedInstance(Isolate* isolate, | 455 void ValidateOrphanedInstance(Isolate* isolate, |
| 454 Handle<WasmInstanceObject> instance); | 456 Handle<WasmInstanceObject> instance); |
| 455 | 457 |
| 456 } // namespace testing | 458 } // namespace testing |
| 457 } // namespace wasm | 459 } // namespace wasm |
| 458 } // namespace internal | 460 } // namespace internal |
| 459 } // namespace v8 | 461 } // namespace v8 |
| 460 | 462 |
| 461 #endif // V8_WASM_MODULE_H_ | 463 #endif // V8_WASM_MODULE_H_ |
| OLD | NEW |