Changeset 10204


Ignore:
Timestamp:
10/23/05 17:17:00 (16 years ago)
Author:
piso
Message:

Symbol refactoring (work in progress).

Location:
trunk/j/src/org/armedbear/lisp
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/Bignum.java

    r9870 r10204  
    33 *
    44 * Copyright (C) 2003-2005 Peter Graves
    5  * $Id: Bignum.java,v 1.73 2005-08-15 23:25:08 piso Exp $
     5 * $Id: Bignum.java,v 1.74 2005-10-23 17:17:00 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    616616        final int base = Fixnum.getValue(_PRINT_BASE_.symbolValue(thread));
    617617        String s = value.toString(base).toUpperCase();
    618         if (_PRINT_RADIX_.symbolValue(thread) != NIL) {
     618        if (Symbol.PRINT_RADIX.symbolValue(thread) != NIL) {
    619619            StringBuffer sb = new StringBuffer();
    620620            switch (base) {
  • trunk/j/src/org/armedbear/lisp/Fixnum.java

    r9941 r10204  
    33 *
    44 * Copyright (C) 2002-2005 Peter Graves
    5  * $Id: Fixnum.java,v 1.127 2005-09-05 14:07:26 piso Exp $
     5 * $Id: Fixnum.java,v 1.128 2005-10-23 17:17:00 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    811811        int base = Fixnum.getValue(_PRINT_BASE_.symbolValue(thread));
    812812        String s = Integer.toString(value, base).toUpperCase();
    813         if (_PRINT_RADIX_.symbolValue(thread) != NIL) {
     813        if (Symbol.PRINT_RADIX.symbolValue(thread) != NIL) {
    814814            FastStringBuffer sb = new FastStringBuffer();
    815815            switch (base) {
  • trunk/j/src/org/armedbear/lisp/Lisp.java

    r10203 r10204  
    33 *
    44 * Copyright (C) 2002-2005 Peter Graves
    5  * $Id: Lisp.java,v 1.404 2005-10-23 16:58:26 piso Exp $
     5 * $Id: Lisp.java,v 1.405 2005-10-23 17:16:02 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    20902090    }
    20912091
    2092 //     public static final Symbol PI =
    2093 //         exportConstant("PI", PACKAGE_CL, new DoubleFloat(Math.PI));
     2092    // Floating point constants.
    20942093    static {
    20952094        Symbol.PI.initializeConstant(new DoubleFloat(Math.PI));
    2096     }
    2097 
    2098 //     public static final Symbol SHORT_FLOAT_EPSILON =
    2099 //         exportConstant("SHORT-FLOAT-EPSILON", PACKAGE_CL,
    2100 //                        new SingleFloat((float)5.960465E-8));
    2101     static {
    21022095        Symbol.SHORT_FLOAT_EPSILON.initializeConstant(new SingleFloat((float)5.960465E-8));
    2103     }
    2104 
    2105 //     public static final Symbol SINGLE_FLOAT_EPSILON =
    2106 //         exportConstant("SINGLE-FLOAT-EPSILON", PACKAGE_CL,
    2107 //                        new SingleFloat((float)5.960465E-8));
    2108     static {
    21092096        Symbol.SINGLE_FLOAT_EPSILON.initializeConstant(new SingleFloat((float)5.960465E-8));
    2110     }
    2111 
    2112 //     public static final Symbol DOUBLE_FLOAT_EPSILON =
    2113 //         exportConstant("DOUBLE-FLOAT-EPSILON", PACKAGE_CL,
    2114 //                        new DoubleFloat((double)1.1102230246251568E-16));
    2115     static {
    21162097        Symbol.DOUBLE_FLOAT_EPSILON.initializeConstant(new DoubleFloat((double)1.1102230246251568E-16));
    2117     }
    2118 
    2119 //     public static final Symbol LONG_FLOAT_EPSILON =
    2120 //         exportConstant("LONG-FLOAT-EPSILON", PACKAGE_CL,
    2121 //                        new DoubleFloat((double)1.1102230246251568E-16));
    2122     static {
    21232098        Symbol.LONG_FLOAT_EPSILON.initializeConstant(new DoubleFloat((double)1.1102230246251568E-16));
    2124     }
    2125 
    2126 //     public static final Symbol SHORT_FLOAT_NEGATIVE_EPSILON =
    2127 //         exportConstant("SHORT-FLOAT-NEGATIVE-EPSILON", PACKAGE_CL,
    2128 //                        new SingleFloat(2.9802326e-8f));
    2129     static {
    21302099        Symbol.SHORT_FLOAT_NEGATIVE_EPSILON.initializeConstant(new SingleFloat(2.9802326e-8f));
    2131     }
    2132 
    2133 //     public static final Symbol SINGLE_FLOAT_NEGATIVE_EPSILON =
    2134 //         exportConstant("SINGLE-FLOAT-NEGATIVE-EPSILON", PACKAGE_CL,
    2135 //                        new SingleFloat(2.9802326e-8f));
    2136     static {
    21372100        Symbol.SINGLE_FLOAT_NEGATIVE_EPSILON.initializeConstant(new SingleFloat(2.9802326e-8f));
    2138     }
    2139 
    2140 //     public static final Symbol DOUBLE_FLOAT_NEGATIVE_EPSILON =
    2141 //         exportConstant("DOUBLE-FLOAT-NEGATIVE-EPSILON", PACKAGE_CL,
    2142 //                        new DoubleFloat((double)5.551115123125784E-17));
    2143     static {
    21442101        Symbol.DOUBLE_FLOAT_NEGATIVE_EPSILON.initializeConstant(new DoubleFloat((double)5.551115123125784E-17));
    2145     }
    2146 
    2147 //     public static final Symbol LONG_FLOAT_NEGATIVE_EPSILON =
    2148 //         exportConstant("LONG-FLOAT-NEGATIVE-EPSILON", PACKAGE_CL,
    2149 //                        new DoubleFloat((double)5.551115123125784E-17));
    2150     static {
    21512102        Symbol.LONG_FLOAT_NEGATIVE_EPSILON.initializeConstant(new DoubleFloat((double)5.551115123125784E-17));
    2152     }
    2153 
    2154     public static final Symbol MOST_POSITIVE_SHORT_FLOAT =
    2155         exportConstant("MOST-POSITIVE-SHORT-FLOAT", PACKAGE_CL,
    2156                        new SingleFloat(Float.MAX_VALUE));
    2157 
    2158     public static final Symbol MOST_POSITIVE_SINGLE_FLOAT =
    2159         exportConstant("MOST-POSITIVE-SINGLE-FLOAT", PACKAGE_CL,
    2160                        new SingleFloat(Float.MAX_VALUE));
    2161 
    2162     public static final Symbol MOST_POSITIVE_DOUBLE_FLOAT =
    2163         exportConstant("MOST-POSITIVE-DOUBLE-FLOAT", PACKAGE_CL,
    2164                        new DoubleFloat(Double.MAX_VALUE));
    2165 
    2166     public static final Symbol MOST_POSITIVE_LONG_FLOAT =
    2167         exportConstant("MOST-POSITIVE-LONG-FLOAT", PACKAGE_CL,
    2168                        new DoubleFloat(Double.MAX_VALUE));
    2169 
    2170     public static final Symbol LEAST_POSITIVE_SHORT_FLOAT =
    2171         exportConstant("LEAST-POSITIVE-SHORT-FLOAT", PACKAGE_CL,
    2172                        new SingleFloat(Float.MIN_VALUE));
    2173 
    2174     public static final Symbol LEAST_POSITIVE_SINGLE_FLOAT =
    2175         exportConstant("LEAST-POSITIVE-SINGLE-FLOAT", PACKAGE_CL,
    2176                        new SingleFloat(Float.MIN_VALUE));
    2177 
    2178     public static final Symbol LEAST_POSITIVE_DOUBLE_FLOAT =
    2179         exportConstant("LEAST-POSITIVE-DOUBLE-FLOAT", PACKAGE_CL,
    2180                        new DoubleFloat(Double.MIN_VALUE));
    2181 
    2182     public static final Symbol LEAST_POSITIVE_LONG_FLOAT =
    2183         exportConstant("LEAST-POSITIVE-LONG-FLOAT", PACKAGE_CL,
    2184                        new DoubleFloat(Double.MIN_VALUE));
    2185 
    2186     public static final Symbol LEAST_POSITIVE_NORMALIZED_SHORT_FLOAT =
    2187         exportConstant("LEAST-POSITIVE-NORMALIZED-SHORT-FLOAT", PACKAGE_CL,
    2188                        new SingleFloat(1.17549435e-38f));
    2189 
    2190     public static final Symbol LEAST_POSITIVE_NORMALIZED_SINGLE_FLOAT =
    2191         exportConstant("LEAST-POSITIVE-NORMALIZED-SINGLE-FLOAT", PACKAGE_CL,
    2192                        new SingleFloat(1.17549435e-38f));
    2193 
    2194     public static final Symbol LEAST_POSITIVE_NORMALIZED_DOUBLE_FLOAT =
    2195         exportConstant("LEAST-POSITIVE-NORMALIZED-DOUBLE-FLOAT", PACKAGE_CL,
    2196                        new DoubleFloat(2.2250738585072014e-308d));
    2197 
    2198     public static final Symbol LEAST_POSITIVE_NORMALIZED_LONG_FLOAT =
    2199         exportConstant("LEAST-POSITIVE-NORMALIZED-LONG-FLOAT", PACKAGE_CL,
    2200                        new DoubleFloat(2.2250738585072014e-308d));
    2201 
    2202     public static final Symbol MOST_NEGATIVE_SHORT_FLOAT =
    2203         exportConstant("MOST-NEGATIVE-SHORT-FLOAT", PACKAGE_CL,
    2204                        new SingleFloat(- Float.MAX_VALUE));
    2205 
    2206     public static final Symbol MOST_NEGATIVE_SINGLE_FLOAT =
    2207         exportConstant("MOST-NEGATIVE-SINGLE-FLOAT", PACKAGE_CL,
    2208                        new SingleFloat(- Float.MAX_VALUE));
    2209 
    2210     public static final Symbol MOST_NEGATIVE_DOUBLE_FLOAT =
    2211         exportConstant("MOST-NEGATIVE-DOUBLE-FLOAT", PACKAGE_CL,
    2212                        new DoubleFloat(- Double.MAX_VALUE));
    2213 
    2214     public static final Symbol MOST_NEGATIVE_LONG_FLOAT =
    2215         exportConstant("MOST-NEGATIVE-LONG-FLOAT", PACKAGE_CL,
    2216                        new DoubleFloat(- Double.MAX_VALUE));
    2217 
    2218     public static final Symbol LEAST_NEGATIVE_SHORT_FLOAT =
    2219         exportConstant("LEAST-NEGATIVE-SHORT-FLOAT", PACKAGE_CL,
    2220                        new SingleFloat(- Float.MIN_VALUE));
    2221 
    2222     public static final Symbol LEAST_NEGATIVE_SINGLE_FLOAT =
    2223         exportConstant("LEAST-NEGATIVE-SINGLE-FLOAT", PACKAGE_CL,
    2224                        new SingleFloat(- Float.MIN_VALUE));
    2225 
    2226     public static final Symbol LEAST_NEGATIVE_DOUBLE_FLOAT =
    2227         exportConstant("LEAST-NEGATIVE-DOUBLE-FLOAT", PACKAGE_CL,
    2228                        new DoubleFloat(- Double.MIN_VALUE));
    2229 
    2230     public static final Symbol LEAST_NEGATIVE_LONG_FLOAT =
    2231         exportConstant("LEAST-NEGATIVE-LONG-FLOAT", PACKAGE_CL,
    2232                        new DoubleFloat(- Double.MIN_VALUE));
    2233 
    2234     public static final Symbol LEAST_NEGATIVE_NORMALIZED_SHORT_FLOAT =
    2235         exportConstant("LEAST-NEGATIVE-NORMALIZED-SHORT-FLOAT", PACKAGE_CL,
    2236                        new SingleFloat(-1.17549435e-38f));
    2237 
    2238     public static final Symbol LEAST_NEGATIVE_NORMALIZED_SINGLE_FLOAT =
    2239         exportConstant("LEAST-NEGATIVE-NORMALIZED-SINGLE-FLOAT", PACKAGE_CL,
    2240                        new SingleFloat(-1.17549435e-38f));
    2241 
    2242     public static final Symbol LEAST_NEGATIVE_NORMALIZED_DOUBLE_FLOAT =
    2243         exportConstant("LEAST-NEGATIVE-NORMALIZED-DOUBLE-FLOAT", PACKAGE_CL,
    2244                        new DoubleFloat(-2.2250738585072014e-308d));
    2245 
    2246     public static final Symbol LEAST_NEGATIVE_NORMALIZED_LONG_FLOAT =
    2247         exportConstant("LEAST-NEGATIVE-NORMALIZED-LONG-FLOAT", PACKAGE_CL,
    2248                        new DoubleFloat(-2.2250738585072014e-308d));
     2103        Symbol.MOST_POSITIVE_SHORT_FLOAT.initializeConstant(new SingleFloat(Float.MAX_VALUE));
     2104        Symbol.MOST_POSITIVE_SINGLE_FLOAT.initializeConstant(new SingleFloat(Float.MAX_VALUE));
     2105        Symbol.MOST_POSITIVE_DOUBLE_FLOAT.initializeConstant(new DoubleFloat(Double.MAX_VALUE));
     2106        Symbol.MOST_POSITIVE_LONG_FLOAT.initializeConstant(new DoubleFloat(Double.MAX_VALUE));
     2107        Symbol.LEAST_POSITIVE_SHORT_FLOAT.initializeConstant(new SingleFloat(Float.MIN_VALUE));
     2108        Symbol.LEAST_POSITIVE_SINGLE_FLOAT.initializeConstant(new SingleFloat(Float.MIN_VALUE));
     2109        Symbol.LEAST_POSITIVE_DOUBLE_FLOAT.initializeConstant(new DoubleFloat(Double.MIN_VALUE));
     2110        Symbol.LEAST_POSITIVE_LONG_FLOAT.initializeConstant(new DoubleFloat(Double.MIN_VALUE));
     2111        Symbol.LEAST_POSITIVE_NORMALIZED_SHORT_FLOAT.initializeConstant(new SingleFloat(1.17549435e-38f));
     2112        Symbol.LEAST_POSITIVE_NORMALIZED_SINGLE_FLOAT.initializeConstant(new SingleFloat(1.17549435e-38f));
     2113        Symbol.LEAST_POSITIVE_NORMALIZED_DOUBLE_FLOAT.initializeConstant(new DoubleFloat(2.2250738585072014e-308d));
     2114        Symbol.LEAST_POSITIVE_NORMALIZED_LONG_FLOAT.initializeConstant(new DoubleFloat(2.2250738585072014e-308d));
     2115        Symbol.MOST_NEGATIVE_SHORT_FLOAT.initializeConstant(new SingleFloat(- Float.MAX_VALUE));
     2116        Symbol.MOST_NEGATIVE_SINGLE_FLOAT.initializeConstant(new SingleFloat(- Float.MAX_VALUE));
     2117        Symbol.MOST_NEGATIVE_DOUBLE_FLOAT.initializeConstant(new DoubleFloat(- Double.MAX_VALUE));
     2118        Symbol.MOST_NEGATIVE_LONG_FLOAT.initializeConstant(new DoubleFloat(- Double.MAX_VALUE));
     2119        Symbol.LEAST_NEGATIVE_SHORT_FLOAT.initializeConstant(new SingleFloat(- Float.MIN_VALUE));
     2120        Symbol.LEAST_NEGATIVE_SINGLE_FLOAT.initializeConstant(new SingleFloat(- Float.MIN_VALUE));
     2121        Symbol.LEAST_NEGATIVE_DOUBLE_FLOAT.initializeConstant(new DoubleFloat(- Double.MIN_VALUE));
     2122        Symbol.LEAST_NEGATIVE_LONG_FLOAT.initializeConstant(new DoubleFloat(- Double.MIN_VALUE));
     2123        Symbol.LEAST_NEGATIVE_NORMALIZED_SHORT_FLOAT.initializeConstant(new SingleFloat(-1.17549435e-38f));
     2124        Symbol.LEAST_NEGATIVE_NORMALIZED_SINGLE_FLOAT.initializeConstant(new SingleFloat(-1.17549435e-38f));
     2125        Symbol.LEAST_NEGATIVE_NORMALIZED_DOUBLE_FLOAT.initializeConstant(new DoubleFloat(-2.2250738585072014e-308d));
     2126        Symbol.LEAST_NEGATIVE_NORMALIZED_LONG_FLOAT.initializeConstant(new DoubleFloat(-2.2250738585072014e-308d));
     2127    }
    22492128
    22502129    public static final Symbol BOOLE_CLR =
  • trunk/j/src/org/armedbear/lisp/Ratio.java

    r8784 r10204  
    33 *
    44 * Copyright (C) 2003-2005 Peter Graves
    5  * $Id: Ratio.java,v 1.50 2005-03-17 14:56:43 piso Exp $
     5 * $Id: Ratio.java,v 1.51 2005-10-23 17:17:00 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    514514        sb.append(denominator.toString(base));
    515515        String s = sb.toString().toUpperCase();
    516         if (_PRINT_RADIX_.symbolValue(thread) != NIL) {
     516        if (Symbol.PRINT_RADIX.symbolValue(thread) != NIL) {
    517517            sb.setLength(0);
    518518            switch (base) {
  • trunk/j/src/org/armedbear/lisp/Symbol.java

    r10202 r10204  
    33 *
    44 * Copyright (C) 2002-2005 Peter Graves
    5  * $Id: Symbol.java,v 1.217 2005-10-23 16:39:49 piso Exp $
     5 * $Id: Symbol.java,v 1.218 2005-10-23 17:17:00 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    870870    public static final Symbol _PRINT_PRETTY_ =
    871871        PACKAGE_CL.addExternalSymbol("*PRINT-PRETTY*");
    872     public static final Symbol _PRINT_RADIX_ =
     872    public static final Symbol PRINT_RADIX =
    873873        PACKAGE_CL.addExternalSymbol("*PRINT-RADIX*");
    874874    public static final Symbol PRINT_READABLY =
Note: See TracChangeset for help on using the changeset viewer.