search for: getformclass

Displaying 2 results from an estimated 2 matches for "getformclass".

2020 May 22
2
RFC: Add DWARF support for yaml2obj
Hi Pavel, Thanks for your comments! On 5/21/20, Pavel Labath <pavel at labath.sk> wrote: > Hello Xing, > > I think the proposal looks very useful. I think it will be fairly tricky > to get all of the details right though. There is a lot of "inferring" > going on there, and getting that to work reliably and with predictable > results will need careful
2020 May 22
2
RFC: Add DWARF support for yaml2obj
...finitely possible. You just need to make the map calls > conditional on the values of other attributes. Maybe something like this: > IO.mapRequired("Attr", Attr); > IO.mapOptional("Form", Form, getDefaultForm(Attr, Ctx.isSplitDwarf() > /*or whatever*/)); > switch (getFormClass(Form)) { > /* The cases could correspond to DWARF5 form classes, but maybe not > completely.*/ > case String: IO.mapRequired("Value", Value.String); > case Constant: IO.mapRequired("Value", Value.Int); > case Block: IO.mapRequired("Value", Value.Bytes);...