/[gcl]/gcl/o/eval.c
ViewVC logotype

Diff of /gcl/o/eval.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.24 by camm, Sun Sep 18 02:48:58 2005 UTC revision 1.25 by camm, Thu Oct 6 20:30:08 2005 UTC
# Line 814  EVAL: Line 814  EVAL:
814          } else          } else
815                  eval1 = 0;                  eval1 = 0;
816    
817          if (type_of(form) == t_cons)          if (consp(form))
818                  goto APPLICATION;                  goto APPLICATION;
819    
820          if (type_of(form) != t_symbol)  RETURN1(form);          if (type_of(form) != t_symbol)  RETURN1(form);
# Line 830  EVAL: Line 830  EVAL:
830    
831          default:          default:
832                  /*  x = lex_var_sch(form);  */                  /*  x = lex_var_sch(form);  */
833                  for (x = lex_env[0];  type_of(x) == t_cons;  x = x->c.c_cdr)                  for (x = lex_env[0];  consp(x);  x = x->c.c_cdr)
834                          if (x->c.c_car->c.c_car == form) {                          if (x->c.c_car->c.c_car == form) {
835                                  x = x->c.c_car->c.c_cdr;                                  x = x->c.c_car->c.c_cdr;
836                                  if (endp(x))                                  if (endp(x))
# Line 875  APPLICATION: Line 875  APPLICATION:
875                  return Ivs_values();                  return Ivs_values();
876          }          }
877          /*  x = lex_fd_sch(fun);  */          /*  x = lex_fd_sch(fun);  */
878          for (x = lex_env[1];  type_of(x) == t_cons;  x = x->c.c_cdr)          for (x = lex_env[1];  consp(x);  x = x->c.c_cdr)
879                  if (x->c.c_car->c.c_car == fun) {                  if (x->c.c_car->c.c_car == fun) {
880                          x = x->c.c_car;                          x = x->c.c_car;
881                          if (MMcadr(x) == sLmacro) {                          if (MMcadr(x) == sLmacro) {
# Line 931  EVAL_ARGS: Line 931  EVAL_ARGS:
931                   }                   }
932    
933  LAMBDA:  LAMBDA:
934          if (type_of(fun) == t_cons && MMcar(fun) == sLlambda) {          if (consp(fun) && MMcar(fun) == sLlambda) {
935            x = listA(4,sLlambda_closure,lex_env[0],lex_env[1],lex_env[2],Mcdr(fun));            x = listA(4,sLlambda_closure,lex_env[0],lex_env[1],lex_env[2],Mcdr(fun));
936            goto EVAL_ARGS;            goto EVAL_ARGS;
937          }          }
# Line 984  EVAL: Line 984  EVAL:
984          } else          } else
985                  eval1 = 0;                  eval1 = 0;
986    
987          if (type_of(form) == t_cons)          if (consp(form))
988                  goto APPLICATION;                  goto APPLICATION;
989    
990          if (type_of(form) != t_symbol) {          if (type_of(form) != t_symbol) {
# Line 1008  EVAL: Line 1008  EVAL:
1008    
1009          default:          default:
1010                  /*  x = lex_var_sch(form);  */                  /*  x = lex_var_sch(form);  */
1011                  for (x = lex_env[0];  type_of(x) == t_cons;  x = x->c.c_cdr)                  for (x = lex_env[0];  consp(x);  x = x->c.c_cdr)
1012                          if (x->c.c_car->c.c_car == form) {                          if (x->c.c_car->c.c_car == form) {
1013                                  x = x->c.c_car->c.c_cdr;                                  x = x->c.c_car->c.c_cdr;
1014                                  if (endp(x))                                  if (endp(x))
# Line 1057  APPLICATION: Line 1057  APPLICATION:
1057                  return;                  return;
1058          }          }
1059          /*  x = lex_fd_sch(fun);  */          /*  x = lex_fd_sch(fun);  */
1060          for (x = lex_env[1];  type_of(x) == t_cons;  x = x->c.c_cdr)          for (x = lex_env[1];  consp(x);  x = x->c.c_cdr)
1061                  if (x->c.c_car->c.c_car == fun) {                  if (x->c.c_car->c.c_car == fun) {
1062                          x = x->c.c_car;                          x = x->c.c_car;
1063                          if (MMcadr(x) == sLmacro) {                          if (MMcadr(x) == sLmacro) {
# Line 1090  EVAL_ARGS: Line 1090  EVAL_ARGS:
1090          form = form->c.c_cdr;          form = form->c.c_cdr;
1091          base = vs_top;          base = vs_top;
1092          top = vs_top;          top = vs_top;
1093          while(!endp_prop(form)) {          while(!endp(form)) {
1094                  eval(MMcar(form));                  eval(MMcar(form));
1095                  top[0] = vs_base[0];                  top[0] = vs_base[0];
1096                  vs_top = ++top;                  vs_top = ++top;
# Line 1112  EVAL_ARGS: Line 1112  EVAL_ARGS:
1112          return;          return;
1113    
1114  LAMBDA:  LAMBDA:
1115          if (type_of(fun) == t_cons && MMcar(fun) == sLlambda) {          if (consp(fun) && MMcar(fun) == sLlambda) {
1116                  temporary = make_cons(lex_env[2], fun->c.c_cdr);                  temporary = make_cons(lex_env[2], fun->c.c_cdr);
1117                  temporary = make_cons(lex_env[1], temporary);                  temporary = make_cons(lex_env[1], temporary);
1118                  temporary = make_cons(lex_env[0], temporary);                  temporary = make_cons(lex_env[0], temporary);

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.25

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26