WebAssembly / tool-conventions

Conventions supporting interoperatibility between tools working with WebAssembly.
Artistic License 2.0
302 stars 67 forks source link

Add a first draft of the code annotations specification. #173

Closed yuri91 closed 2 years ago

yuri91 commented 3 years ago

This adds the document discussed in https://github.com/WebAssembly/tool-conventions/issues/167

jabraham17 commented 3 years ago

Adding to this document, the following is proposed as the new instruction trace format fitting with this proposal.


Trace Instruction

annotation(trace_inst) ::= funcpos: u32
               size: 0x04
               data: mark_id
mark_id ::= u32

Trace marks can appear on any instruction and are considered attached to the instruction. If a code transformation reorders the instruction, the trace mark should move with it. If a code transformation removes the instruction, the trace mark should be removed.

yuri91 commented 3 years ago

Thanks @jacob-abraham , I updated the PR with the description of the Trace Instruction.

yuri91 commented 3 years ago

Is there any blocker to get this merged? In the latest CG meeting there seemed to be no objection in the direction of this proposal. If there are specific issues I am happy to work on fixing them.

yuri91 commented 2 years ago

Could this be merged? I would like to be able to easily point issues like https://github.com/WebAssembly/branch-hinting/issues/15 that concern Code Annotations in general to this document (and this repo).

dschuff commented 2 years ago

Sorry for the delay here. If you end up contributing frequently to tool-conventions I'll just add you as a committer.