• Clemens Hammacher's avatar
    [wasm] Don't store global handles in the interpreter · 5648aad5
    Clemens Hammacher authored
    Storing global handles in the interpreter is dangerous, because the
    global handles are strong roots into the heap. The interpreter itself is
    referenced from the heap via a Managed. Hence the interpreter keeps the
    instance alive, while the instance keeps the Managed alive. So the GC
    will never collect them.
    
    This CL refactors this to only store the handle to the instance object
    while executing in the interpreter, and clearing it when returning.
    It also removes the cache of import wrappers, as it should not be
    performance critical, but keeps lots of objects alive. If it turns out
    to be performance critical, we will have to reintroduce such a cache
    stored in the WasmDebugInfo object.
    
    R=titzer@chromium.org
    CC=ahaas@chromium.org
    
    Bug: chromium:610330
    Change-Id: I54b489dadc16685887c0c1a98da6fd0df5ad7cbb
    Reviewed-on: https://chromium-review.googlesource.com/567058Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
    Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#46629}
    5648aad5
Name
Last commit
Last update
..
OWNERS Loading commit data...
compilation-manager.cc Loading commit data...
compilation-manager.h Loading commit data...
decoder.h Loading commit data...
function-body-decoder-impl.h Loading commit data...
function-body-decoder.cc Loading commit data...
function-body-decoder.h Loading commit data...
leb-helper.h Loading commit data...
local-decl-encoder.cc Loading commit data...
local-decl-encoder.h Loading commit data...
module-compiler.cc Loading commit data...
module-compiler.h Loading commit data...
module-decoder.cc Loading commit data...
module-decoder.h Loading commit data...
signature-map.cc Loading commit data...
signature-map.h Loading commit data...
streaming-decoder.cc Loading commit data...
streaming-decoder.h Loading commit data...
wasm-code-specialization.cc Loading commit data...
wasm-code-specialization.h Loading commit data...
wasm-debug.cc Loading commit data...
wasm-external-refs.cc Loading commit data...
wasm-external-refs.h Loading commit data...
wasm-interpreter.cc Loading commit data...
wasm-interpreter.h Loading commit data...
wasm-js.cc Loading commit data...
wasm-js.h Loading commit data...
wasm-limits.h Loading commit data...
wasm-module-builder.cc Loading commit data...
wasm-module-builder.h Loading commit data...
wasm-module.cc Loading commit data...
wasm-module.h Loading commit data...
wasm-objects.cc Loading commit data...
wasm-objects.h Loading commit data...
wasm-opcodes.cc Loading commit data...
wasm-opcodes.h Loading commit data...
wasm-result.cc Loading commit data...
wasm-result.h Loading commit data...
wasm-text.cc Loading commit data...
wasm-text.h Loading commit data...