< prev index next >

test/compiler/c2/Test6724218.java

Print this page
rev 11557 : 8132919: use package in compiler tests
Reviewed-by: duke

*** 23,47 **** /* * @test * @bug 6724218 * @summary Fix raise_LCA_above_marks() early termination ! * @run main/othervm -Xbatch -XX:CompileCommand=exclude,Test.update Test */ ! public class Test { ! Test next = null; Object value = null; static boolean _closed = false; static int size = 0; ! static Test list = null; static int cache_size = 0; ! static Test cache = null; Object get(int i) { ! Test t = list; list = t.next; size -= 1; Object o = t.value; if (i > 0) { t.next = cache; --- 23,52 ---- /* * @test * @bug 6724218 * @summary Fix raise_LCA_above_marks() early termination ! * ! * @run main/othervm -Xbatch ! * -XX:CompileCommand=exclude,compiler.c2.Test6724218::update ! * compiler.c2.Test6724218 */ ! package compiler.c2; ! ! public class Test6724218 { ! Test6724218 next = null; Object value = null; static boolean _closed = false; static int size = 0; ! static Test6724218 list = null; static int cache_size = 0; ! static Test6724218 cache = null; Object get(int i) { ! Test6724218 t = list; list = t.next; size -= 1; Object o = t.value; if (i > 0) { t.next = cache;
*** 53,69 **** } void update() { // Exclude compilation of this one. if (size == 0) { ! Test t; if (cache_size > 0) { t = cache; cache = t.next; cache_size = -1; } else { ! t = new Test(); } t.value = new Object(); t.next = list; list = t; size += 1; --- 58,74 ---- } void update() { // Exclude compilation of this one. if (size == 0) { ! Test6724218 t; if (cache_size > 0) { t = cache; cache = t.next; cache_size = -1; } else { ! t = new Test6724218(); } t.value = new Object(); t.next = list; list = t; size += 1;
*** 80,90 **** update(); } } public static void main(String argv[]) throws Exception { ! Test t = new Test(); int lim = 500000; Object o; for (int j = 0; j < lim; j++) { o = t.test(j&1); if (o == null) { --- 85,95 ---- update(); } } public static void main(String argv[]) throws Exception { ! Test6724218 t = new Test6724218(); int lim = 500000; Object o; for (int j = 0; j < lim; j++) { o = t.test(j&1); if (o == null) {
< prev index next >