• 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
..
OWNERS Loading commit data...
test-run-wasm-64.cc Loading commit data...
test-run-wasm-asmjs.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-relocation.cc Loading commit data...
test-run-wasm-simd.cc Loading commit data...
test-run-wasm.cc Loading commit data...
test-wasm-breakpoints.cc Loading commit data...
test-wasm-interpreter-entry.cc Loading commit data...
test-wasm-stack.cc Loading commit data...
test-wasm-trap-position.cc Loading commit data...
wasm-run-utils.h Loading commit data...