Changeset 12456
- Timestamp:
- 02/13/10 15:28:44 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/SpecialOperators.java
r12290 r12456 41 41 { 42 42 // ### quote 43 private static final SpecialOperator QUOTE = 44 new SpecialOperator(Symbol.QUOTE, "thing") 45 { 43 private static final SpecialOperator QUOTE = new sf_quote(); 44 private static final class sf_quote extends SpecialOperator { 45 sf_quote() 46 { 47 super(Symbol.QUOTE, "thing"); 48 } 49 46 50 @Override 47 51 public LispObject execute(LispObject args, Environment env) … … 55 59 56 60 // ### if 57 private static final SpecialOperator IF = 58 new SpecialOperator(Symbol.IF, "test then &optional else") 59 { 61 private static final SpecialOperator IF = new sf_if(); 62 private static final class sf_if extends SpecialOperator { 63 sf_if() 64 { 65 super(Symbol.IF, "test then &optional else"); 66 } 67 60 68 @Override 61 69 public LispObject execute(LispObject args, Environment env) … … 85 93 86 94 // ### let 87 private static final SpecialOperator LET = 88 new SpecialOperator(Symbol.LET, "bindings &body body") 89 { 95 private static final SpecialOperator LET = new sf_let(); 96 private static final class sf_let extends SpecialOperator { 97 sf_let() 98 { 99 super(Symbol.LET, "bindings &body body"); 100 } 101 90 102 @Override 91 103 public LispObject execute(LispObject args, Environment env) … … 99 111 100 112 // ### let* 101 private static final SpecialOperator LET_STAR = 102 new SpecialOperator(Symbol.LET_STAR, "bindings &body body") 103 { 113 private static final SpecialOperator LET_STAR = new sf_let_star(); 114 private static final class sf_let_star extends SpecialOperator { 115 sf_let_star() 116 { 117 super(Symbol.LET_STAR, "bindings &body body"); 118 } 119 104 120 @Override 105 121 public LispObject execute(LispObject args, Environment env) … … 174 190 175 191 // ### symbol-macrolet 176 private static final SpecialOperator SYMBOL_MACROLET = 177 new SpecialOperator(Symbol.SYMBOL_MACROLET, "macrobindings &body body") 178 { 192 private static final SpecialOperator SYMBOL_MACROLET = new sf_symbol_macrolet(); 193 private static final class sf_symbol_macrolet extends SpecialOperator { 194 sf_symbol_macrolet() 195 { 196 super(Symbol.SYMBOL_MACROLET, "macrobindings &body body"); 197 } 198 179 199 @Override 180 200 public LispObject execute(LispObject args, Environment env) … … 224 244 225 245 // ### load-time-value form &optional read-only-p => object 226 private static final SpecialOperator LOAD_TIME_VALUE = 227 new SpecialOperator(Symbol.LOAD_TIME_VALUE, 228 "form &optional read-only-p") 229 { 246 private static final SpecialOperator LOAD_TIME_VALUE = new sf_load_time_value(); 247 private static final class sf_load_time_value extends SpecialOperator { 248 sf_load_time_value() 249 { 250 super(Symbol.LOAD_TIME_VALUE, 251 "form &optional read-only-p"); 252 } 253 230 254 @Override 231 255 public LispObject execute(LispObject args, Environment env) … … 245 269 246 270 // ### locally 247 private static final SpecialOperator LOCALLY = 248 new SpecialOperator(Symbol.LOCALLY, "&body body") 249 { 271 private static final SpecialOperator LOCALLY = new sf_locally(); 272 private static final class sf_locally extends SpecialOperator { 273 sf_locally() 274 { 275 super(Symbol.LOCALLY, "&body body"); 276 } 277 250 278 @Override 251 279 public LispObject execute(LispObject args, Environment env) … … 260 288 261 289 // ### progn 262 private static final SpecialOperator PROGN = 263 new SpecialOperator(Symbol.PROGN, "&rest forms") 264 { 290 private static final SpecialOperator PROGN = new sf_progn(); 291 private static final class sf_progn extends SpecialOperator { 292 sf_progn() 293 { 294 super(Symbol.PROGN, "&rest forms"); 295 } 296 265 297 @Override 266 298 public LispObject execute(LispObject args, Environment env) … … 273 305 274 306 // ### flet 275 private static final SpecialOperator FLET = 276 new SpecialOperator(Symbol.FLET, "definitions &body body") 277 { 307 private static final SpecialOperator FLET = new sf_flet(); 308 private static final class sf_flet extends SpecialOperator { 309 sf_flet() 310 { 311 super(Symbol.FLET, "definitions &body body"); 312 } 313 278 314 @Override 279 315 public LispObject execute(LispObject args, Environment env) … … 285 321 286 322 // ### labels 287 private static final SpecialOperator LABELS = 288 new SpecialOperator(Symbol.LABELS, "definitions &body body") 289 { 323 private static final SpecialOperator LABELS = new sf_labels(); 324 private static final class sf_labels extends SpecialOperator { 325 sf_labels() 326 { 327 super(Symbol.LABELS, "definitions &body body"); 328 } 329 290 330 @Override 291 331 public LispObject execute(LispObject args, Environment env) … … 365 405 366 406 // ### the value-type form => result* 367 private static final SpecialOperator THE = 368 new SpecialOperator(Symbol.THE, "type value") 369 { 407 private static final SpecialOperator THE = new sf_the(); 408 private static final class sf_the extends SpecialOperator { 409 sf_the() 410 { 411 super(Symbol.THE, "type value"); 412 } 413 370 414 @Override 371 415 public LispObject execute(LispObject args, Environment env) … … 400 444 401 445 // ### progv 402 private static final SpecialOperator PROGV = 403 new SpecialOperator(Symbol.PROGV, "symbols values &body body") 404 { 446 private static final SpecialOperator PROGV = new sf_progv(); 447 private static final class sf_progv extends SpecialOperator { 448 sf_progv() 449 { 450 super(Symbol.PROGV, "symbols values &body body"); 451 } 452 405 453 @Override 406 454 public LispObject execute(LispObject args, Environment env) … … 428 476 429 477 // ### declare 430 private static final SpecialOperator DECLARE = 431 new SpecialOperator(Symbol.DECLARE, "&rest declaration-specifiers") 432 { 478 private static final SpecialOperator DECLARE = new sf_declare(); 479 private static final class sf_declare extends SpecialOperator { 480 sf_declare() 481 { 482 super(Symbol.DECLARE, "&rest declaration-specifiers"); 483 } 484 433 485 @Override 434 486 public LispObject execute(LispObject args, Environment env) … … 440 492 441 493 // ### function 442 private static final SpecialOperator FUNCTION = 443 new SpecialOperator(Symbol.FUNCTION, "thing") 444 { 494 private static final SpecialOperator FUNCTION = new sf_function(); 495 private static final class sf_function extends SpecialOperator { 496 sf_function() 497 { 498 super(Symbol.FUNCTION, "thing"); 499 } 500 445 501 @Override 446 502 public LispObject execute(LispObject args, Environment env) … … 498 554 499 555 // ### setq 500 private static final SpecialOperator SETQ = 501 new SpecialOperator(Symbol.SETQ, "&rest vars-and-values") 502 { 556 private static final SpecialOperator SETQ = new sf_setq(); 557 private static final class sf_setq extends SpecialOperator { 558 sf_setq() 559 { 560 super(Symbol.SETQ, "&rest vars-and-values"); 561 } 562 503 563 @Override 504 564 public LispObject execute(LispObject args, Environment env)
Note: See TracChangeset
for help on using the changeset viewer.