Conversation
and it makes the auto-gen'ed code a bit more compact to read anyway.
aa93109 to
c73a1a4
Compare
|
After some discussion with Mark, we're going to put this on hold until we're more sure whether or not we'll ever want flambda2 to support unboxing on 32 bit platforms. (It's possible, but not clear one way or another.) Accepting a mixed record definition requires that, if the runtime rep is a real mixed block with a flat suffix, then everything in the flat suffix must be stored flat. We want the same set of mixed record definitions to be accepted for 32 and 64 bit backends. So, if flambda2 starts supporting 32 bit platforms with unboxing, we'd regret ever allowing immediate64s in the flat suffix. This isn't a big limitation for users, as they can just move the immediate64s into the value prefix. (The GC will scan them, but we could probably change this on 64 bit platforms if the immediate64 fields are put right before the flat suffix.) |
Allow immediate64s in the non-value suffix of mixed records. On its face, this may seem concerning, because immediate64s are boxed on 32 bit platforms. But this is nonetheless OK because mixed records are only represented as mixed blocks (with a flat, non-scannable suffix) on 64 bit platforms.
Changes to the code:
Imm64as an allowed element of the flat suffixFloatconstructor offlat_elementtoFloat_boxedper @mshinwell's suggestion. The old name is easy to confuse withFloat32andFloat64. (This change touches a similar set of places in code.)We have to propagate the immediate64-ness of the field up until lambda. This is point that makes the call as to whether the value is boxed. Assumption: once we hit flambda2, we know that immediate64s are immediates — I believe this assumption is already present in the code base, but I'm less familiar with this part of the world, so I want to flag it explicitly to the flambda2 reviewer.
Changes to auto-generated tests:
There are also normal unit tests.
I suggest that @ccasin reviews (and I'll get someone else to take a look at the flambda2 pieces afterward). This is non-urgent to review.