pike.git / src / program.c

version» Context lines:

pike.git/src/program.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: program.c,v 1.651 2008/02/14 18:23:11 grubba Exp $ + || $Id: program.c,v 1.652 2008/02/19 15:35:25 grubba Exp $   */      #include "global.h"   #include "program.h"   #include "object.h"   #include "dynamic_buffer.h"   #include "pike_types.h"   #include "stralloc.h"   #include "las.h"   #include "lex.h"
pike.git/src/program.c:2901:   }      int sizeof_variable(int run_time_type)   {    switch(run_time_type)    {    case T_FUNCTION:    case T_MIXED: return sizeof(struct svalue);    case T_FLOAT: return sizeof(FLOAT_TYPE);    case T_INT: return sizeof(INT_TYPE); +  case PIKE_T_GET_SET: return 0;    default: return sizeof(void *);    }   }      static ptrdiff_t alignof_variable(int run_time_type)   {    switch(run_time_type)    {    case T_FUNCTION:    case T_MIXED: return ALIGNOF(struct svalue);    case T_FLOAT: return ALIGNOF(FLOAT_TYPE);    case T_INT: return ALIGNOF(INT_TYPE); -  +  case PIKE_T_GET_SET: return 1;    default: return ALIGNOF(void *);    }   }      #ifdef PIKE_DEBUG      void dump_program_tables (struct program *p, int indent)   {    int d;   
pike.git/src/program.c:3194:    if(p->identifiers[e].identifier_flags & ~IDENTIFIER_MASK)    Pike_fatal("Unknown flags in identifier flag field.\n");       if((p->identifiers[e].run_time_type!=T_MIXED) &&    (p->identifiers[e].run_time_type!=PIKE_T_GET_SET))    check_type(p->identifiers[e].run_time_type);       if (!IDENTIFIER_IS_ALIAS(p->identifiers[e].identifier_flags)) {    if(IDENTIFIER_IS_VARIABLE(p->identifiers[e].identifier_flags))    { -  if( (p->identifiers[e].func.offset /* + OFFSETOF(object,storage)*/ ) & +  if((p->identifiers[e].func.offset /* + OFFSETOF(object,storage)*/ ) &    (alignof_variable(p->identifiers[e].run_time_type)-1))    {    dump_program_tables(p, 0);    Pike_fatal("Variable %s offset is not properly aligned (%ld).\n",    p->identifiers[e].name->str,    PTRDIFF_T_TO_LONG(p->identifiers[e].func.offset));    }    }    } else {    /* FIXME: Check that ext_ref.depth and ext_ref.id are valid and