1 package scm; 2 3 import jas.*; 4 class scmaddCPItem extends Procedure implements Obj 6 { 7 Obj apply(Cell args, Env f) 8 throws Exception 9 { 10 11 Cell t = args; 12 Obj tmp; 13 if (t == null) { throw new SchemeError("jas-class-addcpe expects 2 arguments"); } 14 tmp = (t.car!=null)?t.car.eval(f):null; t = t.cdr; 15 if ((tmp != null) && !(tmp instanceof primnode)) { throw new SchemeError("jas-class-addcpe expects a ClassEnv for arg #1"); } 16 if ((tmp != null) && !((((primnode)tmp).val) instanceof ClassEnv)) { throw new SchemeError("jas-class-addcpe expects a ClassEnv for arg #1"); } 17 ClassEnv arg0 = (tmp != null)?(ClassEnv)(((primnode)tmp).val):null; 18 if (t == null) { throw new SchemeError("jas-class-addcpe expects 2 arguments"); } 19 tmp = (t.car!=null)?t.car.eval(f):null; t = t.cdr; 20 if ((tmp != null) && !(tmp instanceof primnode)) { throw new SchemeError("jas-class-addcpe expects a CP for arg #2"); } 21 if ((tmp != null) && !((((primnode)tmp).val) instanceof CP)) { throw new SchemeError("jas-class-addcpe expects a CP for arg #2"); } 22 CP arg1 = (tmp != null)?(CP)(((primnode)tmp).val):null; 23 arg0.addCPItem(arg1); 24 return null; 25 } 26 public String toString() 27 { return ("<#jas-class-addcpe#>"); } 28 } 29 class scmaddField extends Procedure implements Obj 31 { 32 Obj apply(Cell args, Env f) 33 throws Exception 34 { 35 36 Cell t = args; 37 Obj tmp; 38 if (t == null) { throw new SchemeError("jas-class-addfield expects 2 arguments"); } 39 tmp = (t.car!=null)?t.car.eval(f):null; t = t.cdr; 40 if ((tmp != null) && !(tmp instanceof primnode)) { throw new SchemeError("jas-class-addfield expects a ClassEnv for arg #1"); } 41 if ((tmp != null) && !((((primnode)tmp).val) instanceof ClassEnv)) { throw new SchemeError("jas-class-addfield expects a ClassEnv for arg #1"); } 42 ClassEnv arg0 = (tmp != null)?(ClassEnv)(((primnode)tmp).val):null; 43 if (t == null) { throw new SchemeError("jas-class-addfield expects 2 arguments"); } 44 tmp = (t.car!=null)?t.car.eval(f):null; t = t.cdr; 45 if ((tmp != null) && !(tmp instanceof primnode)) { throw new SchemeError("jas-class-addfield expects a Var for arg #2"); } 46 if ((tmp != null) && !((((primnode)tmp).val) instanceof Var)) { throw new SchemeError("jas-class-addfield expects a Var for arg #2"); } 47 Var arg1 = (tmp != null)?(Var)(((primnode)tmp).val):null; 48 arg0.addField(arg1); 49 return null; 50 } 51 public String toString() 52 { return ("<#jas-class-addfield#>"); } 53 } 54 class scmaddInterface extends Procedure implements Obj 56 { 57 Obj apply(Cell args, Env f) 58 throws Exception 59 { 60 61 Cell t = args; 62 Obj tmp; 63 if (t == null) { throw new SchemeError("jas-class-addinterface expects 2 arguments"); } 64 tmp = (t.car!=null)?t.car.eval(f):null; t = t.cdr; 65 if ((tmp != null) && !(tmp instanceof primnode)) { throw new SchemeError("jas-class-addinterface expects a ClassEnv for arg #1"); } 66 if ((tmp != null) && !((((primnode)tmp).val) instanceof ClassEnv)) { throw new SchemeError("jas-class-addinterface expects a ClassEnv for arg #1"); } 67 ClassEnv arg0 = (tmp != null)?(ClassEnv)(((primnode)tmp).val):null; 68 if (t == null) { throw new SchemeError("jas-class-addinterface expects 2 arguments"); } 69 tmp = (t.car!=null)?t.car.eval(f):null; t = t.cdr; 70 if ((tmp != null) && !(tmp instanceof primnode)) { throw new SchemeError("jas-class-addinterface expects a CP for arg #2"); } 71 if ((tmp != null) && !((((primnode)tmp).val) instanceof CP)) { throw new SchemeError("jas-class-addinterface expects a CP for arg #2"); } 72 CP arg1 = (tmp != null)?(CP)(((primnode)tmp).val):null; 73 arg0.addInterface(arg1); 74 return null; 75 } 76 public String toString() 77 { return ("<#jas-class-addinterface#>"); } 78 } 79 class scmsetClass extends Procedure implements Obj 81 { 82 Obj apply(Cell args, Env f) 83 throws Exception 84 { 85 86 Cell t = args; 87 Obj tmp; 88 if (t == null) { throw new SchemeError("jas-class-setclass expects 2 arguments"); } 89 tmp = (t.car!=null)?t.car.eval(f):null; t = t.cdr; 90 if ((tmp != null) && !(tmp instanceof primnode)) { throw new SchemeError("jas-class-setclass expects a ClassEnv for arg #1"); } 91 if ((tmp != null) && !((((primnode)tmp).val) instanceof ClassEnv)) { throw new SchemeError("jas-class-setclass expects a ClassEnv for arg #1"); } 92 ClassEnv arg0 = (tmp != null)?(ClassEnv)(((primnode)tmp).val):null; 93 if (t == null) { throw new SchemeError("jas-class-setclass expects 2 arguments"); } 94 tmp = (t.car!=null)?t.car.eval(f):null; t = t.cdr; 95 if ((tmp != null) && !(tmp instanceof primnode)) { throw new SchemeError("jas-class-setclass expects a CP for arg #2"); } 96 if ((tmp != null) && !((((primnode)tmp).val) instanceof CP)) { throw new SchemeError("jas-class-setclass expects a CP for arg #2"); } 97 CP arg1 = (tmp != null)?(CP)(((primnode)tmp).val):null; 98 arg0.setClass(arg1); 99 return null; 100 } 101 public String toString() 102 { return ("<#jas-class-setclass#>"); } 103 } 104 class scmsetSuperClass extends Procedure implements Obj 106 { 107 Obj apply(Cell args, Env f) 108 throws Exception 109 { 110 111 Cell t = args; 112 Obj tmp; 113 if (t == null) { throw new SchemeError("jas-class-setsuperclass expects 2 arguments"); } 114 tmp = (t.car!=null)?t.car.eval(f):null; t = t.cdr; 115 if ((tmp != null) && !(tmp instanceof primnode)) { throw new SchemeError("jas-class-setsuperclass expects a ClassEnv for arg #1"); } 116 if ((tmp != null) && !((((primnode)tmp).val) instanceof ClassEnv)) { throw new SchemeError("jas-class-setsuperclass expects a ClassEnv for arg #1"); } 117 ClassEnv arg0 = (tmp != null)?(ClassEnv)(((primnode)tmp).val):null; 118 if (t == null) { throw new SchemeError("jas-class-setsuperclass expects 2 arguments"); } 119 tmp = (t.car!=null)?t.car.eval(f):null; t = t.cdr; 120 if ((tmp != null) && !(tmp instanceof primnode)) { throw new SchemeError("jas-class-setsuperclass expects a CP for arg #2"); } 121 if ((tmp != null) && !((((primnode)tmp).val) instanceof CP)) { throw new SchemeError("jas-class-setsuperclass expects a CP for arg #2"); } 122 CP arg1 = (tmp != null)?(CP)(((primnode)tmp).val):null; 123 arg0.setSuperClass(arg1); 124 return null; 125 } 126 public String toString() 127 { return ("<#jas-class-setsuperclass#>"); } 128 } 129 class scmaddMethod extends Procedure implements Obj 131 { 132 Obj apply(Cell args, Env f) 133 throws Exception 134 { 135 136 Cell t = args; 137 Obj tmp; 138 if (t == null) { throw new SchemeError("jas-class-addmethod expects 6 arguments"); } 139 tmp = (t.car!=null)?t.car.eval(f):null; t = t.cdr; 140 if ((tmp != null) && !(tmp instanceof primnode)) { throw new SchemeError("jas-class-addmethod expects a ClassEnv for arg #1"); } 141 if ((tmp != null) && !((((primnode)tmp).val) instanceof ClassEnv)) { throw new SchemeError("jas-class-addmethod expects a ClassEnv for arg #1"); } 142 ClassEnv arg0 = (tmp != null)?(ClassEnv)(((primnode)tmp).val):null; 143 if (t == null) { throw new SchemeError("jas-class-addmethod expects 6 arguments"); } 144 tmp = (t.car!=null)?t.car.eval(f):null; t = t.cdr; 145 if (!(tmp instanceof Selfrep)) { throw new SchemeError("jas-class-addmethod expects a number for arg #2"); } 146 short arg1 = (short)(((Selfrep)tmp).num); 147 if (t == null) { throw new SchemeError("jas-class-addmethod expects 6 arguments"); } 148 tmp = (t.car!=null)?t.car.eval(f):null; t = t.cdr; 149 if ((tmp != null) && !(tmp instanceof Selfrep)) { throw new SchemeError("jas-class-addmethod expects a String for arg #3"); } 150 String arg2 = (tmp!=null)?((Selfrep)tmp).val:null; 151 if (t == null) { throw new SchemeError("jas-class-addmethod expects 6 arguments"); } 152 tmp = (t.car!=null)?t.car.eval(f):null; t = t.cdr; 153 if ((tmp != null) && !(tmp instanceof Selfrep)) { throw new SchemeError("jas-class-addmethod expects a String for arg #4"); } 154 String arg3 = (tmp!=null)?((Selfrep)tmp).val:null; 155 if (t == null) { throw new SchemeError("jas-class-addmethod expects 6 arguments"); } 156 tmp = (t.car!=null)?t.car.eval(f):null; t = t.cdr; 157 if ((tmp != null) && !(tmp instanceof primnode)) { throw new SchemeError("jas-class-addmethod expects a CodeAttr for arg #5"); } 158 if ((tmp != null) && !((((primnode)tmp).val) instanceof CodeAttr)) { throw new SchemeError("jas-class-addmethod expects a CodeAttr for arg #5"); } 159 CodeAttr arg4 = (tmp != null)?(CodeAttr)(((primnode)tmp).val):null; 160 if (t == null) { throw new SchemeError("jas-class-addmethod expects 6 arguments"); } 161 tmp = (t.car!=null)?t.car.eval(f):null; t = t.cdr; 162 if ((tmp != null) && !(tmp instanceof primnode)) { throw new SchemeError("jas-class-addmethod expects a ExceptAttr for arg #6"); } 163 if ((tmp != null) && !((((primnode)tmp).val) instanceof ExceptAttr)) { throw new SchemeError("jas-class-addmethod expects a ExceptAttr for arg #6"); } 164 ExceptAttr arg5 = (tmp != null)?(ExceptAttr)(((primnode)tmp).val):null; 165 arg0.addMethod(arg1, arg2, arg3, arg4, arg5); 166 return null; 167 } 168 public String toString() 169 { return ("<#jas-class-addmethod#>"); } 170 } 171 class scmsetClassAccess extends Procedure implements Obj 173 { 174 Obj apply(Cell args, Env f) 175 throws Exception 176 { 177 178 Cell t = args; 179 Obj tmp; 180 if (t == null) { throw new SchemeError("jas-class-setaccess expects 2 arguments"); } 181 tmp = (t.car!=null)?t.car.eval(f):null; t = t.cdr; 182 if ((tmp != null) && !(tmp instanceof primnode)) { throw new SchemeError("jas-class-setaccess expects a ClassEnv for arg #1"); } 183 if ((tmp != null) && !((((primnode)tmp).val) instanceof ClassEnv)) { throw new SchemeError("jas-class-setaccess expects a ClassEnv for arg #1"); } 184 ClassEnv arg0 = (tmp != null)?(ClassEnv)(((primnode)tmp).val):null; 185 if (t == null) { throw new SchemeError("jas-class-setaccess expects 2 arguments"); } 186 tmp = (t.car!=null)?t.car.eval(f):null; t = t.cdr; 187 if (!(tmp instanceof Selfrep)) { throw new SchemeError("jas-class-setaccess expects a number for arg #2"); } 188 short arg1 = (short)(((Selfrep)tmp).num); 189 arg0.setClassAccess(arg1); 190 return null; 191 } 192 public String toString() 193 { return ("<#jas-class-setaccess#>"); } 194 } 195 class scmsetSource extends Procedure implements Obj 197 { 198 Obj apply(Cell args, Env f) 199 throws Exception 200 { 201 202 Cell t = args; 203 Obj tmp; 204 if (t == null) { throw new SchemeError("jas-class-setsource expects 2 arguments"); } 205 tmp = (t.car!=null)?t.car.eval(f):null; t = t.cdr; 206 if ((tmp != null) && !(tmp instanceof primnode)) { throw new SchemeError("jas-class-setsource expects a ClassEnv for arg #1"); } 207 if ((tmp != null) && !((((primnode)tmp).val) instanceof ClassEnv)) { throw new SchemeError("jas-class-setsource expects a ClassEnv for arg #1"); } 208 ClassEnv arg0 = (tmp != null)?(ClassEnv)(((primnode)tmp).val):null; 209 if (t == null) { throw new SchemeError("jas-class-setsource expects 2 arguments"); } 210 tmp = (t.car!=null)?t.car.eval(f):null; t = t.cdr; 211 if ((tmp != null) && !(tmp instanceof Selfrep)) { throw new SchemeError("jas-class-setsource expects a String for arg #2"); } 212 String arg1 = (tmp!=null)?((Selfrep)tmp).val:null; 213 arg0.setSource(arg1); 214 return null; 215 } 216 public String toString() 217 { return ("<#jas-class-setsource#>"); } 218 } 219 class scmwrite extends Procedure implements Obj 221 { 222 Obj apply(Cell args, Env f) 223 throws Exception 224 { 225 226 Cell t = args; 227 Obj tmp; 228 if (t == null) { throw new SchemeError("jas-class-write expects 2 arguments"); } 229 tmp = (t.car!=null)?t.car.eval(f):null; t = t.cdr; 230 if ((tmp != null) && !(tmp instanceof primnode)) { throw new SchemeError("jas-class-write expects a ClassEnv for arg #1"); } 231 if ((tmp != null) && !((((primnode)tmp).val) instanceof ClassEnv)) { throw new SchemeError("jas-class-write expects a ClassEnv for arg #1"); } 232 ClassEnv arg0 = (tmp != null)?(ClassEnv)(((primnode)tmp).val):null; 233 if (t == null) { throw new SchemeError("jas-class-write expects 2 arguments"); } 234 tmp = (t.car!=null)?t.car.eval(f):null; t = t.cdr; 235 if ((tmp != null) && !(tmp instanceof primnode)) { throw new SchemeError("jas-class-write expects a scmOutputStream for arg #2"); } 236 if ((tmp != null) && !((((primnode)tmp).val) instanceof scmOutputStream)) { throw new SchemeError("jas-class-write expects a scmOutputStream for arg #2"); } 237 scmOutputStream arg1 = (tmp != null)?(scmOutputStream)(((primnode)tmp).val):null; 238 arg0.write(arg1); 239 return null; 240 } 241 public String toString() 242 { return ("<#jas-class-write#>"); } 243 } 244 class scmaddException extends Procedure implements Obj 246 { 247 Obj apply(Cell args, Env f) 248 throws Exception 249 { 250 251 Cell t = args; 252 Obj tmp; 253 if (t == null) { throw new SchemeError("jas-exception-add expects 2 arguments"); } 254 tmp = (t.car!=null)?t.car.eval(f):null; t = t.cdr; 255 if ((tmp != null) && !(tmp instanceof primnode)) { throw new SchemeError("jas-exception-add expects a ExceptAttr for arg #1"); } 256 if ((tmp != null) && !((((primnode)tmp).val) instanceof ExceptAttr)) { throw new SchemeError("jas-exception-add expects a ExceptAttr for arg #1"); } 257 ExceptAttr arg0 = (tmp != null)?(ExceptAttr)(((primnode)tmp).val):null; 258 if (t == null) { throw new SchemeError("jas-exception-add expects 2 arguments"); } 259 tmp = (t.car!=null)?t.car.eval(f):null; t = t.cdr; 260 if ((tmp != null) && !(tmp instanceof primnode)) { throw new SchemeError("jas-exception-add expects a CP for arg #2"); } 261 if ((tmp != null) && !((((primnode)tmp).val) instanceof CP)) { throw new SchemeError("jas-exception-add expects a CP for arg #2"); } 262 CP arg1 = (tmp != null)?(CP)(((primnode)tmp).val):null; 263 arg0.addException(arg1); 264 return null; 265 } 266 public String toString() 267 { return ("<#jas-exception-add#>"); } 268 } 269 class scmaddInsn extends Procedure implements Obj 271 { 272 Obj apply(Cell args, Env f) 273 throws Exception 274 { 275 276 Cell t = args; 277 Obj tmp; 278 if (t == null) { throw new SchemeError("jas-code-addinsn expects 2 arguments"); } 279 tmp = (t.car!=null)?t.car.eval(f):null; t = t.cdr; 280 if ((tmp != null) && !(tmp instanceof primnode)) { throw new SchemeError("jas-code-addinsn expects a CodeAttr for arg #1"); } 281 if ((tmp != null) && !((((primnode)tmp).val) instanceof CodeAttr)) { throw new SchemeError("jas-code-addinsn expects a CodeAttr for arg #1"); } 282 CodeAttr arg0 = (tmp != null)?(CodeAttr)(((primnode)tmp).val):null; 283 if (t == null) { throw new SchemeError("jas-code-addinsn expects 2 arguments"); } 284 tmp = (t.car!=null)?t.car.eval(f):null; t = t.cdr; 285 if ((tmp != null) && !(tmp instanceof primnode)) { throw new SchemeError("jas-code-addinsn expects a Insn for arg #2"); } 286 if ((tmp != null) && !((((primnode)tmp).val) instanceof Insn)) { throw new SchemeError("jas-code-addinsn expects a Insn for arg #2"); } 287 Insn arg1 = (tmp != null)?(Insn)(((primnode)tmp).val):null; 288 arg0.addInsn(arg1); 289 return null; 290 } 291 public String toString() 292 { return ("<#jas-code-addinsn#>"); } 293 } 294 class scmsetStackSize extends Procedure implements Obj 296 { 297 Obj apply(Cell args, Env f) 298 throws Exception 299 { 300 301 Cell t = args; 302 Obj tmp; 303 if (t == null) { throw new SchemeError("jas-code-stack-size expects 2 arguments"); } 304 tmp = (t.car!=null)?t.car.eval(f):null; t = t.cdr; 305 if ((tmp != null) && !(tmp instanceof primnode)) { throw new SchemeError("jas-code-stack-size expects a CodeAttr for arg #1"); } 306 if ((tmp != null) && !((((primnode)tmp).val) instanceof CodeAttr)) { throw new SchemeError("jas-code-stack-size expects a CodeAttr for arg #1"); } 307 CodeAttr arg0 = (tmp != null)?(CodeAttr)(((primnode)tmp).val):null; 308 if (t == null) { throw new SchemeError("jas-code-stack-size expects 2 arguments"); } 309 tmp = (t.car!=null)?t.car.eval(f):null; t = t.cdr; 310 if (!(tmp instanceof Selfrep)) { throw new SchemeError("jas-code-stack-size expects a number for arg #2"); } 311 short arg1 = (short)(((Selfrep)tmp).num); 312 arg0.setStackSize(arg1); 313 return null; 314 } 315 public String toString() 316 { return ("<#jas-code-stack-size#>"); } 317 } 318 class scmsetVarSize extends Procedure implements Obj 320 { 321 Obj apply(Cell args, Env f) 322 throws Exception 323 { 324 325 Cell t = args; 326 Obj tmp; 327 if (t == null) { throw new SchemeError("jas-code-var-size expects 2 arguments"); } 328 tmp = (t.car!=null)?t.car.eval(f):null; t = t.cdr; 329 if ((tmp != null) && !(tmp instanceof primnode)) { throw new SchemeError("jas-code-var-size expects a CodeAttr for arg #1"); } 330 if ((tmp != null) && !((((primnode)tmp).val) instanceof CodeAttr)) { throw new SchemeError("jas-code-var-size expects a CodeAttr for arg #1"); } 331 CodeAttr arg0 = (tmp != null)?(CodeAttr)(((primnode)tmp).val):null; 332 if (t == null) { throw new SchemeError("jas-code-var-size expects 2 arguments"); } 333 tmp = (t.car!=null)?t.car.eval(f):null; t = t.cdr; 334 if (!(tmp instanceof Selfrep)) { throw new SchemeError("jas-code-var-size expects a number for arg #2"); } 335 short arg1 = (short)(((Selfrep)tmp).num); 336 arg0.setVarSize(arg1); 337 return null; 338 } 339 public String toString() 340 { return ("<#jas-code-var-size#>"); } 341 } 342 class scmsetCatchtable extends Procedure implements Obj 344 { 345 Obj apply(Cell args, Env f) 346 throws Exception 347 { 348 349 Cell t = args; 350 Obj tmp; 351 if (t == null) { throw new SchemeError("jas-set-catchtable expects 2 arguments"); } 352 tmp = (t.car!=null)?t.car.eval(f):null; t = t.cdr; 353 if ((tmp != null) && !(tmp instanceof primnode)) { throw new SchemeError("jas-set-catchtable expects a CodeAttr for arg #1"); } 354 if ((tmp != null) && !((((primnode)tmp).val) instanceof CodeAttr)) { throw new SchemeError("jas-set-catchtable expects a CodeAttr for arg #1"); } 355 CodeAttr arg0 = (tmp != null)?(CodeAttr)(((primnode)tmp).val):null; 356 if (t == null) { throw new SchemeError("jas-set-catchtable expects 2 arguments"); } 357 tmp = (t.car!=null)?t.car.eval(f):null; t = t.cdr; 358 if ((tmp != null) && !(tmp instanceof primnode)) { throw new SchemeError("jas-set-catchtable expects a Catchtable for arg #2"); } 359 if ((tmp != null) && !((((primnode)tmp).val) instanceof Catchtable)) { throw new SchemeError("jas-set-catchtable expects a Catchtable for arg #2"); } 360 Catchtable arg1 = (tmp != null)?(Catchtable)(((primnode)tmp).val):null; 361 arg0.setCatchtable(arg1); 362 return null; 363 } 364 public String toString() 365 { return ("<#jas-set-catchtable#>"); } 366 } 367 class scmaddEntry extends Procedure implements Obj 369 { 370 Obj apply(Cell args, Env f) 371 throws Exception 372 { 373 374 Cell t = args; 375 Obj tmp; 376 if (t == null) { throw new SchemeError("jas-add-catch-entry expects 2 arguments"); } 377 tmp = (t.car!=null)?t.car.eval(f):null; t = t.cdr; 378 if ((tmp != null) && !(tmp instanceof primnode)) { throw new SchemeError("jas-add-catch-entry expects a Catchtable for arg #1"); } 379 if ((tmp != null) && !((((primnode)tmp).val) instanceof Catchtable)) { throw new SchemeError("jas-add-catch-entry expects a Catchtable for arg #1"); } 380 Catchtable arg0 = (tmp != null)?(Catchtable)(((primnode)tmp).val):null; 381 if (t == null) { throw new SchemeError("jas-add-catch-entry expects 2 arguments"); } 382 tmp = (t.car!=null)?t.car.eval(f):null; t = t.cdr; 383 if ((tmp != null) && !(tmp instanceof primnode)) { throw new SchemeError("jas-add-catch-entry expects a CatchEntry for arg #2"); } 384 if ((tmp != null) && !((((primnode)tmp).val) instanceof CatchEntry)) { throw new SchemeError("jas-add-catch-entry expects a CatchEntry for arg #2"); } 385 CatchEntry arg1 = (tmp != null)?(CatchEntry)(((primnode)tmp).val):null; 386 arg0.addEntry(arg1); 387 return null; 388 } 389 public String toString() 390 { return ("<#jas-add-catch-entry#>"); } 391 } 392 | Popular Tags |