1 /* This file has been automatically generated from "bootstrap.m4.c" */
2
3 /*
4 ----------------------------------------------------------------------
5 _svmf_bootstrap
6 ----------------------------------------------------------------------
7 */
8
9 svm_static jint
_svmf_bootstrap(_svmt_JNIEnv * env)10 _svmf_bootstrap (_svmt_JNIEnv *env)
11 {
12 _svmt_JavaVM *vm = env->vm;
13
14 if (_svmf_bootcl_internal_split_bootcl (env) != JNI_OK)
15 return JNI_ERR;
16
17 /* We must create the following classes and array first. This will
18 allow us to create java/lang/Class instances.
19
20 Initialization is done in a special way. Initialization checks
21 that there is no <clinit> method. This is a requirement SableVM
22 imposes on classes internally created.
23
24 Rationale: Initialization can possibly cause the execution of an
25 arbitrary amount of bytecode in an unrestricted number of
26 classes. At bootstrapping time, though, SableVM is not yet ready
27 to run arbitrary code.
28
29 If you really need to use static initializers in such classes,
30 simply put your static initializers in static inner classes;
31 you'll achieve equivalent semantics while also complying with
32 SableVM's "no <clinit>" requirement. */
33
34 /* Create, link, and initialize class: java/lang/Object */
35 if (_svmm_create_class
36 (env, vm->class_loading.boot_loader.class_loader_info,
37 "java/lang/Object", vm->class_loading.boot_loader.classes.jlobject) != JNI_OK)
38 {
39 _svmf_printf (env, stderr,
40 "*** Fatal error: Unable to create essential class java/lang/Object.\n");
41 return JNI_ERR;
42 }
43
44 if (_svmf_link_class
45 (env, vm->class_loading.boot_loader.classes.jlobject) != JNI_OK)
46 {
47 _svmf_printf (env, stderr,
48 "*** Fatal error: Unable to link essential class java/lang/Object.\n");
49 return JNI_ERR;
50 }
51
52 if (_svmf_special_initialization
53 (env, vm->class_loading.boot_loader.classes.jlobject) != JNI_OK)
54 {
55 _svmf_printf (env, stderr,
56 "*** Fatal error: Unable to initialize essential class java/lang/Object.\n");
57 return JNI_ERR;
58 }
59
60 /* Create, link, and initialize class: java/io/Serializable */
61 if (_svmm_create_class
62 (env, vm->class_loading.boot_loader.class_loader_info,
63 "java/io/Serializable", vm->class_loading.boot_loader.classes.jiserializable) != JNI_OK)
64 {
65 _svmf_printf (env, stderr,
66 "*** Fatal error: Unable to create essential class java/io/Serializable.\n");
67 return JNI_ERR;
68 }
69
70 if (_svmf_link_class
71 (env, vm->class_loading.boot_loader.classes.jiserializable) != JNI_OK)
72 {
73 _svmf_printf (env, stderr,
74 "*** Fatal error: Unable to link essential class java/io/Serializable.\n");
75 return JNI_ERR;
76 }
77
78 if (_svmf_special_initialization
79 (env, vm->class_loading.boot_loader.classes.jiserializable) != JNI_OK)
80 {
81 _svmf_printf (env, stderr,
82 "*** Fatal error: Unable to initialize essential class java/io/Serializable.\n");
83 return JNI_ERR;
84 }
85
86 /* Create, link, and initialize class: java/lang/Cloneable */
87 if (_svmm_create_class
88 (env, vm->class_loading.boot_loader.class_loader_info,
89 "java/lang/Cloneable", vm->class_loading.boot_loader.classes.jlcloneable) != JNI_OK)
90 {
91 _svmf_printf (env, stderr,
92 "*** Fatal error: Unable to create essential class java/lang/Cloneable.\n");
93 return JNI_ERR;
94 }
95
96 if (_svmf_link_class
97 (env, vm->class_loading.boot_loader.classes.jlcloneable) != JNI_OK)
98 {
99 _svmf_printf (env, stderr,
100 "*** Fatal error: Unable to link essential class java/lang/Cloneable.\n");
101 return JNI_ERR;
102 }
103
104 if (_svmf_special_initialization
105 (env, vm->class_loading.boot_loader.classes.jlcloneable) != JNI_OK)
106 {
107 _svmf_printf (env, stderr,
108 "*** Fatal error: Unable to initialize essential class java/lang/Cloneable.\n");
109 return JNI_ERR;
110 }
111
112 /* Create and link array: [B */
113 if (_svmm_create_array
114 (env, vm->class_loading.boot_loader.class_loader_info,
115 "[B", vm->class_loading.boot_loader.classes.byte_array) != JNI_OK)
116 {
117 return JNI_ERR;
118 }
119
120 if (_svmf_link_array
121 (env, vm->class_loading.boot_loader.classes.byte_array) != JNI_OK)
122 {
123 return JNI_ERR;
124 }
125
126 /* Create, link, and initialize class: java/lang/VMClass */
127 if (_svmm_create_class
128 (env, vm->class_loading.boot_loader.class_loader_info,
129 "java/lang/VMClass", vm->class_loading.boot_loader.classes.jlvmclass) != JNI_OK)
130 {
131 _svmf_printf (env, stderr,
132 "*** Fatal error: Unable to create essential class java/lang/VMClass.\n");
133 return JNI_ERR;
134 }
135
136 if (_svmf_link_class
137 (env, vm->class_loading.boot_loader.classes.jlvmclass) != JNI_OK)
138 {
139 _svmf_printf (env, stderr,
140 "*** Fatal error: Unable to link essential class java/lang/VMClass.\n");
141 return JNI_ERR;
142 }
143
144 if (_svmf_special_initialization
145 (env, vm->class_loading.boot_loader.classes.jlvmclass) != JNI_OK)
146 {
147 _svmf_printf (env, stderr,
148 "*** Fatal error: Unable to initialize essential class java/lang/VMClass.\n");
149 return JNI_ERR;
150 }
151
152 /* Create, link, and initialize class: java/lang/Class */
153 if (_svmm_create_class
154 (env, vm->class_loading.boot_loader.class_loader_info,
155 "java/lang/Class", vm->class_loading.boot_loader.classes.jlclass) != JNI_OK)
156 {
157 _svmf_printf (env, stderr,
158 "*** Fatal error: Unable to create essential class java/lang/Class.\n");
159 return JNI_ERR;
160 }
161
162 if (_svmf_link_class
163 (env, vm->class_loading.boot_loader.classes.jlclass) != JNI_OK)
164 {
165 _svmf_printf (env, stderr,
166 "*** Fatal error: Unable to link essential class java/lang/Class.\n");
167 return JNI_ERR;
168 }
169
170 if (_svmf_special_initialization
171 (env, vm->class_loading.boot_loader.classes.jlclass) != JNI_OK)
172 {
173 _svmf_printf (env, stderr,
174 "*** Fatal error: Unable to initialize essential class java/lang/Class.\n");
175 return JNI_ERR;
176 }
177
178 /* find java/lang/Class constructor */
179
180 vm->class_loading.boot_loader.methods.jlclass_init =
181 _svmf_resolve_method (vm->class_loading.boot_loader.classes.jlclass,
182 "<init>",
183 "(Ljava/lang/Object;Ljava/security/ProtectionDomain;)V");
184
185 if (vm->class_loading.boot_loader.methods.jlclass_init == NULL)
186 {
187 _svmf_error_NoSuchMethodError (env);
188 return JNI_ERR;
189 }
190
191 /* Now, we're ready to create "java/lang/Class" instances.
192
193 IMPORTANT: Usually, this is automatically done by
194 _svmf_create_class and _svmf_create_array, so you should not call
195 _svmf_new_class. In this particular case, though,
196 "java/lang/Class" was't yet created, so _svmf_create_class and
197 _svmf_create_array were not able to invoke _svmf_new_class; so we
198 do it now. */
199
200 /*
201 The constructor of java.lang.Class should look like this:
202
203 private Class(byte[] vmData)
204 {
205 this.vmData = vmData;
206 }
207
208 In bytecode:
209
210 0 aload_0
211 1 invokespecial <Method java.lang.Object()>
212 4 aload_0
213 5 aload_1
214 6 putfield <Field byte[] vmData>
215 9 return
216
217
218 *** Update for Classpath 0.06 ************************************
219
220 With Classpath 0.06 the constructor of java.lang.Class looks like:
221
222 Class(RawData vmData)
223 {
224 this.vmClass = new VMClass(vmData);
225 this.vmData = vmData;
226 }
227
228 Ideally, it should look like:
229
230 Class(VMClass vmClass)
231 {
232 this.vmClass = vmClass;
233 }
234
235 We are still in transition towards the VM{Classes} interface.
236
237 Note also that RawData still correspond to a Java byte[]. In
238 other words the runtime type of RawData is byte[] although its
239 compile type is RawData. It is still used the same way as before.
240
241 ******************************************************************
242
243 */
244
245 if (_svmf_new_class
246 (env, _svmf_cast_type_class
247 (vm->class_loading.boot_loader.classes.jlobject)) != JNI_OK)
248 {
249 return JNI_ERR;
250 }
251
252 if (_svmf_new_class
253 (env, _svmf_cast_type_class
254 (vm->class_loading.boot_loader.classes.jiserializable)) != JNI_OK)
255 {
256 return JNI_ERR;
257 }
258
259 if (_svmf_new_class
260 (env, _svmf_cast_type_class
261 (vm->class_loading.boot_loader.classes.jlcloneable)) != JNI_OK)
262 {
263 return JNI_ERR;
264 }
265
266 if (_svmf_new_class
267 (env, _svmf_cast_type_array
268 (vm->class_loading.boot_loader.classes.byte_array)) != JNI_OK)
269 {
270 return JNI_ERR;
271 }
272
273 if (_svmf_new_class
274 (env, _svmf_cast_type_class
275 (vm->class_loading.boot_loader.classes.jlvmclass)) != JNI_OK)
276 {
277 return JNI_ERR;
278 }
279
280 if (_svmf_new_class
281 (env, _svmf_cast_type_class
282 (vm->class_loading.boot_loader.classes.jlclass)) != JNI_OK)
283 {
284 return JNI_ERR;
285 }
286
287 /* create, link, and intialize various classes and arrays */
288
289 /* Create, link, and initialize class: java/lang/StackTraceElement */
290 if (_svmm_create_class
291 (env, vm->class_loading.boot_loader.class_loader_info,
292 "java/lang/StackTraceElement", vm->class_loading.boot_loader.classes.jlstacktraceelement) != JNI_OK)
293 {
294 _svmf_printf (env, stderr,
295 "*** Fatal error: Unable to create essential class java/lang/StackTraceElement.\n");
296 return JNI_ERR;
297 }
298
299 if (_svmf_link_class
300 (env, vm->class_loading.boot_loader.classes.jlstacktraceelement) != JNI_OK)
301 {
302 _svmf_printf (env, stderr,
303 "*** Fatal error: Unable to link essential class java/lang/StackTraceElement.\n");
304 return JNI_ERR;
305 }
306
307 if (_svmf_special_initialization
308 (env, vm->class_loading.boot_loader.classes.jlstacktraceelement) != JNI_OK)
309 {
310 _svmf_printf (env, stderr,
311 "*** Fatal error: Unable to initialize essential class java/lang/StackTraceElement.\n");
312 return JNI_ERR;
313 }
314
315 /* Create, link, and initialize class: java/lang/StringCreator */
316 if (_svmm_create_class
317 (env, vm->class_loading.boot_loader.class_loader_info,
318 "java/lang/StringCreator", vm->class_loading.boot_loader.classes.stringcreator) != JNI_OK)
319 {
320 _svmf_printf (env, stderr,
321 "*** Fatal error: Unable to create essential class java/lang/StringCreator.\n");
322 return JNI_ERR;
323 }
324
325 if (_svmf_link_class
326 (env, vm->class_loading.boot_loader.classes.stringcreator) != JNI_OK)
327 {
328 _svmf_printf (env, stderr,
329 "*** Fatal error: Unable to link essential class java/lang/StringCreator.\n");
330 return JNI_ERR;
331 }
332
333 if (_svmf_special_initialization
334 (env, vm->class_loading.boot_loader.classes.stringcreator) != JNI_OK)
335 {
336 _svmf_printf (env, stderr,
337 "*** Fatal error: Unable to initialize essential class java/lang/StringCreator.\n");
338 return JNI_ERR;
339 }
340
341 /* Create, link, and initialize class: java/lang/VirtualMachine */
342 if (_svmm_create_class
343 (env, vm->class_loading.boot_loader.class_loader_info,
344 "java/lang/VirtualMachine", vm->class_loading.boot_loader.classes.virtualmachine) != JNI_OK)
345 {
346 _svmf_printf (env, stderr,
347 "*** Fatal error: Unable to create essential class java/lang/VirtualMachine.\n");
348 return JNI_ERR;
349 }
350
351 if (_svmf_link_class
352 (env, vm->class_loading.boot_loader.classes.virtualmachine) != JNI_OK)
353 {
354 _svmf_printf (env, stderr,
355 "*** Fatal error: Unable to link essential class java/lang/VirtualMachine.\n");
356 return JNI_ERR;
357 }
358
359 if (_svmf_special_initialization
360 (env, vm->class_loading.boot_loader.classes.virtualmachine) != JNI_OK)
361 {
362 _svmf_printf (env, stderr,
363 "*** Fatal error: Unable to initialize essential class java/lang/VirtualMachine.\n");
364 return JNI_ERR;
365 }
366
367 /* Create, link, and initialize class: java/lang/reflect/Constructor */
368 if (_svmm_create_class
369 (env, vm->class_loading.boot_loader.class_loader_info,
370 "java/lang/reflect/Constructor", vm->class_loading.boot_loader.classes.jlrconstructor) != JNI_OK)
371 {
372 _svmf_printf (env, stderr,
373 "*** Fatal error: Unable to create essential class java/lang/reflect/Constructor.\n");
374 return JNI_ERR;
375 }
376
377 if (_svmf_link_class
378 (env, vm->class_loading.boot_loader.classes.jlrconstructor) != JNI_OK)
379 {
380 _svmf_printf (env, stderr,
381 "*** Fatal error: Unable to link essential class java/lang/reflect/Constructor.\n");
382 return JNI_ERR;
383 }
384
385 if (_svmf_special_initialization
386 (env, vm->class_loading.boot_loader.classes.jlrconstructor) != JNI_OK)
387 {
388 _svmf_printf (env, stderr,
389 "*** Fatal error: Unable to initialize essential class java/lang/reflect/Constructor.\n");
390 return JNI_ERR;
391 }
392
393 /* Create, link, and initialize class: java/lang/reflect/Field */
394 if (_svmm_create_class
395 (env, vm->class_loading.boot_loader.class_loader_info,
396 "java/lang/reflect/Field", vm->class_loading.boot_loader.classes.jlrfield) != JNI_OK)
397 {
398 _svmf_printf (env, stderr,
399 "*** Fatal error: Unable to create essential class java/lang/reflect/Field.\n");
400 return JNI_ERR;
401 }
402
403 if (_svmf_link_class
404 (env, vm->class_loading.boot_loader.classes.jlrfield) != JNI_OK)
405 {
406 _svmf_printf (env, stderr,
407 "*** Fatal error: Unable to link essential class java/lang/reflect/Field.\n");
408 return JNI_ERR;
409 }
410
411 if (_svmf_special_initialization
412 (env, vm->class_loading.boot_loader.classes.jlrfield) != JNI_OK)
413 {
414 _svmf_printf (env, stderr,
415 "*** Fatal error: Unable to initialize essential class java/lang/reflect/Field.\n");
416 return JNI_ERR;
417 }
418
419 /* Create, link, and initialize class: java/lang/reflect/InvocationTargetException */
420 if (_svmm_create_class
421 (env, vm->class_loading.boot_loader.class_loader_info,
422 "java/lang/reflect/InvocationTargetException", vm->class_loading.boot_loader.classes.jlrinvocationtargetexception) != JNI_OK)
423 {
424 _svmf_printf (env, stderr,
425 "*** Fatal error: Unable to create essential class java/lang/reflect/InvocationTargetException.\n");
426 return JNI_ERR;
427 }
428
429 if (_svmf_link_class
430 (env, vm->class_loading.boot_loader.classes.jlrinvocationtargetexception) != JNI_OK)
431 {
432 _svmf_printf (env, stderr,
433 "*** Fatal error: Unable to link essential class java/lang/reflect/InvocationTargetException.\n");
434 return JNI_ERR;
435 }
436
437 if (_svmf_special_initialization
438 (env, vm->class_loading.boot_loader.classes.jlrinvocationtargetexception) != JNI_OK)
439 {
440 _svmf_printf (env, stderr,
441 "*** Fatal error: Unable to initialize essential class java/lang/reflect/InvocationTargetException.\n");
442 return JNI_ERR;
443 }
444
445 /* Create, link, and initialize class: java/lang/reflect/Method */
446 if (_svmm_create_class
447 (env, vm->class_loading.boot_loader.class_loader_info,
448 "java/lang/reflect/Method", vm->class_loading.boot_loader.classes.jlrmethod) != JNI_OK)
449 {
450 _svmf_printf (env, stderr,
451 "*** Fatal error: Unable to create essential class java/lang/reflect/Method.\n");
452 return JNI_ERR;
453 }
454
455 if (_svmf_link_class
456 (env, vm->class_loading.boot_loader.classes.jlrmethod) != JNI_OK)
457 {
458 _svmf_printf (env, stderr,
459 "*** Fatal error: Unable to link essential class java/lang/reflect/Method.\n");
460 return JNI_ERR;
461 }
462
463 if (_svmf_special_initialization
464 (env, vm->class_loading.boot_loader.classes.jlrmethod) != JNI_OK)
465 {
466 _svmf_printf (env, stderr,
467 "*** Fatal error: Unable to initialize essential class java/lang/reflect/Method.\n");
468 return JNI_ERR;
469 }
470
471 /* Create, link, and initialize class: java/nio/ByteBuffer$vm */
472 if (_svmm_create_class
473 (env, vm->class_loading.boot_loader.class_loader_info,
474 "java/nio/ByteBuffer$vm", vm->class_loading.boot_loader.classes.niobytebuffervm) != JNI_OK)
475 {
476 _svmf_printf (env, stderr,
477 "*** Fatal error: Unable to create essential class java/nio/ByteBuffer$vm.\n");
478 return JNI_ERR;
479 }
480
481 if (_svmf_link_class
482 (env, vm->class_loading.boot_loader.classes.niobytebuffervm) != JNI_OK)
483 {
484 _svmf_printf (env, stderr,
485 "*** Fatal error: Unable to link essential class java/nio/ByteBuffer$vm.\n");
486 return JNI_ERR;
487 }
488
489 if (_svmf_special_initialization
490 (env, vm->class_loading.boot_loader.classes.niobytebuffervm) != JNI_OK)
491 {
492 _svmf_printf (env, stderr,
493 "*** Fatal error: Unable to initialize essential class java/nio/ByteBuffer$vm.\n");
494 return JNI_ERR;
495 }
496
497 /* Create and link array: [Ljava/lang/reflect/Field; */
498 if (_svmm_create_array
499 (env, vm->class_loading.boot_loader.class_loader_info,
500 "[Ljava/lang/reflect/Field;", vm->class_loading.boot_loader.classes.jlrfield_array) != JNI_OK)
501 {
502 return JNI_ERR;
503 }
504
505 if (_svmf_link_array
506 (env, vm->class_loading.boot_loader.classes.jlrfield_array) != JNI_OK)
507 {
508 return JNI_ERR;
509 }
510
511 /* Create and link array: [Z */
512 if (_svmm_create_array
513 (env, vm->class_loading.boot_loader.class_loader_info,
514 "[Z", vm->class_loading.boot_loader.classes.boolean_array) != JNI_OK)
515 {
516 return JNI_ERR;
517 }
518
519 if (_svmf_link_array
520 (env, vm->class_loading.boot_loader.classes.boolean_array) != JNI_OK)
521 {
522 return JNI_ERR;
523 }
524
525 /* Create and link array: [S */
526 if (_svmm_create_array
527 (env, vm->class_loading.boot_loader.class_loader_info,
528 "[S", vm->class_loading.boot_loader.classes.short_array) != JNI_OK)
529 {
530 return JNI_ERR;
531 }
532
533 if (_svmf_link_array
534 (env, vm->class_loading.boot_loader.classes.short_array) != JNI_OK)
535 {
536 return JNI_ERR;
537 }
538
539 /* Create and link array: [C */
540 if (_svmm_create_array
541 (env, vm->class_loading.boot_loader.class_loader_info,
542 "[C", vm->class_loading.boot_loader.classes.char_array) != JNI_OK)
543 {
544 return JNI_ERR;
545 }
546
547 if (_svmf_link_array
548 (env, vm->class_loading.boot_loader.classes.char_array) != JNI_OK)
549 {
550 return JNI_ERR;
551 }
552
553 /* Create and link array: [I */
554 if (_svmm_create_array
555 (env, vm->class_loading.boot_loader.class_loader_info,
556 "[I", vm->class_loading.boot_loader.classes.int_array) != JNI_OK)
557 {
558 return JNI_ERR;
559 }
560
561 if (_svmf_link_array
562 (env, vm->class_loading.boot_loader.classes.int_array) != JNI_OK)
563 {
564 return JNI_ERR;
565 }
566
567 /* Create and link array: [J */
568 if (_svmm_create_array
569 (env, vm->class_loading.boot_loader.class_loader_info,
570 "[J", vm->class_loading.boot_loader.classes.long_array) != JNI_OK)
571 {
572 return JNI_ERR;
573 }
574
575 if (_svmf_link_array
576 (env, vm->class_loading.boot_loader.classes.long_array) != JNI_OK)
577 {
578 return JNI_ERR;
579 }
580
581 /* Create and link array: [F */
582 if (_svmm_create_array
583 (env, vm->class_loading.boot_loader.class_loader_info,
584 "[F", vm->class_loading.boot_loader.classes.float_array) != JNI_OK)
585 {
586 return JNI_ERR;
587 }
588
589 if (_svmf_link_array
590 (env, vm->class_loading.boot_loader.classes.float_array) != JNI_OK)
591 {
592 return JNI_ERR;
593 }
594
595 /* Create and link array: [D */
596 if (_svmm_create_array
597 (env, vm->class_loading.boot_loader.class_loader_info,
598 "[D", vm->class_loading.boot_loader.classes.double_array) != JNI_OK)
599 {
600 return JNI_ERR;
601 }
602
603 if (_svmf_link_array
604 (env, vm->class_loading.boot_loader.classes.double_array) != JNI_OK)
605 {
606 return JNI_ERR;
607 }
608
609 /* Create, link, and initialize class: java/lang/ArithmeticException */
610 if (_svmm_create_class
611 (env, vm->class_loading.boot_loader.class_loader_info,
612 "java/lang/ArithmeticException", vm->class_loading.boot_loader.classes.ArithmeticException) != JNI_OK)
613 {
614 _svmf_printf (env, stderr,
615 "*** Fatal error: Unable to create essential class java/lang/ArithmeticException.\n");
616 return JNI_ERR;
617 }
618
619 if (_svmf_link_class
620 (env, vm->class_loading.boot_loader.classes.ArithmeticException) != JNI_OK)
621 {
622 _svmf_printf (env, stderr,
623 "*** Fatal error: Unable to link essential class java/lang/ArithmeticException.\n");
624 return JNI_ERR;
625 }
626
627 if (_svmf_special_initialization
628 (env, vm->class_loading.boot_loader.classes.ArithmeticException) != JNI_OK)
629 {
630 _svmf_printf (env, stderr,
631 "*** Fatal error: Unable to initialize essential class java/lang/ArithmeticException.\n");
632 return JNI_ERR;
633 }
634
635 /* Create, link, and initialize class: java/lang/ArrayIndexOutOfBoundsException */
636 if (_svmm_create_class
637 (env, vm->class_loading.boot_loader.class_loader_info,
638 "java/lang/ArrayIndexOutOfBoundsException", vm->class_loading.boot_loader.classes.ArrayIndexOutOfBoundsException) != JNI_OK)
639 {
640 _svmf_printf (env, stderr,
641 "*** Fatal error: Unable to create essential class java/lang/ArrayIndexOutOfBoundsException.\n");
642 return JNI_ERR;
643 }
644
645 if (_svmf_link_class
646 (env, vm->class_loading.boot_loader.classes.ArrayIndexOutOfBoundsException) != JNI_OK)
647 {
648 _svmf_printf (env, stderr,
649 "*** Fatal error: Unable to link essential class java/lang/ArrayIndexOutOfBoundsException.\n");
650 return JNI_ERR;
651 }
652
653 if (_svmf_special_initialization
654 (env, vm->class_loading.boot_loader.classes.ArrayIndexOutOfBoundsException) != JNI_OK)
655 {
656 _svmf_printf (env, stderr,
657 "*** Fatal error: Unable to initialize essential class java/lang/ArrayIndexOutOfBoundsException.\n");
658 return JNI_ERR;
659 }
660
661 /* Create, link, and initialize class: java/lang/ArrayStoreException */
662 if (_svmm_create_class
663 (env, vm->class_loading.boot_loader.class_loader_info,
664 "java/lang/ArrayStoreException", vm->class_loading.boot_loader.classes.ArrayStoreException) != JNI_OK)
665 {
666 _svmf_printf (env, stderr,
667 "*** Fatal error: Unable to create essential class java/lang/ArrayStoreException.\n");
668 return JNI_ERR;
669 }
670
671 if (_svmf_link_class
672 (env, vm->class_loading.boot_loader.classes.ArrayStoreException) != JNI_OK)
673 {
674 _svmf_printf (env, stderr,
675 "*** Fatal error: Unable to link essential class java/lang/ArrayStoreException.\n");
676 return JNI_ERR;
677 }
678
679 if (_svmf_special_initialization
680 (env, vm->class_loading.boot_loader.classes.ArrayStoreException) != JNI_OK)
681 {
682 _svmf_printf (env, stderr,
683 "*** Fatal error: Unable to initialize essential class java/lang/ArrayStoreException.\n");
684 return JNI_ERR;
685 }
686
687 /* Create, link, and initialize class: java/lang/ClassCastException */
688 if (_svmm_create_class
689 (env, vm->class_loading.boot_loader.class_loader_info,
690 "java/lang/ClassCastException", vm->class_loading.boot_loader.classes.ClassCastException) != JNI_OK)
691 {
692 _svmf_printf (env, stderr,
693 "*** Fatal error: Unable to create essential class java/lang/ClassCastException.\n");
694 return JNI_ERR;
695 }
696
697 if (_svmf_link_class
698 (env, vm->class_loading.boot_loader.classes.ClassCastException) != JNI_OK)
699 {
700 _svmf_printf (env, stderr,
701 "*** Fatal error: Unable to link essential class java/lang/ClassCastException.\n");
702 return JNI_ERR;
703 }
704
705 if (_svmf_special_initialization
706 (env, vm->class_loading.boot_loader.classes.ClassCastException) != JNI_OK)
707 {
708 _svmf_printf (env, stderr,
709 "*** Fatal error: Unable to initialize essential class java/lang/ClassCastException.\n");
710 return JNI_ERR;
711 }
712
713 /* Create, link, and initialize class: java/lang/IllegalMonitorStateException */
714 if (_svmm_create_class
715 (env, vm->class_loading.boot_loader.class_loader_info,
716 "java/lang/IllegalMonitorStateException", vm->class_loading.boot_loader.classes.IllegalMonitorStateException) != JNI_OK)
717 {
718 _svmf_printf (env, stderr,
719 "*** Fatal error: Unable to create essential class java/lang/IllegalMonitorStateException.\n");
720 return JNI_ERR;
721 }
722
723 if (_svmf_link_class
724 (env, vm->class_loading.boot_loader.classes.IllegalMonitorStateException) != JNI_OK)
725 {
726 _svmf_printf (env, stderr,
727 "*** Fatal error: Unable to link essential class java/lang/IllegalMonitorStateException.\n");
728 return JNI_ERR;
729 }
730
731 if (_svmf_special_initialization
732 (env, vm->class_loading.boot_loader.classes.IllegalMonitorStateException) != JNI_OK)
733 {
734 _svmf_printf (env, stderr,
735 "*** Fatal error: Unable to initialize essential class java/lang/IllegalMonitorStateException.\n");
736 return JNI_ERR;
737 }
738
739 /* Create, link, and initialize class: java/lang/NegativeArraySizeException */
740 if (_svmm_create_class
741 (env, vm->class_loading.boot_loader.class_loader_info,
742 "java/lang/NegativeArraySizeException", vm->class_loading.boot_loader.classes.NegativeArraySizeException) != JNI_OK)
743 {
744 _svmf_printf (env, stderr,
745 "*** Fatal error: Unable to create essential class java/lang/NegativeArraySizeException.\n");
746 return JNI_ERR;
747 }
748
749 if (_svmf_link_class
750 (env, vm->class_loading.boot_loader.classes.NegativeArraySizeException) != JNI_OK)
751 {
752 _svmf_printf (env, stderr,
753 "*** Fatal error: Unable to link essential class java/lang/NegativeArraySizeException.\n");
754 return JNI_ERR;
755 }
756
757 if (_svmf_special_initialization
758 (env, vm->class_loading.boot_loader.classes.NegativeArraySizeException) != JNI_OK)
759 {
760 _svmf_printf (env, stderr,
761 "*** Fatal error: Unable to initialize essential class java/lang/NegativeArraySizeException.\n");
762 return JNI_ERR;
763 }
764
765 /* Create, link, and initialize class: java/lang/NoSuchFieldException */
766 if (_svmm_create_class
767 (env, vm->class_loading.boot_loader.class_loader_info,
768 "java/lang/NoSuchFieldException", vm->class_loading.boot_loader.classes.NoSuchFieldException) != JNI_OK)
769 {
770 _svmf_printf (env, stderr,
771 "*** Fatal error: Unable to create essential class java/lang/NoSuchFieldException.\n");
772 return JNI_ERR;
773 }
774
775 if (_svmf_link_class
776 (env, vm->class_loading.boot_loader.classes.NoSuchFieldException) != JNI_OK)
777 {
778 _svmf_printf (env, stderr,
779 "*** Fatal error: Unable to link essential class java/lang/NoSuchFieldException.\n");
780 return JNI_ERR;
781 }
782
783 if (_svmf_special_initialization
784 (env, vm->class_loading.boot_loader.classes.NoSuchFieldException) != JNI_OK)
785 {
786 _svmf_printf (env, stderr,
787 "*** Fatal error: Unable to initialize essential class java/lang/NoSuchFieldException.\n");
788 return JNI_ERR;
789 }
790
791 /* Create, link, and initialize class: java/lang/NoSuchMethodException */
792 if (_svmm_create_class
793 (env, vm->class_loading.boot_loader.class_loader_info,
794 "java/lang/NoSuchMethodException", vm->class_loading.boot_loader.classes.NoSuchMethodException) != JNI_OK)
795 {
796 _svmf_printf (env, stderr,
797 "*** Fatal error: Unable to create essential class java/lang/NoSuchMethodException.\n");
798 return JNI_ERR;
799 }
800
801 if (_svmf_link_class
802 (env, vm->class_loading.boot_loader.classes.NoSuchMethodException) != JNI_OK)
803 {
804 _svmf_printf (env, stderr,
805 "*** Fatal error: Unable to link essential class java/lang/NoSuchMethodException.\n");
806 return JNI_ERR;
807 }
808
809 if (_svmf_special_initialization
810 (env, vm->class_loading.boot_loader.classes.NoSuchMethodException) != JNI_OK)
811 {
812 _svmf_printf (env, stderr,
813 "*** Fatal error: Unable to initialize essential class java/lang/NoSuchMethodException.\n");
814 return JNI_ERR;
815 }
816
817 /* Create, link, and initialize class: java/lang/NullPointerException */
818 if (_svmm_create_class
819 (env, vm->class_loading.boot_loader.class_loader_info,
820 "java/lang/NullPointerException", vm->class_loading.boot_loader.classes.NullPointerException) != JNI_OK)
821 {
822 _svmf_printf (env, stderr,
823 "*** Fatal error: Unable to create essential class java/lang/NullPointerException.\n");
824 return JNI_ERR;
825 }
826
827 if (_svmf_link_class
828 (env, vm->class_loading.boot_loader.classes.NullPointerException) != JNI_OK)
829 {
830 _svmf_printf (env, stderr,
831 "*** Fatal error: Unable to link essential class java/lang/NullPointerException.\n");
832 return JNI_ERR;
833 }
834
835 if (_svmf_special_initialization
836 (env, vm->class_loading.boot_loader.classes.NullPointerException) != JNI_OK)
837 {
838 _svmf_printf (env, stderr,
839 "*** Fatal error: Unable to initialize essential class java/lang/NullPointerException.\n");
840 return JNI_ERR;
841 }
842
843 /* Create, link, and initialize class: java/lang/InterruptedException */
844 if (_svmm_create_class
845 (env, vm->class_loading.boot_loader.class_loader_info,
846 "java/lang/InterruptedException", vm->class_loading.boot_loader.classes.InterruptedException) != JNI_OK)
847 {
848 _svmf_printf (env, stderr,
849 "*** Fatal error: Unable to create essential class java/lang/InterruptedException.\n");
850 return JNI_ERR;
851 }
852
853 if (_svmf_link_class
854 (env, vm->class_loading.boot_loader.classes.InterruptedException) != JNI_OK)
855 {
856 _svmf_printf (env, stderr,
857 "*** Fatal error: Unable to link essential class java/lang/InterruptedException.\n");
858 return JNI_ERR;
859 }
860
861 if (_svmf_special_initialization
862 (env, vm->class_loading.boot_loader.classes.InterruptedException) != JNI_OK)
863 {
864 _svmf_printf (env, stderr,
865 "*** Fatal error: Unable to initialize essential class java/lang/InterruptedException.\n");
866 return JNI_ERR;
867 }
868
869 #if defined(_SABLEVM_INLINABILITY_TESTING)
870
871 /* Create, link, and initialize class: java/lang/InliningException */
872 if (_svmm_create_class
873 (env, vm->class_loading.boot_loader.class_loader_info,
874 "java/lang/InliningException", vm->class_loading.boot_loader.classes.InliningException) != JNI_OK)
875 {
876 _svmf_printf (env, stderr,
877 "*** Fatal error: Unable to create essential class java/lang/InliningException.\n");
878 return JNI_ERR;
879 }
880
881 if (_svmf_link_class
882 (env, vm->class_loading.boot_loader.classes.InliningException) != JNI_OK)
883 {
884 _svmf_printf (env, stderr,
885 "*** Fatal error: Unable to link essential class java/lang/InliningException.\n");
886 return JNI_ERR;
887 }
888
889 if (_svmf_special_initialization
890 (env, vm->class_loading.boot_loader.classes.InliningException) != JNI_OK)
891 {
892 _svmf_printf (env, stderr,
893 "*** Fatal error: Unable to initialize essential class java/lang/InliningException.\n");
894 return JNI_ERR;
895 }
896
897 #endif
898
899 /* Create, link, and initialize class: java/lang/AbstractMethodError */
900 if (_svmm_create_class
901 (env, vm->class_loading.boot_loader.class_loader_info,
902 "java/lang/AbstractMethodError", vm->class_loading.boot_loader.classes.AbstractMethodError) != JNI_OK)
903 {
904 _svmf_printf (env, stderr,
905 "*** Fatal error: Unable to create essential class java/lang/AbstractMethodError.\n");
906 return JNI_ERR;
907 }
908
909 if (_svmf_link_class
910 (env, vm->class_loading.boot_loader.classes.AbstractMethodError) != JNI_OK)
911 {
912 _svmf_printf (env, stderr,
913 "*** Fatal error: Unable to link essential class java/lang/AbstractMethodError.\n");
914 return JNI_ERR;
915 }
916
917 if (_svmf_special_initialization
918 (env, vm->class_loading.boot_loader.classes.AbstractMethodError) != JNI_OK)
919 {
920 _svmf_printf (env, stderr,
921 "*** Fatal error: Unable to initialize essential class java/lang/AbstractMethodError.\n");
922 return JNI_ERR;
923 }
924
925 /* Create, link, and initialize class: java/lang/ClassCircularityError */
926 if (_svmm_create_class
927 (env, vm->class_loading.boot_loader.class_loader_info,
928 "java/lang/ClassCircularityError", vm->class_loading.boot_loader.classes.ClassCircularityError) != JNI_OK)
929 {
930 _svmf_printf (env, stderr,
931 "*** Fatal error: Unable to create essential class java/lang/ClassCircularityError.\n");
932 return JNI_ERR;
933 }
934
935 if (_svmf_link_class
936 (env, vm->class_loading.boot_loader.classes.ClassCircularityError) != JNI_OK)
937 {
938 _svmf_printf (env, stderr,
939 "*** Fatal error: Unable to link essential class java/lang/ClassCircularityError.\n");
940 return JNI_ERR;
941 }
942
943 if (_svmf_special_initialization
944 (env, vm->class_loading.boot_loader.classes.ClassCircularityError) != JNI_OK)
945 {
946 _svmf_printf (env, stderr,
947 "*** Fatal error: Unable to initialize essential class java/lang/ClassCircularityError.\n");
948 return JNI_ERR;
949 }
950
951 /* Create, link, and initialize class: java/lang/ClassFormatError */
952 if (_svmm_create_class
953 (env, vm->class_loading.boot_loader.class_loader_info,
954 "java/lang/ClassFormatError", vm->class_loading.boot_loader.classes.ClassFormatError) != JNI_OK)
955 {
956 _svmf_printf (env, stderr,
957 "*** Fatal error: Unable to create essential class java/lang/ClassFormatError.\n");
958 return JNI_ERR;
959 }
960
961 if (_svmf_link_class
962 (env, vm->class_loading.boot_loader.classes.ClassFormatError) != JNI_OK)
963 {
964 _svmf_printf (env, stderr,
965 "*** Fatal error: Unable to link essential class java/lang/ClassFormatError.\n");
966 return JNI_ERR;
967 }
968
969 if (_svmf_special_initialization
970 (env, vm->class_loading.boot_loader.classes.ClassFormatError) != JNI_OK)
971 {
972 _svmf_printf (env, stderr,
973 "*** Fatal error: Unable to initialize essential class java/lang/ClassFormatError.\n");
974 return JNI_ERR;
975 }
976
977 /* Create, link, and initialize class: java/lang/ExceptionInInitializerError */
978 if (_svmm_create_class
979 (env, vm->class_loading.boot_loader.class_loader_info,
980 "java/lang/ExceptionInInitializerError", vm->class_loading.boot_loader.classes.ExceptionInInitializerError) != JNI_OK)
981 {
982 _svmf_printf (env, stderr,
983 "*** Fatal error: Unable to create essential class java/lang/ExceptionInInitializerError.\n");
984 return JNI_ERR;
985 }
986
987 if (_svmf_link_class
988 (env, vm->class_loading.boot_loader.classes.ExceptionInInitializerError) != JNI_OK)
989 {
990 _svmf_printf (env, stderr,
991 "*** Fatal error: Unable to link essential class java/lang/ExceptionInInitializerError.\n");
992 return JNI_ERR;
993 }
994
995 if (_svmf_special_initialization
996 (env, vm->class_loading.boot_loader.classes.ExceptionInInitializerError) != JNI_OK)
997 {
998 _svmf_printf (env, stderr,
999 "*** Fatal error: Unable to initialize essential class java/lang/ExceptionInInitializerError.\n");
1000 return JNI_ERR;
1001 }
1002
1003 /* Create, link, and initialize class: java/lang/IncompatibleClassChangeError */
1004 if (_svmm_create_class
1005 (env, vm->class_loading.boot_loader.class_loader_info,
1006 "java/lang/IncompatibleClassChangeError", vm->class_loading.boot_loader.classes.IncompatibleClassChangeError) != JNI_OK)
1007 {
1008 _svmf_printf (env, stderr,
1009 "*** Fatal error: Unable to create essential class java/lang/IncompatibleClassChangeError.\n");
1010 return JNI_ERR;
1011 }
1012
1013 if (_svmf_link_class
1014 (env, vm->class_loading.boot_loader.classes.IncompatibleClassChangeError) != JNI_OK)
1015 {
1016 _svmf_printf (env, stderr,
1017 "*** Fatal error: Unable to link essential class java/lang/IncompatibleClassChangeError.\n");
1018 return JNI_ERR;
1019 }
1020
1021 if (_svmf_special_initialization
1022 (env, vm->class_loading.boot_loader.classes.IncompatibleClassChangeError) != JNI_OK)
1023 {
1024 _svmf_printf (env, stderr,
1025 "*** Fatal error: Unable to initialize essential class java/lang/IncompatibleClassChangeError.\n");
1026 return JNI_ERR;
1027 }
1028
1029 /* Create, link, and initialize class: java/lang/InternalError */
1030 if (_svmm_create_class
1031 (env, vm->class_loading.boot_loader.class_loader_info,
1032 "java/lang/InternalError", vm->class_loading.boot_loader.classes.InternalError) != JNI_OK)
1033 {
1034 _svmf_printf (env, stderr,
1035 "*** Fatal error: Unable to create essential class java/lang/InternalError.\n");
1036 return JNI_ERR;
1037 }
1038
1039 if (_svmf_link_class
1040 (env, vm->class_loading.boot_loader.classes.InternalError) != JNI_OK)
1041 {
1042 _svmf_printf (env, stderr,
1043 "*** Fatal error: Unable to link essential class java/lang/InternalError.\n");
1044 return JNI_ERR;
1045 }
1046
1047 if (_svmf_special_initialization
1048 (env, vm->class_loading.boot_loader.classes.InternalError) != JNI_OK)
1049 {
1050 _svmf_printf (env, stderr,
1051 "*** Fatal error: Unable to initialize essential class java/lang/InternalError.\n");
1052 return JNI_ERR;
1053 }
1054
1055 /* Create, link, and initialize class: java/lang/LinkageError */
1056 if (_svmm_create_class
1057 (env, vm->class_loading.boot_loader.class_loader_info,
1058 "java/lang/LinkageError", vm->class_loading.boot_loader.classes.LinkageError) != JNI_OK)
1059 {
1060 _svmf_printf (env, stderr,
1061 "*** Fatal error: Unable to create essential class java/lang/LinkageError.\n");
1062 return JNI_ERR;
1063 }
1064
1065 if (_svmf_link_class
1066 (env, vm->class_loading.boot_loader.classes.LinkageError) != JNI_OK)
1067 {
1068 _svmf_printf (env, stderr,
1069 "*** Fatal error: Unable to link essential class java/lang/LinkageError.\n");
1070 return JNI_ERR;
1071 }
1072
1073 if (_svmf_special_initialization
1074 (env, vm->class_loading.boot_loader.classes.LinkageError) != JNI_OK)
1075 {
1076 _svmf_printf (env, stderr,
1077 "*** Fatal error: Unable to initialize essential class java/lang/LinkageError.\n");
1078 return JNI_ERR;
1079 }
1080
1081 /* Create, link, and initialize class: java/lang/NoClassDefFoundError */
1082 if (_svmm_create_class
1083 (env, vm->class_loading.boot_loader.class_loader_info,
1084 "java/lang/NoClassDefFoundError", vm->class_loading.boot_loader.classes.NoClassDefFoundError) != JNI_OK)
1085 {
1086 _svmf_printf (env, stderr,
1087 "*** Fatal error: Unable to create essential class java/lang/NoClassDefFoundError.\n");
1088 return JNI_ERR;
1089 }
1090
1091 if (_svmf_link_class
1092 (env, vm->class_loading.boot_loader.classes.NoClassDefFoundError) != JNI_OK)
1093 {
1094 _svmf_printf (env, stderr,
1095 "*** Fatal error: Unable to link essential class java/lang/NoClassDefFoundError.\n");
1096 return JNI_ERR;
1097 }
1098
1099 if (_svmf_special_initialization
1100 (env, vm->class_loading.boot_loader.classes.NoClassDefFoundError) != JNI_OK)
1101 {
1102 _svmf_printf (env, stderr,
1103 "*** Fatal error: Unable to initialize essential class java/lang/NoClassDefFoundError.\n");
1104 return JNI_ERR;
1105 }
1106
1107 /* Create, link, and initialize class: java/lang/NoSuchFieldError */
1108 if (_svmm_create_class
1109 (env, vm->class_loading.boot_loader.class_loader_info,
1110 "java/lang/NoSuchFieldError", vm->class_loading.boot_loader.classes.NoSuchFieldError) != JNI_OK)
1111 {
1112 _svmf_printf (env, stderr,
1113 "*** Fatal error: Unable to create essential class java/lang/NoSuchFieldError.\n");
1114 return JNI_ERR;
1115 }
1116
1117 if (_svmf_link_class
1118 (env, vm->class_loading.boot_loader.classes.NoSuchFieldError) != JNI_OK)
1119 {
1120 _svmf_printf (env, stderr,
1121 "*** Fatal error: Unable to link essential class java/lang/NoSuchFieldError.\n");
1122 return JNI_ERR;
1123 }
1124
1125 if (_svmf_special_initialization
1126 (env, vm->class_loading.boot_loader.classes.NoSuchFieldError) != JNI_OK)
1127 {
1128 _svmf_printf (env, stderr,
1129 "*** Fatal error: Unable to initialize essential class java/lang/NoSuchFieldError.\n");
1130 return JNI_ERR;
1131 }
1132
1133 /* Create, link, and initialize class: java/lang/NoSuchMethodError */
1134 if (_svmm_create_class
1135 (env, vm->class_loading.boot_loader.class_loader_info,
1136 "java/lang/NoSuchMethodError", vm->class_loading.boot_loader.classes.NoSuchMethodError) != JNI_OK)
1137 {
1138 _svmf_printf (env, stderr,
1139 "*** Fatal error: Unable to create essential class java/lang/NoSuchMethodError.\n");
1140 return JNI_ERR;
1141 }
1142
1143 if (_svmf_link_class
1144 (env, vm->class_loading.boot_loader.classes.NoSuchMethodError) != JNI_OK)
1145 {
1146 _svmf_printf (env, stderr,
1147 "*** Fatal error: Unable to link essential class java/lang/NoSuchMethodError.\n");
1148 return JNI_ERR;
1149 }
1150
1151 if (_svmf_special_initialization
1152 (env, vm->class_loading.boot_loader.classes.NoSuchMethodError) != JNI_OK)
1153 {
1154 _svmf_printf (env, stderr,
1155 "*** Fatal error: Unable to initialize essential class java/lang/NoSuchMethodError.\n");
1156 return JNI_ERR;
1157 }
1158
1159 /* Create, link, and initialize class: java/lang/OutOfMemoryError */
1160 if (_svmm_create_class
1161 (env, vm->class_loading.boot_loader.class_loader_info,
1162 "java/lang/OutOfMemoryError", vm->class_loading.boot_loader.classes.OutOfMemoryError) != JNI_OK)
1163 {
1164 _svmf_printf (env, stderr,
1165 "*** Fatal error: Unable to create essential class java/lang/OutOfMemoryError.\n");
1166 return JNI_ERR;
1167 }
1168
1169 if (_svmf_link_class
1170 (env, vm->class_loading.boot_loader.classes.OutOfMemoryError) != JNI_OK)
1171 {
1172 _svmf_printf (env, stderr,
1173 "*** Fatal error: Unable to link essential class java/lang/OutOfMemoryError.\n");
1174 return JNI_ERR;
1175 }
1176
1177 if (_svmf_special_initialization
1178 (env, vm->class_loading.boot_loader.classes.OutOfMemoryError) != JNI_OK)
1179 {
1180 _svmf_printf (env, stderr,
1181 "*** Fatal error: Unable to initialize essential class java/lang/OutOfMemoryError.\n");
1182 return JNI_ERR;
1183 }
1184
1185 /* Create, link, and initialize class: java/lang/UnsatisfiedLinkError */
1186 if (_svmm_create_class
1187 (env, vm->class_loading.boot_loader.class_loader_info,
1188 "java/lang/UnsatisfiedLinkError", vm->class_loading.boot_loader.classes.UnsatisfiedLinkError) != JNI_OK)
1189 {
1190 _svmf_printf (env, stderr,
1191 "*** Fatal error: Unable to create essential class java/lang/UnsatisfiedLinkError.\n");
1192 return JNI_ERR;
1193 }
1194
1195 if (_svmf_link_class
1196 (env, vm->class_loading.boot_loader.classes.UnsatisfiedLinkError) != JNI_OK)
1197 {
1198 _svmf_printf (env, stderr,
1199 "*** Fatal error: Unable to link essential class java/lang/UnsatisfiedLinkError.\n");
1200 return JNI_ERR;
1201 }
1202
1203 if (_svmf_special_initialization
1204 (env, vm->class_loading.boot_loader.classes.UnsatisfiedLinkError) != JNI_OK)
1205 {
1206 _svmf_printf (env, stderr,
1207 "*** Fatal error: Unable to initialize essential class java/lang/UnsatisfiedLinkError.\n");
1208 return JNI_ERR;
1209 }
1210
1211 /* Create, link, and initialize class: java/lang/UnsupportedClassVersionError */
1212 if (_svmm_create_class
1213 (env, vm->class_loading.boot_loader.class_loader_info,
1214 "java/lang/UnsupportedClassVersionError", vm->class_loading.boot_loader.classes.UnsupportedClassVersionError) != JNI_OK)
1215 {
1216 _svmf_printf (env, stderr,
1217 "*** Fatal error: Unable to create essential class java/lang/UnsupportedClassVersionError.\n");
1218 return JNI_ERR;
1219 }
1220
1221 if (_svmf_link_class
1222 (env, vm->class_loading.boot_loader.classes.UnsupportedClassVersionError) != JNI_OK)
1223 {
1224 _svmf_printf (env, stderr,
1225 "*** Fatal error: Unable to link essential class java/lang/UnsupportedClassVersionError.\n");
1226 return JNI_ERR;
1227 }
1228
1229 if (_svmf_special_initialization
1230 (env, vm->class_loading.boot_loader.classes.UnsupportedClassVersionError) != JNI_OK)
1231 {
1232 _svmf_printf (env, stderr,
1233 "*** Fatal error: Unable to initialize essential class java/lang/UnsupportedClassVersionError.\n");
1234 return JNI_ERR;
1235 }
1236
1237 /* Create, link, and initialize class: java/lang/VerifyError */
1238 if (_svmm_create_class
1239 (env, vm->class_loading.boot_loader.class_loader_info,
1240 "java/lang/VerifyError", vm->class_loading.boot_loader.classes.VerifyError) != JNI_OK)
1241 {
1242 _svmf_printf (env, stderr,
1243 "*** Fatal error: Unable to create essential class java/lang/VerifyError.\n");
1244 return JNI_ERR;
1245 }
1246
1247 if (_svmf_link_class
1248 (env, vm->class_loading.boot_loader.classes.VerifyError) != JNI_OK)
1249 {
1250 _svmf_printf (env, stderr,
1251 "*** Fatal error: Unable to link essential class java/lang/VerifyError.\n");
1252 return JNI_ERR;
1253 }
1254
1255 if (_svmf_special_initialization
1256 (env, vm->class_loading.boot_loader.classes.VerifyError) != JNI_OK)
1257 {
1258 _svmf_printf (env, stderr,
1259 "*** Fatal error: Unable to initialize essential class java/lang/VerifyError.\n");
1260 return JNI_ERR;
1261 }
1262
1263 /* find some methods */
1264
1265 /* Find method: jlclass.<init>(C)V */
1266 vm->class_loading.boot_loader.methods.jlclass_init_primitive =
1267 _svmf_resolve_method (vm->class_loading.boot_loader.classes.jlclass,
1268 "<init>", "(C)V");
1269
1270 if (vm->class_loading.boot_loader.methods.jlclass_init_primitive == NULL)
1271 {
1272 _svmf_printf (env, stderr,
1273 "*** Fatal error: Unable to find essential method <init> in jlclass class.\n");
1274 _svmf_error_NoSuchMethodError (env);
1275 return JNI_ERR;
1276 }
1277
1278 /* Find method: jlstacktraceelement.<init>(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Z)V */
1279 vm->class_loading.boot_loader.methods.jlstacktraceelement_init =
1280 _svmf_resolve_method (vm->class_loading.boot_loader.classes.jlstacktraceelement,
1281 "<init>", "(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Z)V");
1282
1283 if (vm->class_loading.boot_loader.methods.jlstacktraceelement_init == NULL)
1284 {
1285 _svmf_printf (env, stderr,
1286 "*** Fatal error: Unable to find essential method <init> in jlstacktraceelement class.\n");
1287 _svmf_error_NoSuchMethodError (env);
1288 return JNI_ERR;
1289 }
1290
1291 /* Find method: jlrinvocationtargetexception.<init>(Ljava/lang/Throwable;)V */
1292 vm->class_loading.boot_loader.methods.jlrinvocationtargetexception_init =
1293 _svmf_resolve_method (vm->class_loading.boot_loader.classes.jlrinvocationtargetexception,
1294 "<init>", "(Ljava/lang/Throwable;)V");
1295
1296 if (vm->class_loading.boot_loader.methods.jlrinvocationtargetexception_init == NULL)
1297 {
1298 _svmf_printf (env, stderr,
1299 "*** Fatal error: Unable to find essential method <init> in jlrinvocationtargetexception class.\n");
1300 _svmf_error_NoSuchMethodError (env);
1301 return JNI_ERR;
1302 }
1303
1304 /* Find method: jlrconstructor.<init>([B)V */
1305 vm->class_loading.boot_loader.methods.jlrconstructor_init =
1306 _svmf_resolve_method (vm->class_loading.boot_loader.classes.jlrconstructor,
1307 "<init>", "([B)V");
1308
1309 if (vm->class_loading.boot_loader.methods.jlrconstructor_init == NULL)
1310 {
1311 _svmf_printf (env, stderr,
1312 "*** Fatal error: Unable to find essential method <init> in jlrconstructor class.\n");
1313 _svmf_error_NoSuchMethodError (env);
1314 return JNI_ERR;
1315 }
1316
1317 /* Find method: jlrfield.<init>([B)V */
1318 vm->class_loading.boot_loader.methods.jlrfield_init =
1319 _svmf_resolve_method (vm->class_loading.boot_loader.classes.jlrfield,
1320 "<init>", "([B)V");
1321
1322 if (vm->class_loading.boot_loader.methods.jlrfield_init == NULL)
1323 {
1324 _svmf_printf (env, stderr,
1325 "*** Fatal error: Unable to find essential method <init> in jlrfield class.\n");
1326 _svmf_error_NoSuchMethodError (env);
1327 return JNI_ERR;
1328 }
1329
1330 /* Find method: jlrmethod.<init>([B)V */
1331 vm->class_loading.boot_loader.methods.jlrmethod_init =
1332 _svmf_resolve_method (vm->class_loading.boot_loader.classes.jlrmethod,
1333 "<init>", "([B)V");
1334
1335 if (vm->class_loading.boot_loader.methods.jlrmethod_init == NULL)
1336 {
1337 _svmf_printf (env, stderr,
1338 "*** Fatal error: Unable to find essential method <init> in jlrmethod class.\n");
1339 _svmf_error_NoSuchMethodError (env);
1340 return JNI_ERR;
1341 }
1342
1343 /* Find method: virtualmachine.createArray(Ljava/lang/ClassLoader;Ljava/lang/String;)Ljava/lang/Class; */
1344 vm->class_loading.boot_loader.methods.virtualmachine_createarray =
1345 _svmf_resolve_method (vm->class_loading.boot_loader.classes.virtualmachine,
1346 "createArray", "(Ljava/lang/ClassLoader;Ljava/lang/String;)Ljava/lang/Class;");
1347
1348 if (vm->class_loading.boot_loader.methods.virtualmachine_createarray == NULL)
1349 {
1350 _svmf_printf (env, stderr,
1351 "*** Fatal error: Unable to find essential method createArray in virtualmachine class.\n");
1352 _svmf_error_NoSuchMethodError (env);
1353 return JNI_ERR;
1354 }
1355
1356 /* Find method: virtualmachine.createClass(Ljava/lang/ClassLoader;Ljava/lang/String;)Ljava/lang/Class; */
1357 vm->class_loading.boot_loader.methods.virtualmachine_createclass =
1358 _svmf_resolve_method (vm->class_loading.boot_loader.classes.virtualmachine,
1359 "createClass", "(Ljava/lang/ClassLoader;Ljava/lang/String;)Ljava/lang/Class;");
1360
1361 if (vm->class_loading.boot_loader.methods.virtualmachine_createclass == NULL)
1362 {
1363 _svmf_printf (env, stderr,
1364 "*** Fatal error: Unable to find essential method createClass in virtualmachine class.\n");
1365 _svmf_error_NoSuchMethodError (env);
1366 return JNI_ERR;
1367 }
1368
1369 /* Find method: stringcreator.createInternedString([B)Ljava/lang/String; */
1370 vm->class_loading.boot_loader.methods.stringcreator_createinternedstring =
1371 _svmf_resolve_method (vm->class_loading.boot_loader.classes.stringcreator,
1372 "createInternedString", "([B)Ljava/lang/String;");
1373
1374 if (vm->class_loading.boot_loader.methods.stringcreator_createinternedstring == NULL)
1375 {
1376 _svmf_printf (env, stderr,
1377 "*** Fatal error: Unable to find essential method createInternedString in stringcreator class.\n");
1378 _svmf_error_NoSuchMethodError (env);
1379 return JNI_ERR;
1380 }
1381
1382 /* Find method: virtualmachine.createRootThread([B)Ljava/lang/Thread; */
1383 vm->class_loading.boot_loader.methods.virtualmachine_createrootthread =
1384 _svmf_resolve_method (vm->class_loading.boot_loader.classes.virtualmachine,
1385 "createRootThread", "([B)Ljava/lang/Thread;");
1386
1387 if (vm->class_loading.boot_loader.methods.virtualmachine_createrootthread == NULL)
1388 {
1389 _svmf_printf (env, stderr,
1390 "*** Fatal error: Unable to find essential method createRootThread in virtualmachine class.\n");
1391 _svmf_error_NoSuchMethodError (env);
1392 return JNI_ERR;
1393 }
1394
1395 /* Find method: stringcreator.createString([B)Ljava/lang/String; */
1396 vm->class_loading.boot_loader.methods.stringcreator_createstring =
1397 _svmf_resolve_method (vm->class_loading.boot_loader.classes.stringcreator,
1398 "createString", "([B)Ljava/lang/String;");
1399
1400 if (vm->class_loading.boot_loader.methods.stringcreator_createstring == NULL)
1401 {
1402 _svmf_printf (env, stderr,
1403 "*** Fatal error: Unable to find essential method createString in stringcreator class.\n");
1404 _svmf_error_NoSuchMethodError (env);
1405 return JNI_ERR;
1406 }
1407
1408 /* Find method: stringcreator.createStringFromChars([C)Ljava/lang/String; */
1409 vm->class_loading.boot_loader.methods.stringcreator_createstringfromchars =
1410 _svmf_resolve_method (vm->class_loading.boot_loader.classes.stringcreator,
1411 "createStringFromChars", "([C)Ljava/lang/String;");
1412
1413 if (vm->class_loading.boot_loader.methods.stringcreator_createstringfromchars == NULL)
1414 {
1415 _svmf_printf (env, stderr,
1416 "*** Fatal error: Unable to find essential method createStringFromChars in stringcreator class.\n");
1417 _svmf_error_NoSuchMethodError (env);
1418 return JNI_ERR;
1419 }
1420
1421 /* Find method: virtualmachine.exceptionDescribe(Ljava/lang/Throwable;)V */
1422 vm->class_loading.boot_loader.methods.virtualmachine_exceptiondescribe =
1423 _svmf_resolve_method (vm->class_loading.boot_loader.classes.virtualmachine,
1424 "exceptionDescribe", "(Ljava/lang/Throwable;)V");
1425
1426 if (vm->class_loading.boot_loader.methods.virtualmachine_exceptiondescribe == NULL)
1427 {
1428 _svmf_printf (env, stderr,
1429 "*** Fatal error: Unable to find essential method exceptionDescribe in virtualmachine class.\n");
1430 _svmf_error_NoSuchMethodError (env);
1431 return JNI_ERR;
1432 }
1433
1434 /* Find method: virtualmachine.exceptionDescription(Ljava/lang/Throwable;)Ljava/lang/String; */
1435 vm->class_loading.boot_loader.methods.virtualmachine_exceptiondescription =
1436 _svmf_resolve_method (vm->class_loading.boot_loader.classes.virtualmachine,
1437 "exceptionDescription", "(Ljava/lang/Throwable;)Ljava/lang/String;");
1438
1439 if (vm->class_loading.boot_loader.methods.virtualmachine_exceptiondescription == NULL)
1440 {
1441 _svmf_printf (env, stderr,
1442 "*** Fatal error: Unable to find essential method exceptionDescription in virtualmachine class.\n");
1443 _svmf_error_NoSuchMethodError (env);
1444 return JNI_ERR;
1445 }
1446
1447 /* Find method: virtualmachine.exceptionTruncatedDescription(Ljava/lang/Throwable;)Ljava/lang/String; */
1448 vm->class_loading.boot_loader.methods.virtualmachine_exceptiontruncateddescription =
1449 _svmf_resolve_method (vm->class_loading.boot_loader.classes.virtualmachine,
1450 "exceptionTruncatedDescription", "(Ljava/lang/Throwable;)Ljava/lang/String;");
1451
1452 if (vm->class_loading.boot_loader.methods.virtualmachine_exceptiontruncateddescription == NULL)
1453 {
1454 _svmf_printf (env, stderr,
1455 "*** Fatal error: Unable to find essential method exceptionTruncatedDescription in virtualmachine class.\n");
1456 _svmf_error_NoSuchMethodError (env);
1457 return JNI_ERR;
1458 }
1459
1460 /* Find method: stringcreator.getChars(Ljava/lang/String;)[C */
1461 vm->class_loading.boot_loader.methods.stringcreator_getchars =
1462 _svmf_resolve_method (vm->class_loading.boot_loader.classes.stringcreator,
1463 "getChars", "(Ljava/lang/String;)[C");
1464
1465 if (vm->class_loading.boot_loader.methods.stringcreator_getchars == NULL)
1466 {
1467 _svmf_printf (env, stderr,
1468 "*** Fatal error: Unable to find essential method getChars in stringcreator class.\n");
1469 _svmf_error_NoSuchMethodError (env);
1470 return JNI_ERR;
1471 }
1472
1473 /* Find method: stringcreator.getLength(Ljava/lang/String;)I */
1474 vm->class_loading.boot_loader.methods.stringcreator_getlength =
1475 _svmf_resolve_method (vm->class_loading.boot_loader.classes.stringcreator,
1476 "getLength", "(Ljava/lang/String;)I");
1477
1478 if (vm->class_loading.boot_loader.methods.stringcreator_getlength == NULL)
1479 {
1480 _svmf_printf (env, stderr,
1481 "*** Fatal error: Unable to find essential method getLength in stringcreator class.\n");
1482 _svmf_error_NoSuchMethodError (env);
1483 return JNI_ERR;
1484 }
1485
1486 /* Find method: virtualmachine.getSystemClassLoader()[B */
1487 vm->class_loading.boot_loader.methods.virtualmachine_getsystemcl =
1488 _svmf_resolve_method (vm->class_loading.boot_loader.classes.virtualmachine,
1489 "getSystemClassLoader", "()[B");
1490
1491 if (vm->class_loading.boot_loader.methods.virtualmachine_getsystemcl == NULL)
1492 {
1493 _svmf_printf (env, stderr,
1494 "*** Fatal error: Unable to find essential method getSystemClassLoader in virtualmachine class.\n");
1495 _svmf_error_NoSuchMethodError (env);
1496 return JNI_ERR;
1497 }
1498
1499 /* Find method: stringcreator.getUTFChars(Ljava/lang/String;)[B */
1500 vm->class_loading.boot_loader.methods.stringcreator_getutfchars =
1501 _svmf_resolve_method (vm->class_loading.boot_loader.classes.stringcreator,
1502 "getUTFChars", "(Ljava/lang/String;)[B");
1503
1504 if (vm->class_loading.boot_loader.methods.stringcreator_getutfchars == NULL)
1505 {
1506 _svmf_printf (env, stderr,
1507 "*** Fatal error: Unable to find essential method getUTFChars in stringcreator class.\n");
1508 _svmf_error_NoSuchMethodError (env);
1509 return JNI_ERR;
1510 }
1511
1512 /* Find method: stringcreator.getUTFLength(Ljava/lang/String;)I */
1513 vm->class_loading.boot_loader.methods.stringcreator_getutflength =
1514 _svmf_resolve_method (vm->class_loading.boot_loader.classes.stringcreator,
1515 "getUTFLength", "(Ljava/lang/String;)I");
1516
1517 if (vm->class_loading.boot_loader.methods.stringcreator_getutflength == NULL)
1518 {
1519 _svmf_printf (env, stderr,
1520 "*** Fatal error: Unable to find essential method getUTFLength in stringcreator class.\n");
1521 _svmf_error_NoSuchMethodError (env);
1522 return JNI_ERR;
1523 }
1524
1525 /* Find method: jlclass.initialize(I)V */
1526 vm->class_loading.boot_loader.methods.jlclass_initialize =
1527 _svmf_resolve_method (vm->class_loading.boot_loader.classes.jlclass,
1528 "initialize", "(I)V");
1529
1530 if (vm->class_loading.boot_loader.methods.jlclass_initialize == NULL)
1531 {
1532 _svmf_printf (env, stderr,
1533 "*** Fatal error: Unable to find essential method initialize in jlclass class.\n");
1534 _svmf_error_NoSuchMethodError (env);
1535 return JNI_ERR;
1536 }
1537
1538 /* Find method: virtualmachine.runThread()V */
1539 vm->class_loading.boot_loader.methods.virtualmachine_runthread =
1540 _svmf_resolve_method (vm->class_loading.boot_loader.classes.virtualmachine,
1541 "runThread", "()V");
1542
1543 if (vm->class_loading.boot_loader.methods.virtualmachine_runthread == NULL)
1544 {
1545 _svmf_printf (env, stderr,
1546 "*** Fatal error: Unable to find essential method runThread in virtualmachine class.\n");
1547 _svmf_error_NoSuchMethodError (env);
1548 return JNI_ERR;
1549 }
1550
1551 /* Find method: niobytebuffervm.vmGetDirectBufferCapacity(Ljava/nio/ByteBuffer;)J */
1552 vm->class_loading.boot_loader.methods.niobytebuffervm_getcapacity =
1553 _svmf_resolve_method (vm->class_loading.boot_loader.classes.niobytebuffervm,
1554 "vmGetDirectBufferCapacity", "(Ljava/nio/ByteBuffer;)J");
1555
1556 if (vm->class_loading.boot_loader.methods.niobytebuffervm_getcapacity == NULL)
1557 {
1558 _svmf_printf (env, stderr,
1559 "*** Fatal error: Unable to find essential method vmGetDirectBufferCapacity in niobytebuffervm class.\n");
1560 _svmf_error_NoSuchMethodError (env);
1561 return JNI_ERR;
1562 }
1563
1564 #if SVM_WORD_BIT_COUNT == 32
1565
1566 /* Find method: niobytebuffervm.vmGetDirectBufferAddress32(Ljava/nio/ByteBuffer;)I */
1567 vm->class_loading.boot_loader.methods.niobytebuffervm_getaddress32 =
1568 _svmf_resolve_method (vm->class_loading.boot_loader.classes.niobytebuffervm,
1569 "vmGetDirectBufferAddress32", "(Ljava/nio/ByteBuffer;)I");
1570
1571 if (vm->class_loading.boot_loader.methods.niobytebuffervm_getaddress32 == NULL)
1572 {
1573 _svmf_printf (env, stderr,
1574 "*** Fatal error: Unable to find essential method vmGetDirectBufferAddress32 in niobytebuffervm class.\n");
1575 _svmf_error_NoSuchMethodError (env);
1576 return JNI_ERR;
1577 }
1578
1579 /* Find method: niobytebuffervm.vmNewDirectByteBuffer32(IJ)Ljava/nio/ByteBuffer; */
1580 vm->class_loading.boot_loader.methods.niobytebuffervm_newbuffer32 =
1581 _svmf_resolve_method (vm->class_loading.boot_loader.classes.niobytebuffervm,
1582 "vmNewDirectByteBuffer32", "(IJ)Ljava/nio/ByteBuffer;");
1583
1584 if (vm->class_loading.boot_loader.methods.niobytebuffervm_newbuffer32 == NULL)
1585 {
1586 _svmf_printf (env, stderr,
1587 "*** Fatal error: Unable to find essential method vmNewDirectByteBuffer32 in niobytebuffervm class.\n");
1588 _svmf_error_NoSuchMethodError (env);
1589 return JNI_ERR;
1590 }
1591
1592 #elif SVM_WORD_BIT_COUNT == 64
1593
1594 /* Find method: niobytebuffervm.vmGetDirectBufferAddress64(Ljava/nio/ByteBuffer;)J */
1595 vm->class_loading.boot_loader.methods.niobytebuffervm_getaddress64 =
1596 _svmf_resolve_method (vm->class_loading.boot_loader.classes.niobytebuffervm,
1597 "vmGetDirectBufferAddress64", "(Ljava/nio/ByteBuffer;)J");
1598
1599 if (vm->class_loading.boot_loader.methods.niobytebuffervm_getaddress64 == NULL)
1600 {
1601 _svmf_printf (env, stderr,
1602 "*** Fatal error: Unable to find essential method vmGetDirectBufferAddress64 in niobytebuffervm class.\n");
1603 _svmf_error_NoSuchMethodError (env);
1604 return JNI_ERR;
1605 }
1606
1607 /* Find method: niobytebuffervm.vmNewDirectByteBuffer64(JJ)Ljava/nio/ByteBuffer; */
1608 vm->class_loading.boot_loader.methods.niobytebuffervm_newbuffer64 =
1609 _svmf_resolve_method (vm->class_loading.boot_loader.classes.niobytebuffervm,
1610 "vmNewDirectByteBuffer64", "(JJ)Ljava/nio/ByteBuffer;");
1611
1612 if (vm->class_loading.boot_loader.methods.niobytebuffervm_newbuffer64 == NULL)
1613 {
1614 _svmf_printf (env, stderr,
1615 "*** Fatal error: Unable to find essential method vmNewDirectByteBuffer64 in niobytebuffervm class.\n");
1616 _svmf_error_NoSuchMethodError (env);
1617 return JNI_ERR;
1618 }
1619
1620 #endif
1621
1622 /* Find method: ArithmeticException.<init>(Ljava/lang/String;)V */
1623 vm->class_loading.boot_loader.methods.ArithmeticException_init =
1624 _svmf_resolve_method (vm->class_loading.boot_loader.classes.ArithmeticException,
1625 "<init>", "(Ljava/lang/String;)V");
1626
1627 if (vm->class_loading.boot_loader.methods.ArithmeticException_init == NULL)
1628 {
1629 _svmf_printf (env, stderr,
1630 "*** Fatal error: Unable to find essential method <init> in ArithmeticException class.\n");
1631 _svmf_error_NoSuchMethodError (env);
1632 return JNI_ERR;
1633 }
1634
1635 /* Find method: ArrayIndexOutOfBoundsException.<init>(Ljava/lang/String;)V */
1636 vm->class_loading.boot_loader.methods.ArrayIndexOutOfBoundsException_init =
1637 _svmf_resolve_method (vm->class_loading.boot_loader.classes.ArrayIndexOutOfBoundsException,
1638 "<init>", "(Ljava/lang/String;)V");
1639
1640 if (vm->class_loading.boot_loader.methods.ArrayIndexOutOfBoundsException_init == NULL)
1641 {
1642 _svmf_printf (env, stderr,
1643 "*** Fatal error: Unable to find essential method <init> in ArrayIndexOutOfBoundsException class.\n");
1644 _svmf_error_NoSuchMethodError (env);
1645 return JNI_ERR;
1646 }
1647
1648 /* Find method: ArrayStoreException.<init>(Ljava/lang/String;)V */
1649 vm->class_loading.boot_loader.methods.ArrayStoreException_init =
1650 _svmf_resolve_method (vm->class_loading.boot_loader.classes.ArrayStoreException,
1651 "<init>", "(Ljava/lang/String;)V");
1652
1653 if (vm->class_loading.boot_loader.methods.ArrayStoreException_init == NULL)
1654 {
1655 _svmf_printf (env, stderr,
1656 "*** Fatal error: Unable to find essential method <init> in ArrayStoreException class.\n");
1657 _svmf_error_NoSuchMethodError (env);
1658 return JNI_ERR;
1659 }
1660
1661 /* Find method: ClassCastException.<init>(Ljava/lang/String;)V */
1662 vm->class_loading.boot_loader.methods.ClassCastException_init =
1663 _svmf_resolve_method (vm->class_loading.boot_loader.classes.ClassCastException,
1664 "<init>", "(Ljava/lang/String;)V");
1665
1666 if (vm->class_loading.boot_loader.methods.ClassCastException_init == NULL)
1667 {
1668 _svmf_printf (env, stderr,
1669 "*** Fatal error: Unable to find essential method <init> in ClassCastException class.\n");
1670 _svmf_error_NoSuchMethodError (env);
1671 return JNI_ERR;
1672 }
1673
1674 /* Find method: IllegalMonitorStateException.<init>(Ljava/lang/String;)V */
1675 vm->class_loading.boot_loader.methods.IllegalMonitorStateException_init =
1676 _svmf_resolve_method (vm->class_loading.boot_loader.classes.IllegalMonitorStateException,
1677 "<init>", "(Ljava/lang/String;)V");
1678
1679 if (vm->class_loading.boot_loader.methods.IllegalMonitorStateException_init == NULL)
1680 {
1681 _svmf_printf (env, stderr,
1682 "*** Fatal error: Unable to find essential method <init> in IllegalMonitorStateException class.\n");
1683 _svmf_error_NoSuchMethodError (env);
1684 return JNI_ERR;
1685 }
1686
1687 /* Find method: NegativeArraySizeException.<init>(Ljava/lang/String;)V */
1688 vm->class_loading.boot_loader.methods.NegativeArraySizeException_init =
1689 _svmf_resolve_method (vm->class_loading.boot_loader.classes.NegativeArraySizeException,
1690 "<init>", "(Ljava/lang/String;)V");
1691
1692 if (vm->class_loading.boot_loader.methods.NegativeArraySizeException_init == NULL)
1693 {
1694 _svmf_printf (env, stderr,
1695 "*** Fatal error: Unable to find essential method <init> in NegativeArraySizeException class.\n");
1696 _svmf_error_NoSuchMethodError (env);
1697 return JNI_ERR;
1698 }
1699
1700 /* Find method: NoSuchFieldException.<init>(Ljava/lang/String;)V */
1701 vm->class_loading.boot_loader.methods.NoSuchFieldException_init =
1702 _svmf_resolve_method (vm->class_loading.boot_loader.classes.NoSuchFieldException,
1703 "<init>", "(Ljava/lang/String;)V");
1704
1705 if (vm->class_loading.boot_loader.methods.NoSuchFieldException_init == NULL)
1706 {
1707 _svmf_printf (env, stderr,
1708 "*** Fatal error: Unable to find essential method <init> in NoSuchFieldException class.\n");
1709 _svmf_error_NoSuchMethodError (env);
1710 return JNI_ERR;
1711 }
1712
1713 /* Find method: NoSuchMethodException.<init>(Ljava/lang/String;)V */
1714 vm->class_loading.boot_loader.methods.NoSuchMethodException_init =
1715 _svmf_resolve_method (vm->class_loading.boot_loader.classes.NoSuchMethodException,
1716 "<init>", "(Ljava/lang/String;)V");
1717
1718 if (vm->class_loading.boot_loader.methods.NoSuchMethodException_init == NULL)
1719 {
1720 _svmf_printf (env, stderr,
1721 "*** Fatal error: Unable to find essential method <init> in NoSuchMethodException class.\n");
1722 _svmf_error_NoSuchMethodError (env);
1723 return JNI_ERR;
1724 }
1725
1726 /* Find method: NullPointerException.<init>(Ljava/lang/String;)V */
1727 vm->class_loading.boot_loader.methods.NullPointerException_init =
1728 _svmf_resolve_method (vm->class_loading.boot_loader.classes.NullPointerException,
1729 "<init>", "(Ljava/lang/String;)V");
1730
1731 if (vm->class_loading.boot_loader.methods.NullPointerException_init == NULL)
1732 {
1733 _svmf_printf (env, stderr,
1734 "*** Fatal error: Unable to find essential method <init> in NullPointerException class.\n");
1735 _svmf_error_NoSuchMethodError (env);
1736 return JNI_ERR;
1737 }
1738
1739 /* Find method: InterruptedException.<init>(Ljava/lang/String;)V */
1740 vm->class_loading.boot_loader.methods.InterruptedException_init =
1741 _svmf_resolve_method (vm->class_loading.boot_loader.classes.InterruptedException,
1742 "<init>", "(Ljava/lang/String;)V");
1743
1744 if (vm->class_loading.boot_loader.methods.InterruptedException_init == NULL)
1745 {
1746 _svmf_printf (env, stderr,
1747 "*** Fatal error: Unable to find essential method <init> in InterruptedException class.\n");
1748 _svmf_error_NoSuchMethodError (env);
1749 return JNI_ERR;
1750 }
1751
1752 #if defined(_SABLEVM_INLINABILITY_TESTING)
1753
1754 /* Find method: InliningException.<init>(Ljava/lang/String;)V */
1755 vm->class_loading.boot_loader.methods.InliningException_init =
1756 _svmf_resolve_method (vm->class_loading.boot_loader.classes.InliningException,
1757 "<init>", "(Ljava/lang/String;)V");
1758
1759 if (vm->class_loading.boot_loader.methods.InliningException_init == NULL)
1760 {
1761 _svmf_printf (env, stderr,
1762 "*** Fatal error: Unable to find essential method <init> in InliningException class.\n");
1763 _svmf_error_NoSuchMethodError (env);
1764 return JNI_ERR;
1765 }
1766
1767 #endif
1768
1769 /* Find method: AbstractMethodError.<init>(Ljava/lang/String;)V */
1770 vm->class_loading.boot_loader.methods.AbstractMethodError_init =
1771 _svmf_resolve_method (vm->class_loading.boot_loader.classes.AbstractMethodError,
1772 "<init>", "(Ljava/lang/String;)V");
1773
1774 if (vm->class_loading.boot_loader.methods.AbstractMethodError_init == NULL)
1775 {
1776 _svmf_printf (env, stderr,
1777 "*** Fatal error: Unable to find essential method <init> in AbstractMethodError class.\n");
1778 _svmf_error_NoSuchMethodError (env);
1779 return JNI_ERR;
1780 }
1781
1782 /* Find method: ClassCircularityError.<init>(Ljava/lang/String;)V */
1783 vm->class_loading.boot_loader.methods.ClassCircularityError_init =
1784 _svmf_resolve_method (vm->class_loading.boot_loader.classes.ClassCircularityError,
1785 "<init>", "(Ljava/lang/String;)V");
1786
1787 if (vm->class_loading.boot_loader.methods.ClassCircularityError_init == NULL)
1788 {
1789 _svmf_printf (env, stderr,
1790 "*** Fatal error: Unable to find essential method <init> in ClassCircularityError class.\n");
1791 _svmf_error_NoSuchMethodError (env);
1792 return JNI_ERR;
1793 }
1794
1795 /* Find method: ClassFormatError.<init>(Ljava/lang/String;)V */
1796 vm->class_loading.boot_loader.methods.ClassFormatError_init =
1797 _svmf_resolve_method (vm->class_loading.boot_loader.classes.ClassFormatError,
1798 "<init>", "(Ljava/lang/String;)V");
1799
1800 if (vm->class_loading.boot_loader.methods.ClassFormatError_init == NULL)
1801 {
1802 _svmf_printf (env, stderr,
1803 "*** Fatal error: Unable to find essential method <init> in ClassFormatError class.\n");
1804 _svmf_error_NoSuchMethodError (env);
1805 return JNI_ERR;
1806 }
1807
1808 /* Find method: ExceptionInInitializerError.<init>(Ljava/lang/String;)V */
1809 vm->class_loading.boot_loader.methods.ExceptionInInitializerError_init =
1810 _svmf_resolve_method (vm->class_loading.boot_loader.classes.ExceptionInInitializerError,
1811 "<init>", "(Ljava/lang/String;)V");
1812
1813 if (vm->class_loading.boot_loader.methods.ExceptionInInitializerError_init == NULL)
1814 {
1815 _svmf_printf (env, stderr,
1816 "*** Fatal error: Unable to find essential method <init> in ExceptionInInitializerError class.\n");
1817 _svmf_error_NoSuchMethodError (env);
1818 return JNI_ERR;
1819 }
1820
1821 /* Find method: IncompatibleClassChangeError.<init>(Ljava/lang/String;)V */
1822 vm->class_loading.boot_loader.methods.IncompatibleClassChangeError_init =
1823 _svmf_resolve_method (vm->class_loading.boot_loader.classes.IncompatibleClassChangeError,
1824 "<init>", "(Ljava/lang/String;)V");
1825
1826 if (vm->class_loading.boot_loader.methods.IncompatibleClassChangeError_init == NULL)
1827 {
1828 _svmf_printf (env, stderr,
1829 "*** Fatal error: Unable to find essential method <init> in IncompatibleClassChangeError class.\n");
1830 _svmf_error_NoSuchMethodError (env);
1831 return JNI_ERR;
1832 }
1833
1834 /* Find method: InternalError.<init>(Ljava/lang/String;)V */
1835 vm->class_loading.boot_loader.methods.InternalError_init =
1836 _svmf_resolve_method (vm->class_loading.boot_loader.classes.InternalError,
1837 "<init>", "(Ljava/lang/String;)V");
1838
1839 if (vm->class_loading.boot_loader.methods.InternalError_init == NULL)
1840 {
1841 _svmf_printf (env, stderr,
1842 "*** Fatal error: Unable to find essential method <init> in InternalError class.\n");
1843 _svmf_error_NoSuchMethodError (env);
1844 return JNI_ERR;
1845 }
1846
1847 /* Find method: LinkageError.<init>(Ljava/lang/String;)V */
1848 vm->class_loading.boot_loader.methods.LinkageError_init =
1849 _svmf_resolve_method (vm->class_loading.boot_loader.classes.LinkageError,
1850 "<init>", "(Ljava/lang/String;)V");
1851
1852 if (vm->class_loading.boot_loader.methods.LinkageError_init == NULL)
1853 {
1854 _svmf_printf (env, stderr,
1855 "*** Fatal error: Unable to find essential method <init> in LinkageError class.\n");
1856 _svmf_error_NoSuchMethodError (env);
1857 return JNI_ERR;
1858 }
1859
1860 /* Find method: NoClassDefFoundError.<init>(Ljava/lang/String;)V */
1861 vm->class_loading.boot_loader.methods.NoClassDefFoundError_init =
1862 _svmf_resolve_method (vm->class_loading.boot_loader.classes.NoClassDefFoundError,
1863 "<init>", "(Ljava/lang/String;)V");
1864
1865 if (vm->class_loading.boot_loader.methods.NoClassDefFoundError_init == NULL)
1866 {
1867 _svmf_printf (env, stderr,
1868 "*** Fatal error: Unable to find essential method <init> in NoClassDefFoundError class.\n");
1869 _svmf_error_NoSuchMethodError (env);
1870 return JNI_ERR;
1871 }
1872
1873 /* Find method: NoSuchFieldError.<init>(Ljava/lang/String;)V */
1874 vm->class_loading.boot_loader.methods.NoSuchFieldError_init =
1875 _svmf_resolve_method (vm->class_loading.boot_loader.classes.NoSuchFieldError,
1876 "<init>", "(Ljava/lang/String;)V");
1877
1878 if (vm->class_loading.boot_loader.methods.NoSuchFieldError_init == NULL)
1879 {
1880 _svmf_printf (env, stderr,
1881 "*** Fatal error: Unable to find essential method <init> in NoSuchFieldError class.\n");
1882 _svmf_error_NoSuchMethodError (env);
1883 return JNI_ERR;
1884 }
1885
1886 /* Find method: NoSuchMethodError.<init>(Ljava/lang/String;)V */
1887 vm->class_loading.boot_loader.methods.NoSuchMethodError_init =
1888 _svmf_resolve_method (vm->class_loading.boot_loader.classes.NoSuchMethodError,
1889 "<init>", "(Ljava/lang/String;)V");
1890
1891 if (vm->class_loading.boot_loader.methods.NoSuchMethodError_init == NULL)
1892 {
1893 _svmf_printf (env, stderr,
1894 "*** Fatal error: Unable to find essential method <init> in NoSuchMethodError class.\n");
1895 _svmf_error_NoSuchMethodError (env);
1896 return JNI_ERR;
1897 }
1898
1899 /* Find method: OutOfMemoryError.<init>(Ljava/lang/String;)V */
1900 vm->class_loading.boot_loader.methods.OutOfMemoryError_init =
1901 _svmf_resolve_method (vm->class_loading.boot_loader.classes.OutOfMemoryError,
1902 "<init>", "(Ljava/lang/String;)V");
1903
1904 if (vm->class_loading.boot_loader.methods.OutOfMemoryError_init == NULL)
1905 {
1906 _svmf_printf (env, stderr,
1907 "*** Fatal error: Unable to find essential method <init> in OutOfMemoryError class.\n");
1908 _svmf_error_NoSuchMethodError (env);
1909 return JNI_ERR;
1910 }
1911
1912 /* Find method: UnsatisfiedLinkError.<init>(Ljava/lang/String;)V */
1913 vm->class_loading.boot_loader.methods.UnsatisfiedLinkError_init =
1914 _svmf_resolve_method (vm->class_loading.boot_loader.classes.UnsatisfiedLinkError,
1915 "<init>", "(Ljava/lang/String;)V");
1916
1917 if (vm->class_loading.boot_loader.methods.UnsatisfiedLinkError_init == NULL)
1918 {
1919 _svmf_printf (env, stderr,
1920 "*** Fatal error: Unable to find essential method <init> in UnsatisfiedLinkError class.\n");
1921 _svmf_error_NoSuchMethodError (env);
1922 return JNI_ERR;
1923 }
1924
1925 /* Find method: UnsupportedClassVersionError.<init>(Ljava/lang/String;)V */
1926 vm->class_loading.boot_loader.methods.UnsupportedClassVersionError_init =
1927 _svmf_resolve_method (vm->class_loading.boot_loader.classes.UnsupportedClassVersionError,
1928 "<init>", "(Ljava/lang/String;)V");
1929
1930 if (vm->class_loading.boot_loader.methods.UnsupportedClassVersionError_init == NULL)
1931 {
1932 _svmf_printf (env, stderr,
1933 "*** Fatal error: Unable to find essential method <init> in UnsupportedClassVersionError class.\n");
1934 _svmf_error_NoSuchMethodError (env);
1935 return JNI_ERR;
1936 }
1937
1938 /* Find method: VerifyError.<init>(Ljava/lang/String;)V */
1939 vm->class_loading.boot_loader.methods.VerifyError_init =
1940 _svmf_resolve_method (vm->class_loading.boot_loader.classes.VerifyError,
1941 "<init>", "(Ljava/lang/String;)V");
1942
1943 if (vm->class_loading.boot_loader.methods.VerifyError_init == NULL)
1944 {
1945 _svmf_printf (env, stderr,
1946 "*** Fatal error: Unable to find essential method <init> in VerifyError class.\n");
1947 _svmf_error_NoSuchMethodError (env);
1948 return JNI_ERR;
1949 }
1950
1951 /* find some fields */
1952
1953 /* Find field: jlclass.(Ljava/lang/Object;)vmdata */
1954 vm->class_loading.boot_loader.fields.jlclass_vmdata =
1955 _svmf_resolve_field (vm->class_loading.boot_loader.classes.jlclass,
1956 "vmdata", "Ljava/lang/Object;");
1957
1958 if (vm->class_loading.boot_loader.fields.jlclass_vmdata == NULL)
1959 {
1960 _svmf_printf (env, stderr,
1961 "*** Fatal error: Unable to find essential field vmdata in jlclass class.\n");
1962 _svmf_error_NoSuchFieldError (env);
1963 return JNI_ERR;
1964 }
1965
1966 /* Find field: jlrfield.([B)vmData */
1967 vm->class_loading.boot_loader.fields.jlrfield_vmdata =
1968 _svmf_resolve_field (vm->class_loading.boot_loader.classes.jlrfield,
1969 "vmData", "[B");
1970
1971 if (vm->class_loading.boot_loader.fields.jlrfield_vmdata == NULL)
1972 {
1973 _svmf_printf (env, stderr,
1974 "*** Fatal error: Unable to find essential field vmData in jlrfield class.\n");
1975 _svmf_error_NoSuchFieldError (env);
1976 return JNI_ERR;
1977 }
1978
1979 /* Find field: jlrmethod.([B)vmData */
1980 vm->class_loading.boot_loader.fields.jlrmethod_vmdata =
1981 _svmf_resolve_field (vm->class_loading.boot_loader.classes.jlrmethod,
1982 "vmData", "[B");
1983
1984 if (vm->class_loading.boot_loader.fields.jlrmethod_vmdata == NULL)
1985 {
1986 _svmf_printf (env, stderr,
1987 "*** Fatal error: Unable to find essential field vmData in jlrmethod class.\n");
1988 _svmf_error_NoSuchFieldError (env);
1989 return JNI_ERR;
1990 }
1991
1992 /* Find field: jlrconstructor.([B)vmData */
1993 vm->class_loading.boot_loader.fields.jlrconstructor_vmdata =
1994 _svmf_resolve_field (vm->class_loading.boot_loader.classes.jlrconstructor,
1995 "vmData", "[B");
1996
1997 if (vm->class_loading.boot_loader.fields.jlrconstructor_vmdata == NULL)
1998 {
1999 _svmf_printf (env, stderr,
2000 "*** Fatal error: Unable to find essential field vmData in jlrconstructor class.\n");
2001 _svmf_error_NoSuchFieldError (env);
2002 return JNI_ERR;
2003 }
2004
2005 /* Find field: jlstacktraceelement.(Ljava/lang/StackTraceElement;)next */
2006 vm->class_loading.boot_loader.fields.jlstacktraceelement_next =
2007 _svmf_resolve_field (vm->class_loading.boot_loader.classes.jlstacktraceelement,
2008 "next", "Ljava/lang/StackTraceElement;");
2009
2010 if (vm->class_loading.boot_loader.fields.jlstacktraceelement_next == NULL)
2011 {
2012 _svmf_printf (env, stderr,
2013 "*** Fatal error: Unable to find essential field next in jlstacktraceelement class.\n");
2014 _svmf_error_NoSuchFieldError (env);
2015 return JNI_ERR;
2016 }
2017
2018 /* Find field: jlstacktraceelement.(I)length */
2019 vm->class_loading.boot_loader.fields.jlstacktraceelement_length =
2020 _svmf_resolve_field (vm->class_loading.boot_loader.classes.jlstacktraceelement,
2021 "length", "I");
2022
2023 if (vm->class_loading.boot_loader.fields.jlstacktraceelement_length == NULL)
2024 {
2025 _svmf_printf (env, stderr,
2026 "*** Fatal error: Unable to find essential field length in jlstacktraceelement class.\n");
2027 _svmf_error_NoSuchFieldError (env);
2028 return JNI_ERR;
2029 }
2030
2031 /* create default error and exception instances */
2032
2033 /* instantiate and init the boolean class instance */
2034 {
2035 jobject obj;
2036
2037 if (_svmm_new_native_global (env, obj) != JNI_OK)
2038 {
2039 return JNI_ERR;
2040 }
2041
2042 if (_svmm_new_object_instance
2043 (env, vm->class_loading.boot_loader.classes.jlclass, *obj) != JNI_OK)
2044 {
2045 _svmm_free_native_global (env, obj);
2046 return JNI_ERR;
2047 }
2048
2049 if (_svmm_invoke_nonvirtual_jlclass_init_primitive (env, obj, 'Z') !=
2050 JNI_OK)
2051 {
2052 _svmm_free_native_global (env, obj);
2053 return JNI_ERR;
2054 }
2055
2056 vm->class_loading.boot_loader.instances.boolean_type = obj;
2057 }
2058
2059 /* instantiate and init the byte class instance */
2060 {
2061 jobject obj;
2062
2063 if (_svmm_new_native_global (env, obj) != JNI_OK)
2064 {
2065 return JNI_ERR;
2066 }
2067
2068 if (_svmm_new_object_instance
2069 (env, vm->class_loading.boot_loader.classes.jlclass, *obj) != JNI_OK)
2070 {
2071 _svmm_free_native_global (env, obj);
2072 return JNI_ERR;
2073 }
2074
2075 if (_svmm_invoke_nonvirtual_jlclass_init_primitive (env, obj, 'B') !=
2076 JNI_OK)
2077 {
2078 _svmm_free_native_global (env, obj);
2079 return JNI_ERR;
2080 }
2081
2082 vm->class_loading.boot_loader.instances.byte_type = obj;
2083 }
2084
2085 /* instantiate and init the short class instance */
2086 {
2087 jobject obj;
2088
2089 if (_svmm_new_native_global (env, obj) != JNI_OK)
2090 {
2091 return JNI_ERR;
2092 }
2093
2094 if (_svmm_new_object_instance
2095 (env, vm->class_loading.boot_loader.classes.jlclass, *obj) != JNI_OK)
2096 {
2097 _svmm_free_native_global (env, obj);
2098 return JNI_ERR;
2099 }
2100
2101 if (_svmm_invoke_nonvirtual_jlclass_init_primitive (env, obj, 'S') !=
2102 JNI_OK)
2103 {
2104 _svmm_free_native_global (env, obj);
2105 return JNI_ERR;
2106 }
2107
2108 vm->class_loading.boot_loader.instances.short_type = obj;
2109 }
2110
2111 /* instantiate and init the char class instance */
2112 {
2113 jobject obj;
2114
2115 if (_svmm_new_native_global (env, obj) != JNI_OK)
2116 {
2117 return JNI_ERR;
2118 }
2119
2120 if (_svmm_new_object_instance
2121 (env, vm->class_loading.boot_loader.classes.jlclass, *obj) != JNI_OK)
2122 {
2123 _svmm_free_native_global (env, obj);
2124 return JNI_ERR;
2125 }
2126
2127 if (_svmm_invoke_nonvirtual_jlclass_init_primitive (env, obj, 'C') !=
2128 JNI_OK)
2129 {
2130 _svmm_free_native_global (env, obj);
2131 return JNI_ERR;
2132 }
2133
2134 vm->class_loading.boot_loader.instances.char_type = obj;
2135 }
2136
2137 /* instantiate and init the int class instance */
2138 {
2139 jobject obj;
2140
2141 if (_svmm_new_native_global (env, obj) != JNI_OK)
2142 {
2143 return JNI_ERR;
2144 }
2145
2146 if (_svmm_new_object_instance
2147 (env, vm->class_loading.boot_loader.classes.jlclass, *obj) != JNI_OK)
2148 {
2149 _svmm_free_native_global (env, obj);
2150 return JNI_ERR;
2151 }
2152
2153 if (_svmm_invoke_nonvirtual_jlclass_init_primitive (env, obj, 'I') !=
2154 JNI_OK)
2155 {
2156 _svmm_free_native_global (env, obj);
2157 return JNI_ERR;
2158 }
2159
2160 vm->class_loading.boot_loader.instances.int_type = obj;
2161 }
2162
2163 /* instantiate and init the long class instance */
2164 {
2165 jobject obj;
2166
2167 if (_svmm_new_native_global (env, obj) != JNI_OK)
2168 {
2169 return JNI_ERR;
2170 }
2171
2172 if (_svmm_new_object_instance
2173 (env, vm->class_loading.boot_loader.classes.jlclass, *obj) != JNI_OK)
2174 {
2175 _svmm_free_native_global (env, obj);
2176 return JNI_ERR;
2177 }
2178
2179 if (_svmm_invoke_nonvirtual_jlclass_init_primitive (env, obj, 'J') !=
2180 JNI_OK)
2181 {
2182 _svmm_free_native_global (env, obj);
2183 return JNI_ERR;
2184 }
2185
2186 vm->class_loading.boot_loader.instances.long_type = obj;
2187 }
2188
2189 /* instantiate and init the float class instance */
2190 {
2191 jobject obj;
2192
2193 if (_svmm_new_native_global (env, obj) != JNI_OK)
2194 {
2195 return JNI_ERR;
2196 }
2197
2198 if (_svmm_new_object_instance
2199 (env, vm->class_loading.boot_loader.classes.jlclass, *obj) != JNI_OK)
2200 {
2201 _svmm_free_native_global (env, obj);
2202 return JNI_ERR;
2203 }
2204
2205 if (_svmm_invoke_nonvirtual_jlclass_init_primitive (env, obj, 'F') !=
2206 JNI_OK)
2207 {
2208 _svmm_free_native_global (env, obj);
2209 return JNI_ERR;
2210 }
2211
2212 vm->class_loading.boot_loader.instances.float_type = obj;
2213 }
2214
2215 /* instantiate and init the double class instance */
2216 {
2217 jobject obj;
2218
2219 if (_svmm_new_native_global (env, obj) != JNI_OK)
2220 {
2221 return JNI_ERR;
2222 }
2223
2224 if (_svmm_new_object_instance
2225 (env, vm->class_loading.boot_loader.classes.jlclass, *obj) != JNI_OK)
2226 {
2227 _svmm_free_native_global (env, obj);
2228 return JNI_ERR;
2229 }
2230
2231 if (_svmm_invoke_nonvirtual_jlclass_init_primitive (env, obj, 'D') !=
2232 JNI_OK)
2233 {
2234 _svmm_free_native_global (env, obj);
2235 return JNI_ERR;
2236 }
2237
2238 vm->class_loading.boot_loader.instances.double_type = obj;
2239 }
2240
2241 /* instantiate and init the void class instance */
2242 {
2243 jobject obj;
2244
2245 if (_svmm_new_native_global (env, obj) != JNI_OK)
2246 {
2247 return JNI_ERR;
2248 }
2249
2250 if (_svmm_new_object_instance
2251 (env, vm->class_loading.boot_loader.classes.jlclass, *obj) != JNI_OK)
2252 {
2253 _svmm_free_native_global (env, obj);
2254 return JNI_ERR;
2255 }
2256
2257 if (_svmm_invoke_nonvirtual_jlclass_init_primitive (env, obj, 'V') !=
2258 JNI_OK)
2259 {
2260 _svmm_free_native_global (env, obj);
2261 return JNI_ERR;
2262 }
2263
2264 vm->class_loading.boot_loader.instances.void_type = obj;
2265 }
2266
2267 /* instantiate and init the default ArithmeticException instance */
2268 {
2269 jobject error;
2270
2271 if (_svmm_new_native_global (env, error) != JNI_OK)
2272 {
2273 return JNI_ERR;
2274 }
2275
2276 if (_svmm_new_object_instance
2277 (env, vm->class_loading.boot_loader.classes.ArithmeticException, *error) != JNI_OK)
2278 {
2279 _svmm_free_native_global (env, error);
2280 return JNI_ERR;
2281 }
2282
2283 if (_svmm_invoke_nonvirtual_ArithmeticException_init (env, error, NULL) != JNI_OK)
2284 {
2285 _svmm_free_native_global (env, error);
2286 return JNI_ERR;
2287 }
2288
2289 vm->class_loading.boot_loader.instances.default_ArithmeticException = error;
2290 }
2291
2292 /* instantiate and init the default ArrayIndexOutOfBoundsException instance */
2293 {
2294 jobject error;
2295
2296 if (_svmm_new_native_global (env, error) != JNI_OK)
2297 {
2298 return JNI_ERR;
2299 }
2300
2301 if (_svmm_new_object_instance
2302 (env, vm->class_loading.boot_loader.classes.ArrayIndexOutOfBoundsException, *error) != JNI_OK)
2303 {
2304 _svmm_free_native_global (env, error);
2305 return JNI_ERR;
2306 }
2307
2308 if (_svmm_invoke_nonvirtual_ArrayIndexOutOfBoundsException_init (env, error, NULL) != JNI_OK)
2309 {
2310 _svmm_free_native_global (env, error);
2311 return JNI_ERR;
2312 }
2313
2314 vm->class_loading.boot_loader.instances.default_ArrayIndexOutOfBoundsException = error;
2315 }
2316
2317 /* instantiate and init the default ArrayStoreException instance */
2318 {
2319 jobject error;
2320
2321 if (_svmm_new_native_global (env, error) != JNI_OK)
2322 {
2323 return JNI_ERR;
2324 }
2325
2326 if (_svmm_new_object_instance
2327 (env, vm->class_loading.boot_loader.classes.ArrayStoreException, *error) != JNI_OK)
2328 {
2329 _svmm_free_native_global (env, error);
2330 return JNI_ERR;
2331 }
2332
2333 if (_svmm_invoke_nonvirtual_ArrayStoreException_init (env, error, NULL) != JNI_OK)
2334 {
2335 _svmm_free_native_global (env, error);
2336 return JNI_ERR;
2337 }
2338
2339 vm->class_loading.boot_loader.instances.default_ArrayStoreException = error;
2340 }
2341
2342 /* instantiate and init the default ClassCastException instance */
2343 {
2344 jobject error;
2345
2346 if (_svmm_new_native_global (env, error) != JNI_OK)
2347 {
2348 return JNI_ERR;
2349 }
2350
2351 if (_svmm_new_object_instance
2352 (env, vm->class_loading.boot_loader.classes.ClassCastException, *error) != JNI_OK)
2353 {
2354 _svmm_free_native_global (env, error);
2355 return JNI_ERR;
2356 }
2357
2358 if (_svmm_invoke_nonvirtual_ClassCastException_init (env, error, NULL) != JNI_OK)
2359 {
2360 _svmm_free_native_global (env, error);
2361 return JNI_ERR;
2362 }
2363
2364 vm->class_loading.boot_loader.instances.default_ClassCastException = error;
2365 }
2366
2367 /* instantiate and init the default IllegalMonitorStateException instance */
2368 {
2369 jobject error;
2370
2371 if (_svmm_new_native_global (env, error) != JNI_OK)
2372 {
2373 return JNI_ERR;
2374 }
2375
2376 if (_svmm_new_object_instance
2377 (env, vm->class_loading.boot_loader.classes.IllegalMonitorStateException, *error) != JNI_OK)
2378 {
2379 _svmm_free_native_global (env, error);
2380 return JNI_ERR;
2381 }
2382
2383 if (_svmm_invoke_nonvirtual_IllegalMonitorStateException_init (env, error, NULL) != JNI_OK)
2384 {
2385 _svmm_free_native_global (env, error);
2386 return JNI_ERR;
2387 }
2388
2389 vm->class_loading.boot_loader.instances.default_IllegalMonitorStateException = error;
2390 }
2391
2392 /* instantiate and init the default NegativeArraySizeException instance */
2393 {
2394 jobject error;
2395
2396 if (_svmm_new_native_global (env, error) != JNI_OK)
2397 {
2398 return JNI_ERR;
2399 }
2400
2401 if (_svmm_new_object_instance
2402 (env, vm->class_loading.boot_loader.classes.NegativeArraySizeException, *error) != JNI_OK)
2403 {
2404 _svmm_free_native_global (env, error);
2405 return JNI_ERR;
2406 }
2407
2408 if (_svmm_invoke_nonvirtual_NegativeArraySizeException_init (env, error, NULL) != JNI_OK)
2409 {
2410 _svmm_free_native_global (env, error);
2411 return JNI_ERR;
2412 }
2413
2414 vm->class_loading.boot_loader.instances.default_NegativeArraySizeException = error;
2415 }
2416
2417 /* instantiate and init the default NoSuchFieldException instance */
2418 {
2419 jobject error;
2420
2421 if (_svmm_new_native_global (env, error) != JNI_OK)
2422 {
2423 return JNI_ERR;
2424 }
2425
2426 if (_svmm_new_object_instance
2427 (env, vm->class_loading.boot_loader.classes.NoSuchFieldException, *error) != JNI_OK)
2428 {
2429 _svmm_free_native_global (env, error);
2430 return JNI_ERR;
2431 }
2432
2433 if (_svmm_invoke_nonvirtual_NoSuchFieldException_init (env, error, NULL) != JNI_OK)
2434 {
2435 _svmm_free_native_global (env, error);
2436 return JNI_ERR;
2437 }
2438
2439 vm->class_loading.boot_loader.instances.default_NoSuchFieldException = error;
2440 }
2441
2442 /* instantiate and init the default NoSuchMethodException instance */
2443 {
2444 jobject error;
2445
2446 if (_svmm_new_native_global (env, error) != JNI_OK)
2447 {
2448 return JNI_ERR;
2449 }
2450
2451 if (_svmm_new_object_instance
2452 (env, vm->class_loading.boot_loader.classes.NoSuchMethodException, *error) != JNI_OK)
2453 {
2454 _svmm_free_native_global (env, error);
2455 return JNI_ERR;
2456 }
2457
2458 if (_svmm_invoke_nonvirtual_NoSuchMethodException_init (env, error, NULL) != JNI_OK)
2459 {
2460 _svmm_free_native_global (env, error);
2461 return JNI_ERR;
2462 }
2463
2464 vm->class_loading.boot_loader.instances.default_NoSuchMethodException = error;
2465 }
2466
2467 /* instantiate and init the default NullPointerException instance */
2468 {
2469 jobject error;
2470
2471 if (_svmm_new_native_global (env, error) != JNI_OK)
2472 {
2473 return JNI_ERR;
2474 }
2475
2476 if (_svmm_new_object_instance
2477 (env, vm->class_loading.boot_loader.classes.NullPointerException, *error) != JNI_OK)
2478 {
2479 _svmm_free_native_global (env, error);
2480 return JNI_ERR;
2481 }
2482
2483 if (_svmm_invoke_nonvirtual_NullPointerException_init (env, error, NULL) != JNI_OK)
2484 {
2485 _svmm_free_native_global (env, error);
2486 return JNI_ERR;
2487 }
2488
2489 vm->class_loading.boot_loader.instances.default_NullPointerException = error;
2490 }
2491
2492 /* instantiate and init the default InterruptedException instance */
2493 {
2494 jobject error;
2495
2496 if (_svmm_new_native_global (env, error) != JNI_OK)
2497 {
2498 return JNI_ERR;
2499 }
2500
2501 if (_svmm_new_object_instance
2502 (env, vm->class_loading.boot_loader.classes.InterruptedException, *error) != JNI_OK)
2503 {
2504 _svmm_free_native_global (env, error);
2505 return JNI_ERR;
2506 }
2507
2508 if (_svmm_invoke_nonvirtual_InterruptedException_init (env, error, NULL) != JNI_OK)
2509 {
2510 _svmm_free_native_global (env, error);
2511 return JNI_ERR;
2512 }
2513
2514 vm->class_loading.boot_loader.instances.default_InterruptedException = error;
2515 }
2516
2517 #if defined(_SABLEVM_INLINABILITY_TESTING)
2518
2519 /* instantiate and init the default InliningException instance */
2520 {
2521 jobject error;
2522
2523 if (_svmm_new_native_global (env, error) != JNI_OK)
2524 {
2525 return JNI_ERR;
2526 }
2527
2528 if (_svmm_new_object_instance
2529 (env, vm->class_loading.boot_loader.classes.InliningException, *error) != JNI_OK)
2530 {
2531 _svmm_free_native_global (env, error);
2532 return JNI_ERR;
2533 }
2534
2535 if (_svmm_invoke_nonvirtual_InliningException_init (env, error, NULL) != JNI_OK)
2536 {
2537 _svmm_free_native_global (env, error);
2538 return JNI_ERR;
2539 }
2540
2541 vm->class_loading.boot_loader.instances.default_InliningException = error;
2542 }
2543
2544 #endif
2545
2546 /* instantiate and init the default ExceptionInInitializerError instance */
2547 {
2548 jobject error;
2549
2550 if (_svmm_new_native_global (env, error) != JNI_OK)
2551 {
2552 return JNI_ERR;
2553 }
2554
2555 if (_svmm_new_object_instance
2556 (env, vm->class_loading.boot_loader.classes.ExceptionInInitializerError, *error) != JNI_OK)
2557 {
2558 _svmm_free_native_global (env, error);
2559 return JNI_ERR;
2560 }
2561
2562 if (_svmm_invoke_nonvirtual_ExceptionInInitializerError_init (env, error, NULL) != JNI_OK)
2563 {
2564 _svmm_free_native_global (env, error);
2565 return JNI_ERR;
2566 }
2567
2568 vm->class_loading.boot_loader.instances.default_ExceptionInInitializerError = error;
2569 }
2570
2571 /* instantiate and init the default AbstractMethodError instance */
2572 {
2573 jobject error;
2574
2575 if (_svmm_new_native_global (env, error) != JNI_OK)
2576 {
2577 return JNI_ERR;
2578 }
2579
2580 if (_svmm_new_object_instance
2581 (env, vm->class_loading.boot_loader.classes.AbstractMethodError, *error) != JNI_OK)
2582 {
2583 _svmm_free_native_global (env, error);
2584 return JNI_ERR;
2585 }
2586
2587 if (_svmm_invoke_nonvirtual_AbstractMethodError_init (env, error, NULL) != JNI_OK)
2588 {
2589 _svmm_free_native_global (env, error);
2590 return JNI_ERR;
2591 }
2592
2593 vm->class_loading.boot_loader.instances.default_AbstractMethodError = error;
2594 }
2595
2596 /* instantiate and init the default ClassCircularityError instance */
2597 {
2598 jobject error;
2599
2600 if (_svmm_new_native_global (env, error) != JNI_OK)
2601 {
2602 return JNI_ERR;
2603 }
2604
2605 if (_svmm_new_object_instance
2606 (env, vm->class_loading.boot_loader.classes.ClassCircularityError, *error) != JNI_OK)
2607 {
2608 _svmm_free_native_global (env, error);
2609 return JNI_ERR;
2610 }
2611
2612 if (_svmm_invoke_nonvirtual_ClassCircularityError_init (env, error, NULL) != JNI_OK)
2613 {
2614 _svmm_free_native_global (env, error);
2615 return JNI_ERR;
2616 }
2617
2618 vm->class_loading.boot_loader.instances.default_ClassCircularityError = error;
2619 }
2620
2621 /* instantiate and init the default ClassFormatError instance */
2622 {
2623 jobject error;
2624
2625 if (_svmm_new_native_global (env, error) != JNI_OK)
2626 {
2627 return JNI_ERR;
2628 }
2629
2630 if (_svmm_new_object_instance
2631 (env, vm->class_loading.boot_loader.classes.ClassFormatError, *error) != JNI_OK)
2632 {
2633 _svmm_free_native_global (env, error);
2634 return JNI_ERR;
2635 }
2636
2637 if (_svmm_invoke_nonvirtual_ClassFormatError_init (env, error, NULL) != JNI_OK)
2638 {
2639 _svmm_free_native_global (env, error);
2640 return JNI_ERR;
2641 }
2642
2643 vm->class_loading.boot_loader.instances.default_ClassFormatError = error;
2644 }
2645
2646 /* instantiate and init the default IncompatibleClassChangeError instance */
2647 {
2648 jobject error;
2649
2650 if (_svmm_new_native_global (env, error) != JNI_OK)
2651 {
2652 return JNI_ERR;
2653 }
2654
2655 if (_svmm_new_object_instance
2656 (env, vm->class_loading.boot_loader.classes.IncompatibleClassChangeError, *error) != JNI_OK)
2657 {
2658 _svmm_free_native_global (env, error);
2659 return JNI_ERR;
2660 }
2661
2662 if (_svmm_invoke_nonvirtual_IncompatibleClassChangeError_init (env, error, NULL) != JNI_OK)
2663 {
2664 _svmm_free_native_global (env, error);
2665 return JNI_ERR;
2666 }
2667
2668 vm->class_loading.boot_loader.instances.default_IncompatibleClassChangeError = error;
2669 }
2670
2671 /* instantiate and init the default InternalError instance */
2672 {
2673 jobject error;
2674
2675 if (_svmm_new_native_global (env, error) != JNI_OK)
2676 {
2677 return JNI_ERR;
2678 }
2679
2680 if (_svmm_new_object_instance
2681 (env, vm->class_loading.boot_loader.classes.InternalError, *error) != JNI_OK)
2682 {
2683 _svmm_free_native_global (env, error);
2684 return JNI_ERR;
2685 }
2686
2687 if (_svmm_invoke_nonvirtual_InternalError_init (env, error, NULL) != JNI_OK)
2688 {
2689 _svmm_free_native_global (env, error);
2690 return JNI_ERR;
2691 }
2692
2693 vm->class_loading.boot_loader.instances.default_InternalError = error;
2694 }
2695
2696 /* instantiate and init the default LinkageError instance */
2697 {
2698 jobject error;
2699
2700 if (_svmm_new_native_global (env, error) != JNI_OK)
2701 {
2702 return JNI_ERR;
2703 }
2704
2705 if (_svmm_new_object_instance
2706 (env, vm->class_loading.boot_loader.classes.LinkageError, *error) != JNI_OK)
2707 {
2708 _svmm_free_native_global (env, error);
2709 return JNI_ERR;
2710 }
2711
2712 if (_svmm_invoke_nonvirtual_LinkageError_init (env, error, NULL) != JNI_OK)
2713 {
2714 _svmm_free_native_global (env, error);
2715 return JNI_ERR;
2716 }
2717
2718 vm->class_loading.boot_loader.instances.default_LinkageError = error;
2719 }
2720
2721 /* instantiate and init the default NoClassDefFoundError instance */
2722 {
2723 jobject error;
2724
2725 if (_svmm_new_native_global (env, error) != JNI_OK)
2726 {
2727 return JNI_ERR;
2728 }
2729
2730 if (_svmm_new_object_instance
2731 (env, vm->class_loading.boot_loader.classes.NoClassDefFoundError, *error) != JNI_OK)
2732 {
2733 _svmm_free_native_global (env, error);
2734 return JNI_ERR;
2735 }
2736
2737 if (_svmm_invoke_nonvirtual_NoClassDefFoundError_init (env, error, NULL) != JNI_OK)
2738 {
2739 _svmm_free_native_global (env, error);
2740 return JNI_ERR;
2741 }
2742
2743 vm->class_loading.boot_loader.instances.default_NoClassDefFoundError = error;
2744 }
2745
2746 /* instantiate and init the default NoSuchFieldError instance */
2747 {
2748 jobject error;
2749
2750 if (_svmm_new_native_global (env, error) != JNI_OK)
2751 {
2752 return JNI_ERR;
2753 }
2754
2755 if (_svmm_new_object_instance
2756 (env, vm->class_loading.boot_loader.classes.NoSuchFieldError, *error) != JNI_OK)
2757 {
2758 _svmm_free_native_global (env, error);
2759 return JNI_ERR;
2760 }
2761
2762 if (_svmm_invoke_nonvirtual_NoSuchFieldError_init (env, error, NULL) != JNI_OK)
2763 {
2764 _svmm_free_native_global (env, error);
2765 return JNI_ERR;
2766 }
2767
2768 vm->class_loading.boot_loader.instances.default_NoSuchFieldError = error;
2769 }
2770
2771 /* instantiate and init the default NoSuchMethodError instance */
2772 {
2773 jobject error;
2774
2775 if (_svmm_new_native_global (env, error) != JNI_OK)
2776 {
2777 return JNI_ERR;
2778 }
2779
2780 if (_svmm_new_object_instance
2781 (env, vm->class_loading.boot_loader.classes.NoSuchMethodError, *error) != JNI_OK)
2782 {
2783 _svmm_free_native_global (env, error);
2784 return JNI_ERR;
2785 }
2786
2787 if (_svmm_invoke_nonvirtual_NoSuchMethodError_init (env, error, NULL) != JNI_OK)
2788 {
2789 _svmm_free_native_global (env, error);
2790 return JNI_ERR;
2791 }
2792
2793 vm->class_loading.boot_loader.instances.default_NoSuchMethodError = error;
2794 }
2795
2796 /* instantiate and init the default OutOfMemoryError instance */
2797 {
2798 jobject error;
2799
2800 if (_svmm_new_native_global (env, error) != JNI_OK)
2801 {
2802 return JNI_ERR;
2803 }
2804
2805 if (_svmm_new_object_instance
2806 (env, vm->class_loading.boot_loader.classes.OutOfMemoryError, *error) != JNI_OK)
2807 {
2808 _svmm_free_native_global (env, error);
2809 return JNI_ERR;
2810 }
2811
2812 if (_svmm_invoke_nonvirtual_OutOfMemoryError_init (env, error, NULL) != JNI_OK)
2813 {
2814 _svmm_free_native_global (env, error);
2815 return JNI_ERR;
2816 }
2817
2818 vm->class_loading.boot_loader.instances.default_OutOfMemoryError = error;
2819 }
2820
2821 /* instantiate and init the default UnsatisfiedLinkError instance */
2822 {
2823 jobject error;
2824
2825 if (_svmm_new_native_global (env, error) != JNI_OK)
2826 {
2827 return JNI_ERR;
2828 }
2829
2830 if (_svmm_new_object_instance
2831 (env, vm->class_loading.boot_loader.classes.UnsatisfiedLinkError, *error) != JNI_OK)
2832 {
2833 _svmm_free_native_global (env, error);
2834 return JNI_ERR;
2835 }
2836
2837 if (_svmm_invoke_nonvirtual_UnsatisfiedLinkError_init (env, error, NULL) != JNI_OK)
2838 {
2839 _svmm_free_native_global (env, error);
2840 return JNI_ERR;
2841 }
2842
2843 vm->class_loading.boot_loader.instances.default_UnsatisfiedLinkError = error;
2844 }
2845
2846 /* instantiate and init the default UnsupportedClassVersionError instance */
2847 {
2848 jobject error;
2849
2850 if (_svmm_new_native_global (env, error) != JNI_OK)
2851 {
2852 return JNI_ERR;
2853 }
2854
2855 if (_svmm_new_object_instance
2856 (env, vm->class_loading.boot_loader.classes.UnsupportedClassVersionError, *error) != JNI_OK)
2857 {
2858 _svmm_free_native_global (env, error);
2859 return JNI_ERR;
2860 }
2861
2862 if (_svmm_invoke_nonvirtual_UnsupportedClassVersionError_init (env, error, NULL) != JNI_OK)
2863 {
2864 _svmm_free_native_global (env, error);
2865 return JNI_ERR;
2866 }
2867
2868 vm->class_loading.boot_loader.instances.default_UnsupportedClassVersionError = error;
2869 }
2870
2871 /* instantiate and init the default VerifyError instance */
2872 {
2873 jobject error;
2874
2875 if (_svmm_new_native_global (env, error) != JNI_OK)
2876 {
2877 return JNI_ERR;
2878 }
2879
2880 if (_svmm_new_object_instance
2881 (env, vm->class_loading.boot_loader.classes.VerifyError, *error) != JNI_OK)
2882 {
2883 _svmm_free_native_global (env, error);
2884 return JNI_ERR;
2885 }
2886
2887 if (_svmm_invoke_nonvirtual_VerifyError_init (env, error, NULL) != JNI_OK)
2888 {
2889 _svmm_free_native_global (env, error);
2890 return JNI_ERR;
2891 }
2892
2893 vm->class_loading.boot_loader.instances.default_VerifyError = error;
2894 }
2895
2896 return JNI_OK;
2897 }
2898