test/hotspot/jtreg/compiler/unsafe/MixedUnsafeStoreObject.java
changeset 52220 9c260a6b6471
parent 47216 71c04702a3d5
equal deleted inserted replaced
52219:151b990e3764 52220:9c260a6b6471
    52 
    52 
    53     public static void testFieldInstanceObject(Object t) {
    53     public static void testFieldInstanceObject(Object t) {
    54         for (int c = 0; c < 20000; c++) { // trigger OSR compilation
    54         for (int c = 0; c < 20000; c++) { // trigger OSR compilation
    55             // java/lang/Object+12 *
    55             // java/lang/Object+12 *
    56             // _base = InstPtr, _ptr = BotPTR, _field = NULL, mismatched = true
    56             // _base = InstPtr, _ptr = BotPTR, _field = NULL, mismatched = true
    57             UNSAFE.putObject(t, F_OFFSET, "foo");
    57             UNSAFE.putReference(t, F_OFFSET, "foo");
    58         }
    58         }
    59     }
    59     }
    60 
    60 
    61     public static void testFieldInstanceT(T t) {
    61     public static void testFieldInstanceT(T t) {
    62         for (int c = 0; c < 20000; c++) { // trigger OSR compilation
    62         for (int c = 0; c < 20000; c++) { // trigger OSR compilation
    63             // ...$T+12 *
    63             // ...$T+12 *
    64             // _base = InstPtr, _ptr = BotPTR, _field = T.f, mismatched = false
    64             // _base = InstPtr, _ptr = BotPTR, _field = T.f, mismatched = false
    65             UNSAFE.putObject(t, F_OFFSET, "foo");
    65             UNSAFE.putReference(t, F_OFFSET, "foo");
    66         }
    66         }
    67     }
    67     }
    68     public static void main(String[] args) {
    68     public static void main(String[] args) {
    69         testFieldInstanceObject(new T());
    69         testFieldInstanceObject(new T());
    70         testFieldInstanceT(new T());
    70         testFieldInstanceT(new T());