Changeset 4595
- Timestamp:
- 11/02/03 00:23:29 (19 years ago)
- Location:
- trunk/j/src/org/armedbear/lisp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/j/src/org/armedbear/lisp/Autoload.java
r4537 r4595 3 3 * 4 4 * Copyright (C) 2003 Peter Graves 5 * $Id: Autoload.java,v 1.9 5 2003-10-25 21:44:27piso Exp $5 * $Id: Autoload.java,v 1.96 2003-11-02 00:23:29 piso Exp $ 6 6 * 7 7 * This program is free software; you can redistribute it and/or … … 236 236 autoload("logtest", "logtest"); 237 237 autoload("logxor", "logxor"); 238 autoload("make-condition", "make_condition");239 238 autoload("make-string-input-stream", "StringInputStream"); 240 239 autoload("make-string-output-stream", "StringOutputStream"); … … 267 266 autoload(PACKAGE_SYS, "%defpackage", "PackageFunctions"); 268 267 autoload(PACKAGE_SYS, "%make-array", "make_array"); 268 autoload(PACKAGE_SYS, "%make-condition", "make_condition"); 269 269 autoload(PACKAGE_SYS, "%make-hash-table", "HashTable"); 270 270 autoload(PACKAGE_SYS, "%make-pathname", "Pathname"); -
trunk/j/src/org/armedbear/lisp/make_condition.java
r4005 r4595 3 3 * 4 4 * Copyright (C) 2003 Peter Graves 5 * $Id: make_condition.java,v 1. 6 2003-09-22 17:26:12piso Exp $5 * $Id: make_condition.java,v 1.7 2003-11-02 00:22:08 piso Exp $ 6 6 * 7 7 * This program is free software; you can redistribute it and/or … … 22 22 package org.armedbear.lisp; 23 23 24 // ### make-condition 25 public final class make_condition extends Primitive 24 public final class make_condition extends Primitive2 26 25 { 27 private make_condition( String name)26 private make_condition() 28 27 { 29 super( name);28 super("%make-condition", PACKAGE_SYS, false); 30 29 } 31 30 32 // make-condition type &rest slot-initializations => condition 33 public LispObject execute(LispObject[] args) throws ConditionThrowable 31 // ### %make-condition 32 // %make-condition type slot-initializations => condition 33 public LispObject execute(LispObject type, LispObject initArgs) 34 throws ConditionThrowable 34 35 { 35 if (args.length < 1)36 throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));37 LispObject type = args[0];38 LispObject initArgs = NIL;39 for (int i = args.length; i-- > 1;)40 initArgs = new Cons(args[i], initArgs);41 36 if (type == Symbol.CONDITION) 42 37 return new Condition(initArgs); … … 60 55 return new UndefinedFunction(initArgs); 61 56 62 // if (type instanceof Symbol) { 63 // LispClass cls = findClass(type); 64 // if (cls instanceof StandardClass) { 65 // return ((StandardClass)cls).makeInstance(initArgs); 66 // } 67 // } 68 69 throw new ConditionThrowable(new LispError("MAKE-CONDITION: unsupported type " + type)); 57 return NIL; 70 58 } 71 59 72 private static final make_condition MAKE_CONDITION = 73 new make_condition("make-condition"); 60 private static final make_condition MAKE_CONDITION = new make_condition(); 74 61 }
Note: See TracChangeset
for help on using the changeset viewer.