Branch: Tag:

2000-06-24

2000-06-24 00:48:31 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

changed some data structures in the compiler, this should allow for
some major code cleanups

Rev: src/builtin_functions.c:1.283
Rev: src/compilation.h:1.15
Rev: src/docode.c:1.74
Rev: src/encode.c:1.60
Rev: src/language.yacc:1.191
Rev: src/las.c:1.180
Rev: src/las.h:1.39
Rev: src/modules/Gmp/mpz_glue.c:1.78
Rev: src/modules/Parser/parser.c:1.7
Rev: src/object.c:1.127
Rev: src/object.h:1.48
Rev: src/pike_types.c:1.131
Rev: src/pike_types.h:1.39
Rev: src/program.c:1.243
Rev: src/program.h:1.92
Rev: src/threads.c:1.130

25:   #include "version.h"   #include "bignum.h"    - RCSID("$Id: encode.c,v 1.59 2000/06/10 11:52:43 mast Exp $"); + RCSID("$Id: encode.c,v 1.60 2000/06/24 00:48:13 hubbe Exp $");      /* #define ENCODE_DEBUG */   
854: Inside #if 0
  {   #if 0    fprintf(stderr, "Restoring type-stack: %p => %p\n", -  type_stackp, old_stackp); +  Pike_compiler->type_stackp, old_stackp);   #endif /* 0 */   #ifdef PIKE_DEBUG -  if (old_stackp > type_stackp) { +  if (old_stackp > Pike_compiler->type_stackp) {    fatal("type stack out of sync!\n");    }   #endif /* PIKE_DEBUG */ -  type_stackp = old_stackp; +  Pike_compiler->type_stackp = old_stackp;   }      static void restore_type_mark(unsigned char **old_type_mark_stackp)   {   #if 0    fprintf(stderr, "Restoring type-mark: %p => %p\n", -  pike_type_mark_stackp, old_type_mark_stackp); +  Pike_compiler->pike_type_mark_stackp, old_type_mark_stackp);   #endif /* 0 */   #ifdef PIKE_DEBUG -  if (old_type_mark_stackp > pike_type_mark_stackp) { +  if (old_type_mark_stackp > Pike_compiler->pike_type_mark_stackp) {    fatal("type mark_stack out of sync!\n");    }   #endif /* PIKE_DEBUG */ -  pike_type_mark_stackp = old_type_mark_stackp; +  Pike_compiler->pike_type_mark_stackp = old_type_mark_stackp;   }      static void low_decode_type(struct decode_data *data)
886:    ONERROR err1;    ONERROR err2;    -  SET_ONERROR(err1, restore_type_stack, type_stackp); -  SET_ONERROR(err2, restore_type_mark, pike_type_mark_stackp); +  SET_ONERROR(err1, restore_type_stack, Pike_compiler->type_stackp); +  SET_ONERROR(err2, restore_type_mark, Pike_compiler->pike_type_mark_stackp);      one_more_type:    tmp = GETC();
1475:       debug_malloc_touch(dat);    -  SET_ONERROR(err1, restore_type_stack, type_stackp); -  SET_ONERROR(err2, restore_type_mark, pike_type_mark_stackp); +  SET_ONERROR(err1, restore_type_stack, Pike_compiler->type_stackp); +  SET_ONERROR(err2, restore_type_mark, Pike_compiler->pike_type_mark_stackp);       for(d=0;d<p->num_identifiers;d++)    {
1509:    debug_malloc_touch(dat);       { -  struct program *new_program_save=new_program; -  new_program=p; +  struct program *new_program_save=Pike_compiler->new_program; +  Pike_compiler->new_program=p;    fsort((void *)p->identifier_index,    p->num_identifier_index,    sizeof(unsigned short),(fsortfun)program_function_index_compare); -  new_program=new_program_save; +  Pike_compiler->new_program=new_program_save;    }    p->flags &=~ PROGRAM_AVOID_CHECK;    p->flags |= PROGRAM_FINISHED;