BC_iinc_3.java revision 12657:6ef01bd40ce2
10Sstevel@tonic-gate/* 20Sstevel@tonic-gate * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. 30Sstevel@tonic-gate * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 40Sstevel@tonic-gate * 50Sstevel@tonic-gate * This code is free software; you can redistribute it and/or modify it 60Sstevel@tonic-gate * under the terms of the GNU General Public License version 2 only, as 70Sstevel@tonic-gate * published by the Free Software Foundation. 80Sstevel@tonic-gate * 90Sstevel@tonic-gate * This code is distributed in the hope that it will be useful, but WITHOUT 100Sstevel@tonic-gate * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 110Sstevel@tonic-gate * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 120Sstevel@tonic-gate * version 2 for more details (a copy is included in the LICENSE file that 130Sstevel@tonic-gate * accompanied this code). 140Sstevel@tonic-gate * 150Sstevel@tonic-gate * You should have received a copy of the GNU General Public License version 160Sstevel@tonic-gate * 2 along with this work; if not, write to the Free Software Foundation, 170Sstevel@tonic-gate * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 200Sstevel@tonic-gate * or visit www.oracle.com if you need additional information or have any 210Sstevel@tonic-gate * questions. 220Sstevel@tonic-gate */ 230Sstevel@tonic-gate/* 240Sstevel@tonic-gate * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. 250Sstevel@tonic-gate */ 260Sstevel@tonic-gatepackage org.graalvm.compiler.jtt.bytecode; 270Sstevel@tonic-gate 280Sstevel@tonic-gateimport org.junit.Test; 290Sstevel@tonic-gate 300Sstevel@tonic-gateimport org.graalvm.compiler.jtt.JTTTest; 310Sstevel@tonic-gate 320Sstevel@tonic-gate/* 330Sstevel@tonic-gate */ 340Sstevel@tonic-gatepublic class BC_iinc_3 extends JTTTest { 350Sstevel@tonic-gate 360Sstevel@tonic-gate public static int test(int a) { 370Sstevel@tonic-gate int arg = a; 380Sstevel@tonic-gate arg += 51; 390Sstevel@tonic-gate return arg; 400Sstevel@tonic-gate } 410Sstevel@tonic-gate 420Sstevel@tonic-gate @Test 430Sstevel@tonic-gate public void run0() throws Throwable { 440Sstevel@tonic-gate runTest("test", 1); 450Sstevel@tonic-gate } 460Sstevel@tonic-gate 470Sstevel@tonic-gate @Test 480Sstevel@tonic-gate public void run1() throws Throwable { 490Sstevel@tonic-gate runTest("test", 2); 500Sstevel@tonic-gate } 510Sstevel@tonic-gate 520Sstevel@tonic-gate @Test 530Sstevel@tonic-gate public void run2() throws Throwable { 540Sstevel@tonic-gate runTest("test", 4); 550Sstevel@tonic-gate } 560Sstevel@tonic-gate 570Sstevel@tonic-gate @Test 580Sstevel@tonic-gate public void run3() throws Throwable { 590Sstevel@tonic-gate runTest("test", -1); 600Sstevel@tonic-gate } 610Sstevel@tonic-gate 620Sstevel@tonic-gate} 630Sstevel@tonic-gate