1 /*
 2  * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
 3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 4  *
 5  * This code is free software; you can redistribute it and/or modify it
 6  * under the terms of the GNU General Public License version 2 only, as
 7  * published by the Free Software Foundation.
 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 public final primitive value class runtime/valhalla/inlinetypes/TestPrimitiveClass
26     version 63:0
27 {
28     final Field nullableField:   "Lruntime/valhalla/inlinetypes/TestFieldNullability$MyValue;";
29     final Field nullfreeField:   "Qruntime/valhalla/inlinetypes/TestFieldNullability$MyValue;"; // flattened
30     final Field nullField:       "Lruntime/valhalla/inlinetypes/TestFieldNullability$MyValue;"; // src of null
31     final Field nullfreeBigField:"Qruntime/valhalla/inlinetypes/TestFieldNullability$MyBigValue;"; // not flattened
32     final Field nullBigField:    "Lruntime/valhalla/inlinetypes/TestFieldNullability$MyBigValue;"; // src of null
33 
34     public Method withNullableField:"(Lruntime/valhalla/inlinetypes/TestFieldNullability$MyValue;)Lruntime/valhalla/inlinetypes/TestPrimitiveClass;"
35         stack 2
36     {
37         aload_0;
38         aload_1;
39         withfield nullableField:"Lruntime/valhalla/inlinetypes/TestFieldNullability$MyValue;";
40         areturn;
41     }
42 
43     public Method withNullfreeField:"(Qruntime/valhalla/inlinetypes/TestFieldNullability$MyValue;)Lruntime/valhalla/inlinetypes/TestPrimitiveClass;"
44         stack 2
45     {
46         aload_0;
47         aload_1;
48         withfield nullfreeField:"Qruntime/valhalla/inlinetypes/TestFieldNullability$MyValue;";
49         areturn;
50     }
51 
52     public Method withNullfreeBigField:"(Qruntime/valhalla/inlinetypes/TestFieldNullability$MyBigValue;)Lruntime/valhalla/inlinetypes/TestPrimitiveClass;"
53         stack 2
54     {
55         aload_0;
56         aload_1;
57         withfield nullfreeBigField:"Qruntime/valhalla/inlinetypes/TestFieldNullability$MyBigValue;";
58         areturn;
59     }
60 
61 }