1 /* This file has been automatically generated from "error.list" */
2 
3 /*
4 ----------------------------------------------------------------------
5 _svmf_error_ArithmeticException
6 ----------------------------------------------------------------------
7 */
8 
9 svm_static void SVM_UNUSED
_svmf_error_ArithmeticException(_svmt_JNIEnv * env)10 _svmf_error_ArithmeticException (_svmt_JNIEnv *env)
11 {
12   _svmt_JavaVM *vm = env->vm;
13 
14   if (vm->class_loading.boot_loader.instances.default_ArithmeticException == NULL)
15     {
16       _svmf_initialization_unrecoverable_exception (env);
17     }
18 
19   /* Empty the stack.  (Note that this works even if the frame is
20      native or internal). */
21   env->stack.current_frame->stack_size = 0;
22 
23   /* We will override any pending instruction with the new one. */
24   *(env->throwable) = NULL;
25 
26   if (env->in_ArithmeticException)
27     {
28       env->in_ArithmeticException = JNI_FALSE;
29 
30       *(env->throwable) =
31 	*(vm->class_loading.boot_loader.instances.default_ArithmeticException);
32       return;
33     }
34 
35   env->in_ArithmeticException = JNI_TRUE;
36 
37   {
38     jobject error;
39 
40     if (_svmm_new_native_local (env, error) != JNI_OK)
41       {
42 	env->in_ArithmeticException = JNI_FALSE;
43 	return;
44       }
45 
46     if (_svmm_new_object_instance
47 	(env, vm->class_loading.boot_loader.classes.ArithmeticException, *error) != JNI_OK)
48       {
49 	_svmm_free_native_local (env, error);
50 	env->in_ArithmeticException = JNI_FALSE;
51 	return;
52       }
53 
54     if (_svmm_invoke_nonvirtual_ArithmeticException_init (env, error, NULL) != JNI_OK)
55       {
56 	_svmm_free_native_local (env, error);
57 	env->in_ArithmeticException = JNI_FALSE;
58 	return;
59       }
60 
61     *(env->throwable) = *error;
62     _svmm_free_native_local (env, error);
63   }
64 
65   env->in_ArithmeticException = JNI_FALSE;
66 }
67 
68 /*
69 ----------------------------------------------------------------------
70 _svmf_error_ArithmeticException_msg
71 ----------------------------------------------------------------------
72 */
73 
74 svm_static void SVM_UNUSED
_svmf_error_ArithmeticException_msg(_svmt_JNIEnv * env,jstring msg)75 _svmf_error_ArithmeticException_msg (_svmt_JNIEnv *env, jstring msg)
76 {
77   _svmt_JavaVM *vm = env->vm;
78 
79   if (vm->class_loading.boot_loader.instances.default_ArithmeticException == NULL)
80     {
81       _svmf_initialization_unrecoverable_exception (env);
82     }
83 
84   /* Empty the stack.  Note that this works even if the frame is
85      native or internal. */
86   env->stack.current_frame->stack_size = 0;
87 
88   /* We will override any pending instruction with the new one. */
89   *(env->throwable) = NULL;
90 
91   if (env->in_ArithmeticException)
92     {
93       env->in_ArithmeticException = JNI_FALSE;
94 
95       *(env->throwable) =
96 	*(vm->class_loading.boot_loader.instances.default_ArithmeticException);
97       return;
98     }
99 
100   env->in_ArithmeticException = JNI_TRUE;
101 
102   {
103     jobject error;
104 
105     if (_svmm_new_native_local (env, error) != JNI_OK)
106       {
107 	env->in_ArithmeticException = JNI_FALSE;
108 	return;
109       }
110 
111     if (_svmm_new_object_instance
112 	(env, vm->class_loading.boot_loader.classes.ArithmeticException, *error) != JNI_OK)
113       {
114 	_svmm_free_native_local (env, error);
115 	env->in_ArithmeticException = JNI_FALSE;
116 	return;
117       }
118 
119     if (_svmm_invoke_nonvirtual_ArithmeticException_init (env, error, msg) != JNI_OK)
120       {
121 	_svmm_free_native_local (env, error);
122 	env->in_ArithmeticException = JNI_FALSE;
123 	return;
124       }
125 
126     *(env->throwable) = *error;
127     _svmm_free_native_local (env, error);
128   }
129 
130   env->in_ArithmeticException = JNI_FALSE;
131 }
132 
133 
134 /*
135 ----------------------------------------------------------------------
136 _svmf_error_ArrayIndexOutOfBoundsException
137 ----------------------------------------------------------------------
138 */
139 
140 svm_static void SVM_UNUSED
_svmf_error_ArrayIndexOutOfBoundsException(_svmt_JNIEnv * env)141 _svmf_error_ArrayIndexOutOfBoundsException (_svmt_JNIEnv *env)
142 {
143   _svmt_JavaVM *vm = env->vm;
144 
145   if (vm->class_loading.boot_loader.instances.default_ArrayIndexOutOfBoundsException == NULL)
146     {
147       _svmf_initialization_unrecoverable_exception (env);
148     }
149 
150   /* Empty the stack.  (Note that this works even if the frame is
151      native or internal). */
152   env->stack.current_frame->stack_size = 0;
153 
154   /* We will override any pending instruction with the new one. */
155   *(env->throwable) = NULL;
156 
157   if (env->in_ArrayIndexOutOfBoundsException)
158     {
159       env->in_ArrayIndexOutOfBoundsException = JNI_FALSE;
160 
161       *(env->throwable) =
162 	*(vm->class_loading.boot_loader.instances.default_ArrayIndexOutOfBoundsException);
163       return;
164     }
165 
166   env->in_ArrayIndexOutOfBoundsException = JNI_TRUE;
167 
168   {
169     jobject error;
170 
171     if (_svmm_new_native_local (env, error) != JNI_OK)
172       {
173 	env->in_ArrayIndexOutOfBoundsException = JNI_FALSE;
174 	return;
175       }
176 
177     if (_svmm_new_object_instance
178 	(env, vm->class_loading.boot_loader.classes.ArrayIndexOutOfBoundsException, *error) != JNI_OK)
179       {
180 	_svmm_free_native_local (env, error);
181 	env->in_ArrayIndexOutOfBoundsException = JNI_FALSE;
182 	return;
183       }
184 
185     if (_svmm_invoke_nonvirtual_ArrayIndexOutOfBoundsException_init (env, error, NULL) != JNI_OK)
186       {
187 	_svmm_free_native_local (env, error);
188 	env->in_ArrayIndexOutOfBoundsException = JNI_FALSE;
189 	return;
190       }
191 
192     *(env->throwable) = *error;
193     _svmm_free_native_local (env, error);
194   }
195 
196   env->in_ArrayIndexOutOfBoundsException = JNI_FALSE;
197 }
198 
199 /*
200 ----------------------------------------------------------------------
201 _svmf_error_ArrayIndexOutOfBoundsException_msg
202 ----------------------------------------------------------------------
203 */
204 
205 svm_static void SVM_UNUSED
_svmf_error_ArrayIndexOutOfBoundsException_msg(_svmt_JNIEnv * env,jstring msg)206 _svmf_error_ArrayIndexOutOfBoundsException_msg (_svmt_JNIEnv *env, jstring msg)
207 {
208   _svmt_JavaVM *vm = env->vm;
209 
210   if (vm->class_loading.boot_loader.instances.default_ArrayIndexOutOfBoundsException == NULL)
211     {
212       _svmf_initialization_unrecoverable_exception (env);
213     }
214 
215   /* Empty the stack.  Note that this works even if the frame is
216      native or internal. */
217   env->stack.current_frame->stack_size = 0;
218 
219   /* We will override any pending instruction with the new one. */
220   *(env->throwable) = NULL;
221 
222   if (env->in_ArrayIndexOutOfBoundsException)
223     {
224       env->in_ArrayIndexOutOfBoundsException = JNI_FALSE;
225 
226       *(env->throwable) =
227 	*(vm->class_loading.boot_loader.instances.default_ArrayIndexOutOfBoundsException);
228       return;
229     }
230 
231   env->in_ArrayIndexOutOfBoundsException = JNI_TRUE;
232 
233   {
234     jobject error;
235 
236     if (_svmm_new_native_local (env, error) != JNI_OK)
237       {
238 	env->in_ArrayIndexOutOfBoundsException = JNI_FALSE;
239 	return;
240       }
241 
242     if (_svmm_new_object_instance
243 	(env, vm->class_loading.boot_loader.classes.ArrayIndexOutOfBoundsException, *error) != JNI_OK)
244       {
245 	_svmm_free_native_local (env, error);
246 	env->in_ArrayIndexOutOfBoundsException = JNI_FALSE;
247 	return;
248       }
249 
250     if (_svmm_invoke_nonvirtual_ArrayIndexOutOfBoundsException_init (env, error, msg) != JNI_OK)
251       {
252 	_svmm_free_native_local (env, error);
253 	env->in_ArrayIndexOutOfBoundsException = JNI_FALSE;
254 	return;
255       }
256 
257     *(env->throwable) = *error;
258     _svmm_free_native_local (env, error);
259   }
260 
261   env->in_ArrayIndexOutOfBoundsException = JNI_FALSE;
262 }
263 
264 
265 /*
266 ----------------------------------------------------------------------
267 _svmf_error_ArrayStoreException
268 ----------------------------------------------------------------------
269 */
270 
271 svm_static void SVM_UNUSED
_svmf_error_ArrayStoreException(_svmt_JNIEnv * env)272 _svmf_error_ArrayStoreException (_svmt_JNIEnv *env)
273 {
274   _svmt_JavaVM *vm = env->vm;
275 
276   if (vm->class_loading.boot_loader.instances.default_ArrayStoreException == NULL)
277     {
278       _svmf_initialization_unrecoverable_exception (env);
279     }
280 
281   /* Empty the stack.  (Note that this works even if the frame is
282      native or internal). */
283   env->stack.current_frame->stack_size = 0;
284 
285   /* We will override any pending instruction with the new one. */
286   *(env->throwable) = NULL;
287 
288   if (env->in_ArrayStoreException)
289     {
290       env->in_ArrayStoreException = JNI_FALSE;
291 
292       *(env->throwable) =
293 	*(vm->class_loading.boot_loader.instances.default_ArrayStoreException);
294       return;
295     }
296 
297   env->in_ArrayStoreException = JNI_TRUE;
298 
299   {
300     jobject error;
301 
302     if (_svmm_new_native_local (env, error) != JNI_OK)
303       {
304 	env->in_ArrayStoreException = JNI_FALSE;
305 	return;
306       }
307 
308     if (_svmm_new_object_instance
309 	(env, vm->class_loading.boot_loader.classes.ArrayStoreException, *error) != JNI_OK)
310       {
311 	_svmm_free_native_local (env, error);
312 	env->in_ArrayStoreException = JNI_FALSE;
313 	return;
314       }
315 
316     if (_svmm_invoke_nonvirtual_ArrayStoreException_init (env, error, NULL) != JNI_OK)
317       {
318 	_svmm_free_native_local (env, error);
319 	env->in_ArrayStoreException = JNI_FALSE;
320 	return;
321       }
322 
323     *(env->throwable) = *error;
324     _svmm_free_native_local (env, error);
325   }
326 
327   env->in_ArrayStoreException = JNI_FALSE;
328 }
329 
330 /*
331 ----------------------------------------------------------------------
332 _svmf_error_ArrayStoreException_msg
333 ----------------------------------------------------------------------
334 */
335 
336 svm_static void SVM_UNUSED
_svmf_error_ArrayStoreException_msg(_svmt_JNIEnv * env,jstring msg)337 _svmf_error_ArrayStoreException_msg (_svmt_JNIEnv *env, jstring msg)
338 {
339   _svmt_JavaVM *vm = env->vm;
340 
341   if (vm->class_loading.boot_loader.instances.default_ArrayStoreException == NULL)
342     {
343       _svmf_initialization_unrecoverable_exception (env);
344     }
345 
346   /* Empty the stack.  Note that this works even if the frame is
347      native or internal. */
348   env->stack.current_frame->stack_size = 0;
349 
350   /* We will override any pending instruction with the new one. */
351   *(env->throwable) = NULL;
352 
353   if (env->in_ArrayStoreException)
354     {
355       env->in_ArrayStoreException = JNI_FALSE;
356 
357       *(env->throwable) =
358 	*(vm->class_loading.boot_loader.instances.default_ArrayStoreException);
359       return;
360     }
361 
362   env->in_ArrayStoreException = JNI_TRUE;
363 
364   {
365     jobject error;
366 
367     if (_svmm_new_native_local (env, error) != JNI_OK)
368       {
369 	env->in_ArrayStoreException = JNI_FALSE;
370 	return;
371       }
372 
373     if (_svmm_new_object_instance
374 	(env, vm->class_loading.boot_loader.classes.ArrayStoreException, *error) != JNI_OK)
375       {
376 	_svmm_free_native_local (env, error);
377 	env->in_ArrayStoreException = JNI_FALSE;
378 	return;
379       }
380 
381     if (_svmm_invoke_nonvirtual_ArrayStoreException_init (env, error, msg) != JNI_OK)
382       {
383 	_svmm_free_native_local (env, error);
384 	env->in_ArrayStoreException = JNI_FALSE;
385 	return;
386       }
387 
388     *(env->throwable) = *error;
389     _svmm_free_native_local (env, error);
390   }
391 
392   env->in_ArrayStoreException = JNI_FALSE;
393 }
394 
395 
396 /*
397 ----------------------------------------------------------------------
398 _svmf_error_ClassCastException
399 ----------------------------------------------------------------------
400 */
401 
402 svm_static void SVM_UNUSED
_svmf_error_ClassCastException(_svmt_JNIEnv * env)403 _svmf_error_ClassCastException (_svmt_JNIEnv *env)
404 {
405   _svmt_JavaVM *vm = env->vm;
406 
407   if (vm->class_loading.boot_loader.instances.default_ClassCastException == NULL)
408     {
409       _svmf_initialization_unrecoverable_exception (env);
410     }
411 
412   /* Empty the stack.  (Note that this works even if the frame is
413      native or internal). */
414   env->stack.current_frame->stack_size = 0;
415 
416   /* We will override any pending instruction with the new one. */
417   *(env->throwable) = NULL;
418 
419   if (env->in_ClassCastException)
420     {
421       env->in_ClassCastException = JNI_FALSE;
422 
423       *(env->throwable) =
424 	*(vm->class_loading.boot_loader.instances.default_ClassCastException);
425       return;
426     }
427 
428   env->in_ClassCastException = JNI_TRUE;
429 
430   {
431     jobject error;
432 
433     if (_svmm_new_native_local (env, error) != JNI_OK)
434       {
435 	env->in_ClassCastException = JNI_FALSE;
436 	return;
437       }
438 
439     if (_svmm_new_object_instance
440 	(env, vm->class_loading.boot_loader.classes.ClassCastException, *error) != JNI_OK)
441       {
442 	_svmm_free_native_local (env, error);
443 	env->in_ClassCastException = JNI_FALSE;
444 	return;
445       }
446 
447     if (_svmm_invoke_nonvirtual_ClassCastException_init (env, error, NULL) != JNI_OK)
448       {
449 	_svmm_free_native_local (env, error);
450 	env->in_ClassCastException = JNI_FALSE;
451 	return;
452       }
453 
454     *(env->throwable) = *error;
455     _svmm_free_native_local (env, error);
456   }
457 
458   env->in_ClassCastException = JNI_FALSE;
459 }
460 
461 /*
462 ----------------------------------------------------------------------
463 _svmf_error_ClassCastException_msg
464 ----------------------------------------------------------------------
465 */
466 
467 svm_static void SVM_UNUSED
_svmf_error_ClassCastException_msg(_svmt_JNIEnv * env,jstring msg)468 _svmf_error_ClassCastException_msg (_svmt_JNIEnv *env, jstring msg)
469 {
470   _svmt_JavaVM *vm = env->vm;
471 
472   if (vm->class_loading.boot_loader.instances.default_ClassCastException == NULL)
473     {
474       _svmf_initialization_unrecoverable_exception (env);
475     }
476 
477   /* Empty the stack.  Note that this works even if the frame is
478      native or internal. */
479   env->stack.current_frame->stack_size = 0;
480 
481   /* We will override any pending instruction with the new one. */
482   *(env->throwable) = NULL;
483 
484   if (env->in_ClassCastException)
485     {
486       env->in_ClassCastException = JNI_FALSE;
487 
488       *(env->throwable) =
489 	*(vm->class_loading.boot_loader.instances.default_ClassCastException);
490       return;
491     }
492 
493   env->in_ClassCastException = JNI_TRUE;
494 
495   {
496     jobject error;
497 
498     if (_svmm_new_native_local (env, error) != JNI_OK)
499       {
500 	env->in_ClassCastException = JNI_FALSE;
501 	return;
502       }
503 
504     if (_svmm_new_object_instance
505 	(env, vm->class_loading.boot_loader.classes.ClassCastException, *error) != JNI_OK)
506       {
507 	_svmm_free_native_local (env, error);
508 	env->in_ClassCastException = JNI_FALSE;
509 	return;
510       }
511 
512     if (_svmm_invoke_nonvirtual_ClassCastException_init (env, error, msg) != JNI_OK)
513       {
514 	_svmm_free_native_local (env, error);
515 	env->in_ClassCastException = JNI_FALSE;
516 	return;
517       }
518 
519     *(env->throwable) = *error;
520     _svmm_free_native_local (env, error);
521   }
522 
523   env->in_ClassCastException = JNI_FALSE;
524 }
525 
526 
527 /*
528 ----------------------------------------------------------------------
529 _svmf_error_IllegalMonitorStateException
530 ----------------------------------------------------------------------
531 */
532 
533 svm_static void SVM_UNUSED
_svmf_error_IllegalMonitorStateException(_svmt_JNIEnv * env)534 _svmf_error_IllegalMonitorStateException (_svmt_JNIEnv *env)
535 {
536   _svmt_JavaVM *vm = env->vm;
537 
538   if (vm->class_loading.boot_loader.instances.default_IllegalMonitorStateException == NULL)
539     {
540       _svmf_initialization_unrecoverable_exception (env);
541     }
542 
543   /* Empty the stack.  (Note that this works even if the frame is
544      native or internal). */
545   env->stack.current_frame->stack_size = 0;
546 
547   /* We will override any pending instruction with the new one. */
548   *(env->throwable) = NULL;
549 
550   if (env->in_IllegalMonitorStateException)
551     {
552       env->in_IllegalMonitorStateException = JNI_FALSE;
553 
554       *(env->throwable) =
555 	*(vm->class_loading.boot_loader.instances.default_IllegalMonitorStateException);
556       return;
557     }
558 
559   env->in_IllegalMonitorStateException = JNI_TRUE;
560 
561   {
562     jobject error;
563 
564     if (_svmm_new_native_local (env, error) != JNI_OK)
565       {
566 	env->in_IllegalMonitorStateException = JNI_FALSE;
567 	return;
568       }
569 
570     if (_svmm_new_object_instance
571 	(env, vm->class_loading.boot_loader.classes.IllegalMonitorStateException, *error) != JNI_OK)
572       {
573 	_svmm_free_native_local (env, error);
574 	env->in_IllegalMonitorStateException = JNI_FALSE;
575 	return;
576       }
577 
578     if (_svmm_invoke_nonvirtual_IllegalMonitorStateException_init (env, error, NULL) != JNI_OK)
579       {
580 	_svmm_free_native_local (env, error);
581 	env->in_IllegalMonitorStateException = JNI_FALSE;
582 	return;
583       }
584 
585     *(env->throwable) = *error;
586     _svmm_free_native_local (env, error);
587   }
588 
589   env->in_IllegalMonitorStateException = JNI_FALSE;
590 }
591 
592 /*
593 ----------------------------------------------------------------------
594 _svmf_error_IllegalMonitorStateException_msg
595 ----------------------------------------------------------------------
596 */
597 
598 svm_static void SVM_UNUSED
_svmf_error_IllegalMonitorStateException_msg(_svmt_JNIEnv * env,jstring msg)599 _svmf_error_IllegalMonitorStateException_msg (_svmt_JNIEnv *env, jstring msg)
600 {
601   _svmt_JavaVM *vm = env->vm;
602 
603   if (vm->class_loading.boot_loader.instances.default_IllegalMonitorStateException == NULL)
604     {
605       _svmf_initialization_unrecoverable_exception (env);
606     }
607 
608   /* Empty the stack.  Note that this works even if the frame is
609      native or internal. */
610   env->stack.current_frame->stack_size = 0;
611 
612   /* We will override any pending instruction with the new one. */
613   *(env->throwable) = NULL;
614 
615   if (env->in_IllegalMonitorStateException)
616     {
617       env->in_IllegalMonitorStateException = JNI_FALSE;
618 
619       *(env->throwable) =
620 	*(vm->class_loading.boot_loader.instances.default_IllegalMonitorStateException);
621       return;
622     }
623 
624   env->in_IllegalMonitorStateException = JNI_TRUE;
625 
626   {
627     jobject error;
628 
629     if (_svmm_new_native_local (env, error) != JNI_OK)
630       {
631 	env->in_IllegalMonitorStateException = JNI_FALSE;
632 	return;
633       }
634 
635     if (_svmm_new_object_instance
636 	(env, vm->class_loading.boot_loader.classes.IllegalMonitorStateException, *error) != JNI_OK)
637       {
638 	_svmm_free_native_local (env, error);
639 	env->in_IllegalMonitorStateException = JNI_FALSE;
640 	return;
641       }
642 
643     if (_svmm_invoke_nonvirtual_IllegalMonitorStateException_init (env, error, msg) != JNI_OK)
644       {
645 	_svmm_free_native_local (env, error);
646 	env->in_IllegalMonitorStateException = JNI_FALSE;
647 	return;
648       }
649 
650     *(env->throwable) = *error;
651     _svmm_free_native_local (env, error);
652   }
653 
654   env->in_IllegalMonitorStateException = JNI_FALSE;
655 }
656 
657 
658 /*
659 ----------------------------------------------------------------------
660 _svmf_error_NegativeArraySizeException
661 ----------------------------------------------------------------------
662 */
663 
664 svm_static void SVM_UNUSED
_svmf_error_NegativeArraySizeException(_svmt_JNIEnv * env)665 _svmf_error_NegativeArraySizeException (_svmt_JNIEnv *env)
666 {
667   _svmt_JavaVM *vm = env->vm;
668 
669   if (vm->class_loading.boot_loader.instances.default_NegativeArraySizeException == NULL)
670     {
671       _svmf_initialization_unrecoverable_exception (env);
672     }
673 
674   /* Empty the stack.  (Note that this works even if the frame is
675      native or internal). */
676   env->stack.current_frame->stack_size = 0;
677 
678   /* We will override any pending instruction with the new one. */
679   *(env->throwable) = NULL;
680 
681   if (env->in_NegativeArraySizeException)
682     {
683       env->in_NegativeArraySizeException = JNI_FALSE;
684 
685       *(env->throwable) =
686 	*(vm->class_loading.boot_loader.instances.default_NegativeArraySizeException);
687       return;
688     }
689 
690   env->in_NegativeArraySizeException = JNI_TRUE;
691 
692   {
693     jobject error;
694 
695     if (_svmm_new_native_local (env, error) != JNI_OK)
696       {
697 	env->in_NegativeArraySizeException = JNI_FALSE;
698 	return;
699       }
700 
701     if (_svmm_new_object_instance
702 	(env, vm->class_loading.boot_loader.classes.NegativeArraySizeException, *error) != JNI_OK)
703       {
704 	_svmm_free_native_local (env, error);
705 	env->in_NegativeArraySizeException = JNI_FALSE;
706 	return;
707       }
708 
709     if (_svmm_invoke_nonvirtual_NegativeArraySizeException_init (env, error, NULL) != JNI_OK)
710       {
711 	_svmm_free_native_local (env, error);
712 	env->in_NegativeArraySizeException = JNI_FALSE;
713 	return;
714       }
715 
716     *(env->throwable) = *error;
717     _svmm_free_native_local (env, error);
718   }
719 
720   env->in_NegativeArraySizeException = JNI_FALSE;
721 }
722 
723 /*
724 ----------------------------------------------------------------------
725 _svmf_error_NegativeArraySizeException_msg
726 ----------------------------------------------------------------------
727 */
728 
729 svm_static void SVM_UNUSED
_svmf_error_NegativeArraySizeException_msg(_svmt_JNIEnv * env,jstring msg)730 _svmf_error_NegativeArraySizeException_msg (_svmt_JNIEnv *env, jstring msg)
731 {
732   _svmt_JavaVM *vm = env->vm;
733 
734   if (vm->class_loading.boot_loader.instances.default_NegativeArraySizeException == NULL)
735     {
736       _svmf_initialization_unrecoverable_exception (env);
737     }
738 
739   /* Empty the stack.  Note that this works even if the frame is
740      native or internal. */
741   env->stack.current_frame->stack_size = 0;
742 
743   /* We will override any pending instruction with the new one. */
744   *(env->throwable) = NULL;
745 
746   if (env->in_NegativeArraySizeException)
747     {
748       env->in_NegativeArraySizeException = JNI_FALSE;
749 
750       *(env->throwable) =
751 	*(vm->class_loading.boot_loader.instances.default_NegativeArraySizeException);
752       return;
753     }
754 
755   env->in_NegativeArraySizeException = JNI_TRUE;
756 
757   {
758     jobject error;
759 
760     if (_svmm_new_native_local (env, error) != JNI_OK)
761       {
762 	env->in_NegativeArraySizeException = JNI_FALSE;
763 	return;
764       }
765 
766     if (_svmm_new_object_instance
767 	(env, vm->class_loading.boot_loader.classes.NegativeArraySizeException, *error) != JNI_OK)
768       {
769 	_svmm_free_native_local (env, error);
770 	env->in_NegativeArraySizeException = JNI_FALSE;
771 	return;
772       }
773 
774     if (_svmm_invoke_nonvirtual_NegativeArraySizeException_init (env, error, msg) != JNI_OK)
775       {
776 	_svmm_free_native_local (env, error);
777 	env->in_NegativeArraySizeException = JNI_FALSE;
778 	return;
779       }
780 
781     *(env->throwable) = *error;
782     _svmm_free_native_local (env, error);
783   }
784 
785   env->in_NegativeArraySizeException = JNI_FALSE;
786 }
787 
788 
789 /*
790 ----------------------------------------------------------------------
791 _svmf_error_NoSuchFieldException
792 ----------------------------------------------------------------------
793 */
794 
795 svm_static void SVM_UNUSED
_svmf_error_NoSuchFieldException(_svmt_JNIEnv * env)796 _svmf_error_NoSuchFieldException (_svmt_JNIEnv *env)
797 {
798   _svmt_JavaVM *vm = env->vm;
799 
800   if (vm->class_loading.boot_loader.instances.default_NoSuchFieldException == NULL)
801     {
802       _svmf_initialization_unrecoverable_exception (env);
803     }
804 
805   /* Empty the stack.  (Note that this works even if the frame is
806      native or internal). */
807   env->stack.current_frame->stack_size = 0;
808 
809   /* We will override any pending instruction with the new one. */
810   *(env->throwable) = NULL;
811 
812   if (env->in_NoSuchFieldException)
813     {
814       env->in_NoSuchFieldException = JNI_FALSE;
815 
816       *(env->throwable) =
817 	*(vm->class_loading.boot_loader.instances.default_NoSuchFieldException);
818       return;
819     }
820 
821   env->in_NoSuchFieldException = JNI_TRUE;
822 
823   {
824     jobject error;
825 
826     if (_svmm_new_native_local (env, error) != JNI_OK)
827       {
828 	env->in_NoSuchFieldException = JNI_FALSE;
829 	return;
830       }
831 
832     if (_svmm_new_object_instance
833 	(env, vm->class_loading.boot_loader.classes.NoSuchFieldException, *error) != JNI_OK)
834       {
835 	_svmm_free_native_local (env, error);
836 	env->in_NoSuchFieldException = JNI_FALSE;
837 	return;
838       }
839 
840     if (_svmm_invoke_nonvirtual_NoSuchFieldException_init (env, error, NULL) != JNI_OK)
841       {
842 	_svmm_free_native_local (env, error);
843 	env->in_NoSuchFieldException = JNI_FALSE;
844 	return;
845       }
846 
847     *(env->throwable) = *error;
848     _svmm_free_native_local (env, error);
849   }
850 
851   env->in_NoSuchFieldException = JNI_FALSE;
852 }
853 
854 /*
855 ----------------------------------------------------------------------
856 _svmf_error_NoSuchFieldException_msg
857 ----------------------------------------------------------------------
858 */
859 
860 svm_static void SVM_UNUSED
_svmf_error_NoSuchFieldException_msg(_svmt_JNIEnv * env,jstring msg)861 _svmf_error_NoSuchFieldException_msg (_svmt_JNIEnv *env, jstring msg)
862 {
863   _svmt_JavaVM *vm = env->vm;
864 
865   if (vm->class_loading.boot_loader.instances.default_NoSuchFieldException == NULL)
866     {
867       _svmf_initialization_unrecoverable_exception (env);
868     }
869 
870   /* Empty the stack.  Note that this works even if the frame is
871      native or internal. */
872   env->stack.current_frame->stack_size = 0;
873 
874   /* We will override any pending instruction with the new one. */
875   *(env->throwable) = NULL;
876 
877   if (env->in_NoSuchFieldException)
878     {
879       env->in_NoSuchFieldException = JNI_FALSE;
880 
881       *(env->throwable) =
882 	*(vm->class_loading.boot_loader.instances.default_NoSuchFieldException);
883       return;
884     }
885 
886   env->in_NoSuchFieldException = JNI_TRUE;
887 
888   {
889     jobject error;
890 
891     if (_svmm_new_native_local (env, error) != JNI_OK)
892       {
893 	env->in_NoSuchFieldException = JNI_FALSE;
894 	return;
895       }
896 
897     if (_svmm_new_object_instance
898 	(env, vm->class_loading.boot_loader.classes.NoSuchFieldException, *error) != JNI_OK)
899       {
900 	_svmm_free_native_local (env, error);
901 	env->in_NoSuchFieldException = JNI_FALSE;
902 	return;
903       }
904 
905     if (_svmm_invoke_nonvirtual_NoSuchFieldException_init (env, error, msg) != JNI_OK)
906       {
907 	_svmm_free_native_local (env, error);
908 	env->in_NoSuchFieldException = JNI_FALSE;
909 	return;
910       }
911 
912     *(env->throwable) = *error;
913     _svmm_free_native_local (env, error);
914   }
915 
916   env->in_NoSuchFieldException = JNI_FALSE;
917 }
918 
919 
920 /*
921 ----------------------------------------------------------------------
922 _svmf_error_NoSuchMethodException
923 ----------------------------------------------------------------------
924 */
925 
926 svm_static void SVM_UNUSED
_svmf_error_NoSuchMethodException(_svmt_JNIEnv * env)927 _svmf_error_NoSuchMethodException (_svmt_JNIEnv *env)
928 {
929   _svmt_JavaVM *vm = env->vm;
930 
931   if (vm->class_loading.boot_loader.instances.default_NoSuchMethodException == NULL)
932     {
933       _svmf_initialization_unrecoverable_exception (env);
934     }
935 
936   /* Empty the stack.  (Note that this works even if the frame is
937      native or internal). */
938   env->stack.current_frame->stack_size = 0;
939 
940   /* We will override any pending instruction with the new one. */
941   *(env->throwable) = NULL;
942 
943   if (env->in_NoSuchMethodException)
944     {
945       env->in_NoSuchMethodException = JNI_FALSE;
946 
947       *(env->throwable) =
948 	*(vm->class_loading.boot_loader.instances.default_NoSuchMethodException);
949       return;
950     }
951 
952   env->in_NoSuchMethodException = JNI_TRUE;
953 
954   {
955     jobject error;
956 
957     if (_svmm_new_native_local (env, error) != JNI_OK)
958       {
959 	env->in_NoSuchMethodException = JNI_FALSE;
960 	return;
961       }
962 
963     if (_svmm_new_object_instance
964 	(env, vm->class_loading.boot_loader.classes.NoSuchMethodException, *error) != JNI_OK)
965       {
966 	_svmm_free_native_local (env, error);
967 	env->in_NoSuchMethodException = JNI_FALSE;
968 	return;
969       }
970 
971     if (_svmm_invoke_nonvirtual_NoSuchMethodException_init (env, error, NULL) != JNI_OK)
972       {
973 	_svmm_free_native_local (env, error);
974 	env->in_NoSuchMethodException = JNI_FALSE;
975 	return;
976       }
977 
978     *(env->throwable) = *error;
979     _svmm_free_native_local (env, error);
980   }
981 
982   env->in_NoSuchMethodException = JNI_FALSE;
983 }
984 
985 /*
986 ----------------------------------------------------------------------
987 _svmf_error_NoSuchMethodException_msg
988 ----------------------------------------------------------------------
989 */
990 
991 svm_static void SVM_UNUSED
_svmf_error_NoSuchMethodException_msg(_svmt_JNIEnv * env,jstring msg)992 _svmf_error_NoSuchMethodException_msg (_svmt_JNIEnv *env, jstring msg)
993 {
994   _svmt_JavaVM *vm = env->vm;
995 
996   if (vm->class_loading.boot_loader.instances.default_NoSuchMethodException == NULL)
997     {
998       _svmf_initialization_unrecoverable_exception (env);
999     }
1000 
1001   /* Empty the stack.  Note that this works even if the frame is
1002      native or internal. */
1003   env->stack.current_frame->stack_size = 0;
1004 
1005   /* We will override any pending instruction with the new one. */
1006   *(env->throwable) = NULL;
1007 
1008   if (env->in_NoSuchMethodException)
1009     {
1010       env->in_NoSuchMethodException = JNI_FALSE;
1011 
1012       *(env->throwable) =
1013 	*(vm->class_loading.boot_loader.instances.default_NoSuchMethodException);
1014       return;
1015     }
1016 
1017   env->in_NoSuchMethodException = JNI_TRUE;
1018 
1019   {
1020     jobject error;
1021 
1022     if (_svmm_new_native_local (env, error) != JNI_OK)
1023       {
1024 	env->in_NoSuchMethodException = JNI_FALSE;
1025 	return;
1026       }
1027 
1028     if (_svmm_new_object_instance
1029 	(env, vm->class_loading.boot_loader.classes.NoSuchMethodException, *error) != JNI_OK)
1030       {
1031 	_svmm_free_native_local (env, error);
1032 	env->in_NoSuchMethodException = JNI_FALSE;
1033 	return;
1034       }
1035 
1036     if (_svmm_invoke_nonvirtual_NoSuchMethodException_init (env, error, msg) != JNI_OK)
1037       {
1038 	_svmm_free_native_local (env, error);
1039 	env->in_NoSuchMethodException = JNI_FALSE;
1040 	return;
1041       }
1042 
1043     *(env->throwable) = *error;
1044     _svmm_free_native_local (env, error);
1045   }
1046 
1047   env->in_NoSuchMethodException = JNI_FALSE;
1048 }
1049 
1050 
1051 /*
1052 ----------------------------------------------------------------------
1053 _svmf_error_NullPointerException
1054 ----------------------------------------------------------------------
1055 */
1056 
1057 svm_static void SVM_UNUSED
_svmf_error_NullPointerException(_svmt_JNIEnv * env)1058 _svmf_error_NullPointerException (_svmt_JNIEnv *env)
1059 {
1060   _svmt_JavaVM *vm = env->vm;
1061 
1062   if (vm->class_loading.boot_loader.instances.default_NullPointerException == NULL)
1063     {
1064       _svmf_initialization_unrecoverable_exception (env);
1065     }
1066 
1067   /* Empty the stack.  (Note that this works even if the frame is
1068      native or internal). */
1069   env->stack.current_frame->stack_size = 0;
1070 
1071   /* We will override any pending instruction with the new one. */
1072   *(env->throwable) = NULL;
1073 
1074   if (env->in_NullPointerException)
1075     {
1076       env->in_NullPointerException = JNI_FALSE;
1077 
1078       *(env->throwable) =
1079 	*(vm->class_loading.boot_loader.instances.default_NullPointerException);
1080       return;
1081     }
1082 
1083   env->in_NullPointerException = JNI_TRUE;
1084 
1085   {
1086     jobject error;
1087 
1088     if (_svmm_new_native_local (env, error) != JNI_OK)
1089       {
1090 	env->in_NullPointerException = JNI_FALSE;
1091 	return;
1092       }
1093 
1094     if (_svmm_new_object_instance
1095 	(env, vm->class_loading.boot_loader.classes.NullPointerException, *error) != JNI_OK)
1096       {
1097 	_svmm_free_native_local (env, error);
1098 	env->in_NullPointerException = JNI_FALSE;
1099 	return;
1100       }
1101 
1102     if (_svmm_invoke_nonvirtual_NullPointerException_init (env, error, NULL) != JNI_OK)
1103       {
1104 	_svmm_free_native_local (env, error);
1105 	env->in_NullPointerException = JNI_FALSE;
1106 	return;
1107       }
1108 
1109     *(env->throwable) = *error;
1110     _svmm_free_native_local (env, error);
1111   }
1112 
1113   env->in_NullPointerException = JNI_FALSE;
1114 }
1115 
1116 /*
1117 ----------------------------------------------------------------------
1118 _svmf_error_NullPointerException_msg
1119 ----------------------------------------------------------------------
1120 */
1121 
1122 svm_static void SVM_UNUSED
_svmf_error_NullPointerException_msg(_svmt_JNIEnv * env,jstring msg)1123 _svmf_error_NullPointerException_msg (_svmt_JNIEnv *env, jstring msg)
1124 {
1125   _svmt_JavaVM *vm = env->vm;
1126 
1127   if (vm->class_loading.boot_loader.instances.default_NullPointerException == NULL)
1128     {
1129       _svmf_initialization_unrecoverable_exception (env);
1130     }
1131 
1132   /* Empty the stack.  Note that this works even if the frame is
1133      native or internal. */
1134   env->stack.current_frame->stack_size = 0;
1135 
1136   /* We will override any pending instruction with the new one. */
1137   *(env->throwable) = NULL;
1138 
1139   if (env->in_NullPointerException)
1140     {
1141       env->in_NullPointerException = JNI_FALSE;
1142 
1143       *(env->throwable) =
1144 	*(vm->class_loading.boot_loader.instances.default_NullPointerException);
1145       return;
1146     }
1147 
1148   env->in_NullPointerException = JNI_TRUE;
1149 
1150   {
1151     jobject error;
1152 
1153     if (_svmm_new_native_local (env, error) != JNI_OK)
1154       {
1155 	env->in_NullPointerException = JNI_FALSE;
1156 	return;
1157       }
1158 
1159     if (_svmm_new_object_instance
1160 	(env, vm->class_loading.boot_loader.classes.NullPointerException, *error) != JNI_OK)
1161       {
1162 	_svmm_free_native_local (env, error);
1163 	env->in_NullPointerException = JNI_FALSE;
1164 	return;
1165       }
1166 
1167     if (_svmm_invoke_nonvirtual_NullPointerException_init (env, error, msg) != JNI_OK)
1168       {
1169 	_svmm_free_native_local (env, error);
1170 	env->in_NullPointerException = JNI_FALSE;
1171 	return;
1172       }
1173 
1174     *(env->throwable) = *error;
1175     _svmm_free_native_local (env, error);
1176   }
1177 
1178   env->in_NullPointerException = JNI_FALSE;
1179 }
1180 
1181 
1182 /*
1183 ----------------------------------------------------------------------
1184 _svmf_error_InterruptedException
1185 ----------------------------------------------------------------------
1186 */
1187 
1188 svm_static void SVM_UNUSED
_svmf_error_InterruptedException(_svmt_JNIEnv * env)1189 _svmf_error_InterruptedException (_svmt_JNIEnv *env)
1190 {
1191   _svmt_JavaVM *vm = env->vm;
1192 
1193   if (vm->class_loading.boot_loader.instances.default_InterruptedException == NULL)
1194     {
1195       _svmf_initialization_unrecoverable_exception (env);
1196     }
1197 
1198   /* Empty the stack.  (Note that this works even if the frame is
1199      native or internal). */
1200   env->stack.current_frame->stack_size = 0;
1201 
1202   /* We will override any pending instruction with the new one. */
1203   *(env->throwable) = NULL;
1204 
1205   if (env->in_InterruptedException)
1206     {
1207       env->in_InterruptedException = JNI_FALSE;
1208 
1209       *(env->throwable) =
1210 	*(vm->class_loading.boot_loader.instances.default_InterruptedException);
1211       return;
1212     }
1213 
1214   env->in_InterruptedException = JNI_TRUE;
1215 
1216   {
1217     jobject error;
1218 
1219     if (_svmm_new_native_local (env, error) != JNI_OK)
1220       {
1221 	env->in_InterruptedException = JNI_FALSE;
1222 	return;
1223       }
1224 
1225     if (_svmm_new_object_instance
1226 	(env, vm->class_loading.boot_loader.classes.InterruptedException, *error) != JNI_OK)
1227       {
1228 	_svmm_free_native_local (env, error);
1229 	env->in_InterruptedException = JNI_FALSE;
1230 	return;
1231       }
1232 
1233     if (_svmm_invoke_nonvirtual_InterruptedException_init (env, error, NULL) != JNI_OK)
1234       {
1235 	_svmm_free_native_local (env, error);
1236 	env->in_InterruptedException = JNI_FALSE;
1237 	return;
1238       }
1239 
1240     *(env->throwable) = *error;
1241     _svmm_free_native_local (env, error);
1242   }
1243 
1244   env->in_InterruptedException = JNI_FALSE;
1245 }
1246 
1247 /*
1248 ----------------------------------------------------------------------
1249 _svmf_error_InterruptedException_msg
1250 ----------------------------------------------------------------------
1251 */
1252 
1253 svm_static void SVM_UNUSED
_svmf_error_InterruptedException_msg(_svmt_JNIEnv * env,jstring msg)1254 _svmf_error_InterruptedException_msg (_svmt_JNIEnv *env, jstring msg)
1255 {
1256   _svmt_JavaVM *vm = env->vm;
1257 
1258   if (vm->class_loading.boot_loader.instances.default_InterruptedException == NULL)
1259     {
1260       _svmf_initialization_unrecoverable_exception (env);
1261     }
1262 
1263   /* Empty the stack.  Note that this works even if the frame is
1264      native or internal. */
1265   env->stack.current_frame->stack_size = 0;
1266 
1267   /* We will override any pending instruction with the new one. */
1268   *(env->throwable) = NULL;
1269 
1270   if (env->in_InterruptedException)
1271     {
1272       env->in_InterruptedException = JNI_FALSE;
1273 
1274       *(env->throwable) =
1275 	*(vm->class_loading.boot_loader.instances.default_InterruptedException);
1276       return;
1277     }
1278 
1279   env->in_InterruptedException = JNI_TRUE;
1280 
1281   {
1282     jobject error;
1283 
1284     if (_svmm_new_native_local (env, error) != JNI_OK)
1285       {
1286 	env->in_InterruptedException = JNI_FALSE;
1287 	return;
1288       }
1289 
1290     if (_svmm_new_object_instance
1291 	(env, vm->class_loading.boot_loader.classes.InterruptedException, *error) != JNI_OK)
1292       {
1293 	_svmm_free_native_local (env, error);
1294 	env->in_InterruptedException = JNI_FALSE;
1295 	return;
1296       }
1297 
1298     if (_svmm_invoke_nonvirtual_InterruptedException_init (env, error, msg) != JNI_OK)
1299       {
1300 	_svmm_free_native_local (env, error);
1301 	env->in_InterruptedException = JNI_FALSE;
1302 	return;
1303       }
1304 
1305     *(env->throwable) = *error;
1306     _svmm_free_native_local (env, error);
1307   }
1308 
1309   env->in_InterruptedException = JNI_FALSE;
1310 }
1311 
1312 
1313 /*
1314 ----------------------------------------------------------------------
1315 _svmf_error_InliningException
1316 ----------------------------------------------------------------------
1317 */
1318 
1319 svm_static void SVM_UNUSED
_svmf_error_InliningException(_svmt_JNIEnv * env)1320 _svmf_error_InliningException (_svmt_JNIEnv *env)
1321 {
1322   _svmt_JavaVM *vm = env->vm;
1323 
1324   if (vm->class_loading.boot_loader.instances.default_InliningException == NULL)
1325     {
1326       _svmf_initialization_unrecoverable_exception (env);
1327     }
1328 
1329   /* Empty the stack.  (Note that this works even if the frame is
1330      native or internal). */
1331   env->stack.current_frame->stack_size = 0;
1332 
1333   /* We will override any pending instruction with the new one. */
1334   *(env->throwable) = NULL;
1335 
1336   if (env->in_InliningException)
1337     {
1338       env->in_InliningException = JNI_FALSE;
1339 
1340       *(env->throwable) =
1341 	*(vm->class_loading.boot_loader.instances.default_InliningException);
1342       return;
1343     }
1344 
1345   env->in_InliningException = JNI_TRUE;
1346 
1347   {
1348     jobject error;
1349 
1350     if (_svmm_new_native_local (env, error) != JNI_OK)
1351       {
1352 	env->in_InliningException = JNI_FALSE;
1353 	return;
1354       }
1355 
1356     if (_svmm_new_object_instance
1357 	(env, vm->class_loading.boot_loader.classes.InliningException, *error) != JNI_OK)
1358       {
1359 	_svmm_free_native_local (env, error);
1360 	env->in_InliningException = JNI_FALSE;
1361 	return;
1362       }
1363 
1364     if (_svmm_invoke_nonvirtual_InliningException_init (env, error, NULL) != JNI_OK)
1365       {
1366 	_svmm_free_native_local (env, error);
1367 	env->in_InliningException = JNI_FALSE;
1368 	return;
1369       }
1370 
1371     *(env->throwable) = *error;
1372     _svmm_free_native_local (env, error);
1373   }
1374 
1375   env->in_InliningException = JNI_FALSE;
1376 }
1377 
1378 /*
1379 ----------------------------------------------------------------------
1380 _svmf_error_InliningException_msg
1381 ----------------------------------------------------------------------
1382 */
1383 
1384 svm_static void SVM_UNUSED
_svmf_error_InliningException_msg(_svmt_JNIEnv * env,jstring msg)1385 _svmf_error_InliningException_msg (_svmt_JNIEnv *env, jstring msg)
1386 {
1387   _svmt_JavaVM *vm = env->vm;
1388 
1389   if (vm->class_loading.boot_loader.instances.default_InliningException == NULL)
1390     {
1391       _svmf_initialization_unrecoverable_exception (env);
1392     }
1393 
1394   /* Empty the stack.  Note that this works even if the frame is
1395      native or internal. */
1396   env->stack.current_frame->stack_size = 0;
1397 
1398   /* We will override any pending instruction with the new one. */
1399   *(env->throwable) = NULL;
1400 
1401   if (env->in_InliningException)
1402     {
1403       env->in_InliningException = JNI_FALSE;
1404 
1405       *(env->throwable) =
1406 	*(vm->class_loading.boot_loader.instances.default_InliningException);
1407       return;
1408     }
1409 
1410   env->in_InliningException = JNI_TRUE;
1411 
1412   {
1413     jobject error;
1414 
1415     if (_svmm_new_native_local (env, error) != JNI_OK)
1416       {
1417 	env->in_InliningException = JNI_FALSE;
1418 	return;
1419       }
1420 
1421     if (_svmm_new_object_instance
1422 	(env, vm->class_loading.boot_loader.classes.InliningException, *error) != JNI_OK)
1423       {
1424 	_svmm_free_native_local (env, error);
1425 	env->in_InliningException = JNI_FALSE;
1426 	return;
1427       }
1428 
1429     if (_svmm_invoke_nonvirtual_InliningException_init (env, error, msg) != JNI_OK)
1430       {
1431 	_svmm_free_native_local (env, error);
1432 	env->in_InliningException = JNI_FALSE;
1433 	return;
1434       }
1435 
1436     *(env->throwable) = *error;
1437     _svmm_free_native_local (env, error);
1438   }
1439 
1440   env->in_InliningException = JNI_FALSE;
1441 }
1442 
1443 
1444 /*
1445 ----------------------------------------------------------------------
1446 _svmf_error_AbstractMethodError
1447 ----------------------------------------------------------------------
1448 */
1449 
1450 svm_static void SVM_UNUSED
_svmf_error_AbstractMethodError(_svmt_JNIEnv * env)1451 _svmf_error_AbstractMethodError (_svmt_JNIEnv *env)
1452 {
1453   _svmt_JavaVM *vm = env->vm;
1454 
1455   if (vm->class_loading.boot_loader.instances.default_AbstractMethodError == NULL)
1456     {
1457       _svmf_initialization_unrecoverable_exception (env);
1458     }
1459 
1460   /* Empty the stack.  (Note that this works even if the frame is
1461      native or internal). */
1462   env->stack.current_frame->stack_size = 0;
1463 
1464   /* We will override any pending instruction with the new one. */
1465   *(env->throwable) = NULL;
1466 
1467   if (env->in_AbstractMethodError)
1468     {
1469       env->in_AbstractMethodError = JNI_FALSE;
1470 
1471       *(env->throwable) =
1472 	*(vm->class_loading.boot_loader.instances.default_AbstractMethodError);
1473       return;
1474     }
1475 
1476   env->in_AbstractMethodError = JNI_TRUE;
1477 
1478   {
1479     jobject error;
1480 
1481     if (_svmm_new_native_local (env, error) != JNI_OK)
1482       {
1483 	env->in_AbstractMethodError = JNI_FALSE;
1484 	return;
1485       }
1486 
1487     if (_svmm_new_object_instance
1488 	(env, vm->class_loading.boot_loader.classes.AbstractMethodError, *error) != JNI_OK)
1489       {
1490 	_svmm_free_native_local (env, error);
1491 	env->in_AbstractMethodError = JNI_FALSE;
1492 	return;
1493       }
1494 
1495     if (_svmm_invoke_nonvirtual_AbstractMethodError_init (env, error, NULL) != JNI_OK)
1496       {
1497 	_svmm_free_native_local (env, error);
1498 	env->in_AbstractMethodError = JNI_FALSE;
1499 	return;
1500       }
1501 
1502     *(env->throwable) = *error;
1503     _svmm_free_native_local (env, error);
1504   }
1505 
1506   env->in_AbstractMethodError = JNI_FALSE;
1507 }
1508 
1509 /*
1510 ----------------------------------------------------------------------
1511 _svmf_error_AbstractMethodError_msg
1512 ----------------------------------------------------------------------
1513 */
1514 
1515 svm_static void SVM_UNUSED
_svmf_error_AbstractMethodError_msg(_svmt_JNIEnv * env,jstring msg)1516 _svmf_error_AbstractMethodError_msg (_svmt_JNIEnv *env, jstring msg)
1517 {
1518   _svmt_JavaVM *vm = env->vm;
1519 
1520   if (vm->class_loading.boot_loader.instances.default_AbstractMethodError == NULL)
1521     {
1522       _svmf_initialization_unrecoverable_exception (env);
1523     }
1524 
1525   /* Empty the stack.  Note that this works even if the frame is
1526      native or internal. */
1527   env->stack.current_frame->stack_size = 0;
1528 
1529   /* We will override any pending instruction with the new one. */
1530   *(env->throwable) = NULL;
1531 
1532   if (env->in_AbstractMethodError)
1533     {
1534       env->in_AbstractMethodError = JNI_FALSE;
1535 
1536       *(env->throwable) =
1537 	*(vm->class_loading.boot_loader.instances.default_AbstractMethodError);
1538       return;
1539     }
1540 
1541   env->in_AbstractMethodError = JNI_TRUE;
1542 
1543   {
1544     jobject error;
1545 
1546     if (_svmm_new_native_local (env, error) != JNI_OK)
1547       {
1548 	env->in_AbstractMethodError = JNI_FALSE;
1549 	return;
1550       }
1551 
1552     if (_svmm_new_object_instance
1553 	(env, vm->class_loading.boot_loader.classes.AbstractMethodError, *error) != JNI_OK)
1554       {
1555 	_svmm_free_native_local (env, error);
1556 	env->in_AbstractMethodError = JNI_FALSE;
1557 	return;
1558       }
1559 
1560     if (_svmm_invoke_nonvirtual_AbstractMethodError_init (env, error, msg) != JNI_OK)
1561       {
1562 	_svmm_free_native_local (env, error);
1563 	env->in_AbstractMethodError = JNI_FALSE;
1564 	return;
1565       }
1566 
1567     *(env->throwable) = *error;
1568     _svmm_free_native_local (env, error);
1569   }
1570 
1571   env->in_AbstractMethodError = JNI_FALSE;
1572 }
1573 
1574 
1575 /*
1576 ----------------------------------------------------------------------
1577 _svmf_error_ClassCircularityError
1578 ----------------------------------------------------------------------
1579 */
1580 
1581 svm_static void SVM_UNUSED
_svmf_error_ClassCircularityError(_svmt_JNIEnv * env)1582 _svmf_error_ClassCircularityError (_svmt_JNIEnv *env)
1583 {
1584   _svmt_JavaVM *vm = env->vm;
1585 
1586   if (vm->class_loading.boot_loader.instances.default_ClassCircularityError == NULL)
1587     {
1588       _svmf_initialization_unrecoverable_exception (env);
1589     }
1590 
1591   /* Empty the stack.  (Note that this works even if the frame is
1592      native or internal). */
1593   env->stack.current_frame->stack_size = 0;
1594 
1595   /* We will override any pending instruction with the new one. */
1596   *(env->throwable) = NULL;
1597 
1598   if (env->in_ClassCircularityError)
1599     {
1600       env->in_ClassCircularityError = JNI_FALSE;
1601 
1602       *(env->throwable) =
1603 	*(vm->class_loading.boot_loader.instances.default_ClassCircularityError);
1604       return;
1605     }
1606 
1607   env->in_ClassCircularityError = JNI_TRUE;
1608 
1609   {
1610     jobject error;
1611 
1612     if (_svmm_new_native_local (env, error) != JNI_OK)
1613       {
1614 	env->in_ClassCircularityError = JNI_FALSE;
1615 	return;
1616       }
1617 
1618     if (_svmm_new_object_instance
1619 	(env, vm->class_loading.boot_loader.classes.ClassCircularityError, *error) != JNI_OK)
1620       {
1621 	_svmm_free_native_local (env, error);
1622 	env->in_ClassCircularityError = JNI_FALSE;
1623 	return;
1624       }
1625 
1626     if (_svmm_invoke_nonvirtual_ClassCircularityError_init (env, error, NULL) != JNI_OK)
1627       {
1628 	_svmm_free_native_local (env, error);
1629 	env->in_ClassCircularityError = JNI_FALSE;
1630 	return;
1631       }
1632 
1633     *(env->throwable) = *error;
1634     _svmm_free_native_local (env, error);
1635   }
1636 
1637   env->in_ClassCircularityError = JNI_FALSE;
1638 }
1639 
1640 /*
1641 ----------------------------------------------------------------------
1642 _svmf_error_ClassCircularityError_msg
1643 ----------------------------------------------------------------------
1644 */
1645 
1646 svm_static void SVM_UNUSED
_svmf_error_ClassCircularityError_msg(_svmt_JNIEnv * env,jstring msg)1647 _svmf_error_ClassCircularityError_msg (_svmt_JNIEnv *env, jstring msg)
1648 {
1649   _svmt_JavaVM *vm = env->vm;
1650 
1651   if (vm->class_loading.boot_loader.instances.default_ClassCircularityError == NULL)
1652     {
1653       _svmf_initialization_unrecoverable_exception (env);
1654     }
1655 
1656   /* Empty the stack.  Note that this works even if the frame is
1657      native or internal. */
1658   env->stack.current_frame->stack_size = 0;
1659 
1660   /* We will override any pending instruction with the new one. */
1661   *(env->throwable) = NULL;
1662 
1663   if (env->in_ClassCircularityError)
1664     {
1665       env->in_ClassCircularityError = JNI_FALSE;
1666 
1667       *(env->throwable) =
1668 	*(vm->class_loading.boot_loader.instances.default_ClassCircularityError);
1669       return;
1670     }
1671 
1672   env->in_ClassCircularityError = JNI_TRUE;
1673 
1674   {
1675     jobject error;
1676 
1677     if (_svmm_new_native_local (env, error) != JNI_OK)
1678       {
1679 	env->in_ClassCircularityError = JNI_FALSE;
1680 	return;
1681       }
1682 
1683     if (_svmm_new_object_instance
1684 	(env, vm->class_loading.boot_loader.classes.ClassCircularityError, *error) != JNI_OK)
1685       {
1686 	_svmm_free_native_local (env, error);
1687 	env->in_ClassCircularityError = JNI_FALSE;
1688 	return;
1689       }
1690 
1691     if (_svmm_invoke_nonvirtual_ClassCircularityError_init (env, error, msg) != JNI_OK)
1692       {
1693 	_svmm_free_native_local (env, error);
1694 	env->in_ClassCircularityError = JNI_FALSE;
1695 	return;
1696       }
1697 
1698     *(env->throwable) = *error;
1699     _svmm_free_native_local (env, error);
1700   }
1701 
1702   env->in_ClassCircularityError = JNI_FALSE;
1703 }
1704 
1705 
1706 /*
1707 ----------------------------------------------------------------------
1708 _svmf_error_ClassFormatError
1709 ----------------------------------------------------------------------
1710 */
1711 
1712 svm_static void SVM_UNUSED
_svmf_error_ClassFormatError(_svmt_JNIEnv * env)1713 _svmf_error_ClassFormatError (_svmt_JNIEnv *env)
1714 {
1715   _svmt_JavaVM *vm = env->vm;
1716 
1717   if (vm->class_loading.boot_loader.instances.default_ClassFormatError == NULL)
1718     {
1719       _svmf_initialization_unrecoverable_exception (env);
1720     }
1721 
1722   /* Empty the stack.  (Note that this works even if the frame is
1723      native or internal). */
1724   env->stack.current_frame->stack_size = 0;
1725 
1726   /* We will override any pending instruction with the new one. */
1727   *(env->throwable) = NULL;
1728 
1729   if (env->in_ClassFormatError)
1730     {
1731       env->in_ClassFormatError = JNI_FALSE;
1732 
1733       *(env->throwable) =
1734 	*(vm->class_loading.boot_loader.instances.default_ClassFormatError);
1735       return;
1736     }
1737 
1738   env->in_ClassFormatError = JNI_TRUE;
1739 
1740   {
1741     jobject error;
1742 
1743     if (_svmm_new_native_local (env, error) != JNI_OK)
1744       {
1745 	env->in_ClassFormatError = JNI_FALSE;
1746 	return;
1747       }
1748 
1749     if (_svmm_new_object_instance
1750 	(env, vm->class_loading.boot_loader.classes.ClassFormatError, *error) != JNI_OK)
1751       {
1752 	_svmm_free_native_local (env, error);
1753 	env->in_ClassFormatError = JNI_FALSE;
1754 	return;
1755       }
1756 
1757     if (_svmm_invoke_nonvirtual_ClassFormatError_init (env, error, NULL) != JNI_OK)
1758       {
1759 	_svmm_free_native_local (env, error);
1760 	env->in_ClassFormatError = JNI_FALSE;
1761 	return;
1762       }
1763 
1764     *(env->throwable) = *error;
1765     _svmm_free_native_local (env, error);
1766   }
1767 
1768   env->in_ClassFormatError = JNI_FALSE;
1769 }
1770 
1771 /*
1772 ----------------------------------------------------------------------
1773 _svmf_error_ClassFormatError_msg
1774 ----------------------------------------------------------------------
1775 */
1776 
1777 svm_static void SVM_UNUSED
_svmf_error_ClassFormatError_msg(_svmt_JNIEnv * env,jstring msg)1778 _svmf_error_ClassFormatError_msg (_svmt_JNIEnv *env, jstring msg)
1779 {
1780   _svmt_JavaVM *vm = env->vm;
1781 
1782   if (vm->class_loading.boot_loader.instances.default_ClassFormatError == NULL)
1783     {
1784       _svmf_initialization_unrecoverable_exception (env);
1785     }
1786 
1787   /* Empty the stack.  Note that this works even if the frame is
1788      native or internal. */
1789   env->stack.current_frame->stack_size = 0;
1790 
1791   /* We will override any pending instruction with the new one. */
1792   *(env->throwable) = NULL;
1793 
1794   if (env->in_ClassFormatError)
1795     {
1796       env->in_ClassFormatError = JNI_FALSE;
1797 
1798       *(env->throwable) =
1799 	*(vm->class_loading.boot_loader.instances.default_ClassFormatError);
1800       return;
1801     }
1802 
1803   env->in_ClassFormatError = JNI_TRUE;
1804 
1805   {
1806     jobject error;
1807 
1808     if (_svmm_new_native_local (env, error) != JNI_OK)
1809       {
1810 	env->in_ClassFormatError = JNI_FALSE;
1811 	return;
1812       }
1813 
1814     if (_svmm_new_object_instance
1815 	(env, vm->class_loading.boot_loader.classes.ClassFormatError, *error) != JNI_OK)
1816       {
1817 	_svmm_free_native_local (env, error);
1818 	env->in_ClassFormatError = JNI_FALSE;
1819 	return;
1820       }
1821 
1822     if (_svmm_invoke_nonvirtual_ClassFormatError_init (env, error, msg) != JNI_OK)
1823       {
1824 	_svmm_free_native_local (env, error);
1825 	env->in_ClassFormatError = JNI_FALSE;
1826 	return;
1827       }
1828 
1829     *(env->throwable) = *error;
1830     _svmm_free_native_local (env, error);
1831   }
1832 
1833   env->in_ClassFormatError = JNI_FALSE;
1834 }
1835 
1836 
1837 /*
1838 ----------------------------------------------------------------------
1839 _svmf_error_ExceptionInInitializerError
1840 ----------------------------------------------------------------------
1841 */
1842 
1843 svm_static void SVM_UNUSED
_svmf_error_ExceptionInInitializerError(_svmt_JNIEnv * env)1844 _svmf_error_ExceptionInInitializerError (_svmt_JNIEnv *env)
1845 {
1846   _svmt_JavaVM *vm = env->vm;
1847 
1848   if (vm->class_loading.boot_loader.instances.default_ExceptionInInitializerError == NULL)
1849     {
1850       _svmf_initialization_unrecoverable_exception (env);
1851     }
1852 
1853   /* Empty the stack.  (Note that this works even if the frame is
1854      native or internal). */
1855   env->stack.current_frame->stack_size = 0;
1856 
1857   /* We will override any pending instruction with the new one. */
1858   *(env->throwable) = NULL;
1859 
1860   if (env->in_ExceptionInInitializerError)
1861     {
1862       env->in_ExceptionInInitializerError = JNI_FALSE;
1863 
1864       *(env->throwable) =
1865 	*(vm->class_loading.boot_loader.instances.default_ExceptionInInitializerError);
1866       return;
1867     }
1868 
1869   env->in_ExceptionInInitializerError = JNI_TRUE;
1870 
1871   {
1872     jobject error;
1873 
1874     if (_svmm_new_native_local (env, error) != JNI_OK)
1875       {
1876 	env->in_ExceptionInInitializerError = JNI_FALSE;
1877 	return;
1878       }
1879 
1880     if (_svmm_new_object_instance
1881 	(env, vm->class_loading.boot_loader.classes.ExceptionInInitializerError, *error) != JNI_OK)
1882       {
1883 	_svmm_free_native_local (env, error);
1884 	env->in_ExceptionInInitializerError = JNI_FALSE;
1885 	return;
1886       }
1887 
1888     if (_svmm_invoke_nonvirtual_ExceptionInInitializerError_init (env, error, NULL) != JNI_OK)
1889       {
1890 	_svmm_free_native_local (env, error);
1891 	env->in_ExceptionInInitializerError = JNI_FALSE;
1892 	return;
1893       }
1894 
1895     *(env->throwable) = *error;
1896     _svmm_free_native_local (env, error);
1897   }
1898 
1899   env->in_ExceptionInInitializerError = JNI_FALSE;
1900 }
1901 
1902 /*
1903 ----------------------------------------------------------------------
1904 _svmf_error_ExceptionInInitializerError_msg
1905 ----------------------------------------------------------------------
1906 */
1907 
1908 svm_static void SVM_UNUSED
_svmf_error_ExceptionInInitializerError_msg(_svmt_JNIEnv * env,jstring msg)1909 _svmf_error_ExceptionInInitializerError_msg (_svmt_JNIEnv *env, jstring msg)
1910 {
1911   _svmt_JavaVM *vm = env->vm;
1912 
1913   if (vm->class_loading.boot_loader.instances.default_ExceptionInInitializerError == NULL)
1914     {
1915       _svmf_initialization_unrecoverable_exception (env);
1916     }
1917 
1918   /* Empty the stack.  Note that this works even if the frame is
1919      native or internal. */
1920   env->stack.current_frame->stack_size = 0;
1921 
1922   /* We will override any pending instruction with the new one. */
1923   *(env->throwable) = NULL;
1924 
1925   if (env->in_ExceptionInInitializerError)
1926     {
1927       env->in_ExceptionInInitializerError = JNI_FALSE;
1928 
1929       *(env->throwable) =
1930 	*(vm->class_loading.boot_loader.instances.default_ExceptionInInitializerError);
1931       return;
1932     }
1933 
1934   env->in_ExceptionInInitializerError = JNI_TRUE;
1935 
1936   {
1937     jobject error;
1938 
1939     if (_svmm_new_native_local (env, error) != JNI_OK)
1940       {
1941 	env->in_ExceptionInInitializerError = JNI_FALSE;
1942 	return;
1943       }
1944 
1945     if (_svmm_new_object_instance
1946 	(env, vm->class_loading.boot_loader.classes.ExceptionInInitializerError, *error) != JNI_OK)
1947       {
1948 	_svmm_free_native_local (env, error);
1949 	env->in_ExceptionInInitializerError = JNI_FALSE;
1950 	return;
1951       }
1952 
1953     if (_svmm_invoke_nonvirtual_ExceptionInInitializerError_init (env, error, msg) != JNI_OK)
1954       {
1955 	_svmm_free_native_local (env, error);
1956 	env->in_ExceptionInInitializerError = JNI_FALSE;
1957 	return;
1958       }
1959 
1960     *(env->throwable) = *error;
1961     _svmm_free_native_local (env, error);
1962   }
1963 
1964   env->in_ExceptionInInitializerError = JNI_FALSE;
1965 }
1966 
1967 
1968 /*
1969 ----------------------------------------------------------------------
1970 _svmf_error_IncompatibleClassChangeError
1971 ----------------------------------------------------------------------
1972 */
1973 
1974 svm_static void SVM_UNUSED
_svmf_error_IncompatibleClassChangeError(_svmt_JNIEnv * env)1975 _svmf_error_IncompatibleClassChangeError (_svmt_JNIEnv *env)
1976 {
1977   _svmt_JavaVM *vm = env->vm;
1978 
1979   if (vm->class_loading.boot_loader.instances.default_IncompatibleClassChangeError == NULL)
1980     {
1981       _svmf_initialization_unrecoverable_exception (env);
1982     }
1983 
1984   /* Empty the stack.  (Note that this works even if the frame is
1985      native or internal). */
1986   env->stack.current_frame->stack_size = 0;
1987 
1988   /* We will override any pending instruction with the new one. */
1989   *(env->throwable) = NULL;
1990 
1991   if (env->in_IncompatibleClassChangeError)
1992     {
1993       env->in_IncompatibleClassChangeError = JNI_FALSE;
1994 
1995       *(env->throwable) =
1996 	*(vm->class_loading.boot_loader.instances.default_IncompatibleClassChangeError);
1997       return;
1998     }
1999 
2000   env->in_IncompatibleClassChangeError = JNI_TRUE;
2001 
2002   {
2003     jobject error;
2004 
2005     if (_svmm_new_native_local (env, error) != JNI_OK)
2006       {
2007 	env->in_IncompatibleClassChangeError = JNI_FALSE;
2008 	return;
2009       }
2010 
2011     if (_svmm_new_object_instance
2012 	(env, vm->class_loading.boot_loader.classes.IncompatibleClassChangeError, *error) != JNI_OK)
2013       {
2014 	_svmm_free_native_local (env, error);
2015 	env->in_IncompatibleClassChangeError = JNI_FALSE;
2016 	return;
2017       }
2018 
2019     if (_svmm_invoke_nonvirtual_IncompatibleClassChangeError_init (env, error, NULL) != JNI_OK)
2020       {
2021 	_svmm_free_native_local (env, error);
2022 	env->in_IncompatibleClassChangeError = JNI_FALSE;
2023 	return;
2024       }
2025 
2026     *(env->throwable) = *error;
2027     _svmm_free_native_local (env, error);
2028   }
2029 
2030   env->in_IncompatibleClassChangeError = JNI_FALSE;
2031 }
2032 
2033 /*
2034 ----------------------------------------------------------------------
2035 _svmf_error_IncompatibleClassChangeError_msg
2036 ----------------------------------------------------------------------
2037 */
2038 
2039 svm_static void SVM_UNUSED
_svmf_error_IncompatibleClassChangeError_msg(_svmt_JNIEnv * env,jstring msg)2040 _svmf_error_IncompatibleClassChangeError_msg (_svmt_JNIEnv *env, jstring msg)
2041 {
2042   _svmt_JavaVM *vm = env->vm;
2043 
2044   if (vm->class_loading.boot_loader.instances.default_IncompatibleClassChangeError == NULL)
2045     {
2046       _svmf_initialization_unrecoverable_exception (env);
2047     }
2048 
2049   /* Empty the stack.  Note that this works even if the frame is
2050      native or internal. */
2051   env->stack.current_frame->stack_size = 0;
2052 
2053   /* We will override any pending instruction with the new one. */
2054   *(env->throwable) = NULL;
2055 
2056   if (env->in_IncompatibleClassChangeError)
2057     {
2058       env->in_IncompatibleClassChangeError = JNI_FALSE;
2059 
2060       *(env->throwable) =
2061 	*(vm->class_loading.boot_loader.instances.default_IncompatibleClassChangeError);
2062       return;
2063     }
2064 
2065   env->in_IncompatibleClassChangeError = JNI_TRUE;
2066 
2067   {
2068     jobject error;
2069 
2070     if (_svmm_new_native_local (env, error) != JNI_OK)
2071       {
2072 	env->in_IncompatibleClassChangeError = JNI_FALSE;
2073 	return;
2074       }
2075 
2076     if (_svmm_new_object_instance
2077 	(env, vm->class_loading.boot_loader.classes.IncompatibleClassChangeError, *error) != JNI_OK)
2078       {
2079 	_svmm_free_native_local (env, error);
2080 	env->in_IncompatibleClassChangeError = JNI_FALSE;
2081 	return;
2082       }
2083 
2084     if (_svmm_invoke_nonvirtual_IncompatibleClassChangeError_init (env, error, msg) != JNI_OK)
2085       {
2086 	_svmm_free_native_local (env, error);
2087 	env->in_IncompatibleClassChangeError = JNI_FALSE;
2088 	return;
2089       }
2090 
2091     *(env->throwable) = *error;
2092     _svmm_free_native_local (env, error);
2093   }
2094 
2095   env->in_IncompatibleClassChangeError = JNI_FALSE;
2096 }
2097 
2098 
2099 /*
2100 ----------------------------------------------------------------------
2101 _svmf_error_InternalError
2102 ----------------------------------------------------------------------
2103 */
2104 
2105 svm_static void SVM_UNUSED
_svmf_error_InternalError(_svmt_JNIEnv * env)2106 _svmf_error_InternalError (_svmt_JNIEnv *env)
2107 {
2108   _svmt_JavaVM *vm = env->vm;
2109 
2110   if (vm->class_loading.boot_loader.instances.default_InternalError == NULL)
2111     {
2112       _svmf_initialization_unrecoverable_exception (env);
2113     }
2114 
2115   /* Empty the stack.  (Note that this works even if the frame is
2116      native or internal). */
2117   env->stack.current_frame->stack_size = 0;
2118 
2119   /* We will override any pending instruction with the new one. */
2120   *(env->throwable) = NULL;
2121 
2122   if (env->in_InternalError)
2123     {
2124       env->in_InternalError = JNI_FALSE;
2125 
2126       *(env->throwable) =
2127 	*(vm->class_loading.boot_loader.instances.default_InternalError);
2128       return;
2129     }
2130 
2131   env->in_InternalError = JNI_TRUE;
2132 
2133   {
2134     jobject error;
2135 
2136     if (_svmm_new_native_local (env, error) != JNI_OK)
2137       {
2138 	env->in_InternalError = JNI_FALSE;
2139 	return;
2140       }
2141 
2142     if (_svmm_new_object_instance
2143 	(env, vm->class_loading.boot_loader.classes.InternalError, *error) != JNI_OK)
2144       {
2145 	_svmm_free_native_local (env, error);
2146 	env->in_InternalError = JNI_FALSE;
2147 	return;
2148       }
2149 
2150     if (_svmm_invoke_nonvirtual_InternalError_init (env, error, NULL) != JNI_OK)
2151       {
2152 	_svmm_free_native_local (env, error);
2153 	env->in_InternalError = JNI_FALSE;
2154 	return;
2155       }
2156 
2157     *(env->throwable) = *error;
2158     _svmm_free_native_local (env, error);
2159   }
2160 
2161   env->in_InternalError = JNI_FALSE;
2162 }
2163 
2164 /*
2165 ----------------------------------------------------------------------
2166 _svmf_error_InternalError_msg
2167 ----------------------------------------------------------------------
2168 */
2169 
2170 svm_static void SVM_UNUSED
_svmf_error_InternalError_msg(_svmt_JNIEnv * env,jstring msg)2171 _svmf_error_InternalError_msg (_svmt_JNIEnv *env, jstring msg)
2172 {
2173   _svmt_JavaVM *vm = env->vm;
2174 
2175   if (vm->class_loading.boot_loader.instances.default_InternalError == NULL)
2176     {
2177       _svmf_initialization_unrecoverable_exception (env);
2178     }
2179 
2180   /* Empty the stack.  Note that this works even if the frame is
2181      native or internal. */
2182   env->stack.current_frame->stack_size = 0;
2183 
2184   /* We will override any pending instruction with the new one. */
2185   *(env->throwable) = NULL;
2186 
2187   if (env->in_InternalError)
2188     {
2189       env->in_InternalError = JNI_FALSE;
2190 
2191       *(env->throwable) =
2192 	*(vm->class_loading.boot_loader.instances.default_InternalError);
2193       return;
2194     }
2195 
2196   env->in_InternalError = JNI_TRUE;
2197 
2198   {
2199     jobject error;
2200 
2201     if (_svmm_new_native_local (env, error) != JNI_OK)
2202       {
2203 	env->in_InternalError = JNI_FALSE;
2204 	return;
2205       }
2206 
2207     if (_svmm_new_object_instance
2208 	(env, vm->class_loading.boot_loader.classes.InternalError, *error) != JNI_OK)
2209       {
2210 	_svmm_free_native_local (env, error);
2211 	env->in_InternalError = JNI_FALSE;
2212 	return;
2213       }
2214 
2215     if (_svmm_invoke_nonvirtual_InternalError_init (env, error, msg) != JNI_OK)
2216       {
2217 	_svmm_free_native_local (env, error);
2218 	env->in_InternalError = JNI_FALSE;
2219 	return;
2220       }
2221 
2222     *(env->throwable) = *error;
2223     _svmm_free_native_local (env, error);
2224   }
2225 
2226   env->in_InternalError = JNI_FALSE;
2227 }
2228 
2229 
2230 /*
2231 ----------------------------------------------------------------------
2232 _svmf_error_LinkageError
2233 ----------------------------------------------------------------------
2234 */
2235 
2236 svm_static void SVM_UNUSED
_svmf_error_LinkageError(_svmt_JNIEnv * env)2237 _svmf_error_LinkageError (_svmt_JNIEnv *env)
2238 {
2239   _svmt_JavaVM *vm = env->vm;
2240 
2241   if (vm->class_loading.boot_loader.instances.default_LinkageError == NULL)
2242     {
2243       _svmf_initialization_unrecoverable_exception (env);
2244     }
2245 
2246   /* Empty the stack.  (Note that this works even if the frame is
2247      native or internal). */
2248   env->stack.current_frame->stack_size = 0;
2249 
2250   /* We will override any pending instruction with the new one. */
2251   *(env->throwable) = NULL;
2252 
2253   if (env->in_LinkageError)
2254     {
2255       env->in_LinkageError = JNI_FALSE;
2256 
2257       *(env->throwable) =
2258 	*(vm->class_loading.boot_loader.instances.default_LinkageError);
2259       return;
2260     }
2261 
2262   env->in_LinkageError = JNI_TRUE;
2263 
2264   {
2265     jobject error;
2266 
2267     if (_svmm_new_native_local (env, error) != JNI_OK)
2268       {
2269 	env->in_LinkageError = JNI_FALSE;
2270 	return;
2271       }
2272 
2273     if (_svmm_new_object_instance
2274 	(env, vm->class_loading.boot_loader.classes.LinkageError, *error) != JNI_OK)
2275       {
2276 	_svmm_free_native_local (env, error);
2277 	env->in_LinkageError = JNI_FALSE;
2278 	return;
2279       }
2280 
2281     if (_svmm_invoke_nonvirtual_LinkageError_init (env, error, NULL) != JNI_OK)
2282       {
2283 	_svmm_free_native_local (env, error);
2284 	env->in_LinkageError = JNI_FALSE;
2285 	return;
2286       }
2287 
2288     *(env->throwable) = *error;
2289     _svmm_free_native_local (env, error);
2290   }
2291 
2292   env->in_LinkageError = JNI_FALSE;
2293 }
2294 
2295 /*
2296 ----------------------------------------------------------------------
2297 _svmf_error_LinkageError_msg
2298 ----------------------------------------------------------------------
2299 */
2300 
2301 svm_static void SVM_UNUSED
_svmf_error_LinkageError_msg(_svmt_JNIEnv * env,jstring msg)2302 _svmf_error_LinkageError_msg (_svmt_JNIEnv *env, jstring msg)
2303 {
2304   _svmt_JavaVM *vm = env->vm;
2305 
2306   if (vm->class_loading.boot_loader.instances.default_LinkageError == NULL)
2307     {
2308       _svmf_initialization_unrecoverable_exception (env);
2309     }
2310 
2311   /* Empty the stack.  Note that this works even if the frame is
2312      native or internal. */
2313   env->stack.current_frame->stack_size = 0;
2314 
2315   /* We will override any pending instruction with the new one. */
2316   *(env->throwable) = NULL;
2317 
2318   if (env->in_LinkageError)
2319     {
2320       env->in_LinkageError = JNI_FALSE;
2321 
2322       *(env->throwable) =
2323 	*(vm->class_loading.boot_loader.instances.default_LinkageError);
2324       return;
2325     }
2326 
2327   env->in_LinkageError = JNI_TRUE;
2328 
2329   {
2330     jobject error;
2331 
2332     if (_svmm_new_native_local (env, error) != JNI_OK)
2333       {
2334 	env->in_LinkageError = JNI_FALSE;
2335 	return;
2336       }
2337 
2338     if (_svmm_new_object_instance
2339 	(env, vm->class_loading.boot_loader.classes.LinkageError, *error) != JNI_OK)
2340       {
2341 	_svmm_free_native_local (env, error);
2342 	env->in_LinkageError = JNI_FALSE;
2343 	return;
2344       }
2345 
2346     if (_svmm_invoke_nonvirtual_LinkageError_init (env, error, msg) != JNI_OK)
2347       {
2348 	_svmm_free_native_local (env, error);
2349 	env->in_LinkageError = JNI_FALSE;
2350 	return;
2351       }
2352 
2353     *(env->throwable) = *error;
2354     _svmm_free_native_local (env, error);
2355   }
2356 
2357   env->in_LinkageError = JNI_FALSE;
2358 }
2359 
2360 
2361 /*
2362 ----------------------------------------------------------------------
2363 _svmf_error_NoClassDefFoundError
2364 ----------------------------------------------------------------------
2365 */
2366 
2367 svm_static void SVM_UNUSED
_svmf_error_NoClassDefFoundError(_svmt_JNIEnv * env)2368 _svmf_error_NoClassDefFoundError (_svmt_JNIEnv *env)
2369 {
2370   _svmt_JavaVM *vm = env->vm;
2371 
2372   if (vm->class_loading.boot_loader.instances.default_NoClassDefFoundError == NULL)
2373     {
2374       _svmf_initialization_unrecoverable_exception (env);
2375     }
2376 
2377   /* Empty the stack.  (Note that this works even if the frame is
2378      native or internal). */
2379   env->stack.current_frame->stack_size = 0;
2380 
2381   /* We will override any pending instruction with the new one. */
2382   *(env->throwable) = NULL;
2383 
2384   if (env->in_NoClassDefFoundError)
2385     {
2386       env->in_NoClassDefFoundError = JNI_FALSE;
2387 
2388       *(env->throwable) =
2389 	*(vm->class_loading.boot_loader.instances.default_NoClassDefFoundError);
2390       return;
2391     }
2392 
2393   env->in_NoClassDefFoundError = JNI_TRUE;
2394 
2395   {
2396     jobject error;
2397 
2398     if (_svmm_new_native_local (env, error) != JNI_OK)
2399       {
2400 	env->in_NoClassDefFoundError = JNI_FALSE;
2401 	return;
2402       }
2403 
2404     if (_svmm_new_object_instance
2405 	(env, vm->class_loading.boot_loader.classes.NoClassDefFoundError, *error) != JNI_OK)
2406       {
2407 	_svmm_free_native_local (env, error);
2408 	env->in_NoClassDefFoundError = JNI_FALSE;
2409 	return;
2410       }
2411 
2412     if (_svmm_invoke_nonvirtual_NoClassDefFoundError_init (env, error, NULL) != JNI_OK)
2413       {
2414 	_svmm_free_native_local (env, error);
2415 	env->in_NoClassDefFoundError = JNI_FALSE;
2416 	return;
2417       }
2418 
2419     *(env->throwable) = *error;
2420     _svmm_free_native_local (env, error);
2421   }
2422 
2423   env->in_NoClassDefFoundError = JNI_FALSE;
2424 }
2425 
2426 /*
2427 ----------------------------------------------------------------------
2428 _svmf_error_NoClassDefFoundError_msg
2429 ----------------------------------------------------------------------
2430 */
2431 
2432 svm_static void SVM_UNUSED
_svmf_error_NoClassDefFoundError_msg(_svmt_JNIEnv * env,jstring msg)2433 _svmf_error_NoClassDefFoundError_msg (_svmt_JNIEnv *env, jstring msg)
2434 {
2435   _svmt_JavaVM *vm = env->vm;
2436 
2437   if (vm->class_loading.boot_loader.instances.default_NoClassDefFoundError == NULL)
2438     {
2439       _svmf_initialization_unrecoverable_exception (env);
2440     }
2441 
2442   /* Empty the stack.  Note that this works even if the frame is
2443      native or internal. */
2444   env->stack.current_frame->stack_size = 0;
2445 
2446   /* We will override any pending instruction with the new one. */
2447   *(env->throwable) = NULL;
2448 
2449   if (env->in_NoClassDefFoundError)
2450     {
2451       env->in_NoClassDefFoundError = JNI_FALSE;
2452 
2453       *(env->throwable) =
2454 	*(vm->class_loading.boot_loader.instances.default_NoClassDefFoundError);
2455       return;
2456     }
2457 
2458   env->in_NoClassDefFoundError = JNI_TRUE;
2459 
2460   {
2461     jobject error;
2462 
2463     if (_svmm_new_native_local (env, error) != JNI_OK)
2464       {
2465 	env->in_NoClassDefFoundError = JNI_FALSE;
2466 	return;
2467       }
2468 
2469     if (_svmm_new_object_instance
2470 	(env, vm->class_loading.boot_loader.classes.NoClassDefFoundError, *error) != JNI_OK)
2471       {
2472 	_svmm_free_native_local (env, error);
2473 	env->in_NoClassDefFoundError = JNI_FALSE;
2474 	return;
2475       }
2476 
2477     if (_svmm_invoke_nonvirtual_NoClassDefFoundError_init (env, error, msg) != JNI_OK)
2478       {
2479 	_svmm_free_native_local (env, error);
2480 	env->in_NoClassDefFoundError = JNI_FALSE;
2481 	return;
2482       }
2483 
2484     *(env->throwable) = *error;
2485     _svmm_free_native_local (env, error);
2486   }
2487 
2488   env->in_NoClassDefFoundError = JNI_FALSE;
2489 }
2490 
2491 
2492 /*
2493 ----------------------------------------------------------------------
2494 _svmf_error_NoSuchFieldError
2495 ----------------------------------------------------------------------
2496 */
2497 
2498 svm_static void SVM_UNUSED
_svmf_error_NoSuchFieldError(_svmt_JNIEnv * env)2499 _svmf_error_NoSuchFieldError (_svmt_JNIEnv *env)
2500 {
2501   _svmt_JavaVM *vm = env->vm;
2502 
2503   if (vm->class_loading.boot_loader.instances.default_NoSuchFieldError == NULL)
2504     {
2505       _svmf_initialization_unrecoverable_exception (env);
2506     }
2507 
2508   /* Empty the stack.  (Note that this works even if the frame is
2509      native or internal). */
2510   env->stack.current_frame->stack_size = 0;
2511 
2512   /* We will override any pending instruction with the new one. */
2513   *(env->throwable) = NULL;
2514 
2515   if (env->in_NoSuchFieldError)
2516     {
2517       env->in_NoSuchFieldError = JNI_FALSE;
2518 
2519       *(env->throwable) =
2520 	*(vm->class_loading.boot_loader.instances.default_NoSuchFieldError);
2521       return;
2522     }
2523 
2524   env->in_NoSuchFieldError = JNI_TRUE;
2525 
2526   {
2527     jobject error;
2528 
2529     if (_svmm_new_native_local (env, error) != JNI_OK)
2530       {
2531 	env->in_NoSuchFieldError = JNI_FALSE;
2532 	return;
2533       }
2534 
2535     if (_svmm_new_object_instance
2536 	(env, vm->class_loading.boot_loader.classes.NoSuchFieldError, *error) != JNI_OK)
2537       {
2538 	_svmm_free_native_local (env, error);
2539 	env->in_NoSuchFieldError = JNI_FALSE;
2540 	return;
2541       }
2542 
2543     if (_svmm_invoke_nonvirtual_NoSuchFieldError_init (env, error, NULL) != JNI_OK)
2544       {
2545 	_svmm_free_native_local (env, error);
2546 	env->in_NoSuchFieldError = JNI_FALSE;
2547 	return;
2548       }
2549 
2550     *(env->throwable) = *error;
2551     _svmm_free_native_local (env, error);
2552   }
2553 
2554   env->in_NoSuchFieldError = JNI_FALSE;
2555 }
2556 
2557 /*
2558 ----------------------------------------------------------------------
2559 _svmf_error_NoSuchFieldError_msg
2560 ----------------------------------------------------------------------
2561 */
2562 
2563 svm_static void SVM_UNUSED
_svmf_error_NoSuchFieldError_msg(_svmt_JNIEnv * env,jstring msg)2564 _svmf_error_NoSuchFieldError_msg (_svmt_JNIEnv *env, jstring msg)
2565 {
2566   _svmt_JavaVM *vm = env->vm;
2567 
2568   if (vm->class_loading.boot_loader.instances.default_NoSuchFieldError == NULL)
2569     {
2570       _svmf_initialization_unrecoverable_exception (env);
2571     }
2572 
2573   /* Empty the stack.  Note that this works even if the frame is
2574      native or internal. */
2575   env->stack.current_frame->stack_size = 0;
2576 
2577   /* We will override any pending instruction with the new one. */
2578   *(env->throwable) = NULL;
2579 
2580   if (env->in_NoSuchFieldError)
2581     {
2582       env->in_NoSuchFieldError = JNI_FALSE;
2583 
2584       *(env->throwable) =
2585 	*(vm->class_loading.boot_loader.instances.default_NoSuchFieldError);
2586       return;
2587     }
2588 
2589   env->in_NoSuchFieldError = JNI_TRUE;
2590 
2591   {
2592     jobject error;
2593 
2594     if (_svmm_new_native_local (env, error) != JNI_OK)
2595       {
2596 	env->in_NoSuchFieldError = JNI_FALSE;
2597 	return;
2598       }
2599 
2600     if (_svmm_new_object_instance
2601 	(env, vm->class_loading.boot_loader.classes.NoSuchFieldError, *error) != JNI_OK)
2602       {
2603 	_svmm_free_native_local (env, error);
2604 	env->in_NoSuchFieldError = JNI_FALSE;
2605 	return;
2606       }
2607 
2608     if (_svmm_invoke_nonvirtual_NoSuchFieldError_init (env, error, msg) != JNI_OK)
2609       {
2610 	_svmm_free_native_local (env, error);
2611 	env->in_NoSuchFieldError = JNI_FALSE;
2612 	return;
2613       }
2614 
2615     *(env->throwable) = *error;
2616     _svmm_free_native_local (env, error);
2617   }
2618 
2619   env->in_NoSuchFieldError = JNI_FALSE;
2620 }
2621 
2622 
2623 /*
2624 ----------------------------------------------------------------------
2625 _svmf_error_NoSuchMethodError
2626 ----------------------------------------------------------------------
2627 */
2628 
2629 svm_static void SVM_UNUSED
_svmf_error_NoSuchMethodError(_svmt_JNIEnv * env)2630 _svmf_error_NoSuchMethodError (_svmt_JNIEnv *env)
2631 {
2632   _svmt_JavaVM *vm = env->vm;
2633 
2634   if (vm->class_loading.boot_loader.instances.default_NoSuchMethodError == NULL)
2635     {
2636       _svmf_initialization_unrecoverable_exception (env);
2637     }
2638 
2639   /* Empty the stack.  (Note that this works even if the frame is
2640      native or internal). */
2641   env->stack.current_frame->stack_size = 0;
2642 
2643   /* We will override any pending instruction with the new one. */
2644   *(env->throwable) = NULL;
2645 
2646   if (env->in_NoSuchMethodError)
2647     {
2648       env->in_NoSuchMethodError = JNI_FALSE;
2649 
2650       *(env->throwable) =
2651 	*(vm->class_loading.boot_loader.instances.default_NoSuchMethodError);
2652       return;
2653     }
2654 
2655   env->in_NoSuchMethodError = JNI_TRUE;
2656 
2657   {
2658     jobject error;
2659 
2660     if (_svmm_new_native_local (env, error) != JNI_OK)
2661       {
2662 	env->in_NoSuchMethodError = JNI_FALSE;
2663 	return;
2664       }
2665 
2666     if (_svmm_new_object_instance
2667 	(env, vm->class_loading.boot_loader.classes.NoSuchMethodError, *error) != JNI_OK)
2668       {
2669 	_svmm_free_native_local (env, error);
2670 	env->in_NoSuchMethodError = JNI_FALSE;
2671 	return;
2672       }
2673 
2674     if (_svmm_invoke_nonvirtual_NoSuchMethodError_init (env, error, NULL) != JNI_OK)
2675       {
2676 	_svmm_free_native_local (env, error);
2677 	env->in_NoSuchMethodError = JNI_FALSE;
2678 	return;
2679       }
2680 
2681     *(env->throwable) = *error;
2682     _svmm_free_native_local (env, error);
2683   }
2684 
2685   env->in_NoSuchMethodError = JNI_FALSE;
2686 }
2687 
2688 /*
2689 ----------------------------------------------------------------------
2690 _svmf_error_NoSuchMethodError_msg
2691 ----------------------------------------------------------------------
2692 */
2693 
2694 svm_static void SVM_UNUSED
_svmf_error_NoSuchMethodError_msg(_svmt_JNIEnv * env,jstring msg)2695 _svmf_error_NoSuchMethodError_msg (_svmt_JNIEnv *env, jstring msg)
2696 {
2697   _svmt_JavaVM *vm = env->vm;
2698 
2699   if (vm->class_loading.boot_loader.instances.default_NoSuchMethodError == NULL)
2700     {
2701       _svmf_initialization_unrecoverable_exception (env);
2702     }
2703 
2704   /* Empty the stack.  Note that this works even if the frame is
2705      native or internal. */
2706   env->stack.current_frame->stack_size = 0;
2707 
2708   /* We will override any pending instruction with the new one. */
2709   *(env->throwable) = NULL;
2710 
2711   if (env->in_NoSuchMethodError)
2712     {
2713       env->in_NoSuchMethodError = JNI_FALSE;
2714 
2715       *(env->throwable) =
2716 	*(vm->class_loading.boot_loader.instances.default_NoSuchMethodError);
2717       return;
2718     }
2719 
2720   env->in_NoSuchMethodError = JNI_TRUE;
2721 
2722   {
2723     jobject error;
2724 
2725     if (_svmm_new_native_local (env, error) != JNI_OK)
2726       {
2727 	env->in_NoSuchMethodError = JNI_FALSE;
2728 	return;
2729       }
2730 
2731     if (_svmm_new_object_instance
2732 	(env, vm->class_loading.boot_loader.classes.NoSuchMethodError, *error) != JNI_OK)
2733       {
2734 	_svmm_free_native_local (env, error);
2735 	env->in_NoSuchMethodError = JNI_FALSE;
2736 	return;
2737       }
2738 
2739     if (_svmm_invoke_nonvirtual_NoSuchMethodError_init (env, error, msg) != JNI_OK)
2740       {
2741 	_svmm_free_native_local (env, error);
2742 	env->in_NoSuchMethodError = JNI_FALSE;
2743 	return;
2744       }
2745 
2746     *(env->throwable) = *error;
2747     _svmm_free_native_local (env, error);
2748   }
2749 
2750   env->in_NoSuchMethodError = JNI_FALSE;
2751 }
2752 
2753 
2754 /*
2755 ----------------------------------------------------------------------
2756 _svmf_error_OutOfMemoryError
2757 ----------------------------------------------------------------------
2758 */
2759 
2760 svm_static void SVM_UNUSED
_svmf_error_OutOfMemoryError(_svmt_JNIEnv * env)2761 _svmf_error_OutOfMemoryError (_svmt_JNIEnv *env)
2762 {
2763   _svmt_JavaVM *vm = env->vm;
2764 
2765   if (vm->class_loading.boot_loader.instances.default_OutOfMemoryError == NULL)
2766     {
2767       _svmf_initialization_unrecoverable_exception (env);
2768     }
2769 
2770   /* Empty the stack.  (Note that this works even if the frame is
2771      native or internal). */
2772   env->stack.current_frame->stack_size = 0;
2773 
2774   /* We will override any pending instruction with the new one. */
2775   *(env->throwable) = NULL;
2776 
2777   if (env->in_OutOfMemoryError)
2778     {
2779       env->in_OutOfMemoryError = JNI_FALSE;
2780 
2781       *(env->throwable) =
2782 	*(vm->class_loading.boot_loader.instances.default_OutOfMemoryError);
2783       return;
2784     }
2785 
2786   env->in_OutOfMemoryError = JNI_TRUE;
2787 
2788   {
2789     jobject error;
2790 
2791     if (_svmm_new_native_local (env, error) != JNI_OK)
2792       {
2793 	env->in_OutOfMemoryError = JNI_FALSE;
2794 	return;
2795       }
2796 
2797     if (_svmm_new_object_instance
2798 	(env, vm->class_loading.boot_loader.classes.OutOfMemoryError, *error) != JNI_OK)
2799       {
2800 	_svmm_free_native_local (env, error);
2801 	env->in_OutOfMemoryError = JNI_FALSE;
2802 	return;
2803       }
2804 
2805     if (_svmm_invoke_nonvirtual_OutOfMemoryError_init (env, error, NULL) != JNI_OK)
2806       {
2807 	_svmm_free_native_local (env, error);
2808 	env->in_OutOfMemoryError = JNI_FALSE;
2809 	return;
2810       }
2811 
2812     *(env->throwable) = *error;
2813     _svmm_free_native_local (env, error);
2814   }
2815 
2816   env->in_OutOfMemoryError = JNI_FALSE;
2817 }
2818 
2819 /*
2820 ----------------------------------------------------------------------
2821 _svmf_error_OutOfMemoryError_msg
2822 ----------------------------------------------------------------------
2823 */
2824 
2825 svm_static void SVM_UNUSED
_svmf_error_OutOfMemoryError_msg(_svmt_JNIEnv * env,jstring msg)2826 _svmf_error_OutOfMemoryError_msg (_svmt_JNIEnv *env, jstring msg)
2827 {
2828   _svmt_JavaVM *vm = env->vm;
2829 
2830   if (vm->class_loading.boot_loader.instances.default_OutOfMemoryError == NULL)
2831     {
2832       _svmf_initialization_unrecoverable_exception (env);
2833     }
2834 
2835   /* Empty the stack.  Note that this works even if the frame is
2836      native or internal. */
2837   env->stack.current_frame->stack_size = 0;
2838 
2839   /* We will override any pending instruction with the new one. */
2840   *(env->throwable) = NULL;
2841 
2842   if (env->in_OutOfMemoryError)
2843     {
2844       env->in_OutOfMemoryError = JNI_FALSE;
2845 
2846       *(env->throwable) =
2847 	*(vm->class_loading.boot_loader.instances.default_OutOfMemoryError);
2848       return;
2849     }
2850 
2851   env->in_OutOfMemoryError = JNI_TRUE;
2852 
2853   {
2854     jobject error;
2855 
2856     if (_svmm_new_native_local (env, error) != JNI_OK)
2857       {
2858 	env->in_OutOfMemoryError = JNI_FALSE;
2859 	return;
2860       }
2861 
2862     if (_svmm_new_object_instance
2863 	(env, vm->class_loading.boot_loader.classes.OutOfMemoryError, *error) != JNI_OK)
2864       {
2865 	_svmm_free_native_local (env, error);
2866 	env->in_OutOfMemoryError = JNI_FALSE;
2867 	return;
2868       }
2869 
2870     if (_svmm_invoke_nonvirtual_OutOfMemoryError_init (env, error, msg) != JNI_OK)
2871       {
2872 	_svmm_free_native_local (env, error);
2873 	env->in_OutOfMemoryError = JNI_FALSE;
2874 	return;
2875       }
2876 
2877     *(env->throwable) = *error;
2878     _svmm_free_native_local (env, error);
2879   }
2880 
2881   env->in_OutOfMemoryError = JNI_FALSE;
2882 }
2883 
2884 
2885 /*
2886 ----------------------------------------------------------------------
2887 _svmf_error_UnsatisfiedLinkError
2888 ----------------------------------------------------------------------
2889 */
2890 
2891 svm_static void SVM_UNUSED
_svmf_error_UnsatisfiedLinkError(_svmt_JNIEnv * env)2892 _svmf_error_UnsatisfiedLinkError (_svmt_JNIEnv *env)
2893 {
2894   _svmt_JavaVM *vm = env->vm;
2895 
2896   if (vm->class_loading.boot_loader.instances.default_UnsatisfiedLinkError == NULL)
2897     {
2898       _svmf_initialization_unrecoverable_exception (env);
2899     }
2900 
2901   /* Empty the stack.  (Note that this works even if the frame is
2902      native or internal). */
2903   env->stack.current_frame->stack_size = 0;
2904 
2905   /* We will override any pending instruction with the new one. */
2906   *(env->throwable) = NULL;
2907 
2908   if (env->in_UnsatisfiedLinkError)
2909     {
2910       env->in_UnsatisfiedLinkError = JNI_FALSE;
2911 
2912       *(env->throwable) =
2913 	*(vm->class_loading.boot_loader.instances.default_UnsatisfiedLinkError);
2914       return;
2915     }
2916 
2917   env->in_UnsatisfiedLinkError = JNI_TRUE;
2918 
2919   {
2920     jobject error;
2921 
2922     if (_svmm_new_native_local (env, error) != JNI_OK)
2923       {
2924 	env->in_UnsatisfiedLinkError = JNI_FALSE;
2925 	return;
2926       }
2927 
2928     if (_svmm_new_object_instance
2929 	(env, vm->class_loading.boot_loader.classes.UnsatisfiedLinkError, *error) != JNI_OK)
2930       {
2931 	_svmm_free_native_local (env, error);
2932 	env->in_UnsatisfiedLinkError = JNI_FALSE;
2933 	return;
2934       }
2935 
2936     if (_svmm_invoke_nonvirtual_UnsatisfiedLinkError_init (env, error, NULL) != JNI_OK)
2937       {
2938 	_svmm_free_native_local (env, error);
2939 	env->in_UnsatisfiedLinkError = JNI_FALSE;
2940 	return;
2941       }
2942 
2943     *(env->throwable) = *error;
2944     _svmm_free_native_local (env, error);
2945   }
2946 
2947   env->in_UnsatisfiedLinkError = JNI_FALSE;
2948 }
2949 
2950 /*
2951 ----------------------------------------------------------------------
2952 _svmf_error_UnsatisfiedLinkError_msg
2953 ----------------------------------------------------------------------
2954 */
2955 
2956 svm_static void SVM_UNUSED
_svmf_error_UnsatisfiedLinkError_msg(_svmt_JNIEnv * env,jstring msg)2957 _svmf_error_UnsatisfiedLinkError_msg (_svmt_JNIEnv *env, jstring msg)
2958 {
2959   _svmt_JavaVM *vm = env->vm;
2960 
2961   if (vm->class_loading.boot_loader.instances.default_UnsatisfiedLinkError == NULL)
2962     {
2963       _svmf_initialization_unrecoverable_exception (env);
2964     }
2965 
2966   /* Empty the stack.  Note that this works even if the frame is
2967      native or internal. */
2968   env->stack.current_frame->stack_size = 0;
2969 
2970   /* We will override any pending instruction with the new one. */
2971   *(env->throwable) = NULL;
2972 
2973   if (env->in_UnsatisfiedLinkError)
2974     {
2975       env->in_UnsatisfiedLinkError = JNI_FALSE;
2976 
2977       *(env->throwable) =
2978 	*(vm->class_loading.boot_loader.instances.default_UnsatisfiedLinkError);
2979       return;
2980     }
2981 
2982   env->in_UnsatisfiedLinkError = JNI_TRUE;
2983 
2984   {
2985     jobject error;
2986 
2987     if (_svmm_new_native_local (env, error) != JNI_OK)
2988       {
2989 	env->in_UnsatisfiedLinkError = JNI_FALSE;
2990 	return;
2991       }
2992 
2993     if (_svmm_new_object_instance
2994 	(env, vm->class_loading.boot_loader.classes.UnsatisfiedLinkError, *error) != JNI_OK)
2995       {
2996 	_svmm_free_native_local (env, error);
2997 	env->in_UnsatisfiedLinkError = JNI_FALSE;
2998 	return;
2999       }
3000 
3001     if (_svmm_invoke_nonvirtual_UnsatisfiedLinkError_init (env, error, msg) != JNI_OK)
3002       {
3003 	_svmm_free_native_local (env, error);
3004 	env->in_UnsatisfiedLinkError = JNI_FALSE;
3005 	return;
3006       }
3007 
3008     *(env->throwable) = *error;
3009     _svmm_free_native_local (env, error);
3010   }
3011 
3012   env->in_UnsatisfiedLinkError = JNI_FALSE;
3013 }
3014 
3015 
3016 /*
3017 ----------------------------------------------------------------------
3018 _svmf_error_UnsupportedClassVersionError
3019 ----------------------------------------------------------------------
3020 */
3021 
3022 svm_static void SVM_UNUSED
_svmf_error_UnsupportedClassVersionError(_svmt_JNIEnv * env)3023 _svmf_error_UnsupportedClassVersionError (_svmt_JNIEnv *env)
3024 {
3025   _svmt_JavaVM *vm = env->vm;
3026 
3027   if (vm->class_loading.boot_loader.instances.default_UnsupportedClassVersionError == NULL)
3028     {
3029       _svmf_initialization_unrecoverable_exception (env);
3030     }
3031 
3032   /* Empty the stack.  (Note that this works even if the frame is
3033      native or internal). */
3034   env->stack.current_frame->stack_size = 0;
3035 
3036   /* We will override any pending instruction with the new one. */
3037   *(env->throwable) = NULL;
3038 
3039   if (env->in_UnsupportedClassVersionError)
3040     {
3041       env->in_UnsupportedClassVersionError = JNI_FALSE;
3042 
3043       *(env->throwable) =
3044 	*(vm->class_loading.boot_loader.instances.default_UnsupportedClassVersionError);
3045       return;
3046     }
3047 
3048   env->in_UnsupportedClassVersionError = JNI_TRUE;
3049 
3050   {
3051     jobject error;
3052 
3053     if (_svmm_new_native_local (env, error) != JNI_OK)
3054       {
3055 	env->in_UnsupportedClassVersionError = JNI_FALSE;
3056 	return;
3057       }
3058 
3059     if (_svmm_new_object_instance
3060 	(env, vm->class_loading.boot_loader.classes.UnsupportedClassVersionError, *error) != JNI_OK)
3061       {
3062 	_svmm_free_native_local (env, error);
3063 	env->in_UnsupportedClassVersionError = JNI_FALSE;
3064 	return;
3065       }
3066 
3067     if (_svmm_invoke_nonvirtual_UnsupportedClassVersionError_init (env, error, NULL) != JNI_OK)
3068       {
3069 	_svmm_free_native_local (env, error);
3070 	env->in_UnsupportedClassVersionError = JNI_FALSE;
3071 	return;
3072       }
3073 
3074     *(env->throwable) = *error;
3075     _svmm_free_native_local (env, error);
3076   }
3077 
3078   env->in_UnsupportedClassVersionError = JNI_FALSE;
3079 }
3080 
3081 /*
3082 ----------------------------------------------------------------------
3083 _svmf_error_UnsupportedClassVersionError_msg
3084 ----------------------------------------------------------------------
3085 */
3086 
3087 svm_static void SVM_UNUSED
_svmf_error_UnsupportedClassVersionError_msg(_svmt_JNIEnv * env,jstring msg)3088 _svmf_error_UnsupportedClassVersionError_msg (_svmt_JNIEnv *env, jstring msg)
3089 {
3090   _svmt_JavaVM *vm = env->vm;
3091 
3092   if (vm->class_loading.boot_loader.instances.default_UnsupportedClassVersionError == NULL)
3093     {
3094       _svmf_initialization_unrecoverable_exception (env);
3095     }
3096 
3097   /* Empty the stack.  Note that this works even if the frame is
3098      native or internal. */
3099   env->stack.current_frame->stack_size = 0;
3100 
3101   /* We will override any pending instruction with the new one. */
3102   *(env->throwable) = NULL;
3103 
3104   if (env->in_UnsupportedClassVersionError)
3105     {
3106       env->in_UnsupportedClassVersionError = JNI_FALSE;
3107 
3108       *(env->throwable) =
3109 	*(vm->class_loading.boot_loader.instances.default_UnsupportedClassVersionError);
3110       return;
3111     }
3112 
3113   env->in_UnsupportedClassVersionError = JNI_TRUE;
3114 
3115   {
3116     jobject error;
3117 
3118     if (_svmm_new_native_local (env, error) != JNI_OK)
3119       {
3120 	env->in_UnsupportedClassVersionError = JNI_FALSE;
3121 	return;
3122       }
3123 
3124     if (_svmm_new_object_instance
3125 	(env, vm->class_loading.boot_loader.classes.UnsupportedClassVersionError, *error) != JNI_OK)
3126       {
3127 	_svmm_free_native_local (env, error);
3128 	env->in_UnsupportedClassVersionError = JNI_FALSE;
3129 	return;
3130       }
3131 
3132     if (_svmm_invoke_nonvirtual_UnsupportedClassVersionError_init (env, error, msg) != JNI_OK)
3133       {
3134 	_svmm_free_native_local (env, error);
3135 	env->in_UnsupportedClassVersionError = JNI_FALSE;
3136 	return;
3137       }
3138 
3139     *(env->throwable) = *error;
3140     _svmm_free_native_local (env, error);
3141   }
3142 
3143   env->in_UnsupportedClassVersionError = JNI_FALSE;
3144 }
3145 
3146 
3147 /*
3148 ----------------------------------------------------------------------
3149 _svmf_error_VerifyError
3150 ----------------------------------------------------------------------
3151 */
3152 
3153 svm_static void SVM_UNUSED
_svmf_error_VerifyError(_svmt_JNIEnv * env)3154 _svmf_error_VerifyError (_svmt_JNIEnv *env)
3155 {
3156   _svmt_JavaVM *vm = env->vm;
3157 
3158   if (vm->class_loading.boot_loader.instances.default_VerifyError == NULL)
3159     {
3160       _svmf_initialization_unrecoverable_exception (env);
3161     }
3162 
3163   /* Empty the stack.  (Note that this works even if the frame is
3164      native or internal). */
3165   env->stack.current_frame->stack_size = 0;
3166 
3167   /* We will override any pending instruction with the new one. */
3168   *(env->throwable) = NULL;
3169 
3170   if (env->in_VerifyError)
3171     {
3172       env->in_VerifyError = JNI_FALSE;
3173 
3174       *(env->throwable) =
3175 	*(vm->class_loading.boot_loader.instances.default_VerifyError);
3176       return;
3177     }
3178 
3179   env->in_VerifyError = JNI_TRUE;
3180 
3181   {
3182     jobject error;
3183 
3184     if (_svmm_new_native_local (env, error) != JNI_OK)
3185       {
3186 	env->in_VerifyError = JNI_FALSE;
3187 	return;
3188       }
3189 
3190     if (_svmm_new_object_instance
3191 	(env, vm->class_loading.boot_loader.classes.VerifyError, *error) != JNI_OK)
3192       {
3193 	_svmm_free_native_local (env, error);
3194 	env->in_VerifyError = JNI_FALSE;
3195 	return;
3196       }
3197 
3198     if (_svmm_invoke_nonvirtual_VerifyError_init (env, error, NULL) != JNI_OK)
3199       {
3200 	_svmm_free_native_local (env, error);
3201 	env->in_VerifyError = JNI_FALSE;
3202 	return;
3203       }
3204 
3205     *(env->throwable) = *error;
3206     _svmm_free_native_local (env, error);
3207   }
3208 
3209   env->in_VerifyError = JNI_FALSE;
3210 }
3211 
3212 /*
3213 ----------------------------------------------------------------------
3214 _svmf_error_VerifyError_msg
3215 ----------------------------------------------------------------------
3216 */
3217 
3218 svm_static void SVM_UNUSED
_svmf_error_VerifyError_msg(_svmt_JNIEnv * env,jstring msg)3219 _svmf_error_VerifyError_msg (_svmt_JNIEnv *env, jstring msg)
3220 {
3221   _svmt_JavaVM *vm = env->vm;
3222 
3223   if (vm->class_loading.boot_loader.instances.default_VerifyError == NULL)
3224     {
3225       _svmf_initialization_unrecoverable_exception (env);
3226     }
3227 
3228   /* Empty the stack.  Note that this works even if the frame is
3229      native or internal. */
3230   env->stack.current_frame->stack_size = 0;
3231 
3232   /* We will override any pending instruction with the new one. */
3233   *(env->throwable) = NULL;
3234 
3235   if (env->in_VerifyError)
3236     {
3237       env->in_VerifyError = JNI_FALSE;
3238 
3239       *(env->throwable) =
3240 	*(vm->class_loading.boot_loader.instances.default_VerifyError);
3241       return;
3242     }
3243 
3244   env->in_VerifyError = JNI_TRUE;
3245 
3246   {
3247     jobject error;
3248 
3249     if (_svmm_new_native_local (env, error) != JNI_OK)
3250       {
3251 	env->in_VerifyError = JNI_FALSE;
3252 	return;
3253       }
3254 
3255     if (_svmm_new_object_instance
3256 	(env, vm->class_loading.boot_loader.classes.VerifyError, *error) != JNI_OK)
3257       {
3258 	_svmm_free_native_local (env, error);
3259 	env->in_VerifyError = JNI_FALSE;
3260 	return;
3261       }
3262 
3263     if (_svmm_invoke_nonvirtual_VerifyError_init (env, error, msg) != JNI_OK)
3264       {
3265 	_svmm_free_native_local (env, error);
3266 	env->in_VerifyError = JNI_FALSE;
3267 	return;
3268       }
3269 
3270     *(env->throwable) = *error;
3271     _svmm_free_native_local (env, error);
3272   }
3273 
3274   env->in_VerifyError = JNI_FALSE;
3275 }
3276 
3277