hg: valhalla/valhalla/langtools: Add internal switch '-XDemitTyped' to force emission of 'typed' opcode

maurizio.cimadamore at oracle.com maurizio.cimadamore at oracle.com
Thu Feb 18 12:39:19 UTC 2016


Changeset: cc1999c46d7b
Author:    mcimadamore
Date:      2016-02-18 12:38 +0000
URL:       http://hg.openjdk.java.net/valhalla/valhalla/langtools/rev/cc1999c46d7b

Add internal switch '-XDemitTyped' to force emission of 'typed' opcode
The new switch will rewrite load and store opcodes targeting int/long/double to use the typed opcode.
Example:

class Test {
   void test() {
       int i = 1;
       int b = i;
   }
}

This generates the following bytecode:

void test();
    descriptor: ()V
    flags:
    Code:
      stack=1, locals=3, args_size=1
         0: iconst_1
         1: typed         #7                  // Utf8 I
         4: astore_1
         5: typed         #7                  // Utf8 I
         8: aload_1
         9: typed         #7                  // Utf8 I
        12: astore_2
        13: return

! src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java
! src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Items.java




More information about the valhalla-dev mailing list