summaryrefslogtreecommitdiff
path: root/deps/v8/src/wasm/wasm-module.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/wasm/wasm-module.h')
-rw-r--r--deps/v8/src/wasm/wasm-module.h33
1 files changed, 12 insertions, 21 deletions
diff --git a/deps/v8/src/wasm/wasm-module.h b/deps/v8/src/wasm/wasm-module.h
index 98f498b79c..4776298e9f 100644
--- a/deps/v8/src/wasm/wasm-module.h
+++ b/deps/v8/src/wasm/wasm-module.h
@@ -152,7 +152,7 @@ struct V8_EXPORT_PRIVATE WasmModule {
static const uint32_t kPageSize = 0x10000; // Page size, 64kb.
static const uint32_t kMinMemPages = 1; // Minimum memory size = 64kb
- Zone* owned_zone;
+ std::unique_ptr<Zone> signature_zone;
uint32_t min_mem_pages = 0; // minimum size of the memory in 64k pages
uint32_t max_mem_pages = 0; // maximum size of the memory in 64k pages
bool has_max_mem = false; // try if a maximum memory size exists
@@ -185,10 +185,7 @@ struct V8_EXPORT_PRIVATE WasmModule {
std::unique_ptr<base::Semaphore> pending_tasks;
WasmModule() : WasmModule(nullptr) {}
- WasmModule(Zone* owned_zone);
- ~WasmModule() {
- if (owned_zone) delete owned_zone;
- }
+ WasmModule(std::unique_ptr<Zone> owned);
ModuleOrigin get_origin() const { return origin_; }
void set_origin(ModuleOrigin new_value) { origin_ = new_value; }
@@ -294,7 +291,7 @@ struct V8_EXPORT_PRIVATE ModuleWireBytes {
const byte* start() const { return module_bytes_.start(); }
const byte* end() const { return module_bytes_.end(); }
- int length() const { return module_bytes_.length(); }
+ size_t length() const { return module_bytes_.length(); }
private:
const Vector<const byte> module_bytes_;
@@ -433,8 +430,10 @@ WasmInstanceObject* GetOwningWasmInstance(Code* code);
Handle<JSArrayBuffer> NewArrayBuffer(Isolate*, size_t size,
bool enable_guard_regions);
-Handle<JSArrayBuffer> SetupArrayBuffer(Isolate*, void* backing_store,
- size_t size, bool is_external,
+Handle<JSArrayBuffer> SetupArrayBuffer(Isolate*, void* allocation_base,
+ size_t allocation_length,
+ void* backing_store, size_t size,
+ bool is_external,
bool enable_guard_regions);
void DetachWebAssemblyMemoryBuffer(Isolate* isolate,
@@ -444,13 +443,10 @@ void DetachWebAssemblyMemoryBuffer(Isolate* isolate,
void UpdateDispatchTables(Isolate* isolate, Handle<FixedArray> dispatch_tables,
int index, Handle<JSFunction> js_function);
-void GrowDispatchTables(Isolate* isolate, Handle<FixedArray> dispatch_tables,
- uint32_t old_size, uint32_t count);
-
//============================================================================
//== Compilation and instantiation ===========================================
//============================================================================
-V8_EXPORT_PRIVATE bool SyncValidate(Isolate* isolate, ErrorThrower* thrower,
+V8_EXPORT_PRIVATE bool SyncValidate(Isolate* isolate,
const ModuleWireBytes& bytes);
V8_EXPORT_PRIVATE MaybeHandle<WasmModuleObject> SyncCompileTranslatedAsmJs(
@@ -473,10 +469,6 @@ V8_EXPORT_PRIVATE void AsyncInstantiate(Isolate* isolate,
Handle<WasmModuleObject> module_object,
MaybeHandle<JSReceiver> imports);
-V8_EXPORT_PRIVATE void AsyncCompileAndInstantiate(
- Isolate* isolate, Handle<JSPromise> promise, const ModuleWireBytes& bytes,
- MaybeHandle<JSReceiver> imports);
-
#if V8_TARGET_ARCH_64_BIT
const bool kGuardRegionsSupported = true;
#else
@@ -509,13 +501,12 @@ Handle<Code> CompileLazy(Isolate* isolate);
// logic to actually orchestrate parallel execution of wasm compilation jobs.
// TODO(clemensh): Implement concurrent lazy compilation.
class LazyCompilationOrchestrator {
- bool CompileFunction(Isolate*, Handle<WasmInstanceObject>,
- int func_index) WARN_UNUSED_RESULT;
+ void CompileFunction(Isolate*, Handle<WasmInstanceObject>, int func_index);
public:
- MaybeHandle<Code> CompileLazy(Isolate*, Handle<WasmInstanceObject>,
- Handle<Code> caller, int call_offset,
- int exported_func_index, bool patch_caller);
+ Handle<Code> CompileLazy(Isolate*, Handle<WasmInstanceObject>,
+ Handle<Code> caller, int call_offset,
+ int exported_func_index, bool patch_caller);
};
namespace testing {