v8/test/common/wasm
Clemens Hammacher 5648aad553 [wasm] Don't store global handles in the interpreter
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/567058
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46629}
2017-07-13 10:56:34 +00:00
..
flag-utils.h [cleanup] Templatize the EnableFlagScope 2017-06-12 15:26:12 +00:00
test-signatures.h [wasm] Rename wasm::LocalType to wasm::ValueType and kAst* to kWasm* 2016-12-21 13:43:00 +00:00
wasm-macro-gen.h [cleanup] Remove return after UNREACHABLE 2017-05-22 13:10:01 +00:00
wasm-module-runner.cc [wasm] Don't store global handles in the interpreter 2017-07-13 10:56:34 +00:00
wasm-module-runner.h [wasm] Use pending exceptions consistently 2017-06-29 10:23:45 +00:00