Mercurial > hg > graal-jvmci-8
view Test.java @ 11312:f0c8303cf88e
Restructure Truffle API node intrinsics and introduce new intrinsics for type system modelling.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Fri, 16 Aug 2013 01:09:03 +0200 |
parents | |
children |
line wrap: on
line source
public class Test { public static void main(String[] args) { Test t = new Test(); Test2 t2 = new Test2(); for (int i = 0; i < 5000; ++i) { test2(t2); } for (int i = 0; i < 100000; ++i) { test(t); } } public static int test(Object t) { if (t instanceof Test) { test2(t); } return 3; } public static int test2(Object t) { if (t instanceof Test) { return 1; } return 2; } } class Test2 extends Test { }