• Ben Smith's avatar
    [wasm] Implement importing mutable globals · 9166affb
    Ben Smith authored
    The WasmInstanceObject stores two new arrays:
    
    - imported_mutable_globals_buffers_: a FixedArray of all the imported
      globals' array buffers.
    - imported_mutable_globals: a calloc'd array of Addresses pointing to
      the mutable global in its array buffer.
    
    When accessing the global, the generated code looks up the address in
    imported_mutable_globals to find where to load/store.
    
    Bug: v8:7625
    Change-Id: I60844c21a788fce28f346455f10f2283d1c152e9
    Reviewed-on: https://chromium-review.googlesource.com/1020602
    Commit-Queue: Ben Smith <binji@chromium.org>
    Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#52794}
    9166affb
wasm-module-builder.js 21.2 KB