source: branches/1.0.x/abcl/src/org/armedbear/lisp/Keyword.java

Last change on this file was 13309, checked in by Mark Evenson, 14 years ago

Implementation of hashtables with weak keys and/or values.

MAKE-HASH-TABLE now has an optional :WEAKNESS argument that can take
the values :KEY, :VALUE, :KEY-AND-VALUE, or :KEY-OR-VALUE. :KEY means
that the key of an entry must be live to guarantee that the entry is
preserved. VALUE means that the value of an entry must be live to
guarantee that the entry is preserved. :KEY-AND-VALUE means that both
the key and the value must be live to guarantee that the entry is
preserved. :KEY-OR-VALUE means that either the key or the value must
be live to guarantee that the entry is preserved.

The tests simply excercise the various types of weak hash tables
enough that a GC phase should show that the table indeed does decrease
in size.

Changed the defition of functions in HashTableFunctions? to match
current docstring/pf_XXX() naming conventions.

This implementation is only lightly tested in single-threaded use, and
untested in multiple threading scenarios.

Addresses ticket:140.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 8.0 KB
Line 
1/*
2 * Keyword.java
3 *
4 * Copyright (C) 2002-2007 Peter Graves
5 * $Id: Keyword.java 13309 2011-06-07 15:38:11Z mevenson $
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
20 *
21 * As a special exception, the copyright holders of this library give you
22 * permission to link this library with independent modules to produce an
23 * executable, regardless of the license terms of these independent
24 * modules, and to copy and distribute the resulting executable under
25 * terms of your choice, provided that you also meet, for each linked
26 * independent module, the terms and conditions of the license of that
27 * module.  An independent module is a module which is not derived from
28 * or based on this library.  If you modify this library, you may extend
29 * this exception to your version of the library, but you are not
30 * obligated to do so.  If you do not wish to do so, delete this
31 * exception statement from your version.
32 */
33
34package org.armedbear.lisp;
35
36import static org.armedbear.lisp.Lisp.*;
37
38public final class Keyword
39{
40    public static final Symbol
41        ABCL                = internKeyword("ABCL"),
42        ABORT               = internKeyword("ABORT"),
43        ABSOLUTE            = internKeyword("ABSOLUTE"),
44        ADJUSTABLE          = internKeyword("ADJUSTABLE"),
45        ALLOW_OTHER_KEYS    = internKeyword("ALLOW-OTHER-KEYS"),
46        ANSI_CL             = internKeyword("ANSI-CL"),
47        APPEND              = internKeyword("APPEND"),
48        ARMEDBEAR           = internKeyword("ARMEDBEAR"),
49        BACK                = internKeyword("BACK"),
50        BOOLEAN             = internKeyword("BOOLEAN"),
51        CAPITALIZE          = internKeyword("CAPITALIZE"),
52        CAPITALIZE_FIRST    = internKeyword("CAPITALIZE-FIRST"),
53        CASE                = internKeyword("CASE"),
54        CAUSE               = internKeyword("CAUSE"),
55        CHAR                = internKeyword("CHAR"),
56        COMMON              = internKeyword("COMMON"),
57        COMMON_LISP         = internKeyword("COMMON-LISP"),
58        COMPILE_TOPLEVEL    = internKeyword("COMPILE-TOPLEVEL"),
59        COUNT_ONLY          = internKeyword("COUNT-ONLY"),
60        CREATE              = internKeyword("CREATE"),
61        DARWIN              = internKeyword("DARWIN"),
62        DATUM               = internKeyword("DATUM"),
63        DECLARED            = internKeyword("DECLARED"),
64        DEFAULT             = internKeyword("DEFAULT"),
65        DEFAULTS            = internKeyword("DEFAULTS"),
66        DEVICE              = internKeyword("DEVICE"),
67        DIRECTION           = internKeyword("DIRECTION"),
68        DIRECTORY           = internKeyword("DIRECTORY"),
69        DIRECT_SUPERCLASSES = internKeyword("DIRECT-SUPERCLASSES"),
70        DOWNCASE            = internKeyword("DOWNCASE"),
71        ELEMENT_TYPE        = internKeyword("ELEMENT-TYPE"),
72        END                 = internKeyword("END"),
73        ERROR               = internKeyword("ERROR"),
74        EXECUTE             = internKeyword("EXECUTE"),
75        EXPECTED_TYPE       = internKeyword("EXPECTED-TYPE"),
76        EXTERNAL            = internKeyword("EXTERNAL"),
77        EXTERNAL_FORMAT     = internKeyword("EXTERNAL-FORMAT"),
78        FILL_POINTER        = internKeyword("FILL-POINTER"),
79        FORMAT_ARGUMENTS    = internKeyword("FORMAT-ARGUMENTS"),
80        FORMAT_CONTROL      = internKeyword("FORMAT-CONTROL"),
81        FROM_END            = internKeyword("FROM-END"),
82        FREEBSD             = internKeyword("FREEBSD"),
83        HOST                = internKeyword("HOST"),
84        IF_DOES_NOT_EXIST   = internKeyword("IF-DOES-NOT-EXIST"),
85        IF_EXISTS           = internKeyword("IF-EXISTS"),
86        INHERITED           = internKeyword("INHERITED"),
87        INITIAL_CONTENTS    = internKeyword("INITIAL-CONTENTS"),
88        INITIAL_ELEMENT     = internKeyword("INITIAL-ELEMENT"),
89        INPUT               = internKeyword("INPUT"),
90        INSTANCE            = internKeyword("INSTANCE"),
91        INT                 = internKeyword("INT"),
92        INTERNAL            = internKeyword("INTERNAL"),
93        INVERT              = internKeyword("INVERT"),
94        IO                  = internKeyword("IO"),
95        J                   = internKeyword("J"),
96        JAVA_1_4            = internKeyword("JAVA-1.4"),
97        JAVA_1_5            = internKeyword("JAVA-1.5"),
98        JAVA_1_6            = internKeyword("JAVA-1.6"),
99        JAVA_1_7            = internKeyword("JAVA-1.7"),
100        KEY                 = internKeyword("KEY"),
101        KEY_AND_VALUE       = internKeyword("KEY-AND-VALUE"),
102        KEY_OR_VALUE        = internKeyword("KEY-OR-VALUE"),
103        LINUX               = internKeyword("LINUX"),
104        LOAD_TOPLEVEL       = internKeyword("LOAD-TOPLEVEL"),
105        LOCAL               = internKeyword("LOCAL"),
106        LONG                = internKeyword("LONG"),
107        NAME                = internKeyword("NAME"),
108        NETBSD              = internKeyword("NETBSD"),
109        NEW_VERSION         = internKeyword("NEW"),
110        NEWEST              = internKeyword("NEWEST"),
111        NICKNAMES           = internKeyword("NICKNAMES"),
112        NONE                = internKeyword("NONE"),
113        NO_ERROR            = internKeyword("NO-ERROR"),
114        OBJECT              = internKeyword("OBJECT"),
115        OPENBSD             = internKeyword("OPENBSD"),
116        OPERANDS            = internKeyword("OPERANDS"),
117        OPERATION           = internKeyword("OPERATION"),
118        OUTPUT              = internKeyword("OUTPUT"),
119        OVERFLOW            = internKeyword("OVERFLOW"),
120        OVERWRITE           = internKeyword("OVERWRITE"),
121        PACKAGE             = internKeyword("PACKAGE"),
122        PATHNAME            = internKeyword("PATHNAME"),
123        PROBE               = internKeyword("PROBE"),
124        PUBLIC              = internKeyword("PUBLIC"),
125        PRESERVE            = internKeyword("PRESERVE"),
126        REF                 = internKeyword("REF"),
127        RELATIVE            = internKeyword("RELATIVE"),
128        RENAME              = internKeyword("RENAME"),
129        RENAME_AND_DELETE   = internKeyword("RENAME-AND-DELETE"),
130        SIZE                = internKeyword("SIZE"),
131        SOLARIS             = internKeyword("SOLARIS"),
132        START               = internKeyword("START"),
133        STATUS              = internKeyword("STATUS"),
134        STREAM              = internKeyword("STREAM"),
135        SUNOS               = internKeyword("SUNOS"),
136        SUPERSEDE           = internKeyword("SUPERSEDE"),
137        TEST                = internKeyword("TEST"),
138        TEST_NOT            = internKeyword("TEST-NOT"),
139        TIME                = internKeyword("TIME"),
140        TOP_LEVEL           = internKeyword("TOP-LEVEL"),
141        TRAPS               = internKeyword("TRAPS"),
142        TYPE                = internKeyword("TYPE"),
143        UNDERFLOW           = internKeyword("UNDERFLOW"),
144        UNIX                = internKeyword("UNIX"),
145        UNSPECIFIC          = internKeyword("UNSPECIFIC"),
146        UP                  = internKeyword("UP"),
147        UPCASE              = internKeyword("UPCASE"),
148        USE                 = internKeyword("USE"),
149        VALUE               = internKeyword("VALUE"),
150        VERSION             = internKeyword("VERSION"),
151        WILD                = internKeyword("WILD"),
152        WILD_INFERIORS      = internKeyword("WILD-INFERIORS"),
153        WINDOWS             = internKeyword("WINDOWS"),
154        X86                 = internKeyword("X86"),
155        X86_64              = internKeyword("X86-64"),
156        CDR6                = internKeyword("CDR6");
157}
Note: See TracBrowser for help on using the repository browser.