awakesecurity / proto3-wire

https://hackage.haskell.org/package/proto3-wire
Other
23 stars 30 forks source link

Stop fully inlining of packed field encoders. #101

Closed j6carey closed 11 months ago

j6carey commented 11 months ago

We want to inline the field number because it is often a constant. But by forcing the entire fold to be INLINE, not just the field number, we force an impossible choice on proto3-suite: inline nothing or everything. Therefore we leave the actual folds merely INLINABLE. (If that is insufficient control then we may have to expose a more complex API.)

Also give the compiler more discretion about whether to inline varints.