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.r...@oracle.com>
> À: "daniel smith" <daniel.sm...@oracle.com>
> Cc: "Remi Forax" <fo...@univ-mlv.fr>, "valhalla-spec-experts"
> <valhalla-spec-experts@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.r...@oracle.com |
> john.r.r...@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

Reply via email to