You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While testing these codecs in #18 we've uncovered some issues with the code gen, namely:
Union representation types are generated (e.g. _Child__Repr) but not used by other generated types, they use the default representation (e.g. _Child) which are a map keyed with the name of the types the Union can hold (this might only be an issue with my expectations).
Issue with AssembleValue() switch statements for union Assemblers (e.g. _TrieNode__Assembler; ma.ca cases are off by one).
Needed to manually change some union type fields to pointers to allow compilation of recursive types.
The text was updated successfully, but these errors were encountered:
might indeed be an expectation check. If you're just looking at the generated code and thinking it looks funny -- it does that sometimes :) Most of the time, the types compose using the non-repr form, and there's a "cast" to the repr form on demand. The "cast" is free because the two types have the same memory layout, and is actually optimized into nothing by the compiler -- it just gives us access to different methodsets and the ability to apply them to the same memory.
that sounds like it might be a real bug, if you're sure it's behaving wrong please do open a bug upstream :)
It's not impossible there are bugs in situation 1, too, but if you are just eyeballing code... probably better to run it and see if it's behaviourally wrong.
While testing these codecs in #18 we've uncovered some issues with the code gen, namely:
Union representation types are generated (e.g. _Child__Repr) but not used by other generated types, they use the default representation (e.g. _Child) which are a map keyed with the name of the types the Union can hold (this might only be an issue with my expectations).
Issue with AssembleValue() switch statements for union Assemblers (e.g. _TrieNode__Assembler; ma.ca cases are off by one).
Needed to manually change some union type fields to pointers to allow compilation of recursive types.
The text was updated successfully, but these errors were encountered: