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

Diff of /gcl/o/bind.c

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

revision 1.14 by camm, Tue Jun 14 14:33:55 2005 UTC revision 1.15 by camm, Thu Oct 6 20:30:08 2005 UTC
# Line 99  lambda_bind(object *arg_top) Line 99  lambda_bind(object *arg_top)
99    
100          bds_check;          bds_check;
101          lambda = vs_head;          lambda = vs_head;
102          if (type_of(lambda) != t_cons)          if (!consp(lambda))
103                  FEerror("No lambda list.", 0);                  FEerror("No lambda list.", 0);
104          lambda_list = lambda->c.c_car;          lambda_list = lambda->c.c_car;
105          body = lambda->c.c_cdr;          body = lambda->c.c_cdr;
# Line 152  OPTIONAL: Line 152  OPTIONAL:
152                          goto SEARCH_DECLARE;                          goto SEARCH_DECLARE;
153                  x = lambda_list->c.c_car;                  x = lambda_list->c.c_car;
154                  lambda_list = lambda_list->c.c_cdr;                  lambda_list = lambda_list->c.c_cdr;
155                  if (type_of(x) == t_cons) {                  if (consp(x)) {
156                          check_symbol(x->c.c_car);                          check_symbol(x->c.c_car);
157                          check_var(x->c.c_car);                          check_var(x->c.c_car);
158                          vs_push(x->c.c_car);                          vs_push(x->c.c_car);
# Line 226  KEYWORD: Line 226  KEYWORD:
226                          goto SEARCH_DECLARE;                          goto SEARCH_DECLARE;
227                  x = lambda_list->c.c_car;                  x = lambda_list->c.c_car;
228                  lambda_list = lambda_list->c.c_cdr;                  lambda_list = lambda_list->c.c_cdr;
229                  if (type_of(x) == t_cons) {                  if (consp(x)) {
230                          if (type_of(x->c.c_car) == t_cons) {                          if (consp(x->c.c_car)) {
231                                  if (type_of(x->c.c_car->c.c_car)!=t_symbol)                                  if (type_of(x->c.c_car->c.c_car)!=t_symbol)
232                                    /* FIXME better message */                                    /* FIXME better message */
233                                          FEunexpected_keyword(x->c.c_car->c.c_car);                                          FEunexpected_keyword(x->c.c_car->c.c_car);
# Line 296  AUX_L: Line 296  AUX_L:
296                          goto SEARCH_DECLARE;                          goto SEARCH_DECLARE;
297                  x = lambda_list->c.c_car;                  x = lambda_list->c.c_car;
298                  lambda_list = lambda_list->c.c_cdr;                  lambda_list = lambda_list->c.c_cdr;
299                  if (type_of(x) == t_cons) {                  if (consp(x)) {
300                          check_symbol(x->c.c_car);                          check_symbol(x->c.c_car);
301                          check_var(x->c.c_car);                          check_var(x->c.c_car);
302                          vs_push(x->c.c_car);                          vs_push(x->c.c_car);
# Line 336  SEARCH_DECLARE: Line 336  SEARCH_DECLARE:
336                                  break;                                  break;
337                          continue;                          continue;
338                  }                  }
339                  if (type_of(form)!=t_cons || !isdeclare(form->c.c_car))                  if (!consp(form) || !isdeclare(form->c.c_car))
340                          break;                          break;
341                  for (ds = form->c.c_cdr; !endp(ds); ds = ds->c.c_cdr) {                  for (ds = form->c.c_cdr; !endp(ds); ds = ds->c.c_cdr) {
342                          if (type_of(ds->c.c_car) != t_cons)                          if (!consp(ds->c.c_car))
343                                  illegal_declare(form);                                  illegal_declare(form);
344                          if (ds->c.c_car->c.c_car == sLspecial) {                          if (ds->c.c_car->c.c_car == sLspecial) {
345                                  vs = ds->c.c_car->c.c_cdr;                                  vs = ds->c.c_car->c.c_cdr;
# Line 496  SEARCH_DECLARE: Line 496  SEARCH_DECLARE:
496                  eval_assign(temporary, aux[i].aux_init);                  eval_assign(temporary, aux[i].aux_init);
497                  bind_var(aux[i].aux_var, temporary, aux[i].aux_spp);                  bind_var(aux[i].aux_var, temporary, aux[i].aux_spp);
498          }          }
499          if (type_of(body) != t_cons || body->c.c_car == form) {          if (!consp(body) || body->c.c_car == form) {
500                  vs_reset;                  vs_reset;
501                  vs_head = body;                  vs_head = body;
502          } else {          } else {
# Line 519  REQUIRED_ONLY: Line 519  REQUIRED_ONLY:
519                                  break;                                  break;
520                          continue;                          continue;
521                  }                  }
522                  if (type_of(form)!=t_cons || !isdeclare(form->c.c_car))                  if (!consp(form) || !isdeclare(form->c.c_car))
523                          break;                          break;
524                  for (ds = form->c.c_cdr; !endp(ds); ds = ds->c.c_cdr) {                  for (ds = form->c.c_cdr; !endp(ds); ds = ds->c.c_cdr) {
525                          if (type_of(ds->c.c_car) != t_cons)                          if (!consp(ds->c.c_car))
526                                  illegal_declare(form);                                  illegal_declare(form);
527                          if (ds->c.c_car->c.c_car == sLspecial) {                          if (ds->c.c_car->c.c_car == sLspecial) {
528                                  vs = ds->c.c_car->c.c_cdr;                                  vs = ds->c.c_car->c.c_cdr;
# Line 559  REQUIRED_ONLY: Line 559  REQUIRED_ONLY:
559                  bind_var(required[i].req_var,                  bind_var(required[i].req_var,
560                           base[i],                           base[i],
561                           required[i].req_spp);                           required[i].req_spp);
562          if (type_of(body) != t_cons || body->c.c_car == form) {          if (!consp(body) || body->c.c_car == form) {
563                  vs_reset;                  vs_reset;
564                  vs_head = body;                  vs_head = body;
565          } else {          } else {
# Line 638  find_special(object body, struct bind_te Line 638  find_special(object body, struct bind_te
638                                  break;                                  break;
639                          continue;                          continue;
640                  }                  }
641                  if (type_of(form)!=t_cons || !isdeclare(form->c.c_car))                  if (!consp(form) || !isdeclare(form->c.c_car))
642                          break;                          break;
643                  for (ds = form->c.c_cdr; !endp(ds); ds = ds->c.c_cdr) {                  for (ds = form->c.c_cdr; !endp(ds); ds = ds->c.c_cdr) {
644                          if (type_of(ds->c.c_car) != t_cons)                          if (!consp(ds->c.c_car))
645                                  illegal_declare(form);                                  illegal_declare(form);
646                          if (ds->c.c_car->c.c_car == sLspecial) {                          if (ds->c.c_car->c.c_car == sLspecial) {
647                                  vs = ds->c.c_car->c.c_cdr;                                  vs = ds->c.c_car->c.c_cdr;

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

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