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.675 2008/04/25 11:26:30 grubba Exp $ + || $Id: program.c,v 1.676 2008/04/26 11:17:38 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:7422:       c->lex.pos=c->prog->str;   }      static void run_init2(struct compilation *c)   {    debug_malloc_touch(c);    Pike_compiler->compiler = c;       initialize_buf(&used_modules); +  +  /* Get the proper default module. */ +  safe_apply_current2(PC_GET_DEFAULT_MODULE_FUN_NUM, 0, NULL); +  if(Pike_sp[-1].type == T_INT) +  { +  pop_stack(); +  ref_push_mapping(get_builtin_constants()); +  } +  assign_svalue(&c->default_module, Pike_sp-1); +  pop_stack(); +     use_module(& c->default_module);       Pike_compiler->compat_major=PIKE_MAJOR_VERSION;    Pike_compiler->compat_minor=PIKE_MINOR_VERSION;       if(c->major>=0)    change_compiler_compatibility(c->major, c->minor);   }      static void run_exit(struct compilation *c)
pike.git/src/program.c:7941:       if (c->target) free_program(c->target);    if ((c->target=atarget)) add_ref(atarget);       if (c->placeholder) free_object(c->placeholder);    if ((c->placeholder=aplaceholder)) add_ref(aplaceholder);       c->major = amajor?amajor:-1;    c->minor = aminor?aminor:-1;    -  /* NOTE: Can't use change_compiler_compatibility() here, -  * since we don't have a PikeCompiler yet! -  */ +  STACK_LEVEL_DONE(args); +  pop_n_elems(args);    -  apply_current(PC_GET_DEFAULT_MODULE_FUN_NUM, 0); -  -  if(Pike_sp[-1].type == T_INT) -  { -  pop_stack(); -  ref_push_mapping(get_builtin_constants()); -  } -  -  assign_svalue(&c->default_module, Pike_sp-1); -  -  STACK_LEVEL_DONE(args+1); -  pop_n_elems(args+1); -  +     push_int(0);   }      /*! @decl program compile()    *!    *! Compile the current source into a program.    *!    *! This function compiles the current Pike source code    *! into a clonable program.    *!