Branch: Tag:

1998-01-29

1998-01-29 00:30:37 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

identifiers in parents should now work better

Rev: lib/modules/Stdio.pmod:1.13
Rev: src/compilation.h:1.6
Rev: src/docode.c:1.26
Rev: src/fsort.c:1.4
Rev: src/global.h:1.14
Rev: src/las.c:1.47
Rev: src/object.c:1.35
Rev: src/object.h:1.15
Rev: src/pike_memory.c:1.7
Rev: src/program.c:1.59
Rev: src/program.h:1.29

4:   ||| See the files COPYING and DISCLAIMER for more information.   \*/   #include "global.h" - RCSID("$Id: docode.c,v 1.25 1998/01/25 08:25:05 hubbe Exp $"); + RCSID("$Id: docode.c,v 1.26 1998/01/29 00:30:33 hubbe Exp $");   #include "las.h"   #include "program.h"   #include "language.h"
23:   #include "peep.h"   #include "docode.h"   #include "operators.h" + #include "object.h"      INT32 current_break=-1;   INT32 current_continue=-1;
668:    if(n->type == void_type_string) return 0;    return 1;    }else{ -  if(CAR(n)->u.sval.u.object == &fake_object) +  if(CAR(n)->u.sval.u.object->next == fake_object)    {    emit2(F_MARK);    do_docode(CDR(n),0);
1024:    case T_FUNCTION:    if(n->u.sval.subtype!=FUNCTION_BUILTIN)    { -  if(n->u.sval.u.object == &fake_object) +  if(n->u.sval.u.object == fake_object)    {    emit(F_LFUN,n->u.sval.subtype);    return 1;    } -  +  +  if(n->u.sval.u.object->next == n->u.sval.u.object) +  { +  int x=0; +  struct object *o; +  +  for(o=fake_object->parent;o!=n->u.sval.u.object;o=o->parent) +  x++; +  emit(F_LDA, x); +  emit(F_EXTERNAL, n->u.sval.subtype); +  return 1;    } -  +  }    -  + #ifdef DEBUG +  case T_OBJECT: +  if(n->u.sval.u.object->next == n->u.sval.u.object) +  fatal("Internal error: Pointer to parent cannot be a compile time constant!\n"); + #endif +     default:    tmp1=store_constant(&(n->u.sval),!(n->tree_info & OPT_EXTERNAL_DEPEND));    emit(F_CONSTANT,tmp1);