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 package runtime.valhalla.valuetypes; 25 26 import jdk.test.lib.Asserts; 27 28 /* 29 * @test VDefaultTest 30 * @summary vdefault bytecode test 31 * @library /test/lib 32 * @compile -XDenableValueTypes Point.java VDefaultTest.java 33 * @run main/othervm -noverify -Xint -XX:+EnableValhalla runtime.valhalla.valuetypes.VDefaultTest 34 * @run main/othervm -noverify -Xcomp -XX:+EnableValhalla runtime.valhalla.valuetypes.VDefaultTest 35 */ 36 37 public class VDefaultTest { 38 39 static __ByValue final class Point { 40 final int x; 41 final int y; 42 43 __ValueFactory static Point make() { 44 Point p = __MakeDefault Point(); 45 return p; 46 } 47 48 Point() { 49 x = 0; 50 y = 0; 51 } 52 } 53 54 static __ByValue final class Value { | 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 package runtime.valhalla.valuetypes; 25 26 import jdk.test.lib.Asserts; 27 28 /* 29 * @test VDefaultTest 30 * @summary vdefault bytecode test 31 * @library /test/lib 32 * @compile -XDenableValueTypes Point.java VDefaultTest.java 33 * @run main/othervm -Xint -XX:+EnableValhalla runtime.valhalla.valuetypes.VDefaultTest 34 * @run main/othervm -Xcomp -XX:+EnableValhalla runtime.valhalla.valuetypes.VDefaultTest 35 */ 36 37 public class VDefaultTest { 38 39 static __ByValue final class Point { 40 final int x; 41 final int y; 42 43 __ValueFactory static Point make() { 44 Point p = __MakeDefault Point(); 45 return p; 46 } 47 48 Point() { 49 x = 0; 50 y = 0; 51 } 52 } 53 54 static __ByValue final class Value { |