VM model and aconst_init

Remi Forax forax at univ-mlv.fr
Wed Jan 12 12:31:17 UTC 2022


I've some troubles to wrap my head around those two sentences

"""
aconst_init is the analogue of new for value objects; it leaves a reference to the initial value for a value class on the stack. This initial value is guaranteed to not be equal to null. The sole operand of this bytecode is a reference to a CONSTANT_Class item giving the internal binary name of the value class (not its Q descriptor).
"""

and
"""
Both withfield and aconst_init return a Q type if and only if their class is a primitive class.
"""

The second is ambiguous because it's not clear if aconst_init can return a L-type. I suppose it can not but this is not clear at all.

If this is the case, what is the use case for withfield taking a L-type as parameter ??

regards,
Rémi


More information about the valhalla-spec-observers mailing list