Source code analysis: calls to wrapper class constructors

forax at univ-mlv.fr forax at univ-mlv.fr
Wed Oct 28 20:02:51 UTC 2020


To summarize, 
it's possible to rewrite the NEW + DUP + INVOKESPECIAL sequence and it may also be possible to rewrite other sequence like NEW + STORE + LOAD + INVOKESPECIAL + LOAD or other combination by loading with LDC condy using a fake Integer and using an INVOKESTATIC with more parameter so there is no need to change the StackMapFrames. 

We may still have some bytecode shapes we don't support but it worth a try. 

Rémi 

> De: "John Rose" <john.r.rose at oracle.com>
> À: "daniel smith" <daniel.smith at oracle.com>
> Cc: "Remi Forax" <forax at univ-mlv.fr>, "valhalla-spec-experts"
> <valhalla-spec-experts at openjdk.java.net>
> Envoyé: Mercredi 28 Octobre 2020 20:36:59
> Objet: Re: Source code analysis: calls to wrapper class constructors

> On Oct 28, 2020, at 2:32 PM, John Rose < [ mailto:john.r.rose at oracle.com |
> john.r.rose at oracle.com ] > wrote:

>> invokestatic Integer.$pop2$valueOf(Object,int)V

> That would be invokestatic Integer.$pop2$valueOf(String,int,String)V

> And the dummy object could be an Integer (using a condy) if we don’t
> want to edit the stack maps that might mention the Integer. They
> might be present if the integer expression contains control flow.

> So, invokestatic Integer.$pop2$valueOf(Integer,int,Integer)V


More information about the valhalla-spec-observers mailing list