hotspot/test/compiler/intrinsics/klass/TestIsPrimitive.java
author tpivovarova
Tue, 12 Jul 2016 18:24:48 +0300
changeset 40059 c2304140ed64
parent 36552 hotspot/test/compiler/intrinsics/class/TestClassIsPrimitive.java@0db9be43cebb
child 41705 332239c052cc
permissions -rw-r--r--
8132919: Put compiler tests in packages Reviewed-by: vlivanov, dpochepk Contributed-by: igor.ignatyev@oracle.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
36552
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
     1
/*
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
     2
 * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
     4
 *
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
     7
 * published by the Free Software Foundation.
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
     8
 *
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    13
 * accompanied this code).
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    14
 *
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    18
 *
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    21
 * questions.
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    22
 *
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    23
 */
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    24
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    25
/*
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    26
 * @test
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    27
 * @bug 8150669
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    28
 * @summary C1 intrinsic for Class.isPrimitive
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    29
 * @modules java.base/jdk.internal.misc
40059
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 36552
diff changeset
    30
 *
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 36552
diff changeset
    31
 * @run main/othervm -ea -Diters=200   -Xint
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 36552
diff changeset
    32
 *      compiler.intrinsics.klass.TestIsPrimitive
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 36552
diff changeset
    33
 * @run main/othervm -ea -Diters=30000 -XX:TieredStopAtLevel=1
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 36552
diff changeset
    34
 *      compiler.intrinsics.klass.TestIsPrimitive
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 36552
diff changeset
    35
 * @run main/othervm -ea -Diters=30000 -XX:TieredStopAtLevel=4
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 36552
diff changeset
    36
 *      compiler.intrinsics.klass.TestIsPrimitive
36552
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    37
 */
40059
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 36552
diff changeset
    38
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 36552
diff changeset
    39
package compiler.intrinsics.klass;
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 36552
diff changeset
    40
36552
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    41
import java.util.concurrent.Callable;
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    42
40059
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 36552
diff changeset
    43
