v8/src/wasm
clemensh 6572b5622e [wasm] Remove raw byte pointers from WasmModule
These byte pointers (module_start and module_end) were only valid
during decoding. During instantiation or execution, they can get
invalidated by garbage collection.
This CL removes them from the WasmModule struct, and introduces a new
ModuleStorage struct as interface to the wasm wire bytes.
Since the storage is often needed together with the ModuleEnv, a new
ModuleStorageEnv struct holds both a ModuleEnv and a ModuleStorage.
The pointers in the ModuleStorage should never escape the live range of
this struct, as they might point into a SeqOneByteString or ArrayBuffer.
Therefore, the WasmInterpreter needs to create its own copy of the
whole module.
Runtime functions that previously used the raw pointers in WasmModule
(leading to memory errors) now have to use the SeqOneByteString in the
WasmCompiledModule.

R=titzer@chromium.org
BUG=chromium:669518

Review-Url: https://codereview.chromium.org/2540133002
Cr-Commit-Position: refs/heads/master@{#41388}
2016-11-30 15:03:06 +00:00
..
ast-decoder.cc [wasm] Remove raw byte pointers from WasmModule 2016-11-30 15:03:06 +00:00
ast-decoder.h [wasm] Implement official wasm text format 2016-11-22 11:59:56 +00:00
decoder.h [wasm] Fix decoder for null data 2016-10-12 09:11:52 +00:00
leb-helper.h [wasm] Refactor encoder.h to use a proper buffer and remove OldFunctions section. 2016-05-25 16:13:50 +00:00
managed.h [wasm] Use a Managed<WasmModule> to hold metadata about modules. 2016-10-19 13:07:22 +00:00
module-decoder.cc [wasm] Remove raw byte pointers from WasmModule 2016-11-30 15:03:06 +00:00
module-decoder.h [wasm] Remove raw byte pointers from WasmModule 2016-11-30 15:03:06 +00:00
OWNERS Adding a few more owners to the wasm directory. 2016-06-29 17:38:30 +00:00
signature-map.cc [wasm] Canonicalize function signature indices for matching in indirect calls. 2016-10-11 12:40:33 +00:00
signature-map.h [wasm] Indirect calls without function table cause validation errors. 2016-11-09 08:37:44 +00:00
wasm-debug.cc [wasm] Move asm.js offset table to compiled module 2016-11-28 13:05:30 +00:00
wasm-external-refs.cc [turbofan] Do constant folding for Float64Pow. 2016-09-13 07:10:40 +00:00
wasm-external-refs.h [wasm] Use a C wrapper function to calculate F64Pow. 2016-07-20 14:27:06 +00:00
wasm-interpreter.cc [wasm] Remove raw byte pointers from WasmModule 2016-11-30 15:03:06 +00:00
wasm-interpreter.h [wasm] Remove raw byte pointers from WasmModule 2016-11-30 15:03:06 +00:00
wasm-js.cc [wasm] WebAssembly.Memory object can be referenced by multiple Instance objects. 2016-11-23 20:44:29 +00:00
wasm-js.h [wasm] Move all heap-allocated WASM structures into wasm-objects.h. 2016-11-11 11:13:17 +00:00
wasm-macro-gen.h [asmjs] Do constant folding for I32Asmjs(Div|Rem)S to avoid checks of constant divisors 2016-10-27 16:02:54 +00:00
wasm-module-builder.cc [wasm] asm.js - Parse and convert asm.js to wasm a function at a time. 2016-11-30 00:26:05 +00:00
wasm-module-builder.h [wasm] asm.js - Parse and convert asm.js to wasm a function at a time. 2016-11-30 00:26:05 +00:00
wasm-module.cc [wasm] Remove raw byte pointers from WasmModule 2016-11-30 15:03:06 +00:00
wasm-module.h [wasm] Remove raw byte pointers from WasmModule 2016-11-30 15:03:06 +00:00
wasm-objects.cc [wasm] Move asm.js offset table to compiled module 2016-11-28 13:05:30 +00:00
wasm-objects.h [wasm] Move asm.js offset table to compiled module 2016-11-28 13:05:30 +00:00
wasm-opcodes.cc [wasm] add atomic opcodes 2016-10-26 20:28:44 +00:00
wasm-opcodes.h [wasm] add atomic opcodes 2016-10-26 20:28:44 +00:00
wasm-result.cc [wasm] Implement {Compile,Runtime}Error; fix traps from start function 2016-10-13 16:18:10 +00:00
wasm-result.h Make unittests work in component build 2016-10-17 10:02:06 +00:00
wasm-text.cc [wasm] Remove raw byte pointers from WasmModule 2016-11-30 15:03:06 +00:00
wasm-text.h [wasm] Remove raw byte pointers from WasmModule 2016-11-30 15:03:06 +00:00