• Clemens Hammacher's avatar
    [wasm] [interpreter] Implement indirect function calls · b8f88601
    Clemens Hammacher authored
    This CL adds support for indirect function calls to the interpreter. It
    can indirectly call other wasm function in the same instance, which are
    then executed in the interpreter, or call imported functions.
    
    Implementing this required some refactoring:
    - The wasm interpreter now unwraps import wrappers on demand, instead
      of unwrapping all of them on instantiation and storing a vector of
      handles. This also avoids the DeferredHandleScope completely, instead
      we just store two global handles in the code map.
    - The interpreter gets the code table, function tables and signature
      tables directly from the attached wasm instance object. This ensures
      that the interpreter sees all updates to tables that might have been
      performed by external code.
    - There is now common functionality for calling a code object. This is
      used for direct calls to imported functions and for all indirect
      calls. As these code objects can also be wasm functions which should
      be executed in the interpreter itself, I introduce a struct to hold
      the outcome of calling the code object, or a pointer to
      InterpreterCode to be called in the interpreter.
    
    R=ahaas@chromium.org
    BUG=v8:5822
    
    Change-Id: I20fb2ea007e79e5fcff9afb4b1ca31739ebcb83f
    Reviewed-on: https://chromium-review.googlesource.com/458417
    Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
    Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#44059}
    b8f88601
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
docs Loading commit data...
gni Loading commit data...
gypfiles 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...
.gitignore Loading commit data...
.gn 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...
Makefile Loading commit data...
Makefile.android 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...