-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Description
CodeMetadata.md currently says that @metadata.code.XXX annotations must be within function definitions and gives an example:
(func (@metadata.code.hotness "\01") $test (type 0) ...)
But this could lead to ambiguity for annotations that could apply to either functions or instructions:
(func (@metadata.code.func_or_inst? "unknown") nop)
This potential ambiguity could be avoided (and the text format could be made nicer IMO) if the function annotations were placed before function definitions instead:
(@metadata.code.definitely_a_func "yep")
(func nop)
There are no formally specified function annotations, so this text format is only specified here in the tool-conventions repo. If we get stakeholders to agree, we should be able to change this.
cc @yuri91 as well as @fitzgen to route to appropriate wasm-tools folks, @sbc100 for WABT, and @kripken for binaryen. WDYT?
Metadata
Metadata
Assignees
Labels
No labels