fix include path for old nat/Gtk* in new source tree
[cacao.git] / tests / jctest.java
1 /************************* test/jctest.java ************************************
2
3         Copyright (c) 1997 A. Krall, R. Grafl, M. Gschwind, M. Probst
4
5         See file COPYRIGHT for information on usage and disclaimer of warranties
6
7         Eine Klasse zum Testen (fast) aller JavaVM-Instruktionen
8         in verschiedenen Konstellationen.
9
10         Die Ausgabe, die dieses Programm generiert, sollte bei allen
11         verschiedenen Java-Interpreter/Compiler-Systemen gleich
12         sein. Wenn nicht, dann ist wahrscheinlich eines der Systeme
13         fehlerhaft.
14
15         Authors: Reinhard Grafl      EMAIL: cacao@complang.tuwien.ac.at
16
17         Last Change: 1996/12/03
18
19 *******************************************************************************/
20
21
22 public class jctest implements jcinterface {
23
24         static int linenum = 0;
25
26         static int i1=77;
27         static long l1=123456789,l2=987654321,l3=-99999999999999L;
28         static int i2,i3=-100;
29         static float f1=0.1F,f2=0.2F,f3=0.3F;
30         static double d1=0.001,d2=0.002,d3=0.003;
31         static String s1,s2="der konstante String";
32
33         int n_i1,n_i2,n_i3;
34         long n_l1,n_l2,n_l3,n_l4;
35         float n_f1,n_f2,n_f3,n_f4;
36         int n_i4;
37         double n_d1,n_d2,n_d3,n_d4;
38
39         
40         public static void main(String[] s) {
41                 p ("=================== JavaVM - Tester ========================");
42
43                 p ("------------------- test arguments");
44                 int i;
45                 for (i=0; i<s.length; i++) p(s[i]);
46
47                 testgeneral();
48                 testtables();
49                 testcasts();
50                 testspecialnullpointers();
51                 testarrays();
52                 
53                 p ("------------------- test consts");
54                 testconst ( 1,          1);
55                 testconst (-1,         -1);
56                 testconst (-24123,     -4918923241323L);
57                 testconst (-243511,    -4423423234231423L);
58                 testconst (0x7fffffff, 0x7fffffffffffffffL);
59                 testconst (0x80000000, 0x8000000000000000L);
60
61                 p ("------------------- test div and rem consts");
62                 testdivremconst(17);
63                 testdivremconst(12347);
64                 testdivremconst(8893427);
65                 testdivremconst(1005234562);
66                 testdivremconst(-17);
67                 testdivremconst(-12347);
68                 testdivremconst(-8893427);
69                 testdivremconst(-1005234562);
70
71                 testdivremconst(17L);
72                 testdivremconst(12347L);
73                 testdivremconst(8893427L);
74                 testdivremconst(1005234562L);
75                 testdivremconst(12135005234562L);
76                 testdivremconst(2343552355623464626L);
77                 testdivremconst(-17L);
78                 testdivremconst(-12347L);
79                 testdivremconst(-8893427L);
80                 testdivremconst(-1005234562L);
81                 testdivremconst(-12135005234562L);
82                 testdivremconst(-2343552355623464626L);
83
84                 p ("------------------- test rem 0x10001");
85                 testrem0x10001(0);
86                 testrem0x10001(1);
87                 testrem0x10001(17);
88                 testrem0x10001(123);
89                 testrem0x10001(1234);
90                 testrem0x10001(13247);
91                 testrem0x10001(563467);
92                 testrem0x10001(7456774);
93                 testrem0x10001(34523525);
94                 testrem0x10001(234523456);
95                 testrem0x10001(1005234562);
96                 testrem0x10001(2147483647);
97                 testrem0x10001(-1);
98                 testrem0x10001(-17);
99                 testrem0x10001(-123);
100                 testrem0x10001(-1234);
101                 testrem0x10001(-13247);
102                 testrem0x10001(-563467);
103                 testrem0x10001(-7456774);
104                 testrem0x10001(-34523525);
105                 testrem0x10001(-234523456);
106                 testrem0x10001(-1005234562);
107                 testrem0x10001(-2147483647);
108                 testrem0x10001(-2147483648);
109
110                 testrem0x10001(0L);
111                 testrem0x10001(1L);
112                 testrem0x10001(17L);
113                 testrem0x10001(123L);
114                 testrem0x10001(1234L);
115                 testrem0x10001(13247L);
116                 testrem0x10001(563467L);
117                 testrem0x10001(7456774L);
118                 testrem0x10001(34523525L);
119                 testrem0x10001(234523456L);
120                 testrem0x10001(1005234562L);
121                 testrem0x10001(1983223864L);
122                 testrem0x10001(2147483646L);
123                 testrem0x10001(2147483647L);
124                 testrem0x10001(2147483648L);
125                 testrem0x10001(10052234562L);
126                 testrem0x10001(561005234562L);
127                 testrem0x10001(2100527345962L);
128                 testrem0x10001(34600523456287L);
129                 testrem0x10001(546805234456882L);
130                 testrem0x10001(1360052334734722L);
131                 testrem0x10001(23456705569626354L);
132                 testrem0x10001(9223372036854775807L);
133                 testrem0x10001(-1L);
134                 testrem0x10001(-17L);
135                 testrem0x10001(-123L);
136                 testrem0x10001(-1234L);
137                 testrem0x10001(-13247L);
138                 testrem0x10001(-563467L);
139                 testrem0x10001(-7456774L);
140                 testrem0x10001(-34523525L);
141                 testrem0x10001(-234523456L);
142                 testrem0x10001(-1005234562L);
143                 testrem0x10001(-1983223864L);
144                 testrem0x10001(-2147483647L);
145                 testrem0x10001(-2147483648L);
146                 testrem0x10001(-10052234562L);
147                 testrem0x10001(-561005234562L);
148                 testrem0x10001(-2100527345962L);
149                 testrem0x10001(-34600523456287L);
150                 testrem0x10001(-546805234456882L);
151                 testrem0x10001(-1360052334734722L);
152                 testrem0x10001(-23456705569626354L);
153                 testrem0x10001(-9223372036854775807L);
154                 testrem0x10001(-9223372036854775808L);
155
156                 p ("------------------- test ints");
157                 testint (1,2);
158                 testint (-1,17);
159                 testint (-24351,24123);
160                 testint (4918923,-441423);
161                 testint (0,0);
162                 testint (-1,-1);
163                 testint (1423487,123444444);
164                 testint (0x7fffffff,1);
165                 testint (0,0x7fffffff);
166                 testint (0x3333,143444);
167                 testint (4444441,12342);
168                 testint (0x80000000,-1);
169
170                 p ("------------------- test longs");
171                 testlong (1,2);
172                 testlong (-1,17);
173                 testlong (-24351,24123);
174                 testlong (4918923241323L,-4423423234231423L);
175                 testlong (0,0);
176                 testlong (-1,-1);
177                 testlong (1423487,123444442344L);
178                 testlong (0x7fffffffffffffffL,1);
179                 testlong (0,0x7fffffffffffffffL);
180                 testlong (0x3333,143444);
181                 testlong (4444441,12342);
182                 testlong (0x8000000000000000L,-1);
183
184                 p ("------------------- test floats");
185                 testfloat ((float) 1,(float) 2.042);
186                 testfloat ((float) -1.234,(float) 17.44);
187                 testfloat ((float) -24351,(float) 24123);
188                 testfloat ((float) 0.1,(float) 1243);
189                 testfloat ((float) 0.0,(float) -555.4132);
190                 testfloat ((float) 77.0,(float) -555);
191                 testfloat ((float) 2147483000.0,(float) -555234);
192
193                 p ("------------------- test doubles");
194                 testdouble (1,2.042);
195                 testdouble (-1.234,17.44);
196                 testdouble (-24351,24123);
197                 testdouble (0.1,1243);
198                 testdouble (0.0,-555.4132);
199                 testdouble (77.0,-555);
200                 testdouble (2147483000.0,-555234);
201                 
202
203                 p ("=================== end of test =========================");                        
204                 }
205
206
207         static /* init */ {
208                 p ("successful initialisation");
209                 }
210
211
212                 
213         public static void testgeneral() {
214                 
215                 int i;
216                 // ******************** basic data types *******************************
217                 
218                 p ("------------------- test int-PUSH-STORE-LOAD");
219                 int j = -1;
220                 p(j); p (0); p(2); p(17); p(-100); 
221                 p (500); p(-32768); p(-32769); p(32767); p(32768);
222                 p (90000); p(-1000000000);
223                 
224                 p ("------------------- test long-PUSH-STORE-LOAD");
225                 long l = 3L;
226                 p ( l ); p ( 0L ); p ( 99L );
227                 p (500L); p(-32768L); p(-32769L); p(32767L); p(32768L);
228                 p ( 6900000000000L ); p ( 349827389478173274L );
229
230                 p ("------------------- test float-PUSH-STORE-LOAD");
231                 float f = 99.444F;
232                 p ( f ); p (0.0F); p (1.0F); p (342323423478.2223434234232334F);
233         
234                 p ("------------------- test double-PUSH-STORE-LOAD");
235                 double d = 99234.42D;
236                 p ( d ); p (0.0D); p (1.0D); p (342323423478.2223434234232334D);
237
238
239                 // ******************** static variables *******************************
240
241                 p ("------------------- test static variables");        
242                 i1 = i1+i2+i3;
243                 l2 = l1+l2+l3;
244                 f1 = f1*f2;
245                 p (i1); p(i2); p(i3); 
246                 p (l1); p(l2); p(l3);
247                 p (f1); p(f2); p(f3);
248                 p (d1); p(d2); p(d3);
249
250                 // ******************** arithmetic test ********************************
251                 
252                 p ("------------------- test arithmetic");
253                 i1 = 17;
254                 i2 = 0x7fffffff;
255                 p (i2);
256                 p (i2+1);
257                 p (i1-i2);
258                 l1 = 0x7fffffffffffffffL;
259                 p (l1);
260                 p (l1+1);
261                 p (l1+0x7fffffffffffffffL);
262                 
263                 
264                 // ******************** test method calls ******************************
265                 
266                 p ("statische methode");
267                 jctest ttt = new jctest ();
268                 ttt.p_manyparam (19,18,17,16, 88,77,66,55, 
269                                  0.1F,0.2F,0.3F,0.4F, -2.0D,-3.0D,-4.0D,-5.0D );
270                 jcinterface ttt2 = ttt;
271                 ttt2.p_nonstatic ("interface method");
272
273                 }
274
275
276
277         // ************************ test tables ************************************
278                 
279         public static void testtables() {
280                 int i;
281
282                 p ("------------------- test tableswitch");
283
284                 for (i = -5; i < 15; i++) {
285                         switch (i) {
286                                 case  2:  p ("->  2"); break;   
287                                 case  3:  p ("->  3"); break;   
288                                 case  5:  p ("->  5"); break;   
289                                 case  6:  p ("->  6"); break;
290                                 case  7:  p ("->  7"); break;
291                                 case  8:  p ("->  8"); break;
292                                 case 10:  p ("-> 10"); break;
293                                 default:  p ("default"); break;
294                                 }
295                         }
296
297                 p ("------------------- test lookupswitch");
298
299                 for (i = -5; i < 15; i++) {
300                         switch (i) {
301                                 case  2:  p ("->  2"); break;
302                                 case  8:  p ("->  8"); break;
303                                 case 14:  p ("-> 14"); break;
304                                 case -4:  p ("-> -4"); break;
305                                 default:  p ("default"); break;
306                                 }
307                         }       
308                 }
309
310
311         // ****************** test type casts and array stores *********************            
312
313         public static void testcasts() {
314                 Object     o   = new Object();
315                 Object     oi  = new Integer(0);
316                 Object[]   oa  = new Object [1];
317                 Object[]   oia = new Integer[1];
318                 Integer    i   = new Integer(0);
319                 Integer[]  ia;
320                 java.io.DataOutput dataout = null;
321                 Object             od  = new java.io.DataOutputStream(
322                                              (java.io.DataOutputStream)dataout);
323
324                 p ("------------------- test casts");
325
326                 p("Integer is instanceof Object:  ", oi instanceof Object);
327                 p("Integer is instanceof Integer: ", oi instanceof Integer);
328                 p("Object is instanceof Integer:  ", o instanceof Integer);
329
330                 try {
331                         p ("type cast check: Integer = Object(Integer)");
332                         i = (Integer) oi;
333                         p ("type cast check: Integer = Object");
334                         i = (Integer) o;
335                         p ("error: class cast exception not thrown");
336                         }       
337                 catch (ClassCastException c) {
338                         p ("exception: class cast");
339                         }
340
341                 p("DataOutputStream is instanceof DataOutput: ",
342                                                       od instanceof java.io.DataOutput);
343                 p("Object is instanceof DataOutput: ", o instanceof java.io.DataOutput);
344
345                 try {
346                         p ("type cast check: DataOutput = Object(DataOutputStream)");
347                         dataout = (java.io.DataOutput) od;
348                         p ("type cast check: DataOutput = Object");
349                         dataout = (java.io.DataOutput) o;
350                         p ("error: class cast exception not thrown");
351                         }       
352                 catch (ClassCastException c) {
353                         p ("exception: class cast");
354                         }
355
356                 try {
357                         p ("type cast check: Integer[] = Object(Integer)[]");
358                         ia = (Integer[]) oia;
359                         p ("type cast check: Integer[] = Object[]");
360                         ia = (Integer[]) oa;
361                         p ("error: class cast exception not thrown");
362                         }       
363                 catch (ClassCastException c) {
364                         p ("exception: class cast");
365                         }
366
367                 try {
368                         p ("array store check: Object(Integer)[0] = Integer");
369                         oia[0] = i;
370                         p ("array store check: Object(Integer)[0] = Object");
371                         oia[0] = o;
372                         p ("error: array store exception not thrown");
373                         }       
374                 catch (ArrayStoreException c) {
375                         p ("exception: array store");
376                         }
377                 }
378
379
380         // ****************** test special null pointers ***************************            
381
382         public static void testspecialnullpointers() {
383                 int i = 0;
384                 jctest c = null;
385                 jcinterface f = null;
386
387                 p ("------------------- test special null pointers");
388
389                 try {
390                         p ("null pointer check: put field");
391                         c.n_i1 = 0;
392                         p ("error: put field null pointer exception not thrown");
393                         }       
394                 catch (NullPointerException x) {
395                         p ("exception: null pointer");
396                         }
397
398                 try {
399                         p ("null pointer check: get field");
400                         i = c.n_i1;
401                         p ("error: get field null pointer exception not thrown");
402                         }       
403                 catch (NullPointerException x) {
404                         p ("exception: null pointer");
405                         }
406
407                 try {
408                         p ("null pointer check: invokevirtual");
409                         c.p_nonstatic("invokevirtual");
410                         p ("error: invokevirtual null pointer exception not thrown");
411                         }       
412                 catch (NullPointerException x) {
413                         p ("exception: null pointer");
414                         }
415
416                 try {
417                         p ("null pointer check: invokeinterface");
418                         f.p_nonstatic("invokeinterface");
419                         p ("error: invokeinterface null pointer exception not thrown");
420                         }       
421                 catch (NullPointerException x) {
422                         p ("exception: null pointer");
423                         }
424
425                 try {
426                         p ("null pointer check: monitorenter");
427                         synchronized (c) {
428                                 p ("error: monitorenter null pointer exception not thrown");
429                                 }
430                         }       
431                 catch (NullPointerException x) {
432                         p ("exception: null pointer");
433                         }
434                 }
435
436
437         // ************************ test array bounds ******************************            
438
439         public static void testarraybounds(byte[] ba, int i) {
440                         p ("testarraybounds: " + (i - 10));
441                         ba[i-10] = 0;
442                         p ("testarraybounds: " + (i - 5));
443                         ba[i-5]  = 0;
444                         p ("testarraybounds: " + (i));
445                         ba[i]    = 0;
446                         p ("testarraybounds: " + (i + 5));
447                         ba[i+5]  = 0;
448                         p ("testarraybounds: " + (i + 10));
449                         ba[i+10] = 0; 
450                 }
451
452
453         // ************************ test arrays ************************************            
454
455         public static void testarrays() {
456                 int    i;
457                 long   l;
458                 float  f;
459                 double d;
460                 String s;
461                 
462                 p ("------------------- test byte arrays");
463
464                 byte[] ba = null;
465
466                 try {
467                         p ("null pointer check: byte array store");
468                         ba[1] = 0;
469                         p ("error: null pointer exception not thrown");
470                         }       
471                 catch (NullPointerException c) {
472                         p ("exception: null pointer");
473                         }
474                 try {
475                         p ("null pointer check: byte array load");
476                         i = ba[1];
477                         p ("error: null pointer exception not thrown");
478                         }       
479                 catch (NullPointerException c) {
480                         p ("exception: null pointer");
481                         }
482
483                 try {
484                         p ("negative array size check: byte array");
485                         ba = new byte [-2];
486                         p ("error: negative array size exception not thrown");
487                         }       
488                 catch (NegativeArraySizeException c) {
489                         p ("exception: negative array size");
490                         }
491
492                 ba = new byte [100];
493
494
495                 try {
496                         p ("array bound check: byte array store");
497                         ba[-1] = 0;
498                         p ("error: exception not thrown");
499                         }       
500                 catch (ArrayIndexOutOfBoundsException c) {
501                         p ("exception_1: out of bounds: "+(-1));
502                         }
503                 try {
504                         p ("array bound check: byte array load");
505                         i = ba[-1];
506                         p ("error: exception not thrown");
507                         }       
508                 catch (ArrayIndexOutOfBoundsException c) {
509                         p ("exception_2: out of bounds: "+(-1));
510                         }
511
512                 try {
513                         testarraybounds(ba, 5);
514                         }       
515                 catch (ArrayIndexOutOfBoundsException c) {
516                         p ("exception_3: out of bounds: "+5);
517                         }
518                 try {
519                         testarraybounds(ba, 50);
520                         }       
521                 catch (ArrayIndexOutOfBoundsException c) {
522                         p ("exception_4: out of bounds: "+50);
523                         }
524                 try {
525                         testarraybounds(ba, 100);
526                         }       
527                 catch (ArrayIndexOutOfBoundsException c) {
528                         p ("exception_5: out of bounds: "+100);
529                         }
530
531                 try {
532                         ba[-4] = 0;
533                         }       
534                 catch (ArrayIndexOutOfBoundsException c) {
535                         p ("exception_6: out of bounds: "+(-4));
536                         }
537                 try {
538                         ba[-3] = 0;
539                         }       
540                 catch (ArrayIndexOutOfBoundsException c) {
541                         p ("exception_7: out of bounds: "+(-3));
542                         }
543
544                 for (i=-2; i<102; i++) { 
545                         try {
546                                 ba[i] = (byte) (i-50);
547                                 }       
548                         catch (ArrayIndexOutOfBoundsException c) {
549                                 p ("exception_8: out of bounds: "+i);
550                                 }
551                         }
552                 
553                 try {
554                         ba[102] = 0;
555                         }       
556                 catch (ArrayIndexOutOfBoundsException c) {
557                         p ("exception_9: out of bounds: "+102);
558                         }
559                 try {
560                         ba[103] = 0;
561                         }       
562                 catch (ArrayIndexOutOfBoundsException c) {
563                         p ("exception_10: out of bounds: "+103);
564                         }
565                 for (i=0; i<100; i++) p (ba[i]);                
566
567
568                 
569
570                 p ("-------- test short arrays");               
571
572                 short[] sa = null;
573
574                 try {
575                         p ("null pointer check: short array store");
576                         sa[1] = 0;
577                         p ("error: null pointer exception not thrown");
578                         }       
579                 catch (NullPointerException c) {
580                         p ("exception: null pointer");
581                         }
582                 try {
583                         p ("null pointer check: short array load");
584                         i = sa[1];
585                         p ("error: null pointer exception not thrown");
586                         }       
587                 catch (NullPointerException c) {
588                         p ("exception: null pointer");
589                         }
590
591                 sa = new short [100];
592
593                 try {
594                         p ("array bound check: short array store");
595                         sa[-1] = 0;
596                         p ("error: exception not thrown");
597                         }       
598                 catch (ArrayIndexOutOfBoundsException c) {
599                         p ("exception_11: out of bounds: "+(-1));
600                         }
601                 try {
602                         p ("array bound check: short array load");
603                         i = sa[-1];
604                         p ("error: exception not thrown");
605                         }       
606                 catch (ArrayIndexOutOfBoundsException c) {
607                         p ("exception_12: out of bounds: "+(-1));
608                         }
609
610                 for (i=0; i<100; i++) sa[i] = (short) (i-50);
611                 for (i=0; i<100; i++) p (sa[i]);
612                 
613                 
614
615                 p ("-------- test int arrays");         
616
617                 int[] ia = null;
618
619                 try {
620                         p ("null pointer check: int array store");
621                         ia[1] = 0;
622                         p ("error: null pointer exception not thrown");
623                         }       
624                 catch (NullPointerException c) {
625                         p ("exception: null pointer");
626                         }
627                 try {
628                         p ("null pointer check: int array load");
629                         i = ia[1];
630                         p ("error: null pointer exception not thrown");
631                         }       
632                 catch (NullPointerException c) {
633                         p ("exception: null pointer");
634                         }
635
636                 ia = new int [50];
637
638                 try {
639                         p ("array bound check: int array store");
640                         ia[-1] = 0;
641                         p ("error: exception not thrown");
642                         }       
643                 catch (ArrayIndexOutOfBoundsException c) {
644                         p ("exception: out of bounds: "+(-1));
645                         }
646                 try {
647                         p ("array bound check: int array load");
648                         i = ia[-1];
649                         p ("error: exception not thrown");
650                         }       
651                 catch (ArrayIndexOutOfBoundsException c) {
652                         p ("exception: out of bounds: "+(-1));
653                         }
654
655                 for (i=0; i<10; i++) ia[i] = (123456 + i);
656                 for (i=0; i<10; i++) p (ia[i]);
657
658                 
659
660                 p ("-------- test long arrays");                
661
662                 long[] la = null;
663
664                 try {
665                         p ("null pointer check: long array store");
666                         la[1] = 0;
667                         p ("error: null pointer exception not thrown");
668                         }       
669                 catch (NullPointerException c) {
670                         p ("exception: null pointer");
671                         }
672                 try {
673                         p ("null pointer check: long array load");
674                         l = la[1];
675                         p ("error: null pointer exception not thrown");
676                         }       
677                 catch (NullPointerException c) {
678                         p ("exception: null pointer");
679                         }
680
681                 la = new long [10];
682
683                 try {
684                         p ("array bound check: long array store");
685                         la[-1] = 0;
686                         p ("error: exception not thrown");
687                         }       
688                 catch (ArrayIndexOutOfBoundsException c) {
689                         p ("exception: out of bounds: "+(-1));
690                         }
691                 try {
692                         p ("array bound check: long array load");
693                         l = la[-1];
694                         p ("error: exception not thrown");
695                         }       
696                 catch (ArrayIndexOutOfBoundsException c) {
697                         p ("exception: out of bounds: "+(-1));
698                         }
699
700                 for (i=0; i<10; i++) la[i] = (1234567890123L + i);
701                 for (i=0; i<10; i++) p (la[i]);
702
703                 
704                 p ("-------- test char arrays");                
705
706                 char[] ca = null;
707
708                 try {
709                         p ("null pointer check: char array store");
710                         ca[1] = 0;
711                         p ("error: null pointer exception not thrown");
712                         }       
713                 catch (NullPointerException c) {
714                         p ("exception: null pointer");
715                         }
716                 try {
717                         p ("null pointer check: char array load");
718                         i = ca[1];
719                         p ("error: null pointer exception not thrown");
720                         }       
721                 catch (NullPointerException c) {
722                         p ("exception: null pointer");
723                         }
724
725                 ca = new char [50];
726
727                 try {
728                         p ("array bound check: char array store");
729                         ca[-1] = 0;
730                         p ("error: exception not thrown");
731                         }       
732                 catch (ArrayIndexOutOfBoundsException c) {
733                         p ("exception: out of bounds: "+(-1));
734                         }
735                 try {
736                         p ("array bound check: char array load");
737                         i = ca[-1];
738                         p ("error: exception not thrown");
739                         }       
740                 catch (ArrayIndexOutOfBoundsException c) {
741                         p ("exception: out of bounds: "+(-1));
742                         }
743
744                 for (i=0; i<50; i++) ca[i] = (char) ('A' + i);
745                 for (i=0; i<50; i++) p (ca[i]);
746
747                 p ("-------- test address arrays");
748
749                 String[] sta = null;
750
751                 try {
752                         p ("null pointer check: address array store");
753                         sta[1] = null;
754                         p ("error: null pointer exception not thrown");
755                         }       
756                 catch (NullPointerException c) {
757                         p ("exception: null pointer");
758                         }
759                 try {
760                         p ("null pointer check: address array load");
761                         s = sta[1];
762                         p ("error: null pointer exception not thrown");
763                         }       
764                 catch (NullPointerException c) {
765                         p ("exception: null pointer");
766                         }
767
768                 try {
769                         p ("negative array size check: address array");
770                         sta = new String[-3];
771                         p ("error: negative array size exception not thrown");
772                         }       
773                 catch (NegativeArraySizeException c) {
774                         p ("exception: negative array size");
775                         }
776
777                 sta = new String[5];
778
779                 try {
780                         p ("array bound check: address array store");
781                         sta[-1] = null;
782                         p ("error: exception not thrown");
783                         }       
784                 catch (ArrayIndexOutOfBoundsException c) {
785                         p ("exception: out of bounds: "+(-1));
786                         }
787                 try {
788                         p ("array bound check: address array load");
789                         s = sta[-1];
790                         p ("error: exception not thrown");
791                         }       
792                 catch (ArrayIndexOutOfBoundsException c) {
793                         p ("exception: out of bounds: "+(-1));
794                         }
795
796                 for (i=0; i<5; i++) sta[i] = Integer.toString(i) + ". Zeile";
797                 for (i=0; i<5; i++) p (sta[i]);
798                 
799                 p ("-------- test multi dimensional arrays");
800
801                 int [][][] iaaa = null;
802
803                 try {
804                         p ("negative array size check: multi dimensional array");
805                         iaaa = new int[2][3][-4];
806                         p ("error: negative array size exception not thrown");
807                         }       
808                 catch (NegativeArraySizeException c) {
809                         p ("exception: negative array size");
810                         }
811
812                 iaaa = new int[2][3][4];
813                 long [][][] laaa = new long[2][3][6];
814                 float [][][] faaa = new float[2][3][4];
815                 double [][][] daaa = new double[3][4][7];
816                 for (i=0; i<2; i++) {
817                         int i2; for (i2=0; i2<3; i2++) {
818                                 int i3; for (i3=0; i3<4; i3++) {
819                                         iaaa[i][i2][i3] = i*i*i + i2*i2 + i3;
820                                         laaa[i][i2][i3] = i*i*i + i2*i2 + i3 + 7;
821                                         faaa[i][i2][i3] = i*i*i + i2*i2 + i3 + 0.4F;
822                                         daaa[i][i2][i3] = i*i*i + i2*i2 + i3 - 47.0001;
823                                         p (iaaa[i][i2][i3]);
824                                         p (laaa[i][i2][i3]);
825                                         p (faaa[i][i2][i3]);
826                                         p (daaa[i][i2][i3]);
827                                         }
828                                 }
829                         }
830                 
831
832                 }
833
834
835         static public void testconst(int i, long l) {
836                 p ("TESTCONST CALLED WITH ", i);
837                 p ("                  AND ", l);
838                 
839                 if (!(i == (0))) p("not IFEQ:   ", (0));
840                 if (!(i != (0))) p("not IFNE:   ", (0));
841                 if (!(i <  (0))) p("not IFLT:   ", (0));
842                 if (!(i <= (0))) p("not IFLE:   ", (0));
843                 if (!(i >  (0))) p("not IFGT:   ", (0));
844                 if (!(i >= (0))) p("not IFGE:   ", (0));
845
846                 if (!(l == (0))) p("not IF_LEQ: ", (0));
847                 if (!(l != (0))) p("not IF_LNE: ", (0));
848                 if (!(l <  (0))) p("not IF_LLT: ", (0));
849                 if (!(l <= (0))) p("not IF_LLE: ", (0));
850                 if (!(l >  (0))) p("not IF_LGT: ", (0));
851                 if (!(l >= (0))) p("not IF_LGE: ", (0));
852
853                 p("IADDCONST:  ", i  +  (-1));
854                 p("ISUBCONST:  ", i  -  (-1));
855                 p("IMULCONST:  ", i  *  (-1));
856                 p("ISHLCONST:  ", i <<  (-1));
857                 p("ISHRCONST:  ", i >>  (-1));
858                 p("IUSHRCONST: ", i >>> (-1));
859                 p("IANDCONST:  ", i  &  (-1));
860                 p("IORCONST:   ", i  |  (-1));
861                 p("IXORCONST:  ", i  ^  (-1));
862
863                 if (!(i == (-1))) p("not IFEQ:   ", (-1));
864                 if (!(i != (-1))) p("not IFNE:   ", (-1));
865                 if (!(i <  (-1))) p("not IFLT:   ", (-1));
866                 if (!(i <= (-1))) p("not IFLE:   ", (-1));
867                 if (!(i >  (-1))) p("not IFGT:   ", (-1));
868                 if (!(i >= (-1))) p("not IFGE:   ", (-1));
869
870                 p("LADDCONST:  ", l  +  (-1));
871                 p("LSUBCONST:  ", l  -  (-1));
872                 p("LMULCONST:  ", l  *  (-1));
873                 p("LSHLCONST:  ", l <<  (-1));
874                 p("LSHRCONST:  ", l >>  (-1));
875                 p("LUSHRCONST: ", l >>> (-1));
876                 p("LANDCONST:  ", l  &  (-1));
877                 p("LORCONST:   ", l  |  (-1));
878                 p("LXORCONST:  ", l  ^  (-1));
879
880                 if (!(l == (-1))) p("not IF_LEQ: ", (-1));
881                 if (!(l != (-1))) p("not IF_LNE: ", (-1));
882                 if (!(l <  (-1))) p("not IF_LLT: ", (-1));
883                 if (!(l <= (-1))) p("not IF_LLE: ", (-1));
884                 if (!(l >  (-1))) p("not IF_LGT: ", (-1));
885                 if (!(l >= (-1))) p("not IF_LGE: ", (-1));
886
887                 p("IADDCONST:  ", i  +  (1));
888                 p("ISUBCONST:  ", i  -  (1));
889                 p("IMULCONST:  ", i  *  (1));
890                 p("ISHLCONST:  ", i <<  (1));
891                 p("ISHRCONST:  ", i >>  (1));
892                 p("IUSHRCONST: ", i >>> (1));
893                 p("IANDCONST:  ", i  &  (1));
894                 p("IORCONST:   ", i  |  (1));
895                 p("IXORCONST:  ", i  ^  (1));
896
897                 if (!(i == (1))) p("not IFEQ:   ", (1));
898                 if (!(i != (1))) p("not IFNE:   ", (1));
899                 if (!(i <  (1))) p("not IFLT:   ", (1));
900                 if (!(i <= (1))) p("not IFLE:   ", (1));
901                 if (!(i >  (1))) p("not IFGT:   ", (1));
902                 if (!(i >= (1))) p("not IFGE:   ", (1));
903
904                 p("LADDCONST:  ", l  +  (1));
905                 p("LSUBCONST:  ", l  -  (1));
906                 p("LMULCONST:  ", l  *  (1));
907                 p("LSHLCONST:  ", l <<  (1));
908                 p("LSHRCONST:  ", l >>  (1));
909                 p("LUSHRCONST: ", l >>> (1));
910                 p("LANDCONST:  ", l  &  (1));
911                 p("LORCONST:   ", l  |  (1));
912                 p("LXORCONST:  ", l  ^  (1));
913
914                 if (!(l == (1))) p("not IF_LEQ: ", (1));
915                 if (!(l != (1))) p("not IF_LNE: ", (1));
916                 if (!(l <  (1))) p("not IF_LLT: ", (1));
917                 if (!(l <= (1))) p("not IF_LLE: ", (1));
918                 if (!(l >  (1))) p("not IF_LGT: ", (1));
919                 if (!(l >= (1))) p("not IF_LGE: ", (1));
920
921                 p("IADDCONST:  ", i  +  (255));
922                 p("ISUBCONST:  ", i  -  (255));
923                 p("IMULCONST:  ", i  *  (255));
924                 p("ISHLCONST:  ", i <<  (255));
925                 p("ISHRCONST:  ", i >>  (255));
926                 p("IUSHRCONST: ", i >>> (255));
927                 p("IANDCONST:  ", i  &  (255));
928                 p("IORCONST:   ", i  |  (255));
929                 p("IXORCONST:  ", i  ^  (255));
930
931                 if (!(i == (255))) p("not IFEQ:   ", (255));
932                 if (!(i != (255))) p("not IFNE:   ", (255));
933                 if (!(i <  (255))) p("not IFLT:   ", (255));
934                 if (!(i <= (255))) p("not IFLE:   ", (255));
935                 if (!(i >  (255))) p("not IFGT:   ", (255));
936                 if (!(i >= (255))) p("not IFGE:   ", (255));
937
938                 p("LADDCONST:  ", l  +  (255));
939                 p("LSUBCONST:  ", l  -  (255));
940                 p("LMULCONST:  ", l  *  (255));
941                 p("LSHLCONST:  ", l <<  (255));
942                 p("LSHRCONST:  ", l >>  (255));
943                 p("LUSHRCONST: ", l >>> (255));
944                 p("LANDCONST:  ", l  &  (255));
945                 p("LORCONST:   ", l  |  (255));
946                 p("LXORCONST:  ", l  ^  (255));
947
948                 if (!(l == (255))) p("not IF_LEQ: ", (255));
949                 if (!(l != (255))) p("not IF_LNE: ", (255));
950                 if (!(l <  (255))) p("not IF_LLT: ", (255));
951                 if (!(l <= (255))) p("not IF_LLE: ", (255));
952                 if (!(l >  (255))) p("not IF_LGT: ", (255));
953                 if (!(l >= (255))) p("not IF_LGE: ", (255));
954
955                 p("IADDCONST:  ", i  +  (256));
956                 p("ISUBCONST:  ", i  -  (256));
957                 p("IMULCONST:  ", i  *  (256));
958                 p("ISHLCONST:  ", i <<  (256));
959                 p("ISHRCONST:  ", i >>  (256));
960                 p("IUSHRCONST: ", i >>> (256));
961                 p("IANDCONST:  ", i  &  (256));
962                 p("IORCONST:   ", i  |  (256));
963                 p("IXORCONST:  ", i  ^  (256));
964
965                 if (!(i == (256))) p("not IFEQ:   ", (256));
966                 if (!(i != (256))) p("not IFNE:   ", (256));
967                 if (!(i <  (256))) p("not IFLT:   ", (256));
968                 if (!(i <= (256))) p("not IFLE:   ", (256));
969                 if (!(i >  (256))) p("not IFGT:   ", (256));
970                 if (!(i >= (256))) p("not IFGE:   ", (256));
971
972                 p("LADDCONST:  ", l  +  (256));
973                 p("LSUBCONST:  ", l  -  (256));
974                 p("LMULCONST:  ", l  *  (256));
975                 p("LSHLCONST:  ", l <<  (256));
976                 p("LSHRCONST:  ", l >>  (256));
977                 p("LUSHRCONST: ", l >>> (256));
978                 p("LANDCONST:  ", l  &  (256));
979                 p("LORCONST:   ", l  |  (256));
980                 p("LXORCONST:  ", l  ^  (256));
981
982                 if (!(l == (256))) p("not IF_LEQ: ", (256));
983                 if (!(l != (256))) p("not IF_LNE: ", (256));
984                 if (!(l <  (256))) p("not IF_LLT: ", (256));
985                 if (!(l <= (256))) p("not IF_LLE: ", (256));
986                 if (!(l >  (256))) p("not IF_LGT: ", (256));
987                 if (!(l >= (256))) p("not IF_LGE: ", (256));
988
989                 p("IADDCONST:  ", i  +  (32767));
990                 p("ISUBCONST:  ", i  -  (32767));
991                 p("IMULCONST:  ", i  *  (32767));
992                 p("ISHLCONST:  ", i <<  (32767));
993                 p("ISHRCONST:  ", i >>  (32767));
994                 p("IUSHRCONST: ", i >>> (32767));
995                 p("IANDCONST:  ", i  &  (32767));
996                 p("IORCONST:   ", i  |  (32767));
997                 p("IXORCONST:  ", i  ^  (32767));
998
999                 if (!(i == (32767))) p("not IFEQ:   ", (32767));
1000                 if (!(i != (32767))) p("not IFNE:   ", (32767));
1001                 if (!(i <  (32767))) p("not IFLT:   ", (32767));
1002                 if (!(i <= (32767))) p("not IFLE:   ", (32767));
1003                 if (!(i >  (32767))) p("not IFGT:   ", (32767));
1004                 if (!(i >= (32767))) p("not IFGE:   ", (32767));
1005
1006                 p("LADDCONST:  ", l  +  (32767));
1007                 p("LSUBCONST:  ", l  -  (32767));
1008                 p("LMULCONST:  ", l  *  (32767));
1009                 p("LSHLCONST:  ", l <<  (32767));
1010                 p("LSHRCONST:  ", l >>  (32767));
1011                 p("LUSHRCONST: ", l >>> (32767));
1012                 p("LANDCONST:  ", l  &  (32767));
1013                 p("LORCONST:   ", l  |  (32767));
1014                 p("LXORCONST:  ", l  ^  (32767));
1015
1016                 if (!(l == (32767))) p("not IF_LEQ: ", (32767));
1017                 if (!(l != (32767))) p("not IF_LNE: ", (32767));
1018                 if (!(l <  (32767))) p("not IF_LLT: ", (32767));
1019                 if (!(l <= (32767))) p("not IF_LLE: ", (32767));
1020                 if (!(l >  (32767))) p("not IF_LGT: ", (32767));
1021                 if (!(l >= (32767))) p("not IF_LGE: ", (32767));
1022
1023                 p("IADDCONST:  ", i  +  (32768));
1024                 p("ISUBCONST:  ", i  -  (32768));
1025                 p("IMULCONST:  ", i  *  (32768));
1026                 p("ISHLCONST:  ", i <<  (32768));
1027                 p("ISHRCONST:  ", i >>  (32768));
1028                 p("IUSHRCONST: ", i >>> (32768));
1029                 p("IANDCONST:  ", i  &  (32768));
1030                 p("IORCONST:   ", i  |  (32768));
1031                 p("IXORCONST:  ", i  ^  (32768));
1032
1033                 if (!(i == (32768))) p("not IFEQ:   ", (32768));
1034                 if (!(i != (32768))) p("not IFNE:   ", (32768));
1035                 if (!(i <  (32768))) p("not IFLT:   ", (32768));
1036                 if (!(i <= (32768))) p("not IFLE:   ", (32768));
1037                 if (!(i >  (32768))) p("not IFGT:   ", (32768));
1038                 if (!(i >= (32768))) p("not IFGE:   ", (32768));
1039
1040                 p("LADDCONST:  ", l  +  (32768));
1041                 p("LSUBCONST:  ", l  -  (32768));
1042                 p("LMULCONST:  ", l  *  (32768));
1043                 p("LSHLCONST:  ", l <<  (32768));
1044                 p("LSHRCONST:  ", l >>  (32768));
1045                 p("LUSHRCONST: ", l >>> (32768));
1046                 p("LANDCONST:  ", l  &  (32768));
1047                 p("LORCONST:   ", l  |  (32768));
1048                 p("LXORCONST:  ", l  ^  (32768));
1049
1050                 if (!(l == (32768))) p("not IF_LEQ: ", (32768));
1051                 if (!(l != (32768))) p("not IF_LNE: ", (32768));
1052                 if (!(l <  (32768))) p("not IF_LLT: ", (32768));
1053                 if (!(l <= (32768))) p("not IF_LLE: ", (32768));
1054                 if (!(l >  (32768))) p("not IF_LGT: ", (32768));
1055                 if (!(l >= (32768))) p("not IF_LGE: ", (32768));
1056
1057                 p("IADDCONST:  ", i  +  (-32768));
1058                 p("ISUBCONST:  ", i  -  (-32768));
1059                 p("IMULCONST:  ", i  *  (-32768));
1060                 p("ISHLCONST:  ", i <<  (-32768));
1061                 p("ISHRCONST:  ", i >>  (-32768));
1062                 p("IUSHRCONST: ", i >>> (-32768));
1063                 p("IANDCONST:  ", i  &  (-32768));
1064                 p("IORCONST:   ", i  |  (-32768));
1065                 p("IXORCONST:  ", i  ^  (-32768));
1066
1067                 if (!(i == (-32768))) p("not IFEQ:   ", (-32768));
1068                 if (!(i != (-32768))) p("not IFNE:   ", (-32768));
1069                 if (!(i <  (-32768))) p("not IFLT:   ", (-32768));
1070                 if (!(i <= (-32768))) p("not IFLE:   ", (-32768));
1071                 if (!(i >  (-32768))) p("not IFGT:   ", (-32768));
1072                 if (!(i >= (-32768))) p("not IFGE:   ", (-32768));
1073
1074                 p("LADDCONST:  ", l  +  (-32768));
1075                 p("LSUBCONST:  ", l  -  (-32768));
1076                 p("LMULCONST:  ", l  *  (-32768));
1077                 p("LSHLCONST:  ", l <<  (-32768));
1078                 p("LSHRCONST:  ", l >>  (-32768));
1079                 p("LUSHRCONST: ", l >>> (-32768));
1080                 p("LANDCONST:  ", l  &  (-32768));
1081                 p("LORCONST:   ", l  |  (-32768));
1082                 p("LXORCONST:  ", l  ^  (-32768));
1083
1084                 if (!(l == (-32768))) p("not IF_LEQ: ", (-32768));
1085                 if (!(l != (-32768))) p("not IF_LNE: ", (-32768));
1086                 if (!(l <  (-32768))) p("not IF_LLT: ", (-32768));
1087                 if (!(l <= (-32768))) p("not IF_LLE: ", (-32768));
1088                 if (!(l >  (-32768))) p("not IF_LGT: ", (-32768));
1089                 if (!(l >= (-32768))) p("not IF_LGE: ", (-32768));
1090
1091                 p("IADDCONST:  ", i  +  (-32769));
1092                 p("ISUBCONST:  ", i  -  (-32769));
1093                 p("IMULCONST:  ", i  *  (-32769));
1094                 p("ISHLCONST:  ", i <<  (-32769));
1095                 p("ISHRCONST:  ", i >>  (-32769));
1096                 p("IUSHRCONST: ", i >>> (-32769));
1097                 p("IANDCONST:  ", i  &  (-32769));
1098                 p("IORCONST:   ", i  |  (-32769));
1099                 p("IXORCONST:  ", i  ^  (-32769));
1100
1101                 if (!(i == (-32769))) p("not IFEQ:   ", (-32769));
1102                 if (!(i != (-32769))) p("not IFNE:   ", (-32769));
1103                 if (!(i <  (-32769))) p("not IFLT:   ", (-32769));
1104                 if (!(i <= (-32769))) p("not IFLE:   ", (-32769));
1105                 if (!(i >  (-32769))) p("not IFGT:   ", (-32769));
1106                 if (!(i >= (-32769))) p("not IFGE:   ", (-32769));
1107
1108                 p("LADDCONST:  ", l  +  (-32769));
1109                 p("LSUBCONST:  ", l  -  (-32769));
1110                 p("LMULCONST:  ", l  *  (-32769));
1111                 p("LSHLCONST:  ", l <<  (-32769));
1112                 p("LSHRCONST:  ", l >>  (-32769));
1113                 p("LUSHRCONST: ", l >>> (-32769));
1114                 p("LANDCONST:  ", l  &  (-32769));
1115                 p("LORCONST:   ", l  |  (-32769));
1116                 p("LXORCONST:  ", l  ^  (-32769));
1117
1118                 if (!(l == (-32769))) p("not IF_LEQ: ", (-32769));
1119                 if (!(l != (-32769))) p("not IF_LNE: ", (-32769));
1120                 if (!(l <  (-32769))) p("not IF_LLT: ", (-32769));
1121                 if (!(l <= (-32769))) p("not IF_LLE: ", (-32769));
1122                 if (!(l >  (-32769))) p("not IF_LGT: ", (-32769));
1123                 if (!(l >= (-32769))) p("not IF_LGE: ", (-32769));
1124
1125                 p("IADDCONST:  ", i  +  (2147483647));
1126                 p("ISUBCONST:  ", i  -  (2147483647));
1127                 p("IMULCONST:  ", i  *  (2147483647));
1128                 p("ISHLCONST:  ", i <<  (2147483647));
1129                 p("ISHRCONST:  ", i >>  (2147483647));
1130                 p("IUSHRCONST: ", i >>> (2147483647));
1131                 p("IANDCONST:  ", i  &  (2147483647));
1132                 p("IORCONST:   ", i  |  (2147483647));
1133                 p("IXORCONST:  ", i  ^  (2147483647));
1134
1135                 if (!(i == (2147483647))) p("not IFEQ:   ", (2147483647));
1136                 if (!(i != (2147483647))) p("not IFNE:   ", (2147483647));
1137                 if (!(i <  (2147483647))) p("not IFLT:   ", (2147483647));
1138                 if (!(i <= (2147483647))) p("not IFLE:   ", (2147483647));
1139                 if (!(i >  (2147483647))) p("not IFGT:   ", (2147483647));
1140                 if (!(i >= (2147483647))) p("not IFGE:   ", (2147483647));
1141
1142                 p("LADDCONST:  ", l  +  (2147483647));
1143                 p("LSUBCONST:  ", l  -  (2147483647));
1144                 p("LMULCONST:  ", l  *  (2147483647));
1145                 p("LSHLCONST:  ", l <<  (2147483647));
1146                 p("LSHRCONST:  ", l >>  (2147483647));
1147                 p("LUSHRCONST: ", l >>> (2147483647));
1148                 p("LANDCONST:  ", l  &  (2147483647));
1149                 p("LORCONST:   ", l  |  (2147483647));
1150                 p("LXORCONST:  ", l  ^  (2147483647));
1151
1152                 if (!(l == (2147483647))) p("not IF_LEQ: ", (2147483647));
1153                 if (!(l != (2147483647))) p("not IF_LNE: ", (2147483647));
1154                 if (!(l <  (2147483647))) p("not IF_LLT: ", (2147483647));
1155                 if (!(l <= (2147483647))) p("not IF_LLE: ", (2147483647));
1156                 if (!(l >  (2147483647))) p("not IF_LGT: ", (2147483647));
1157                 if (!(l >= (2147483647))) p("not IF_LGE: ", (2147483647));
1158
1159                 p("LADDCONST:  ", l  +  (2147483648L));
1160                 p("LSUBCONST:  ", l  -  (2147483648L));
1161                 p("LMULCONST:  ", l  *  (2147483648L));
1162                 p("LSHLCONST:  ", l <<  (2147483648L));
1163                 p("LSHRCONST:  ", l >>  (2147483648L));
1164                 p("LUSHRCONST: ", l >>> (2147483648L));
1165                 p("LANDCONST:  ", l  &  (2147483648L));
1166                 p("LORCONST:   ", l  |  (2147483648L));
1167                 p("LXORCONST:  ", l  ^  (2147483648L));
1168
1169                 if (!(l == (2147483648L))) p("not IF_LEQ: ", (2147483648L));
1170                 if (!(l != (2147483648L))) p("not IF_LNE: ", (2147483648L));
1171                 if (!(l <  (2147483648L))) p("not IF_LLT: ", (2147483648L));
1172                 if (!(l <= (2147483648L))) p("not IF_LLE: ", (2147483648L));
1173                 if (!(l >  (2147483648L))) p("not IF_LGT: ", (2147483648L));
1174                 if (!(l >= (2147483648L))) p("not IF_LGE: ", (2147483648L));
1175
1176                 p("IADDCONST:  ", i  +  (-2147483648));
1177                 p("ISUBCONST:  ", i  -  (-2147483648));
1178                 p("IMULCONST:  ", i  *  (-2147483648));
1179                 p("ISHLCONST:  ", i <<  (-2147483648));
1180                 p("ISHRCONST:  ", i >>  (-2147483648));
1181                 p("IUSHRCONST: ", i >>> (-2147483648));
1182                 p("IANDCONST:  ", i  &  (-2147483648));
1183                 p("IORCONST:   ", i  |  (-2147483648));
1184                 p("IXORCONST:  ", i  ^  (-2147483648));
1185
1186                 if (!(i == (-2147483648))) p("not IFEQ:   ", (-2147483648));
1187                 if (!(i != (-2147483648))) p("not IFNE:   ", (-2147483648));
1188                 if (!(i <  (-2147483648))) p("not IFLT:   ", (-2147483648));
1189                 if (!(i <= (-2147483648))) p("not IFLE:   ", (-2147483648));
1190                 if (!(i >  (-2147483648))) p("not IFGT:   ", (-2147483648));
1191                 if (!(i >= (-2147483648))) p("not IFGE:   ", (-2147483648));
1192
1193                 p("LADDCONST:  ", l  +  (-2147483648));
1194                 p("LSUBCONST:  ", l  -  (-2147483648));
1195                 p("LMULCONST:  ", l  *  (-2147483648));
1196                 p("LSHLCONST:  ", l <<  (-2147483648));
1197                 p("LSHRCONST:  ", l >>  (-2147483648));
1198                 p("LUSHRCONST: ", l >>> (-2147483648));
1199                 p("LANDCONST:  ", l  &  (-2147483648));
1200                 p("LORCONST:   ", l  |  (-2147483648));
1201                 p("LXORCONST:  ", l  ^  (-2147483648));
1202
1203                 if (!(l == (-2147483648))) p("not IF_LEQ: ", (-2147483648));
1204                 if (!(l != (-2147483648))) p("not IF_LNE: ", (-2147483648));
1205                 if (!(l <  (-2147483648))) p("not IF_LLT: ", (-2147483648));
1206                 if (!(l <= (-2147483648))) p("not IF_LLE: ", (-2147483648));
1207                 if (!(l >  (-2147483648))) p("not IF_LGT: ", (-2147483648));
1208                 if (!(l >= (-2147483648))) p("not IF_LGE: ", (-2147483648));
1209
1210                 p("LADDCONST:  ", l  +  (-2147483649L));
1211                 p("LSUBCONST:  ", l  -  (-2147483649L));
1212                 p("LMULCONST:  ", l  *  (-2147483649L));
1213                 p("LSHLCONST:  ", l <<  (-2147483649L));
1214                 p("LSHRCONST:  ", l >>  (-2147483649L));
1215                 p("LUSHRCONST: ", l >>> (-2147483649L));
1216                 p("LANDCONST:  ", l  &  (-2147483649L));
1217                 p("LORCONST:   ", l  |  (-2147483649L));
1218                 p("LXORCONST:  ", l  ^  (-2147483649L));
1219
1220                 if (!(l == (-2147483649L))) p("not IF_LEQ: ", (-2147483649L));
1221                 if (!(l != (-2147483649L))) p("not IF_LNE: ", (-2147483649L));
1222                 if (!(l <  (-2147483649L))) p("not IF_LLT: ", (-2147483649L));
1223                 if (!(l <= (-2147483649L))) p("not IF_LLE: ", (-2147483649L));
1224                 if (!(l >  (-2147483649L))) p("not IF_LGT: ", (-2147483649L));
1225                 if (!(l >= (-2147483649L))) p("not IF_LGE: ", (-2147483649L));
1226         }
1227
1228         static public void testrem0x10001(int a) {
1229                 p("IREM0X10001 (" + a + " % 0x10001):  ", a % 0x10001);
1230                 }
1231
1232         static public void testrem0x10001(long a) {
1233                 p("LREM0X10001 (" + a + " % 0x10001):  ", a % 0x10001L);
1234                 }
1235
1236         static public void testdivremconst(int a) {
1237                 p("IDIVPOW2 (" + a + " / 0x00000002):  ", a / 0x00000002);
1238                 p("IDIVPOW2 (" + a + " / 0x00000004):  ", a / 0x00000004);
1239                 p("IDIVPOW2 (" + a + " / 0x00000008):  ", a / 0x00000008);
1240                 p("IDIVPOW2 (" + a + " / 0x00000010):  ", a / 0x00000010);
1241                 p("IDIVPOW2 (" + a + " / 0x00000020):  ", a / 0x00000020);
1242                 p("IDIVPOW2 (" + a + " / 0x00000040):  ", a / 0x00000040);
1243                 p("IDIVPOW2 (" + a + " / 0x00000080):  ", a / 0x00000080);
1244                 p("IDIVPOW2 (" + a + " / 0x00000100):  ", a / 0x00000100);
1245                 p("IDIVPOW2 (" + a + " / 0x00000200):  ", a / 0x00000200);
1246                 p("IDIVPOW2 (" + a + " / 0x00000400):  ", a / 0x00000400);
1247                 p("IDIVPOW2 (" + a + " / 0x00000800):  ", a / 0x00000800);
1248                 p("IDIVPOW2 (" + a + " / 0x00001000):  ", a / 0x00001000);
1249                 p("IDIVPOW2 (" + a + " / 0x00002000):  ", a / 0x00002000);
1250                 p("IDIVPOW2 (" + a + " / 0x00004000):  ", a / 0x00004000);
1251                 p("IDIVPOW2 (" + a + " / 0x00008000):  ", a / 0x00008000);
1252                 p("IDIVPOW2 (" + a + " / 0x00010000):  ", a / 0x00010000);
1253                 p("IDIVPOW2 (" + a + " / 0x00020000):  ", a / 0x00020000);
1254                 p("IDIVPOW2 (" + a + " / 0x00040000):  ", a / 0x00040000);
1255                 p("IDIVPOW2 (" + a + " / 0x00080000):  ", a / 0x00080000);
1256                 p("IDIVPOW2 (" + a + " / 0x00100000):  ", a / 0x00100000);
1257                 p("IDIVPOW2 (" + a + " / 0x00200000):  ", a / 0x00200000);
1258                 p("IDIVPOW2 (" + a + " / 0x00400000):  ", a / 0x00400000);
1259                 p("IDIVPOW2 (" + a + " / 0x00800000):  ", a / 0x00800000);
1260                 p("IDIVPOW2 (" + a + " / 0x01000000):  ", a / 0x01000000);
1261                 p("IDIVPOW2 (" + a + " / 0x02000000):  ", a / 0x02000000);
1262                 p("IDIVPOW2 (" + a + " / 0x04000000):  ", a / 0x04000000);
1263                 p("IDIVPOW2 (" + a + " / 0x08000000):  ", a / 0x08000000);
1264                 p("IDIVPOW2 (" + a + " / 0x10000000):  ", a / 0x10000000);
1265                 p("IDIVPOW2 (" + a + " / 0x20000000):  ", a / 0x20000000);
1266                 p("IDIVPOW2 (" + a + " / 0x40000000):  ", a / 0x40000000);
1267                 p("IDIVPOW2 (" + a + " / 0x80000000):  ", a / 0x80000000);
1268
1269                 p("IREMPOW2 (" + a + " % 0x00000002):  ", a % 0x00000002);
1270                 p("IREMPOW2 (" + a + " % 0x00000004):  ", a % 0x00000004);
1271                 p("IREMPOW2 (" + a + " % 0x00000008):  ", a % 0x00000008);
1272                 p("IREMPOW2 (" + a + " % 0x00000010):  ", a % 0x00000010);
1273                 p("IREMPOW2 (" + a + " % 0x00000020):  ", a % 0x00000020);
1274                 p("IREMPOW2 (" + a + " % 0x00000040):  ", a % 0x00000040);
1275                 p("IREMPOW2 (" + a + " % 0x00000080):  ", a % 0x00000080);
1276                 p("IREMPOW2 (" + a + " % 0x00000100):  ", a % 0x00000100);
1277                 p("IREMPOW2 (" + a + " % 0x00000200):  ", a % 0x00000200);
1278                 p("IREMPOW2 (" + a + " % 0x00000400):  ", a % 0x00000400);
1279                 p("IREMPOW2 (" + a + " % 0x00000800):  ", a % 0x00000800);
1280                 p("IREMPOW2 (" + a + " % 0x00001000):  ", a % 0x00001000);
1281                 p("IREMPOW2 (" + a + " % 0x00002000):  ", a % 0x00002000);
1282                 p("IREMPOW2 (" + a + " % 0x00004000):  ", a % 0x00004000);
1283                 p("IREMPOW2 (" + a + " % 0x00008000):  ", a % 0x00008000);
1284                 p("IREMPOW2 (" + a + " % 0x00010000):  ", a % 0x00010000);
1285                 p("IREMPOW2 (" + a + " % 0x00020000):  ", a % 0x00020000);
1286                 p("IREMPOW2 (" + a + " % 0x00040000):  ", a % 0x00040000);
1287                 p("IREMPOW2 (" + a + " % 0x00080000):  ", a % 0x00080000);
1288                 p("IREMPOW2 (" + a + " % 0x00100000):  ", a % 0x00100000);
1289                 p("IREMPOW2 (" + a + " % 0x00200000):  ", a % 0x00200000);
1290                 p("IREMPOW2 (" + a + " % 0x00400000):  ", a % 0x00400000);
1291                 p("IREMPOW2 (" + a + " % 0x00800000):  ", a % 0x00800000);
1292                 p("IREMPOW2 (" + a + " % 0x01000000):  ", a % 0x01000000);
1293                 p("IREMPOW2 (" + a + " % 0x02000000):  ", a % 0x02000000);
1294                 p("IREMPOW2 (" + a + " % 0x04000000):  ", a % 0x04000000);
1295                 p("IREMPOW2 (" + a + " % 0x08000000):  ", a % 0x08000000);
1296                 p("IREMPOW2 (" + a + " % 0x10000000):  ", a % 0x10000000);
1297                 p("IREMPOW2 (" + a + " % 0x20000000):  ", a % 0x20000000);
1298                 p("IREMPOW2 (" + a + " % 0x40000000):  ", a % 0x40000000);
1299                 p("IREMPOW2 (" + a + " % 0x80000000):  ", a % 0x80000000);
1300                 }
1301
1302         static public void testdivremconst(long a) {
1303                 p("LDIVPOW2 (" + a + " / 0x00000002):  ", a / 0x00000002);
1304                 p("LDIVPOW2 (" + a + " / 0x00000004):  ", a / 0x00000004);
1305                 p("LDIVPOW2 (" + a + " / 0x00000008):  ", a / 0x00000008);
1306                 p("LDIVPOW2 (" + a + " / 0x00000010):  ", a / 0x00000010);
1307                 p("LDIVPOW2 (" + a + " / 0x00000020):  ", a / 0x00000020);
1308                 p("LDIVPOW2 (" + a + " / 0x00000040):  ", a / 0x00000040);
1309                 p("LDIVPOW2 (" + a + " / 0x00000080):  ", a / 0x00000080);
1310                 p("LDIVPOW2 (" + a + " / 0x00000100):  ", a / 0x00000100);
1311                 p("LDIVPOW2 (" + a + " / 0x00000200):  ", a / 0x00000200);
1312                 p("LDIVPOW2 (" + a + " / 0x00000400):  ", a / 0x00000400);
1313                 p("LDIVPOW2 (" + a + " / 0x00000800):  ", a / 0x00000800);
1314                 p("LDIVPOW2 (" + a + " / 0x00001000):  ", a / 0x00001000);
1315                 p("LDIVPOW2 (" + a + " / 0x00002000):  ", a / 0x00002000);
1316                 p("LDIVPOW2 (" + a + " / 0x00004000):  ", a / 0x00004000);
1317                 p("LDIVPOW2 (" + a + " / 0x00008000):  ", a / 0x00008000);
1318                 p("LDIVPOW2 (" + a + " / 0x00010000):  ", a / 0x00010000);
1319                 p("LDIVPOW2 (" + a + " / 0x00020000):  ", a / 0x00020000);
1320                 p("LDIVPOW2 (" + a + " / 0x00040000):  ", a / 0x00040000);
1321                 p("LDIVPOW2 (" + a + " / 0x00080000):  ", a / 0x00080000);
1322                 p("LDIVPOW2 (" + a + " / 0x00100000):  ", a / 0x00100000);
1323                 p("LDIVPOW2 (" + a + " / 0x00200000):  ", a / 0x00200000);
1324                 p("LDIVPOW2 (" + a + " / 0x00400000):  ", a / 0x00400000);
1325                 p("LDIVPOW2 (" + a + " / 0x00800000):  ", a / 0x00800000);
1326                 p("LDIVPOW2 (" + a + " / 0x01000000):  ", a / 0x01000000);
1327                 p("LDIVPOW2 (" + a + " / 0x02000000):  ", a / 0x02000000);
1328                 p("LDIVPOW2 (" + a + " / 0x04000000):  ", a / 0x04000000);
1329                 p("LDIVPOW2 (" + a + " / 0x08000000):  ", a / 0x08000000);
1330                 p("LDIVPOW2 (" + a + " / 0x10000000):  ", a / 0x10000000);
1331                 p("LDIVPOW2 (" + a + " / 0x20000000):  ", a / 0x20000000);
1332                 p("LDIVPOW2 (" + a + " / 0x40000000):  ", a / 0x40000000);
1333                 p("LDIVPOW2 (" + a + " / 0x80000000):  ", a / 0x80000000);
1334
1335                 p("LREMPOW2 (" + a + " % 0x00000002):  ", a % 0x00000002L);
1336                 p("LREMPOW2 (" + a + " % 0x00000004):  ", a % 0x00000004L);
1337                 p("LREMPOW2 (" + a + " % 0x00000008):  ", a % 0x00000008L);
1338                 p("LREMPOW2 (" + a + " % 0x00000010):  ", a % 0x00000010L);
1339                 p("LREMPOW2 (" + a + " % 0x00000020):  ", a % 0x00000020L);
1340                 p("LREMPOW2 (" + a + " % 0x00000040):  ", a % 0x00000040L);
1341                 p("LREMPOW2 (" + a + " % 0x00000080):  ", a % 0x00000080L);
1342                 p("LREMPOW2 (" + a + " % 0x00000100):  ", a % 0x00000100L);
1343                 p("LREMPOW2 (" + a + " % 0x00000200):  ", a % 0x00000200L);
1344                 p("LREMPOW2 (" + a + " % 0x00000400):  ", a % 0x00000400L);
1345                 p("LREMPOW2 (" + a + " % 0x00000800):  ", a % 0x00000800L);
1346                 p("LREMPOW2 (" + a + " % 0x00001000):  ", a % 0x00001000L);
1347                 p("LREMPOW2 (" + a + " % 0x00002000):  ", a % 0x00002000L);
1348                 p("LREMPOW2 (" + a + " % 0x00004000):  ", a % 0x00004000L);
1349                 p("LREMPOW2 (" + a + " % 0x00008000):  ", a % 0x00008000L);
1350                 p("LREMPOW2 (" + a + " % 0x00010000):  ", a % 0x00010000L);
1351                 p("LREMPOW2 (" + a + " % 0x00020000):  ", a % 0x00020000L);
1352                 p("LREMPOW2 (" + a + " % 0x00040000):  ", a % 0x00040000L);
1353                 p("LREMPOW2 (" + a + " % 0x00080000):  ", a % 0x00080000L);
1354                 p("LREMPOW2 (" + a + " % 0x00100000):  ", a % 0x00100000L);
1355                 p("LREMPOW2 (" + a + " % 0x00200000):  ", a % 0x00200000L);
1356                 p("LREMPOW2 (" + a + " % 0x00400000):  ", a % 0x00400000L);
1357                 p("LREMPOW2 (" + a + " % 0x00800000):  ", a % 0x00800000L);
1358                 p("LREMPOW2 (" + a + " % 0x01000000):  ", a % 0x01000000L);
1359                 p("LREMPOW2 (" + a + " % 0x02000000):  ", a % 0x02000000L);
1360                 p("LREMPOW2 (" + a + " % 0x04000000):  ", a % 0x04000000L);
1361                 p("LREMPOW2 (" + a + " % 0x08000000):  ", a % 0x08000000L);
1362                 p("LREMPOW2 (" + a + " % 0x10000000):  ", a % 0x10000000L);
1363                 p("LREMPOW2 (" + a + " % 0x20000000):  ", a % 0x20000000L);
1364                 p("LREMPOW2 (" + a + " % 0x40000000):  ", a % 0x40000000L);
1365                 p("LREMPOW2 (" + a + " % 0x80000000):  ", a % 0x80000000L);
1366                 }
1367
1368
1369         static public void testint(int a, int b) {
1370                 p ("TESTINT CALLED WITH ", a);
1371                 p ("                AND ", b);
1372                 
1373                 p("IADD:  ", a+b);
1374                 p("ISUB:  ", a-b);
1375                 p("IMUL:  ", a*b);
1376                 try { p("IDIV:  ", a/b); } 
1377                 catch (ArithmeticException e) { p("divison by zero"); }
1378                 try { p("IREM:  ", a%b); } 
1379                 catch (ArithmeticException e) { p("divison by zero"); }
1380                 p("INEG:  ", -a);
1381                 p("ISHL:  ", a<<b);
1382                 p("ISHR:  ", a>>b);
1383                 p("IUSHR: ", a>>>b);
1384                 p("IAND:  ", a & b);
1385                 p("IOR:   ", a | b);
1386                 p("IXOR:  ", a ^ b);
1387
1388                 p("I2L:   ", (long) a);
1389                 p("I2F:   ", (float) a);
1390                 p("I2D:   ", (double) a);
1391                 p("INT2BYTE: ", (byte) a);      
1392                 p("INT2CHAR: ", (char) a);      
1393                 p("INT2SHORT: ", (short) a);    
1394
1395                 if (!(a==0)) p("not IFEQ");
1396                 if (!(a!=0)) p("not IFNE");
1397                 if (!(a<0))  p("not IFLT");
1398                 if (!(a<=0)) p("not IFLE");
1399                 if (!(a>0))  p("not IFGT");
1400                 if (!(a>=0)) p("not IFGE");
1401
1402                 if (!(a==b)) p("not IF_ICMPEQ");
1403                 if (!(a!=b)) p("not IF_ICMPNE");
1404                 if (!(a<b))  p("not IF_ICMPLT");
1405                 if (!(a<=b)) p("not IF_ICMPLE");
1406                 if (!(a>b))  p("not IF_ICMPGT");
1407                 if (!(a>=b)) p("not IF_ICMPGE");
1408                 
1409                 p("COND_ICMPEQ " + a + " == 0: " + ((a == 0) ? 0 : 1));
1410                 p("COND_ICMPNE " + a + " != 0: " + ((a != 0) ? 0 : 1));
1411                 p("COND_ICMPLT " + a + " <  0: " + ((a <  0) ? 0 : 1));
1412                 p("COND_ICMPLE " + a + " <= 0: " + ((a <= 0) ? 0 : 1));
1413                 p("COND_ICMPGT " + a + " >  0: " + ((a >  0) ? 0 : 1));
1414                 p("COND_ICMPGE " + a + " >= 0: " + ((a >= 0) ? 0 : 1));
1415                 
1416                 p("COND_ICMPEQ " + a + " == 0: " + ((a == 0) ? 1 : 0));
1417                 p("COND_ICMPNE " + a + " != 0: " + ((a != 0) ? 1 : 0));
1418                 p("COND_ICMPLT " + a + " <  0: " + ((a <  0) ? 1 : 0));
1419                 p("COND_ICMPLE " + a + " <= 0: " + ((a <= 0) ? 1 : 0));
1420                 p("COND_ICMPGT " + a + " >  0: " + ((a >  0) ? 1 : 0));
1421                 p("COND_ICMPGE " + a + " >= 0: " + ((a >= 0) ? 1 : 0));
1422                 
1423                 p("COND_ICMPEQ " + a + " == 0: " + ((a == 0) ? 2 : 3));
1424                 p("COND_ICMPNE " + a + " != 0: " + ((a != 0) ? 2 : 3));
1425                 p("COND_ICMPLT " + a + " <  0: " + ((a <  0) ? 2 : 3));
1426                 p("COND_ICMPLE " + a + " <= 0: " + ((a <= 0) ? 2 : 3));
1427                 p("COND_ICMPGT " + a + " >  0: " + ((a >  0) ? 2 : 3));
1428                 p("COND_ICMPGE " + a + " >= 0: " + ((a >= 0) ? 2 : 3));
1429                 
1430                 p("COND_ICMPEQ " + a + " == " + b + ": " + (a == b));
1431                 p("COND_ICMPNE " + a + " != " + b + ": " + (a != b));
1432                 p("COND_ICMPLT " + a + " <  " + b + ": " + (a <  b));
1433                 p("COND_ICMPLE " + a + " <= " + b + ": " + (a <= b));
1434                 p("COND_ICMPGT " + a + " >  " + b + ": " + (a >  b));
1435                 p("COND_ICMPGE " + a + " >= " + b + ": " + (a >= b));
1436                 
1437         }
1438
1439         static public void testlong(long a, long b) {
1440                 p ("TESTLONG called with ", a);
1441                 p ("                 AND ", b);
1442                 
1443                 p("LADD:  ", a + b);
1444                 p("LSUB:  ", a - b);
1445                 p("LMUL:  ", a * b);
1446                 try { p("LDIV:  ", a / b); } 
1447                 catch (ArithmeticException e) { p("divison by zero"); }
1448                 try { p("LREM:  ", a % b); } 
1449                 catch (ArithmeticException e) { p("divison by zero"); }
1450                 p("LNEG:  ", -a);
1451                 p("LSHL:  ", a << b);
1452                 p("LSHR:  ", a >> b);
1453                 p("LUSHR: ", a >>>b);
1454                 p("LAND:  ", a &  b);
1455                 p("LOR:   ", a |  b);
1456                 p("LXOR:  ", a ^  b);
1457
1458                 p("L2I:   ", (int) a);
1459                 p("L2F:   ", (float) a);
1460                 p("L2D:   ", (double) a);
1461
1462                 p("LCMP a == b : ", a == b);
1463                 p("LCMP a != b : ", a != b);
1464                 p("LCMP a <  b : ", a <  b);
1465                 p("LCMP a <= b : ", a <= b);
1466                 p("LCMP a >  b : ", a >  b);
1467                 p("LCMP a >= b : ", a >= b);
1468
1469                 if ((a==b)) p("not IF_LCMPEQ");
1470                 if ((a!=b)) p("not IF_LCMPNE");
1471                 if ((a<b))  p("not IF_LCMPLT");
1472                 if ((a<=b)) p("not IF_LCMPLE");
1473                 if ((a>b))  p("not IF_LCMPGT");
1474                 if ((a>=b)) p("not IF_LCMPGE");
1475         }
1476
1477         static public void testfloat(float a, float b) {
1478                 p ("TESTFLOAT called with ", a);
1479                 p ("                  AND ", b);
1480                 
1481                 p("FADD:  ", a+b);
1482                 p("FSUB:  ", a-b);
1483                 p("FMUL:  ", a*b);
1484                 p("FDIV:  ", a/b); 
1485                 p("FREM:  ", a%b);
1486                 
1487                 p("F2I:   ", (int) a);
1488                 p("F2L:   ", (long) a);
1489                 p("F2D:   ", (double) a);
1490
1491                 if ((a==b)) p("FCMP a=b");
1492                 if ((a!=b)) p("FCMP a!=b");
1493                 if ((a<b))  p("FCMP a<b");
1494                 if ((a<=b)) p("FCMP a<=b");
1495                 if ((a>b))  p("FCMP a>b");
1496                 if ((a>=b)) p("FCMP a>=b");
1497         }
1498
1499         static public void testdouble(double a, double b) {
1500                 p ("TESTDOUBLE called with ", a);
1501                 p ("                   AND ", b);
1502                 
1503                 p("DADD:  ", a+b);
1504                 p("DSUB:  ", a-b);
1505                 p("DMUL:  ", a*b);
1506                 p("DDIV:  ", a/b); 
1507                 p("DREM:  ", a%b);
1508                 
1509                 p("D2I:   ", (int) a);
1510                 p("D2L:   ", (long) a);
1511                 p("D2F:   ", (float) a);
1512
1513                 if ((a==b)) p("DCMP a=b");
1514                 if ((a!=b)) p("DCMP a!=b");
1515                 if ((a<b))  p("DCMP a<b");
1516                 if ((a<=b)) p("DCMP a<=b");
1517                 if ((a>b))  p("DCMP a>b");
1518                 if ((a>=b)) p("DCMP a>=b");
1519         }
1520
1521
1522         // ********************* output methods ****************************
1523         
1524         public static void pnl() {
1525                 System.out.println ();
1526                 System.out.print (linenum);
1527                 System.out.print (".    ");
1528                 linenum++;
1529                 }
1530
1531         public static void p(String a) { System.out.print(a); pnl(); }
1532         public static void p(boolean a) {System.out.print(a); 
1533                                       pnl();  }
1534         public static void p(int a) { System.out.print ("int: ");
1535                                       System.out.print(a); 
1536                                       pnl();  }
1537         public static void p(long a) { System.out.print ("long: ");
1538                                        System.out.print(a); 
1539                                        pnl(); }
1540         public static void p(short a) { System.out.print ("short: ");
1541                                        System.out.print(a); 
1542                                        pnl(); }
1543         public static void p(byte a) { System.out.print ("byte: ");
1544                                        System.out.print(a); 
1545                                        pnl(); }
1546         public static void p(char a) { System.out.print ("char: ");
1547                                        System.out.print((int)a); 
1548                                        pnl(); }
1549         public static void p(float a) { System.out.print ("float: ");
1550                                         System.out.print ( java.lang.Float.floatToIntBits(a) ); 
1551                                         pnl(); }
1552         public static void p(double a) { System.out.print ("double: ");
1553                                          System.out.print( java.lang.Double.doubleToLongBits(a) ); 
1554                                          pnl(); }
1555
1556         public static void p(String s,boolean i) { 
1557                 System.out.print(s); p(i);
1558                 }
1559         public static void p(String s,int i) { 
1560                 System.out.print(s); p(i);
1561                 }
1562         public static void p(String s,byte i) { 
1563                 System.out.print(s); p(i);
1564                 }
1565         public static void p(String s,char i) { 
1566                 System.out.print(s); p(i);
1567                 }
1568         public static void p(String s,short i) { 
1569                 System.out.print(s); p(i);
1570                 }
1571         public static void p(String s,long l) { 
1572                 System.out.print(s); p(l);
1573                 }
1574         public static void p(String s,float f) { 
1575                 System.out.print(s); p(f);
1576                 }
1577         public static void p(String s,double d) {
1578                 System.out.print(s); p(d);
1579                 }
1580
1581
1582
1583
1584         // methods for testing interface and method calls
1585
1586         public void jctest() { p (" <init> wird aktiviert"); };
1587         public void p_manyparam (int p_i1,int p_i2,
1588                                  int p_i3, int p_i4, 
1589                                  long p_l1,long p_l2,
1590                                  long p_l3,long p_l4, 
1591                                  float p_f1, float p_f2, 
1592                                  float p_f3, float p_f4,
1593                                  double p_d1, double p_d2,
1594                                  double p_d3, double p_d4) {
1595                 n_i1 = p_i1;
1596                 n_i2 = p_i2;
1597                 n_i3 = p_i3;
1598                 n_i4 = p_i4;
1599                 n_l1 = p_l1;
1600                 n_l2 = p_l2;
1601                 n_l3 = p_l3;
1602                 n_l4 = p_l4;
1603                 n_f1 = p_f1;
1604                 n_f2 = p_f2;
1605                 n_f3 = p_f3;
1606                 n_f4 = p_f4;
1607                 n_d1 = p_d1;
1608                 n_d2 = p_d2;
1609                 n_d3 = p_d3;
1610                 n_d4 = p_d4;
1611                 }
1612                 
1613         public void p_nonstatic (String a) { 
1614                 p(a); 
1615                 p(n_i1);
1616                 p(n_i2);
1617                 p(n_i3);
1618                 p(n_i4);
1619                 p(n_l1);
1620                 p(n_l2);
1621                 p(n_l3);
1622                 p(n_l4);
1623                 p(n_f1);
1624                 p(n_f2);
1625                 p(n_f3);
1626                 p(n_f4);
1627                 p(n_d1);
1628                 p(n_d2);
1629                 p(n_d3);
1630                 p(n_d4);
1631                 
1632                 }
1633
1634         }
1635         
1636         
1637 interface jcinterface { 
1638         public void p_nonstatic (String a);
1639         }
1640         
1641