public class TestIsPrimitive {
36552
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    44
    static final int ITERS = Integer.getInteger("iters", 1);
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    45
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    46
    public static void main(String... args) throws Exception {
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    47
        testOK(true,  InlineConstants::testBoolean);
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    48
        testOK(true,  InlineConstants::testByte);
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    49
        testOK(true,  InlineConstants::testShort);
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    50
        testOK(true,  InlineConstants::testChar);
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    51
        testOK(true,  InlineConstants::testInt);
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    52
        testOK(true,  InlineConstants::testFloat);
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    53
        testOK(true,  InlineConstants::testLong);
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    54
        testOK(true,  InlineConstants::testDouble);
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    55
        testOK(false, InlineConstants::testObject);
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    56
        testOK(false, InlineConstants::testArray);
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    57
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    58
        testOK(true,  StaticConstants::testBoolean);
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    59
        testOK(true,  StaticConstants::testByte);
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    60
        testOK(true,  StaticConstants::testShort);
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    61
        testOK(true,  StaticConstants::testChar);
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    62
        testOK(true,  StaticConstants::testInt);
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    63
        testOK(true,  StaticConstants::testFloat);
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    64
        testOK(true,  StaticConstants::testLong);
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    65
        testOK(true,  StaticConstants::testDouble);
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    66
        testOK(false, StaticConstants::testObject);
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    67
        testOK(false, StaticConstants::testArray);
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    68
        testNPE(      StaticConstants::testNull);
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    69
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    70
        testOK(true,  NoConstants::testBoolean);
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    71
        testOK(true,  NoConstants::testByte);
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    72
        testOK(true,  NoConstants::testShort);
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    73
        testOK(true,  NoConstants::testChar);
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    74
        testOK(true,  NoConstants::testInt);
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    75
        testOK(true,  NoConstants::testFloat);
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    76
        testOK(true,  NoConstants::testLong);
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    77
        testOK(true,  NoConstants::testDouble);
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    78
        testOK(false, NoConstants::testObject);
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    79
        testOK(false, NoConstants::testArray);
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    80
        testNPE(      NoConstants::testNull);
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    81
    }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    82
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    83
    public static void testOK(boolean expected, Callable<Object> test) throws Exception {
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    84
        for (int c = 0; c < ITERS; c++) {
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    85
            Object res = test.call();
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    86
            if (!res.equals(expected)) {
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    87
                throw new IllegalStateException("Wrong result: expected = " + expected + ", but got " + res);
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    88
            }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    89
        }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    90
    }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    91
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    92
    static volatile Object sink;
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    93
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    94
    public static void testNPE(Callable<Object> test) throws Exception {
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    95
        for (int c = 0; c < ITERS; c++) {
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    96
            try {
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    97
               sink = test.call();
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    98
               throw new IllegalStateException("Expected NPE");
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
    99
            } catch (NullPointerException iae) {
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   100
               // expected
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   101
            }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   102
        }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   103
    }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   104
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   105
    static volatile Class<?> classBoolean = boolean.class;
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   106
    static volatile Class<?> classByte    = byte.class;
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   107
    static volatile Class<?> classShort   = short.class;
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   108
    static volatile Class<?> classChar    = char.class;
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   109
    static volatile Class<?> classInt     = int.class;
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   110
    static volatile Class<?> classFloat   = float.class;
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   111
    static volatile Class<?> classLong    = long.class;
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   112
    static volatile Class<?> classDouble  = double.class;
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   113
    static volatile Class<?> classObject  = Object.class;
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   114
    static volatile Class<?> classArray   = Object[].class;
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   115
    static volatile Class<?> classNull    = null;
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   116
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   117
    static final Class<?> staticClassBoolean = boolean.class;
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   118
    static final Class<?> staticClassByte    = byte.class;
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   119
    static final Class<?> staticClassShort   = short.class;
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   120
    static final Class<?> staticClassChar    = char.class;
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   121
    static final Class<?> staticClassInt     = int.class;
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   122
    static final Class<?> staticClassFloat   = float.class;
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   123
    static final Class<?> staticClassLong    = long.class;
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   124
    static final Class<?> staticClassDouble  = double.class;
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   125
    static final Class<?> staticClassObject  = Object.class;
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   126
    static final Class<?> staticClassArray   = Object[].class;
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   127
    static final Class<?> staticClassNull    = null;
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   128
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   129
    static class InlineConstants {
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   130
        static boolean testBoolean() { return boolean.class.isPrimitive();  }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   131
        static boolean testByte()    { return byte.class.isPrimitive();     }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   132
        static boolean testShort()   { return short.class.isPrimitive();    }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   133
        static boolean testChar()    { return char.class.isPrimitive();     }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   134
        static boolean testInt()     { return int.class.isPrimitive();      }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   135
        static boolean testFloat()   { return float.class.isPrimitive();    }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   136
        static boolean testLong()    { return long.class.isPrimitive();     }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   137
        static boolean testDouble()  { return double.class.isPrimitive();   }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   138
        static boolean testObject()  { return Object.class.isPrimitive();   }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   139
        static boolean testArray()   { return Object[].class.isPrimitive(); }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   140
    }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   141
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   142
    static class StaticConstants {
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   143
        static boolean testBoolean() { return staticClassBoolean.isPrimitive(); }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   144
        static boolean testByte()    { return staticClassByte.isPrimitive();    }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   145
        static boolean testShort()   { return staticClassShort.isPrimitive();   }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   146
        static boolean testChar()    { return staticClassChar.isPrimitive();    }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   147
        static boolean testInt()     { return staticClassInt.isPrimitive();     }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   148
        static boolean testFloat()   { return staticClassFloat.isPrimitive();   }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   149
        static boolean testLong()    { return staticClassLong.isPrimitive();    }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   150
        static boolean testDouble()  { return staticClassDouble.isPrimitive();  }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   151
        static boolean testObject()  { return staticClassObject.isPrimitive();  }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   152
        static boolean testArray()   { return staticClassArray.isPrimitive();   }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   153
        static boolean testNull()    { return staticClassNull.isPrimitive();    }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   154
    }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   155
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   156
    static class NoConstants {
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   157
        static boolean testBoolean() { return classBoolean.isPrimitive(); }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   158
        static boolean testByte()    { return classByte.isPrimitive();    }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   159
        static boolean testShort()   { return classShort.isPrimitive();   }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   160
        static boolean testChar()    { return classChar.isPrimitive();    }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   161
        static boolean testInt()     { return classInt.isPrimitive();     }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   162
        static boolean testFloat()   { return classFloat.isPrimitive();   }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   163
        static boolean testLong()    { return classLong.isPrimitive();    }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   164
        static boolean testDouble()  { return classDouble.isPrimitive();  }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   165
        static boolean testObject()  { return classObject.isPrimitive();  }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   166
        static boolean testArray()   { return classArray.isPrimitive();   }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   167
        static boolean testNull()    { return classNull.isPrimitive();    }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   168
    }
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   169
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   170
}
0db9be43cebb 8150669: C1 intrinsic for Class.isPrimitive
shade
parents:
diff changeset
   171