13 * version 2 for more details (a copy is included in the LICENSE file that 14 * accompanied this code). 15 * 16 * You should have received a copy of the GNU General Public License version 17 * 2 along with this work; if not, write to the Free Software Foundation, 18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 19 * 20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 21 * or visit www.oracle.com if you need additional information or have any 22 * questions. 23 */ 24 25 package runtime.valhalla.valuetypes; 26 27 /* 28 * @test Test8186715 29 * @summary test return of buffered value passed in argument by caller 30 * @library /test/lib 31 * @compile -XDenableValueTypes Test8186715.java 32 * @run main/othervm -Xint -XX:+EnableValhalla runtime.valhalla.valuetypes.Test8186715 33 * @run main/othervm -XX:+EnableValhalla runtime.valhalla.valuetypes.Test8186715 34 */ 35 36 public class Test8186715 { 37 38 public static void main(String[] args) { 39 MyValueType v = MyValueType.testDefault(); 40 41 for (int i = 0; i < 1000000; i++) 42 MyValueType.testBranchArg1(false, v); 43 } 44 } 45 46 __ByValue final class MyValueType { 47 final int i; 48 final int j; 49 50 private MyValueType() 51 { 52 this.i = 0; | 13 * version 2 for more details (a copy is included in the LICENSE file that 14 * accompanied this code). 15 * 16 * You should have received a copy of the GNU General Public License version 17 * 2 along with this work; if not, write to the Free Software Foundation, 18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 19 * 20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 21 * or visit www.oracle.com if you need additional information or have any 22 * questions. 23 */ 24 25 package runtime.valhalla.valuetypes; 26 27 /* 28 * @test Test8186715 29 * @summary test return of buffered value passed in argument by caller 30 * @library /test/lib 31 * @compile -XDenableValueTypes Test8186715.java 32 * @run main/othervm -Xint -XX:+EnableValhalla runtime.valhalla.valuetypes.Test8186715 33 */ 34 35 36 /* 37 * @run main/othervm -XX:+EnableValhalla runtime.valhalla.valuetypes.Test8186715 38 */ 39 40 public class Test8186715 { 41 42 public static void main(String[] args) { 43 MyValueType v = MyValueType.testDefault(); 44 45 for (int i = 0; i < 1000000; i++) 46 MyValueType.testBranchArg1(false, v); 47 } 48 } 49 50 __ByValue final class MyValueType { 51 final int i; 52 final int j; 53 54 private MyValueType() 55 { 56 this.i = 0; |