Changeset 4529
- Timestamp:
- 10/25/03 16:35:13 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/j/src/org/armedbear/lisp/Lisp.java
r4430 r4529 3 3 * 4 4 * Copyright (C) 2002-2003 Peter Graves 5 * $Id: Lisp.java,v 1.16 7 2003-10-17 14:08:35piso Exp $5 * $Id: Lisp.java,v 1.168 2003-10-25 16:35:13 piso Exp $ 6 6 * 7 7 * This program is free software; you can redistribute it and/or … … 23 23 24 24 import java.math.BigInteger; 25 import java.util.Hashtable; 25 26 import java.util.Random; 26 27 … … 1037 1038 Package pkg = Packages.findPackage(packageName); 1038 1039 if (pkg == null) 1039 throw new ConditionThrowable(new LispError(packageName + " is not the name of a package")); 1040 throw new ConditionThrowable(new LispError(packageName + 1041 " is not the name of a package")); 1040 1042 return pkg.intern(name); 1041 1043 } 1044 1045 // The jvm compiler's object table. 1046 private static final Hashtable objectTable = new Hashtable(); 1047 1048 public static final LispObject recall(LispString key) 1049 { 1050 return (LispObject) objectTable.get(((LispString)key).getValue()); 1051 } 1052 1053 public static final void forget(LispString key) 1054 { 1055 objectTable.remove(((LispString)key).getValue()); 1056 } 1057 1058 public static final Primitive2 REMEMBER = 1059 new Primitive2("remember", PACKAGE_SYS, false) 1060 { 1061 public LispObject execute(LispObject first, LispObject second) 1062 throws ConditionThrowable 1063 { 1064 objectTable.put(LispString.getValue(first), second); 1065 return NIL; 1066 } 1067 }; 1042 1068 1043 1069 public static final Symbol export(String name, Package pkg) … … 1222 1248 // ### start-profiler 1223 1249 public static final Primitive0 START_PROFILER = 1224 new Primitive0("start-profiler", PACKAGE_EXT, true) { 1250 new Primitive0("start-profiler", PACKAGE_EXT, true) 1251 { 1225 1252 public LispObject execute() throws ConditionThrowable 1226 1253 { … … 1252 1279 // ### stop-profiler 1253 1280 public static final Primitive0 STOP_PROFILER = 1254 new Primitive0("stop-profiler", PACKAGE_EXT, true) { 1281 new Primitive0("stop-profiler", PACKAGE_EXT, true) 1282 { 1255 1283 public LispObject execute() throws ConditionThrowable 1256 1284 {
Note: See TracChangeset
for help on using the changeset viewer.