Ignore:
Timestamp:
Apr 17, 2011, 10:28:20 AM (10 years ago)
Author:
Sam Hocevar
Message:

lisp: populate LispSymbol? with symbol-related methods.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/lisp/lisp_opt.cpp

    r482 r484  
    9191}
    9292
    93 
    9493void l_comp_init()
    9594{
    96   l_undefined=make_find_symbol(":UNDEFINED");  // this needs to be defined first
    97   ((LispSymbol *)l_undefined)->function=NULL;  // collection problems result if we don't do this
    98   ((LispSymbol *)l_undefined)->value=NULL;
     95    // This needs to be defined first
     96    l_undefined = LispSymbol::FindOrCreate(":UNDEFINED");
    9997
     98    // Collection problems result if we don't do this
     99    ((LispSymbol *)l_undefined)->function = NULL;
     100    ((LispSymbol *)l_undefined)->value = NULL;
    100101
    101   true_symbol=make_find_symbol("T");
     102    true_symbol = LispSymbol::FindOrCreate("T");
    102103
     104    list_symbol = LispSymbol::FindOrCreate("list");
     105    string_symbol = LispSymbol::FindOrCreate("string");
     106    quote_symbol = LispSymbol::FindOrCreate("quote");
     107    backquote_symbol = LispSymbol::FindOrCreate("backquote");
     108    comma_symbol = LispSymbol::FindOrCreate("comma");
     109    in_symbol = LispSymbol::FindOrCreate("in");
     110    do_symbol = LispSymbol::FindOrCreate("do");
     111    aref_symbol = LispSymbol::FindOrCreate("aref");
     112    colon_initial_contents = LispSymbol::FindOrCreate(":initial-contents");
     113    colon_initial_element = LispSymbol::FindOrCreate(":initial-element");
    103114
    104   list_symbol=make_find_symbol("list");
    105   string_symbol=make_find_symbol("string");
    106   quote_symbol=make_find_symbol("quote");
    107   backquote_symbol=make_find_symbol("backquote");
    108   comma_symbol=make_find_symbol("comma");
    109   in_symbol=make_find_symbol("in");
    110   do_symbol=make_find_symbol("do");
    111   aref_symbol=make_find_symbol("aref");
    112   colon_initial_contents=make_find_symbol(":initial-contents");
    113   colon_initial_element=make_find_symbol(":initial-element");
     115    if_1progn = LispSymbol::FindOrCreate("if-1progn");
     116    if_2progn = LispSymbol::FindOrCreate("if-2progn");
     117    if_12progn = LispSymbol::FindOrCreate("if-12progn");
     118    if_symbol = LispSymbol::FindOrCreate("if");
     119    progn_symbol = LispSymbol::FindOrCreate("progn");
     120    not_symbol = LispSymbol::FindOrCreate("not");
     121    eq_symbol = LispSymbol::FindOrCreate("eq");
     122    zero_symbol = LispSymbol::FindOrCreate("0");
     123    eq0_symbol = LispSymbol::FindOrCreate("eq0");
     124    car_symbol = LispSymbol::FindOrCreate("car");
     125    cdr_symbol = LispSymbol::FindOrCreate("cdr");
     126    load_warning = LispSymbol::FindOrCreate("load_warning");
     127}
    114128
    115   if_1progn=make_find_symbol("if-1progn");
    116   if_2progn=make_find_symbol("if-2progn");
    117   if_12progn=make_find_symbol("if-12progn");
    118   if_symbol=make_find_symbol("if");
    119   progn_symbol=make_find_symbol("progn");
    120   not_symbol=make_find_symbol("not");
    121   eq_symbol=make_find_symbol("eq");
    122   zero_symbol=make_find_symbol("0");
    123   eq0_symbol=make_find_symbol("eq0");
    124   car_symbol=make_find_symbol("car");
    125   cdr_symbol=make_find_symbol("cdr");
    126   load_warning=make_find_symbol("load_warning");
    127 }
Note: See TracChangeset for help on using the changeset viewer.