pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:4005:    if(id!=-1)    {    Pike_compiler->init_node=mknode(F_COMMA_EXPR,    mkcastnode(void_type_string,    mkapplynode(mkidentifiernode(id),0)),    Pike_compiler->init_node);    }    }    }    +  if (finish == 1) { +  if (Pike_compiler->compiler_pass == 1) { +  /* Called from end_program(). */ +  if (Pike_compiler->init_node) { +  /* Make sure that the __INIT symbol exists, so that +  * we won't get a fatal when we add the actual code +  * further down when we have entered pass 2. +  */ +  define_function(s, function_type_string, ID_PROTECTED, +  IDENTIFIER_PIKE_FUNCTION, NULL, 0); +  } +  } +  Pike_compiler->compiler_pass = 2; +  } +     /*    * Define the __INIT function, but only if there was any code    * to initialize.    */       if(Pike_compiler->init_node)    {    Pike_compiler->compiler_frame->current_function_number = -2;    e=dooptcode(s,    mknode(F_COMMA_EXPR,
pike.git/src/program.c:4154:   #endif /* PIKE_USE_MACHINE_CODE */   #endif /* 0 */    return prog;   }      /*    * Finish this program, returning the newly built program    */   PMOD_EXPORT struct program *debug_end_program(void)   { -  Pike_compiler->compiler_pass = 2; +     return end_first_pass(1);   }         /*    * Allocate space needed for this program in the object structure.    * An offset to the data is returned.    */   PMOD_EXPORT size_t low_add_storage(size_t size, size_t alignment,    ptrdiff_t modulo_orig)