view c1x4hotspotsrc/HotSpotTest/src/C1XCompiledTest.java @ 1425:98fffb304868

tlab-allocated "new instance", invokespecial, support for static fields in COMPILER_CLASSES_DO
author Lukas Stadler <lukas.stadler@oracle.com>
date Tue, 17 Aug 2010 17:34:25 -0700
parents 760213a60e8b
children
line wrap: on
line source

public class C1XCompiledTest {

	static class A {
		int j;
	}

	static class B extends A {
		int k;
	}

	static class C extends B {
		int l;
	}

	static long c = 5;
	static long j = 1000;

	public long doCalc(int[] a) {
		return a.length;
	}

	public long doCalc(int a, int b, Object o) {
		if (o instanceof A) {
			return 0;
		} else {
			long k = 5;
			for (int i = 0; i < 10; i++) {
				k += c;
			}
			j += k;
			return a + b + k;
		}
	}
}