v8/src/wasm
Andreas Haas c7892d3577 [wasm] Extract module compilation code into module-compiler.cc
This CL extracts the classes CompilationHelper, InstantiationHelper,
and AsyncCompileJob from wasm-module.cc and puts them into
module-compiler.{h|cc}. This is necessary to introduce a
WasmCompilationManager which is known to the isolate and manages the
lifetime of all AsyncCompileJobs.

In addition to the mechanical changes of copying the code and splitting
class declaration from instantiation, I did the following changes:

* I renamed the CompilationHelper to ModuleCompiler.
* A finalizer function is passed to the InstantiationHelper as a
  parameter.
* Adjusted UpdateDispatchTable in wasm-module.cc to make it available in
  wasm-module.h, also with the internal signature.
* Duplicate the ResolvePromise/RejectPromise helper functions.

I did not rename InstantiationHelper because I could not come up with a
good name, and it could benefit from a small special refactoring anyways.

BUG=v8:6436
R=clemensh@chromium.org, mtrofin@chromium.org

Change-Id: I4abe854c36dfc995b34c9d7b3e7ec0f4f0aa562e
Reviewed-on: https://chromium-review.googlesource.com/525572
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Mircea Trofin <mtrofin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45773}
2017-06-07 16:38:03 +00:00
..
decoder.h [wasm] Avoid reporting of unrelated compiler errors 2017-05-29 12:32:36 +00:00
function-body-decoder-impl.h [wasm] Make prototype flags experimental 2017-05-31 14:18:08 +00:00
function-body-decoder.cc [wasm] Make prototype flags experimental 2017-05-31 14:18:08 +00:00
function-body-decoder.h [wasm] [cleanup] Remove unused DecodeStruct type 2017-05-22 14:26:41 +00:00
leb-helper.h [wasm] Reuse LEB encoding logic in module builder 2017-04-25 11:32:21 +00:00
local-decl-encoder.cc [wasm] [cleanup] Move LocalDeclEncoder to own compilation unit 2017-04-25 10:56:01 +00:00
local-decl-encoder.h Reland "Make unittest link correctly again" 2017-05-03 10:44:07 +00:00
module-compiler.cc [wasm] Extract module compilation code into module-compiler.cc 2017-06-07 16:38:03 +00:00
module-compiler.h [wasm] Extract module compilation code into module-compiler.cc 2017-06-07 16:38:03 +00:00
module-decoder.cc [WASM] Use better error message when decoding function body fails. 2017-06-05 20:38:56 +00:00
module-decoder.h [wasm] Refactor the module decoder to work with section bytes 2017-05-17 12:34:02 +00:00
OWNERS Add COMPONENT tags to OWNERS files where appropriate 2017-05-22 10:15:28 +00:00
signature-map.cc
signature-map.h
streaming-decoder.cc [wasm] use Vector's size_t members. 2017-05-12 05:38:43 +00:00
streaming-decoder.h [wasm] Streaming decoder 2017-05-11 09:46:31 +00:00
wasm-code-specialization.cc [wasm] Disallow lazy compilation with --wasm-interpret-all 2017-05-03 08:05:42 +00:00
wasm-code-specialization.h Add support to IdentityMap for deletion, iteration and AllocationPolicy. 2017-02-22 10:20:15 +00:00
wasm-debug.cc [cleanup] Remove return after UNREACHABLE 2017-05-22 13:10:01 +00:00
wasm-external-refs.cc MIPS: Fix unaligned memory access for 64-bit types in wasm-external-refs 2017-05-12 13:17:37 +00:00
wasm-external-refs.h [wasm] Introduce the TrapIf and TrapUnless operators to generate trap code. 2016-12-15 13:31:29 +00:00
wasm-interpreter.cc [wasm] [interpreter] Remove dead internal method 2017-05-30 13:56:17 +00:00
wasm-interpreter.h [cleanup] Remove return after UNREACHABLE 2017-05-22 13:10:01 +00:00
wasm-js.cc [wasm] Refactor Table.Set 2017-06-07 10:01:14 +00:00
wasm-js.h Implement Instance instances correctly; fix a few error cases 2017-01-12 20:32:27 +00:00
wasm-limits.h Revert "[wasm] Add guard pages before Wasm Memory" 2017-04-26 20:57:35 +00:00
wasm-module-builder.cc [asm.js] Fix excessive function table sizes. 2017-05-19 14:14:17 +00:00
wasm-module-builder.h [asm.js] Tune initial buffer sizes and growing strategy. 2017-05-19 09:43:54 +00:00
wasm-module.cc [wasm] Extract module compilation code into module-compiler.cc 2017-06-07 16:38:03 +00:00
wasm-module.h [wasm] Extract module compilation code into module-compiler.cc 2017-06-07 16:38:03 +00:00
wasm-objects.cc [wasm] Fix WasmMemoryObject constructor for when a module has no initial memory 2017-06-01 17:08:02 +00:00
wasm-objects.h [wasm] Fix WasmMemoryObject constructor for when a module has no initial memory 2017-06-01 17:08:02 +00:00
wasm-opcodes.cc [base] Fix CHECK/DCHECK macros for enum types 2017-05-30 11:04:09 +00:00
wasm-opcodes.h [cleanup] Remove return after UNREACHABLE 2017-05-22 13:10:01 +00:00
wasm-result.cc [wasm] Fix usages of ErrorThrower::Reify 2017-05-02 15:11:36 +00:00
wasm-result.h [wasm] Fix memory management for Result types 2017-05-08 14:26:57 +00:00
wasm-text.cc [WASM SIMD] Replace primitive shuffles with general Shuffle. 2017-05-04 16:50:51 +00:00
wasm-text.h [inspector] Split off interface-types.h 2016-12-05 13:32:24 +00:00