Conversation
0dde597 to
273c77a
Compare
|
For now, we can probably run the command |
|
I did that. Running |
| wat_file | ||
| output_file = | ||
| let sourcemap_file = | ||
| if Sys.command "wasm-merge -osm foo 2> /dev/null" <> 0 then None |
There was a problem hiding this comment.
| if Sys.command "wasm-merge -osm foo 2> /dev/null" <> 0 then None | |
| if Option.is_none sourcemap_file || Sys.command "wasm-merge -osm foo 2> /dev/null" <> 0 then None |
There was a problem hiding this comment.
This would still call wasm-metadce with the -osm option though.
There was a problem hiding this comment.
If sourcemap_file is None, one does not need to check for source map support, and wasm-metadce is not going to be called with the -osm option, right?
There was a problem hiding this comment.
Ah yes, I was confused. Done.
Thanks! |
Implement mapping between source and wasm locations. To work, this requires a version of Binaryen compiled with Jérôme's patch WebAssembly/binaryen#6372. Single-stepping can jump around in slightly surprising ways in the OCaml code, due to the different order of operations in wasm. This could be improved by modifying Binaryen to support “no location” annotations. Another future improvement can be to support mapping Wasm identifiers to OCaml ones. Co-authored-by: Jérôme Vouillon <jerome.vouillon@gmail.com>
0cc0f8d to
628d4e0
Compare
|
I rebased the PR and squashed the history as it looked a bit weird. |
|
Thanks! |
Implement mapping between source and wasm locations.
To work, this requires a version of Binaryen compiled with Jérôme's patch WebAssembly/binaryen#6372, so I’m opening this a draft for now.
Single-stepping can jump around in slightly surprising ways in the OCaml code, due to the different order of operations in wasm. This could be improved by modifying Binaryen to support “no location” annotations. Another future improvement can be to support mapping Wasm identifiers to OCaml ones.