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 public final primitive value class runtime/valhalla/inlinetypes/WithFieldOwner
 25     version 64:0
 26 {
 27     NestHost runtime/valhalla/inlinetypes/WithFieldNestHost;
 28 
 29     public final Field c:C;
 30     protected final Field l:J;
 31     final Field d:D;
 32     private final Field i:I;
 33 
 34     public Method checkFields:"(CJDI)V" stack 4 {
 35         aload_0;
 36         getfield c:C;
 37         invokestatic java/lang/Character.valueOf:"(C)Ljava/lang/Character;";
 38         iload_1;
 39         invokestatic java/lang/Character.valueOf:"(C)Ljava/lang/Character;";
 40         ldc "unexpected c value";
 41         invokestatic jdk/test/lib/Asserts.assertEquals:"(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/String;)V";
 42 
 43         aload_0;
 44         getfield l:J;
 45         invokestatic java/lang/Long.valueOf:"(J)Ljava/lang/Long;";
 46         lload_2;
 47         invokestatic java/lang/Long.valueOf:"(J)Ljava/lang/Long;";
 48         ldc "unexpected l value";
 49         invokestatic jdk/test/lib/Asserts.assertEquals:"(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/String;)V";
 50 
 51         aload_0;
 52         getfield d:D;
 53         invokestatic java/lang/Double.valueOf:"(D)Ljava/lang/Double;";
 54         dload 4;
 55         invokestatic java/lang/Double.valueOf:"(D)Ljava/lang/Double;";
 56         ldc "unexpected d value";
 57         invokestatic jdk/test/lib/Asserts.assertEquals:"(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/String;)V";
 58 
 59         aload_0;
 60         getfield i:I;
 61         invokestatic java/lang/Integer.valueOf:"(I)Ljava/lang/Integer;";
 62         iload 6;
 63         invokestatic java/lang/Integer.valueOf:"(I)Ljava/lang/Integer;";
 64         ldc "unexpected i value";
 65         invokestatic jdk/test/lib/Asserts.assertEquals:"(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/String;)V";
 66 
 67         return;
 68     }
 69 
 70     public static Method withC:"(Qruntime/valhalla/inlinetypes/WithFieldOwner;C)Qruntime/valhalla/inlinetypes/WithFieldOwner;"
 71         stack 2
 72     {
 73         aload_0;
 74         iload_1;
 75         withfield runtime/valhalla/inlinetypes/WithFieldOwner.c:C;
 76         areturn;
 77     }
 78 
 79     public static Method withL:"(Qruntime/valhalla/inlinetypes/WithFieldOwner;J)Qruntime/valhalla/inlinetypes/WithFieldOwner;"
 80         stack 3
 81     {
 82         aload_0;
 83         lload_1;
 84         withfield runtime/valhalla/inlinetypes/WithFieldOwner.l:J;
 85         areturn;
 86     }
 87 
 88     public static Method withD:"(Qruntime/valhalla/inlinetypes/WithFieldOwner;D)Qruntime/valhalla/inlinetypes/WithFieldOwner;"
 89         stack 3
 90     {
 91         aload_0;
 92         dload_1;
 93         withfield runtime/valhalla/inlinetypes/WithFieldOwner.d:D;
 94         areturn;
 95     }
 96 
 97     public static Method withI:"(Qruntime/valhalla/inlinetypes/WithFieldOwner;I)Qruntime/valhalla/inlinetypes/WithFieldOwner;"
 98         stack 2
 99     {
100         aload_0;
101         iload_1;
102         withfield runtime/valhalla/inlinetypes/WithFieldOwner.i:I;
103         areturn;
104     }
105 
106 }
107 
108 public final primitive value class runtime/valhalla/inlinetypes/WithFieldNestmate
109     version 64:0
110 {
111     NestHost runtime/valhalla/inlinetypes/WithFieldNestHost;
112 
113     public static Method withC:"(Qruntime/valhalla/inlinetypes/WithFieldOwner;C)Qruntime/valhalla/inlinetypes/WithFieldOwner;"
114         stack 2
115     {
116         aload_0;
117         iload_1;
118         withfield runtime/valhalla/inlinetypes/WithFieldOwner.c:C;
119         areturn;
120     }
121 
122     public static Method withL:"(Qruntime/valhalla/inlinetypes/WithFieldOwner;J)Qruntime/valhalla/inlinetypes/WithFieldOwner;"
123         stack 3
124     {
125         aload_0;
126         lload_1;
127         withfield runtime/valhalla/inlinetypes/WithFieldOwner.l:J;
128         areturn;
129     }
130 
131     public static Method withD:"(Qruntime/valhalla/inlinetypes/WithFieldOwner;D)Qruntime/valhalla/inlinetypes/WithFieldOwner;"
132         stack 3
133     {
134         aload_0;
135         dload_1;
136         withfield runtime/valhalla/inlinetypes/WithFieldOwner.d:D;
137         areturn;
138     }
139 
140     public static Method withI:"(Qruntime/valhalla/inlinetypes/WithFieldOwner;I)Qruntime/valhalla/inlinetypes/WithFieldOwner;"
141         stack 2
142     {
143         aload_0;
144         iload_1;
145         withfield runtime/valhalla/inlinetypes/WithFieldOwner.i:I;
146         areturn;
147     }
148 
149 }
150 
151 public final primitive value class runtime/valhalla/inlinetypes/WithFieldNestHost
152     version 64:0
153 {
154     NestMembers runtime/valhalla/inlinetypes/WithFieldOwner, runtime/valhalla/inlinetypes/WithFieldNestmate;
155 
156     public static Method withC:"(Qruntime/valhalla/inlinetypes/WithFieldOwner;C)Qruntime/valhalla/inlinetypes/WithFieldOwner;"
157         stack 2
158     {
159         aload_0;
160         iload_1;
161         withfield runtime/valhalla/inlinetypes/WithFieldOwner.c:C;
162         areturn;
163     }
164 
165     public static Method withL:"(Qruntime/valhalla/inlinetypes/WithFieldOwner;J)Qruntime/valhalla/inlinetypes/WithFieldOwner;"
166         stack 3
167     {
168         aload_0;
169         lload_1;
170         withfield runtime/valhalla/inlinetypes/WithFieldOwner.l:J;
171         areturn;
172     }
173 
174     public static Method withD:"(Qruntime/valhalla/inlinetypes/WithFieldOwner;D)Qruntime/valhalla/inlinetypes/WithFieldOwner;"
175         stack 3
176     {
177         aload_0;
178         dload_1;
179         withfield runtime/valhalla/inlinetypes/WithFieldOwner.d:D;
180         areturn;
181     }
182 
183     public static Method withI:"(Qruntime/valhalla/inlinetypes/WithFieldOwner;I)Qruntime/valhalla/inlinetypes/WithFieldOwner;"
184         stack 2
185     {
186         aload_0;
187         iload_1;
188         withfield runtime/valhalla/inlinetypes/WithFieldOwner.i:I;
189         areturn;
190     }
191 }
192 
193 public final primitive value class runtime/valhalla/inlinetypes/WithFieldSamePackage
194     version 64:0
195 {
196 
197     public static Method withC:"(Qruntime/valhalla/inlinetypes/WithFieldOwner;C)Qruntime/valhalla/inlinetypes/WithFieldOwner;"
198         stack 2
199     {
200         aload_0;
201         iload_1;
202         withfield runtime/valhalla/inlinetypes/WithFieldOwner.c:C;
203         areturn;
204     }
205 
206     public static Method withL:"(Qruntime/valhalla/inlinetypes/WithFieldOwner;J)Qruntime/valhalla/inlinetypes/WithFieldOwner;"
207         stack 3
208     {
209         aload_0;
210         lload_1;
211         withfield runtime/valhalla/inlinetypes/WithFieldOwner.l:J;
212         areturn;
213     }
214 
215     public static Method withD:"(Qruntime/valhalla/inlinetypes/WithFieldOwner;D)Qruntime/valhalla/inlinetypes/WithFieldOwner;"
216         stack 3
217     {
218         aload_0;
219         dload_1;
220         withfield runtime/valhalla/inlinetypes/WithFieldOwner.d:D;
221         areturn;
222     }
223 
224     public static Method withI:"(Qruntime/valhalla/inlinetypes/WithFieldOwner;I)Qruntime/valhalla/inlinetypes/WithFieldOwner;"
225         stack 2
226     {
227         aload_0;
228         iload_1;
229         withfield runtime/valhalla/inlinetypes/WithFieldOwner.i:I;
230         areturn;
231     }
232 
233 }