Open bcantrill opened 2 years ago
Update on this: as it turns out, the server was not in fact functional -- and the compiler was apparently smart enough to see that and optimize the use of the type away! With that fixed, the DWARF type is present (as expected) -- and without having to get weird on the generated code. I'm going to leave this issue open for the moment, but I'll close it if we don't see another instance of this...
One of the annoying bits that I have run into is that argument types are not always generated in DWARF. This is no fault of
idolatry
.As a concrete example, take this definition:
And then this
SensorId
definition:For this definition, a reasonable (that is, functional) server -- that is, one that includes a function that takes
SensorId
and uses the argument -- does not generate DWARF forSensorId
! Because this DWARF is load-bearing with respect to Humility-side HIF generation, not having this type is problematic. Futzing around a bit, there seems to be a zero-cost way of adding this; diff:This does not change the size of the binary at all (or the instructions generated) but does result in the inclusion of the needed type. (Obviously it would be grand to have a way of doing this that felt less brittle; it would be great -- if complicated -- to add a test for this.)