test/compiler/jsr292/NonInlinedCall/InvokeTest.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff test/compiler/jsr292/NonInlinedCall

test/compiler/jsr292/NonInlinedCall/InvokeTest.java

Print this page




   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 8072008
  27  * @library /testlibrary /../../test/lib
  28  * @build InvokeTest NonInlinedReinvoker
  29  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  30  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  31  *                              java.lang.invoke.InvokeTest
  32  *                              java.lang.invoke.InvokeTest$T
  33  *                              java.lang.invoke.InvokeTest$P1
  34  *                              java.lang.invoke.InvokeTest$P2
  35  *                              java.lang.invoke.InvokeTest$I
  36  *                              java.lang.invoke.NonInlinedReinvoker
  37  *                              jdk.test.lib.Asserts
  38  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
  39  *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
  40  *                   -Xbatch -XX:-TieredCompilation -XX:CICompilerCount=1
  41  *                      java.lang.invoke.InvokeTest
  42  */
  43 package java.lang.invoke;
  44 
  45 import sun.hotspot.WhiteBox;
  46 
  47 import jdk.internal.vm.annotation.DontInline;
  48 
  49 import static jdk.test.lib.Asserts.*;
  50 
  51 public class InvokeTest {
  52     static MethodHandles.Lookup LOOKUP = MethodHandles.Lookup.IMPL_LOOKUP;
  53 
  54     static final MethodHandle virtualMH;  // invokevirtual   T.f1
  55     static final MethodHandle staticMH;   // invokestatic    T.f2
  56     static final MethodHandle intfMH;     // invokeinterface I.f1
  57     static final MethodHandle specialMH;  // invokespecial   T.f4 T
  58     static final MethodHandle basicMH;
  59 
  60     static final WhiteBox WB = WhiteBox.getWhiteBox();
  61 
  62     static volatile boolean doDeopt = false;
  63 
  64     static {
  65         try {
  66             MethodType mtype = MethodType.methodType(Class.class);
  67 
  68             virtualMH  = LOOKUP.findVirtual(T.class, "f1", mtype);




   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 8072008
  27  * @library /testlibrary /test/lib
  28  * @compile InvokeTest.java NonInlinedReinvoker.java
  29  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  30  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  31  *                              java.lang.invoke.InvokeTest
  32  *                              java.lang.invoke.InvokeTest$T
  33  *                              java.lang.invoke.InvokeTest$P1
  34  *                              java.lang.invoke.InvokeTest$P2
  35  *                              java.lang.invoke.InvokeTest$I
  36  *                              java.lang.invoke.NonInlinedReinvoker
  37  *                              jdk.test.lib.Asserts
  38  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
  39  *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
  40  *                   -Xbatch -XX:-TieredCompilation -XX:CICompilerCount=1
  41  *                      java.lang.invoke.InvokeTest
  42  */
  43 package java.lang.invoke;
  44 
  45 import sun.hotspot.WhiteBox;

  46 import jdk.internal.vm.annotation.DontInline;

  47 import static jdk.test.lib.Asserts.*;
  48 
  49 public class InvokeTest {
  50     static MethodHandles.Lookup LOOKUP = MethodHandles.Lookup.IMPL_LOOKUP;
  51 
  52     static final MethodHandle virtualMH;  // invokevirtual   T.f1
  53     static final MethodHandle staticMH;   // invokestatic    T.f2
  54     static final MethodHandle intfMH;     // invokeinterface I.f1
  55     static final MethodHandle specialMH;  // invokespecial   T.f4 T
  56     static final MethodHandle basicMH;
  57 
  58     static final WhiteBox WB = WhiteBox.getWhiteBox();
  59 
  60     static volatile boolean doDeopt = false;
  61 
  62     static {
  63         try {
  64             MethodType mtype = MethodType.methodType(Class.class);
  65 
  66             virtualMH  = LOOKUP.findVirtual(T.class, "f1", mtype);


test/compiler/jsr292/NonInlinedCall/InvokeTest.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File