JEP 303 vs JEP 348

Remi Forax forax at univ-mlv.fr
Wed Feb 13 00:15:39 UTC 2019


JEP 348 provides a way to replace a method call with a ldc/indy,
so it's another way to implement JEP 303 (the intrinsification part) given that an Intrinsics. (resp a ldc.invokedynamic) is just a method annotated with both PolymorphicSignature and CompilerIntrinsicCandidate.

class Intrinsics {
    @CompilerIntrinsicCandidate
    @PolymorphicSignature
    public static Object invokedynamic(BootstrapSpecifier indy, Object... args) { return null; }
}

So in my opinion, we should withdraw JEP 303, adds a new JEP only about the constant propagation + mirroring of ConstantDesc and add Intrinsics.ldc and Intrinsic.invokedynamic as part of JEP 348.

Rémi


More information about the amber-spec-experts mailing list