Description[wasm] Separate compilation from instantiation
Compilation of wasm functions happens before instantiation. Imports are linked afterwards, at instantiation time. Globals and memory are also
allocated and then tied in via relocation at instantiation time.
This paves the way for implementing Wasm.compile, a prerequisite to
offering the compiled code serialization feature.
Currently, the WasmModule::Compile method just returns a fixed array
containing the code objects. More appropriate modeling of the compiled module to come.
Opportunistically centralized the logic on how to update memory
references, size, and globals, since that logic is the exact same on each
architecture, except for the actual storing of values back in the
instruction stream.
BUG=v8:5072
Committed: https://crrev.com/c1d01aea117c62759cc2be1805493ed59218558c
Cr-Commit-Position: refs/heads/master@{#37086}
Patch Set 1 #Patch Set 2 : #Patch Set 3 : #Patch Set 4 : #Patch Set 5 : #Patch Set 6 : #Patch Set 7 : #Patch Set 8 : latest #Patch Set 9 : fix #Patch Set 10 : fix #
Total comments: 1
Patch Set 11 : fix #
Total comments: 10
Patch Set 12 : printfs #Patch Set 13 : silly fix #
Total comments: 11
Patch Set 14 : silly fix #Patch Set 15 : mem fix #Patch Set 16 : mem fix #Patch Set 17 : feedback #
Messages
Total messages: 28 (11 generated)
|