Changeset 10203


Ignore:
Timestamp:
10/23/05 16:58:26 (16 years ago)
Author:
piso
Message:

Symbol refactoring (work in progress).

File:
1 edited

Legend:

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

    r10202 r10203  
    33 *
    44 * Copyright (C) 2002-2005 Peter Graves
    5  * $Id: Lisp.java,v 1.403 2005-10-23 16:39:49 piso Exp $
     5 * $Id: Lisp.java,v 1.404 2005-10-23 16:58:26 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    16231623                            SpecialBinding lastSpecialBinding = thread.lastSpecialBinding;
    16241624                            thread.bindSpecial(Symbol.PRINT_ESCAPE, NIL);
    1625                             thread.bindSpecial(_PRINT_RADIX_, NIL);
     1625                            thread.bindSpecial(Symbol.PRINT_RADIX, NIL);
    16261626                            thread.bindSpecial(_PRINT_BASE_, new Fixnum(10));
    16271627                            sb.append(obj.writeToString());
     
    16331633                            SpecialBinding lastSpecialBinding = thread.lastSpecialBinding;
    16341634                            thread.bindSpecial(Symbol.PRINT_ESCAPE, NIL);
    1635                             thread.bindSpecial(_PRINT_RADIX_, NIL);
     1635                            thread.bindSpecial(Symbol.PRINT_RADIX, NIL);
    16361636                            thread.bindSpecial(_PRINT_BASE_, new Fixnum(16));
    16371637                            sb.append(obj.writeToString());
     
    20292029        exportSpecial("*PRINT-CIRCLE*", PACKAGE_CL, NIL);
    20302030
    2031 //     public static final Symbol Symbol.PRINT_ESCAPE =
    2032 //         exportSpecial("*PRINT-ESCAPE*", PACKAGE_CL, T);
    20332031    static {
    20342032        Symbol.PRINT_ESCAPE.initializeSpecial(T);
    2035     }
    2036 
    2037 //     public static final Symbol Symbol.PRINT_GENSYM =
    2038 //         exportSpecial("*PRINT-GENSYM*", PACKAGE_CL, T);
    2039     static {
    20402033        Symbol.PRINT_GENSYM.initializeSpecial(T);
    20412034    }
     
    20592052        exportSpecial("*PRINT-PRETTY*", PACKAGE_CL, NIL);
    20602053
    2061     public static final Symbol _PRINT_RADIX_ =
    2062         exportSpecial("*PRINT-RADIX*", PACKAGE_CL, NIL);
    2063 
    2064     static {
     2054    static {
     2055        Symbol.PRINT_RADIX.initializeSpecial(NIL);
    20652056        Symbol.PRINT_READABLY.initializeSpecial(NIL);
    20662057    }
     
    20862077        exportSpecial("*RANDOM-STATE*", PACKAGE_CL, new RandomState());
    20872078
    2088     public static final Symbol STAR = exportSpecial("*", PACKAGE_CL, NIL);
    2089     public static final Symbol STAR_STAR =
    2090         exportSpecial("**", PACKAGE_CL, NIL);
    2091     public static final Symbol STAR_STAR_STAR =
    2092         exportSpecial("***", PACKAGE_CL, NIL);
    2093 
    2094     public static final Symbol MINUS = exportSpecial("-", PACKAGE_CL, NIL);
    2095 
    2096     public static final Symbol PLUS = exportSpecial("+", PACKAGE_CL, NIL);
    2097     public static final Symbol PLUS_PLUS =
    2098         exportSpecial("++", PACKAGE_CL, NIL);
    2099     public static final Symbol PLUS_PLUS_PLUS =
    2100         exportSpecial("+++", PACKAGE_CL, NIL);
    2101 
    2102     public static final Symbol SLASH = exportSpecial("/", PACKAGE_CL, NIL);
    2103     public static final Symbol SLASH_SLASH =
    2104         exportSpecial("//", PACKAGE_CL, NIL);
    2105     public static final Symbol SLASH_SLASH_SLASH =
    2106         exportSpecial("///", PACKAGE_CL, NIL);
    2107 
    2108     public static final Symbol PI =
    2109         exportConstant("PI", PACKAGE_CL, new DoubleFloat(Math.PI));
    2110 
    2111     public static final Symbol SHORT_FLOAT_EPSILON =
    2112         exportConstant("SHORT-FLOAT-EPSILON", PACKAGE_CL,
    2113                        new SingleFloat((float)5.960465E-8));
    2114 
    2115     public static final Symbol SINGLE_FLOAT_EPSILON =
    2116         exportConstant("SINGLE-FLOAT-EPSILON", PACKAGE_CL,
    2117                        new SingleFloat((float)5.960465E-8));
    2118 
    2119     public static final Symbol DOUBLE_FLOAT_EPSILON =
    2120         exportConstant("DOUBLE-FLOAT-EPSILON", PACKAGE_CL,
    2121                        new DoubleFloat((double)1.1102230246251568E-16));
    2122 
    2123     public static final Symbol LONG_FLOAT_EPSILON =
    2124         exportConstant("LONG-FLOAT-EPSILON", PACKAGE_CL,
    2125                        new DoubleFloat((double)1.1102230246251568E-16));
    2126 
    2127     public static final Symbol SHORT_FLOAT_NEGATIVE_EPSILON =
    2128         exportConstant("SHORT-FLOAT-NEGATIVE-EPSILON", PACKAGE_CL,
    2129                        new SingleFloat(2.9802326e-8f));
    2130 
    2131     public static final Symbol SINGLE_FLOAT_NEGATIVE_EPSILON =
    2132         exportConstant("SINGLE-FLOAT-NEGATIVE-EPSILON", PACKAGE_CL,
    2133                        new SingleFloat(2.9802326e-8f));
    2134 
    2135     public static final Symbol DOUBLE_FLOAT_NEGATIVE_EPSILON =
    2136         exportConstant("DOUBLE-FLOAT-NEGATIVE-EPSILON", PACKAGE_CL,
    2137                        new DoubleFloat((double)5.551115123125784E-17));
    2138 
    2139     public static final Symbol LONG_FLOAT_NEGATIVE_EPSILON =
    2140         exportConstant("LONG-FLOAT-NEGATIVE-EPSILON", PACKAGE_CL,
    2141                        new DoubleFloat((double)5.551115123125784E-17));
     2079    static {
     2080        Symbol.STAR.initializeSpecial(NIL);
     2081        Symbol.STAR_STAR.initializeSpecial(NIL);
     2082        Symbol.STAR_STAR_STAR.initializeSpecial(NIL);
     2083        Symbol.MINUS.initializeSpecial(NIL);
     2084        Symbol.PLUS.initializeSpecial(NIL);
     2085        Symbol.PLUS_PLUS.initializeSpecial(NIL);
     2086        Symbol.PLUS_PLUS_PLUS.initializeSpecial(NIL);
     2087        Symbol.SLASH.initializeSpecial(NIL);
     2088        Symbol.SLASH_SLASH.initializeSpecial(NIL);
     2089        Symbol.SLASH_SLASH_SLASH.initializeSpecial(NIL);
     2090    }
     2091
     2092//     public static final Symbol PI =
     2093//         exportConstant("PI", PACKAGE_CL, new DoubleFloat(Math.PI));
     2094    static {
     2095        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 {
     2102        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 {
     2109        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 {
     2116        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 {
     2123        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 {
     2130        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 {
     2137        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 {
     2144        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 {
     2151        Symbol.LONG_FLOAT_NEGATIVE_EPSILON.initializeConstant(new DoubleFloat((double)5.551115123125784E-17));
     2152    }
    21422153
    21432154    public static final Symbol MOST_POSITIVE_SHORT_FLOAT =
Note: See TracChangeset for help on using the changeset viewer.