Ignore:
Timestamp:
Apr 17, 2011, 11:56:55 PM (10 years ago)
Author:
Sam Hocevar
Message:

lisp: implement LObject::Eval.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/chars.cpp

    r494 r496  
    340340    PtrRef r5(ab);
    341341    if (!NILP(ab))
    342       abil[i]=lnumber_value(eval(lcar(lcdr(ab))));
     342      abil[i]=lnumber_value(lcar(lcdr(ab))->Eval());
    343343      }
    344344    } else if (f==l_funs)
     
    361361    Cell *ab=assoc(LSymbol::FindOrCreate(cflag_names[i]),l);
    362362    PtrRef r5(ab);
    363     if (!NILP(ab) && eval(lcar(lcdr(ab))))
     363    if (!NILP(ab) && lcar(lcdr(ab))->Eval())
    364364    cflags|=(1<<i);
    365365      }
     
    373373    } else if (f==l_range)
    374374    {
    375       rangex=lnumber_value(eval(lcar(lcdr(lcar(field)))));
    376       rangey=lnumber_value(eval(lcar(lcdr(lcdr(lcar(field))))));
     375      rangex=lnumber_value(lcar(lcdr(lcar(field)))->Eval());
     376      rangey=lnumber_value(lcar(lcdr(lcdr(lcar(field))))->Eval());
    377377    } else if (f==l_draw_range)
    378378    {
    379       draw_rangex=lnumber_value(eval(lcar(lcdr(lcar(field)))));
    380       draw_rangey=lnumber_value(eval(lcar(lcdr(lcdr(lcar(field))))));
     379      draw_rangex=lnumber_value(lcar(lcdr(lcar(field)))->Eval());
     380      draw_rangey=lnumber_value(lcar(lcdr(lcdr(lcar(field))))->Eval());
    381381    } else if (f==l_states)
    382382    {
     
    384384      PtrRef r4(l);
    385385      char fn[100];
    386       strcpy(fn,lstring_value(eval(CAR(l)))); l=CDR(l);
     386      strcpy(fn,lstring_value(CAR(l)->Eval())); l=CDR(l);
    387387      while (l)
    388388      {
     
    391391      sequence *mem;
    392392      index = add_state(CAR((CAR(l))));
    393       e = eval(CAR(CDR(CAR(l))));
     393      e = CAR(CDR(CAR(l)))->Eval();
    394394      mem = new sequence(fn,e,NULL);
    395395    seq[index]=mem;
     
    402402      while (!NILP(mf))
    403403      {
    404     char *real=lstring_value(eval(lcar(lcar(mf))));
    405     char *fake=lstring_value(eval(lcar(lcdr(lcar(mf)))));
     404    char *real=lstring_value(lcar(lcar(mf))->Eval());
     405    char *fake=lstring_value(lcar(lcdr(lcar(mf)))->Eval());
    406406    if (!isa_var_name(real))
    407407    {
     
    418418    } else if (f==l_logo)
    419419    {
    420       char *fn=lstring_value(eval(CAR(CDR(CAR(field)))));
    421       char *o=lstring_value(eval(CAR(CDR(CDR(CAR(field))))));
     420      char *fn=lstring_value(CAR(CDR(CAR(field)))->Eval());
     421      char *o=lstring_value(CAR(CDR(CDR(CAR(field))))->Eval());
    422422      logo=cache.reg(fn,o,SPEC_IMAGE,1);
    423423    } else if (f==l_vars)
Note: See TracChangeset for help on using the changeset viewer.