[lworld] RFR: 8244313: [lworld] Evolve javac's code generation to match scheme documented in SoV

Maurizio Cimadamore mcimadamore at openjdk.java.net
Fri Apr 16 16:41:06 UTC 2021


On Fri, 16 Apr 2021 12:12:32 GMT, Srikanth Adayapalam <sadayapalam at openjdk.org> wrote:

> Generate code according to the scheme outlined in the Members section of https://cr.openjdk.java.net/~briangoetz/valhalla/sov/04-translation.html

I have some question regarding constant pool switching

src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/PoolWriter.java line 546:

> 544:     }
> 545: 
> 546:     void switchPool() {

Can you explain the rationale behind going down this path, instead of creating a new pool? E.g. could we call ClassWriter.writeClass on two symbols, instead of having a single call generate two things by using this constant pool switching? It feels like I'm missing something here...

-------------

PR: https://git.openjdk.java.net/valhalla/pull/386


More information about the valhalla-dev mailing list