Changeset 12124
- Timestamp:
- 08/28/09 10:55:00 (13 years ago)
- Location:
- trunk/abcl/src/org/armedbear/lisp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/SpecialOperators.java
r12119 r12124 374 374 LispObject rv = eval(args.cadr(), env, LispThread.currentThread()); 375 375 376 // check only the most simple types: single symbols 377 // (class type specifiers/primitive types) 378 // DEFTYPE-d types need expansion; 379 // doing so would slow down our execution too much 380 381 // An implementation is allowed not to check the type, 382 // the fact that we do so here is mainly driven by the 383 // requirement to verify argument types in structure-slot 384 // accessors (defstruct.lisp) 385 386 // The policy below is in line with the level of verification 387 // in the compiler at *safety* levels below 3 376 388 LispObject type = args.car(); 377 if (type instanceof Symbol 389 if ((type instanceof Symbol 390 && get(type, Symbol.DEFTYPE_DEFINITION) == NIL) 378 391 || type instanceof BuiltInClass) 379 if (rv.typep(type) == NIL) { 380 // Try to call the Lisp-side TYPEP, as we will miss 381 // DEFTYPEd types. 382 Symbol typep 383 = PACKAGE_SYS.findAccessibleSymbol("TYPEP"); 384 LispObject result 385 = typep.getSymbolFunction().execute(rv, type); 386 if (result == NIL) { 392 if (rv.typep(type) == NIL) 387 393 type_error(rv, type); 388 } 389 } 394 390 395 return rv; 391 396 } -
trunk/abcl/src/org/armedbear/lisp/Symbol.java
r12105 r12124 3012 3012 public static final Symbol DATUM = 3013 3013 PACKAGE_SYS.addInternalSymbol("DATUM"); 3014 public static final Symbol DEFTYPE_DEFINITION = 3015 PACKAGE_SYS.addInternalSymbol("DEFTYPE-DEFINITION"); 3014 3016 public static final Symbol EXPECTED_TYPE = 3015 3017 PACKAGE_SYS.addInternalSymbol("EXPECTED-TYPE");
Note: See TracChangeset
for help on using the changeset viewer.