• clemensh's avatar
    [wasm] Implement official wasm text format · 172f5012
    clemensh authored
    When disassembling functions for the inspector, we used an internal
    text representation before. This CL implements the official text
    format like it is understood by the spec interpreter.
    
    Example output:
    func $main (param i32) (result i32)
    block i32
      get_local 0
      i32.const 2
      i32.lt_u
      if
        i32.const -2
        return
      end
      get_local 0
      call_indirect 0
    end
    
    R=rossberg@chromium.org, titzer@chromium.org
    BUG=chromium:659715
    
    Review-Url: https://codereview.chromium.org/2520943002
    Cr-Commit-Position: refs/heads/master@{#41172}
    172f5012
wasm-text.h 876 Bytes