8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 6934604
27 * @summary enable parts of EliminateAutoBox by default
28 * @run main/othervm -Xbatch -XX:+IgnoreUnrecognizedVMOptions -XX:+EliminateAutoBox TestLongBoxing
29 * @run main/othervm -Xbatch -XX:+IgnoreUnrecognizedVMOptions -XX:+EliminateAutoBox
30 * -XX:CompileCommand=exclude,TestLongBoxing.dummy -XX:CompileCommand=exclude,TestLongBoxing.foo -XX:CompileCommand=exclude,TestLongBoxing.foob TestLongBoxing
31 * @run main/othervm -Xbatch -XX:+IgnoreUnrecognizedVMOptions -XX:-EliminateAutoBox
32 * -XX:CompileCommand=exclude,TestLongBoxing.dummy -XX:CompileCommand=exclude,TestLongBoxing.foo -XX:CompileCommand=exclude,TestLongBoxing.foob TestLongBoxing
33 *
34 */
35
36 public class TestLongBoxing {
37
38 static final Long ibc = new Long(1);
39
40 //===============================================
41 // Non-inlined methods to test deoptimization info
42 static void dummy() { }
43 static long foo(long i) { return i; }
44 static Long foob(long i) { return Long.valueOf(i); }
45
46
47 static long simple(long i) {
48 Long ib = new Long(i);
49 return ib;
50 }
51
52 static long simpleb(long i) {
53 Long ib = Long.valueOf(i);
54 return ib;
55 }
|
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 6934604
27 * @summary enable parts of EliminateAutoBox by default
28 *
29 * @run main/othervm -Xbatch -XX:+IgnoreUnrecognizedVMOptions -XX:+EliminateAutoBox
30 * compiler.eliminateAutobox.TestLongBoxing
31 * @run main/othervm -Xbatch -XX:+IgnoreUnrecognizedVMOptions -XX:+EliminateAutoBox
32 * -XX:CompileCommand=exclude,compiler.eliminateAutobox.TestLongBoxing::dummy
33 * -XX:CompileCommand=exclude,compiler.eliminateAutobox.TestLongBoxing::foo
34 * -XX:CompileCommand=exclude,compiler.eliminateAutobox.TestLongBoxing::foob
35 * compiler.eliminateAutobox.TestLongBoxing
36 * @run main/othervm -Xbatch -XX:+IgnoreUnrecognizedVMOptions -XX:-EliminateAutoBox
37 * -XX:CompileCommand=exclude,compiler.eliminateAutobox.TestLongBoxing::dummy
38 * -XX:CompileCommand=exclude,compiler.eliminateAutobox.TestLongBoxing::foo
39 * -XX:CompileCommand=exclude,compiler.eliminateAutobox.TestLongBoxing::foob
40 * compiler.eliminateAutobox.TestLongBoxing
41 */
42
43 package compiler.eliminateAutobox;
44
45 public class TestLongBoxing {
46
47 static final Long ibc = new Long(1);
48
49 //===============================================
50 // Non-inlined methods to test deoptimization info
51 static void dummy() { }
52 static long foo(long i) { return i; }
53 static Long foob(long i) { return Long.valueOf(i); }
54
55
56 static long simple(long i) {
57 Long ib = new Long(i);
58 return ib;
59 }
60
61 static long simpleb(long i) {
62 Long ib = Long.valueOf(i);
63 return ib;
64 }
|