• Andreas Haas's avatar
    [wasm] Construct WasmExportedFunctions for table elements lazily · 27540226
    Andreas Haas authored
    We have to create WasmExportedFunction objects for any WebAssembly
    function which may escape a WebAssembly instance. Up until now we
    created these WasmExportedFunction objects eagerly during instantiation
    time: for any exported function, and any element in an exported table we
    create such an object.
    
    With the anyref proposal, the table.get instruction can allow any
    function in a table to escape its instance. Therefore we would have to
    create a WasmExportedFunction object for any function which is put into
    a table.
    
    With this CL we create WasmExportedFunctions for table entries lazily.
    We initialize tables with placeholders consisting of the instance and
    the function index. If we encounter a placeholder in table.get, we
    create the WasmExportedFunction for the expected function to return it.
    
    R=mstarzinger@chromium.org
    CC=titzer@chromium.org
    
    Bug: v8:7581
    Change-Id: I4f32bd7433285d0b04a22c0fb70b736bac55b3f1
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1505575Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
    Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
    Commit-Queue: Andreas Haas <ahaas@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#60115}
    27540226
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
custom_deps Loading commit data...
docs Loading commit data...
gni Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.clang-tidy Loading commit data...
.editorconfig Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.vpython Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...