File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -924,6 +924,33 @@ environment. That will print this for the above `add`:
924924(full print mode also adds a ` [type] ` for each expression, right before the
925925debug location).
926926
927+ The debug information is also propagated from an expression to its
928+ next sibling:
929+ ``` wat
930+ ;;@ src.cpp:100:33
931+ (local.set $x
932+ (i32.const 0)
933+ )
934+ (local.set $y ;; This receives an annotation of src.cpp:100:33
935+ (i32.const 0)
936+ )
937+ ```
938+
939+ You can prevent the propagation of debug info by explicitly mentioning
940+ that an expression has not debug info using the annotation ` ;;@ ` with
941+ nothing else:
942+ ``` wat
943+ ;;@ src.cpp:100:33
944+ (local.set $x
945+ ;;@
946+ (i32.const 0) ;; This does not receive any annotation
947+ )
948+ ;;@
949+ (local.set $y ;; This does not receive any annotation
950+ (i32.const 0)
951+ )
952+ ```
953+
927954There is no shorthand in the binary format. That is, roundtripping (writing and
928955reading) through a binary + source map should not change which expressions have
929956debug info on them or the contents of that info.
You can’t perform that action at this time.
0 commit comments