• Ben Smith's avatar
    [wasm] Simplify module creation · 425fa3ae
    Ben Smith authored
    This includes WasmEngine::NewNativeModule() and WasmModuleObject::New().
    The intent is to make the various ways of creating a module (sync,
    async, deserialize, import) more similar.
    
    After this change, a NativeModule will always be created before a
    WasmModuleObject. This will make it easier to look up a cached
    NativeModule given its wire bytes.
    
    The following changes are made:
    
    * Use WasmCodeManager::EstimateNativeModuleCodeSize() to find the code
      size estimate by default. A different code size estimate is only used in
      tests.
    * Change CompileJsToWasmWrappers() to allocate a new FixedArray instead of
      assuming the array was created with the correct size. This simplifies
      WasmModuleObject::New(), and matches what CompileToNativeModule()
      does.
    * Remove the WasmModuleObject::New() constructor that creates a
      NativeModule. This case was only used in DeserializeNativeModule() and
      in test code.
    
    Change-Id: I6bdfc425057f92de11abbbf702d052d40aa8267d
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1717497
    Commit-Queue: Ben Smith <binji@chromium.org>
    Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#62925}
    425fa3ae
Name
Last commit
Last update
..
OWNERS Loading commit data...
test-c-wasm-entry.cc Loading commit data...
test-jump-table-assembler.cc Loading commit data...
test-run-wasm-64.cc Loading commit data...
test-run-wasm-asmjs.cc Loading commit data...
test-run-wasm-atomics.cc Loading commit data...
test-run-wasm-atomics64.cc Loading commit data...
test-run-wasm-bulk-memory.cc Loading commit data...
test-run-wasm-exceptions.cc Loading commit data...
test-run-wasm-interpreter.cc Loading commit data...
test-run-wasm-js.cc Loading commit data...
test-run-wasm-module.cc Loading commit data...
test-run-wasm-sign-extension.cc Loading commit data...
test-run-wasm-simd.cc Loading commit data...
test-run-wasm.cc Loading commit data...
test-streaming-compilation.cc Loading commit data...
test-wasm-breakpoints.cc Loading commit data...
test-wasm-codegen.cc Loading commit data...
test-wasm-import-wrapper-cache.cc Loading commit data...
test-wasm-interpreter-entry.cc Loading commit data...
test-wasm-serialization.cc Loading commit data...
test-wasm-shared-engine.cc Loading commit data...
test-wasm-stack.cc Loading commit data...
test-wasm-trap-position.cc Loading commit data...
wasm-atomics-utils.h Loading commit data...
wasm-run-utils.cc Loading commit data...
wasm-run-utils.h Loading commit data...