>java MJ.Compiler TestAllProds.mic ----------------------------------- Parsing file TestAllProds.mic ... No errors! Syntax OK. ------------------------------ Dumping scope 0: - 0 variables - 8 nodes Type int is Int Type char is Char Class with 0 fields Con null = 0 Char Con eol = 10 <0> Meth chr has 1 params, returns Char { Var #0 i<1> = Int } <0> Meth ord has 1 params, returns Int { Var #0 ch<1> = Char } <0> Meth len has 1 params, returns Int { Var #0 arr<1> = Arr of None } Prog TestAllProds { Int Con nPoints = 2 Char Con exclaim = 33 Type Point is Class with 2 fields: Fld #0 x is Int Fld #1 y is Int Var #0 msg<0> = Arr of Char Var #1 pArr<0> = Arr of Class with 2 fields: Fld #0 x is Int Fld #1 y is Int <0> Meth printError has 0 params, returns None { Var #0 i<1> = Int } <61> Meth getX has 1 params, returns Int { Var #0 p<1> = Class with 2 fields: Fld #0 x is Int Fld #1 y is Int } <72> Meth setX has 2 params, returns None { Var #0 x<1> = Int Var #1 p<1> = Class with 2 fields: Fld #0 x is Int Fld #1 y is Int } <145> Meth setMsg has 0 params, returns None <206> Meth setPoints has 0 params, returns None { Var #0 i<1> = Int } <259> Meth main has 0 params, returns None { Var #0 i<1> = Int } } MJ codesize = 310 datasize = 2 startPC = 259 0: enter 0 1 3: const_0 4: store_0 5: load_0 6: getstatic 0 9: arraylength 10: jge 16 (=26) 13: getstatic 0 16: load_0 17: baload 18: const_0 19: bprint 20: inc 0,1 23: jmp -18 (=5) 26: const 33 31: const_0 32: bprint 33: load_0 34: const_0 35: jlt 24 (=59) 38: load_0 39: const_0 40: jeq 6 (=46) 43: jmp 16 (=59) 46: getstatic 0 49: load_0 50: baload 51: const_0 52: bprint 53: inc 0,-1 56: jmp -23 (=33) 59: exit 60: return 61: enter 1 1 64: load_0 65: getfield 0 68: exit 69: return 70: trap 1 72: enter 2 2 75: load_0 76: const -10 81: jle 12 (=93) 84: load_0 85: const 9 90: jle 42 (=132) 93: load_0 94: const_4 95: const_3 96: mul 97: const_4 98: div 99: const_4 100: rem 101: const 12 106: add 107: const 11 112: const 2147483647 117: const -2147483647 122: const_1 123: sub 124: div 125: const_2 126: rem 127: mul 128: sub 129: jne 11 (=140) 132: load_1 133: load_0 134: putfield 0 137: jmp 6 (=143) 140: call -140 (=0) 143: exit 144: return 145: enter 0 0 148: const_5 149: newarray 0 151: putstatic 0 154: getstatic 0 157: const_0 158: const 69 163: bastore 164: getstatic 0 167: const_1 168: const 114 173: bastore 174: getstatic 0 177: const_2 178: const 114 183: bastore 184: getstatic 0 187: const_3 188: const 111 193: bastore 194: getstatic 0 197: const_4 198: const 114 203: bastore 204: exit 205: return 206: enter 0 1 209: const_2 210: newarray 1 212: putstatic 1 215: const_0 216: store_0 217: load_0 218: getstatic 1 221: arraylength 222: jge 35 (=257) 225: getstatic 1 228: load_0 229: new 8 232: astore 233: getstatic 1 236: load_0 237: aload 238: load_0 239: putfield 0 242: getstatic 1 245: load_0 246: aload 247: load_0 248: putfield 1 251: inc 0,1 254: jmp -37 (=217) 257: exit 258: return 259: enter 0 1 262: call -117 (=145) 265: call -59 (=206) 268: read 269: store_0 270: load_0 271: const_2 272: jge 26 (=298) 275: getstatic 1 278: load_0 279: aload 280: call -219 (=61) 283: const_0 284: print 285: getstatic 1 288: load_0 289: aload 290: getfield 1 293: const_0 294: print 295: jmp 6 (=301) 298: call -298 (=0) 301: const 10 306: const_0 307: bprint 308: exit 309: return