This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Make tag attribute's encoding uint8
ClosedPublic

Authored by aheejin on Jun 18 2021, 2:49 PM.

Details

Summary

This changes the encoding of the attribute field, which currently only
contains the value 0 denoting this tag is for an exception, from
varuint32 to uint8. This field is effectively unused at the moment
and reserved for future use, and it is not likely to need varuint32
even in future.
See https://github.com/WebAssembly/exception-handling/pull/162.

This does not change any encoded binaries because 0 is encoded in the
same way both in varuint32 and uint8.

Diff Detail

Unit TestsFailed

Event Timeline

aheejin created this revision.Jun 18 2021, 2:49 PM
aheejin requested review of this revision.Jun 18 2021, 2:49 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 18 2021, 2:49 PM
aheejin edited the summary of this revision. (Show Details)Jun 20 2021, 1:39 AM
tlively accepted this revision.Jun 20 2021, 11:04 AM
tlively added inline comments.
llvm/lib/MC/WasmObjectWriter.cpp
817

Normally I would suggest using uint8_t rather than char here, but I see that this file already uses char in many places, so it's probably best to stay consistent.

This revision is now accepted and ready to land.Jun 20 2021, 11:04 AM
This revision was landed with ongoing or failed builds.Jun 21 2021, 9:23 PM
This revision was automatically updated to reflect the committed changes.