Valhalla EG 20191120
david.simms at oracle.com
Wed Nov 20 17:57:54 UTC 2019
- Expanding on the previous discussion on the Eclair model...
- ...rather than having three things: references, inlines and
- lets subsume primitives (to be part in inline values)
- ...so we get: reference values and inline values
- Inline Values
- primitives and inline classes
- Represented and stored directly
- Reference Values
- Pointers to class instances, arrays and null
- Represented and stored as indirections
- More detail/write-up coming
- Remi: wait, is like MVT ?
- Brian: in the language yes, but not in the VM
- Conversion is "free"
- There are still Q-types, but L/Q-type (dual naming) is gone
- "Companion interface"
- DanH: int vs interface (pox)
- The language compiler will be doing the conversion i <=>
- There is a migration story for migrating primitives / Optional...
- ...write-up need to be able to debate the finer points
- Remi: I kinda like it
- LWorld type system is good for the VM, but has short comings for
- ...so let's use something different in the language model, and
use translation to do the work to keep the VM out of trouble
- Remi: int would have a "ref projection"
- Brian: yes, automatic and total
- Remi: must the VM provide the ref projection ?
- Brian: no the language compiler can provide it,
- or a migration story might involve some manual specified type
- Remi: ref projections used where
- Brian: circularity, null-ability, compatibility
- We think you always have a reference projection for inline types
- Brian: figuring out where to put the responsibility
- how much in javac vs VM ?
- Remi: some playing with eclair model, has empty
- Brian: reference projection can simply be an interface
- Remi: how do we have an "inline record" (abstract record)
- Brian: short answer: "abstract record" become interface
- ValObj / RefObj are interfaces
- Interfaces vs abstract:
- current thinking Interfaces offer few problems (needs more work)
- Remi: does volatile work in the prototype ?
- Simms: nope
- Remi: VarHandle support for "non-volatile" inline
- Yeah, should throw exception
- Can we get volatile field decl into the prototype ?
- Fred: sure, we'll write up a few bug
- equality "==", shall we make lambda inline class (sentinel problems)
- sure, might be worth looking into, to get people slightly more
happy with notion equality for lambda
- Might have some performance implications "fat lambdas", worth
looking at though
Happy Thanksgiving !
More information about the valhalla-spec-experts