pike.git / src / encode.c

version» Context lines:

pike.git/src/encode.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: encode.c,v 1.178 2004/05/11 14:13:02 grubba Exp $ + || $Id: encode.c,v 1.179 2004/05/11 14:16:07 grubba Exp $   */      #include "global.h"   #include "stralloc.h"   #include "pike_macros.h"   #include "object.h"   #include "constants.h"   #include "interpret.h"   #include "svalue.h"   #include "mapping.h"
pike.git/src/encode.c:25:   #include "fsort.h"   #include "threads.h"   #include "stuff.h"   #include "version.h"   #include "bignum.h"   #include "pikecode.h"   #include "pike_types.h"   #include "opcodes.h"   #include "peep.h"    - RCSID("$Id: encode.c,v 1.178 2004/05/11 14:13:02 grubba Exp $"); + RCSID("$Id: encode.c,v 1.179 2004/05/11 14:16:07 grubba Exp $");      /* #define ENCODE_DEBUG */      /* Use the old encoding method for programs. */   #define OLD_PIKE_ENCODE_PROGRAM      #ifdef ENCODE_DEBUG   /* Pass a nonzero integer as the third arg to encode_value,    * encode_value_canonic and decode_value to activate this debug. */   #define EDB(N,X) do { debug_malloc_touch(data); if (data->debug>=N) {X;} } while (0)
pike.git/src/encode.c:3810:       /* De-kludge to get end_first_pass() to free the program. */    Pike_compiler->num_parse_error--;       p->flags |= PROGRAM_PASS_1_DONE;       /* Fixate & optimize    *    * lfuns and identifier_index    */ +  ref_push_program (p);    if (!(p = end_first_pass(2))) {    decode_error(Pike_sp - 1, NULL, "Failed to decode program.\n");    }    pop_stack();    compilation_depth = orig_compilation_depth;    push_program(p);       /* Restore lex.pragmas. */    CALL_AND_UNSET_ONERROR(err2);       EDB(5, dump_program_tables(p, data->depth));   #ifdef PIKE_DEBUG    check_program (p);   #endif    -  +  if (bytecode_method == PIKE_BYTECODE_PORTABLE) { +  /* We've regenerated p->program, so these may be off. */ +  local_num_program = p->num_program; +  local_num_linenumbers = p->num_linenumbers; +  } +     /* Verify... */   #define FOO(NUMTYPE,TYPE,NAME) \    if (PIKE_CONCAT(local_num_, NAME) != p->PIKE_CONCAT(num_,NAME)) { \    ref_push_program (p); \    decode_error(Pike_sp - 1, NULL, \    "Value mismatch for num_" TOSTR(NAME) ": %d != %d\n", \    PIKE_CONCAT(local_num_, NAME), \    p->PIKE_CONCAT(num_, NAME)); \    }   #include "program_areas.h"