Civilizer - let's civilize those primitive types !
Brian Goetz
brian.goetz at oracle.com
Thu Jan 12 21:17:57 UTC 2023
> Everything has a memory address period.
Despite emphasizing it with “period” as if it were obviously true, this statement is not correct.
Value objects can be scalarized into their fields, and those fields can be hoisted into registers, and registers have no memory address. There is no reason why a copy of the object need be placed in memory at all. In fact, this is much of the raison d’être for Valhalla — to give the runtime permission to confidently make this optimization, by saying that an object need not live in a single — or even any — place in “memory".
More information about the valhalla-dev
mailing list