Patch title: Release 87 bulk changes
Abstract:
File: /pliant/language/startup/startup.c
Key:
    Removed line
    Added line
// Copyright  Hubert Tonneau  hubert.tonneau@pliant.cx
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License version 2
// as published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// version 2 along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

/*
abstract
  text "This long code contains mainly three things:"
  list
    item
      text "the " ; link "command line parsing function" "startup.c" section "parse"
    item
      text "the function that will " ; link "attempt to free all objects" "startup.c" section "free" ; text " just before exiting in order to discovered locked ones (when debugging level is 2 or more)"
    item
      text "the big function that will " ; link "initialize everything" "startup.c" section "init" ; text ": mainly setup a few variables, then records all Pliant objects (functions, types, variables, constants) in the general dictionary."
*/


FUNCTION Void initialize(Int debugging_level,Int verbose_level,Address base_address,Int decommit_threshold,Char *pliant_path,Int nb_methods_indices,Bool restore);
_check_( PROTOTYPE Void terminate(); )
PROTOTYPE Void bulk_free();

static int equal2(char *s1,char *s2,int maxi) {
  while(maxi--) {
    if(*s1=='\0' && *s2=='\0')
      return 1;
    if(*s1++!=*s2++)
      return 0; }
  return 1; }

static int equal(char *s1,char *s2) {
  return equal2(s1,s2,1000000000); }

static char *is_parameter(char *s1,char *s2) {
  for(;;) {
    if(*s1==' ' && *s2=='\0')
      return s1+1;
    if(*s1++!=*s2++)
      return null; } }

#ifndef _DLL_
  #if defined(_LINUX_API_) || defined(_POSIX_API_)
    #define _FIND_ROOT_PATH_

    static char *add(char *src,char *dest) {
      for(;;src++,dest++) {
        *dest=*src;
        if(*src=='\0') return dest; } }

    static Char *find_root_path(char *buffer) {
      Int lap,i; char *path,*cursor; char stat_buffer[1024];
      for(lap=0; lap<4; lap++) {
        if (lap==0) {
          for(i=0; process_env[i]!=0; i++)
            if(equal2(process_env[i],"HOME=",5)) {
              cursor=add(process_env[i]+5,buffer);
              cursor=add("/pliant/",cursor);
              path=buffer; } }
        else if(lap==1)
          path="/pliant/";
        else if(lap==2)
          path="/usr/share/pliant/";
        else
          path="/usr/local/pliant/";
        if(stat(path,&stat_buffer)==0)
          return path; }
      return "/pliant/"; }

    #define _SWITCH_EXECUTABLE_

    static char *build_executable_name(char *pliant_path,int debugging_level,char *buffer) {
      char *cursor=buffer;
      cursor=add(pliant_path,cursor);
      cursor=add("binary/pliant-debug",cursor);
      *cursor++='0'+(debugging_level<=2 ? debugging_level : 2);
      cursor=add(".exe",cursor);
      return buffer; }

    static run_the_right_executable(char *pliant_path,int debugging_level,char **args,char **env) {
      char buffer[256];
      execve(build_executable_name(pliant_path,debugging_level,buffer),args,env);
      error_notify_fatalz(error_id_missing,"Cannot start the right Pliant executable."); }

    #define run_the_right_executable(p,d) run_the_right_executable(p,d,process_args,process_env) 

  #endif
#endif

#if defined(_WIN32_API_) || defined(_OS2_API_)
  void update_root_path(char *p) {
    for(; *p!='\0'; p++) if(*p=='\\') *p='/'; }
#endif


#ifdef _DLL_
  #ifdef _GCC_
    // ... is required in order to get around GCC bug
    // it should have rather been void _EXTERNAL_ pliant(int argc,char **args,char **env,int debugging_level,char *pliant_path)
    void pliant(int argc,char **args,char **env,int debugging_level,char *pliant_path, ...)
  #else
    void _EXTERNAL_ pliant(int argc,char **args,char **env,int debugging_level,char *pliant_path)
  #endif
#else
  #ifdef _EXE_
    int _EXTERNAL_ main(int argc,char **args,char **env)
  #else
    void _EXTERNAL_ startup()
  #endif
#endif
{
  Int verbose_level,nb_methods_indices; Bool initialized;
  #if defined(_WIN32_API_) && !defined(_DLL_) && !defined(_EXE_)
    char *args[16]; int argc;
    char *cmdline,*src,*dest;
  #endif
  #if defined(_OS2_API_) && !defined(_DLL_) && !defined(_EXE_)
    char *args[16]; int argc;
    TIB *tib; PIB *pib; char *src,*dest;
  #endif
  #if defined(_LINUX_API_) || defined(_POSIX_API_)
    #if !defined(_DLL_) && !defined(_EXE_)
      #define args process_args
      #define argc process_argc
    #endif
  #endif
  Address base_address;
  Int decommit_threshold;
  #ifndef _DLL_
    int debugging_level;
    char *pliant_path;
    #ifdef _FIND_ROOT_PATH_
      char pliant_path_buffer[256];
    #endif
  #endif
  Int a,i; uInt u; char *ch,*stop; struct Str temp,temp2; Char buffer[16];
  struct Str *line; struct List *text; struct Module *module,*last_module;
  struct Str precompile;
  Arrow *c; struct DelayedAction *ea;
  #ifdef _TIMER_
    Int old;
  #endif
  #if defined(_LINUX_API_) || defined(_POSIX_API_)
    #if defined(_DLL_) || defined(_EXE_)
      process_env=env;
      process_args=args;
    #endif
  #endif
  base_address=null;
  decommit_threshold=64*1024;
  verbose_level=1;
  nb_methods_indices=32;
  initialized=false;
  last_module=null;
  Str_map_string(&precompile,"");
  #if defined(_LINUX_API_) && !defined(_DLL_)
    for(argc=0; args[argc]!=null; argc++);
  #endif
  #if defined(_WIN32_API_) && !defined(_DLL_) && !defined(_EXE_)
    cmdline=GetCommandLine();
    argc=0;
    for(src=cmdline,dest=src; *src!='\0'; )
      if(*src=='\'') {
        if(dest==cmdline || dest[-1]=='\0') args[argc++]=dest;
        src++; while(*src!='\'' && *src!='\0') *dest++=*src++;
        if(*src!='\0') src++;
      orif(*src==' ')
        *dest++='\0'; src++;
      other
        if(dest==cmdline || dest[-1]=='\0') args[argc++]=dest;
        *dest++=*src++; }
    *dest='\0'; args[argc]=0;
  #endif
  #if defined(_OS2_API_) && !defined(_DLL_) && !defined(_EXE_)
    DosGetInfoBlocks(&tib,&pib);
    args[0]=pib->pib_pchcmd; argc=1;
    for(src=pib->pib_pchcmd+string_len(pib->pib_pchcmd)+1,dest=src; *src!='\0'; )
      if(*src=='\'') {
        if(dest[-1]=='\0') args[argc++]=dest;
        src++; while(*src!='\'' && *src!='\0') *dest++=*src++;
        if(*src!='\0') src++;
      orif(*src==' ')
        *dest++='\0'; src++;
      other
        if(dest[-1]=='\0') args[argc++]=dest;
        *dest++=*src++; }
    *dest='\0'; args[argc]=0;
  #endif
  #ifndef _DLL_
    #ifdef _FIND_ROOT_PATH_
      pliant_path=find_root_path(pliant_path_buffer);
    #else
      pliant_path="/pliant/";
    #endif
    debugging_level=c_debugging_level;
  #endif

  #if defined(_WIN32_API_) || defined(_OS2_API_)
    for(ch=args[0]; *ch!='\0'; ch++) {
      if(*ch=='\\') *ch='/';
      if(*ch=='.') *ch='\0';
      if(*ch>='A' && *ch<='Z') *ch+='a'-'A'; }
  #else
    for(ch=args[0]; *ch!='\0'; ch++);
  #endif
  while(ch!=args[0] && ch[-1]!='/') ch--;
  if(equal(ch,"fullpliant")) {
    if(!process_restore(debugging_level,pliant_path,Str_map_string(&precompile,"/binary/default.dump"))) {
      initialize(debugging_level,verbose_level,base_address,decommit_threshold,pliant_path,nb_methods_indices,false);
      load_module(Str_map_string(&temp,"/pliant/install/precompile.pli"),G.safe_module,0,null);
      error_report();
      process_backup(&precompile);
      Str_map_string(&precompile,""); }
    initialized=true;
    load_module(Str_map_string(&temp,"/pliant/fullpliant/run.pli"),G.safe_module,0,null);
    error_report();
  orif(equal(ch,"recover"))
    initialize(debugging_level,verbose_level,base_address,decommit_threshold,pliant_path,nb_methods_indices,false);
    initialized=true;
    load_module(Str_map_string(&temp,"/pliant/install/recover.pli"),G.safe_module,0,null);
    error_report(); }

  for(a=1; a<argc; a++) { /// section "parse"
    ch=args[a];

    again:
    if(*ch==' ') {
      ch++; goto again;
    orif(*ch=='\0')
    orif(is_parameter(ch,"memory_base_address")!=null)
      if(initialized)
        error_notify_fatalz(error_id_unexpected,"memory_start_address must be one of the first parameters.");
      u=0;
      for(ch=is_parameter(ch,"memory_base_address"); *ch!='\0' && *ch!=' '; ch++)
        u=u*10+(*ch-'0');
      base_address=(Address)(u*1024U*1024U);
      goto again;
    orif(is_parameter(ch,"memory_decommit_threshold")!=null)
      if(initialized)
        error_notify_fatalz(error_id_unexpected,"memory_decommit_threshold must be one of the first parameters.");
      decommit_threshold=0;
      for(ch=is_parameter(ch,"memory_decommit_threshold"); *ch!='\0' && *ch!=' '; ch++)
        decommit_threshold=decommit_threshold*10+(*ch-'0');
      goto again;
    orif(is_parameter(ch,"debug")!=null)
      if(initialized)
        error_notify_fatalz(error_id_unexpected,"debug must be one of the first parameters.");
      debugging_level=0;
      for(ch=is_parameter(ch,"debug"); *ch!='\0' && *ch!=' '; ch++)
        debugging_level=debugging_level*10+(*ch-'0');
      #ifdef _SWITCH_EXECUTABLE_
        if((debugging_level<=2 ? debugging_level : 2)!=c_debugging_level)
          run_the_right_executable(pliant_path,debugging_level);
      #endif
      goto again;
    orif(is_parameter(ch,"verbose")!=null)
      if(initialized)
        error_notify_fatalz(error_id_unexpected,"verbose must be one of the first parameters.");
      verbose_level=0;
      for(ch=is_parameter(ch,"verbose"); *ch!='\0' && *ch!=' '; ch++)
        verbose_level=verbose_level*10+(*ch-'0');
      goto again;
    orif(is_parameter(ch,"generic")!=null)
      if(initialized)
        error_notify_fatalz(error_id_unexpected,"generic must be one of the first parameters.");
      nb_methods_indices=0;
      for(ch=is_parameter(ch,"generic"); *ch!='\0' && *ch!=' '; ch++)
        nb_methods_indices=nb_methods_indices*10+(*ch-'0');
      goto again;
    orif(is_parameter(ch,"precompile")!=null)
      if(initialized)
        error_notify_fatalz(error_id_unexpected,"precompile must be one of the first parameters.");
      ch=is_parameter(ch,"precompile");
      for(stop=ch; *stop!=' ' && *stop!='\0'; stop++);
      if(process_restore(debugging_level,pliant_path,Str_map_area(&precompile,ch,stop-ch))) {
        initialized=true;
        Str_map_string(&precompile,""); }
      ch=stop; goto again;
    orif(is_parameter(ch,"reset")!=null)
      ch=is_parameter(ch,"reset");
      if(!initialized)
        initialize(debugging_level,verbose_level,base_address,decommit_threshold,pliant_path,nb_methods_indices,false),initialized=true;
      goto again;
    orif(is_parameter(ch,"module")!=null)
      if(!initialized)
        initialize(debugging_level,verbose_level,base_address,decommit_threshold,pliant_path,nb_methods_indices,true),initialized=true;
      ch=is_parameter(ch,"module");
      for(stop=ch; *stop!=' ' && *stop!='\0'; stop++);
      module=load_module(Str_map_area(&temp,ch,stop-ch),G.safe_module,0,null);
      error_report();
      if(module==null) {
        consolen(Z,"Failed to load module ",S,&temp,EOL);
        process_exit(error_id_missing); }
      ch=stop; goto again;

    orif(Str_len(&precompile)!=0)
      if(!initialized)
        error_notify_fatalz(error_id_unexpected,"nothing precompiled !");
      process_backup(&precompile);
      Str_map_string(&precompile,"");
      goto again;
    orif(equal(args[a],"root") && a+1<argc)
      pliant_path=args[a+1];
      #if defined(_WIN32_API_) || defined(_OS2_API_)
        update_root_path(pliant_path);
      #endif
      a++;
    orif(equal(args[a],"memory_base_address") && a+1<argc)
      if(initialized)
        error_notify_fatalz(error_id_unexpected,"memory_start_address must be one of the first parameters.");
      u=0;
      for(ch=args[++a]; *ch!='\0' && *ch!=' '; ch++)
        u=u*10+(*ch-'0');
      base_address=(Address)(u*1024U*1024U);
    orif(equal(args[a],"memory_decommit_threshold") && a+1<argc)
      if(initialized)
        error_notify_fatalz(error_id_unexpected,"memory_decommit_threshold must be one of the first parameters.");
      decommit_threshold=0;
      for(ch=args[++a]; *ch!='\0' && *ch!=' '; ch++)
        decommit_threshold=decommit_threshold*10+(*ch-'0');
    orif(equal(args[a],"debug") && a+1<argc)
      if(initialized)
        error_notify_fatalz(error_id_unexpected,"debug must be one of the first parameters.");
      debugging_level=0;
      for(ch=args[++a]; *ch!='\0'; ch++)
        debugging_level=debugging_level*10+(*ch-'0');
      #ifdef _SWITCH_EXECUTABLE_
        if((debugging_level<=2 ? debugging_level : 2)!=c_debugging_level)
          run_the_right_executable(pliant_path,debugging_level);
      #endif
    orif(equal(args[a],"verbose") && a+1<argc)
      if(initialized)
        error_notify_fatalz(error_id_unexpected,"verbose must be one of the first parameters.");
      verbose_level=0;
      for(ch=args[++a]; *ch!='\0'; ch++)
        verbose_level=verbose_level*10+(*ch-'0');
    orif(equal(args[a],"generic") && a+1<argc)
      if(initialized)
        error_notify_fatalz(error_id_unexpected,"generic must be one of the first parameters.");
      nb_methods_indices=0;
      for(ch=args[++a]; *ch!='\0'; ch++)
        nb_methods_indices=nb_methods_indices*10+(*ch-'0');

    orif(equal(args[a],"reset"))
      if(initialized)
        error_notify_fatalz(error_id_unexpected,"reset must be the first parameter.");
      else
        initialize(debugging_level,verbose_level,base_address,decommit_threshold,pliant_path,nb_methods_indices,false),initialized=true;
    orif(equal(args[a],"restore") && a+1<argc)
      if(initialized)
        error_notify_fatalz(error_id_unexpected,"restore must be one of the first parameters.");
      if(!process_restore(debugging_level,pliant_path,Str_map_string(&temp,args[++a]))) {
        consolen(Z,"Failed to restore ",S,&temp,EOL);
        process_exit(error_id_restore); }
      initialized=true;
    orif(equal(args[a],"backup") && a+1<argc)
      if(!initialized)
        error_notify_fatalz(error_id_unexpected,"nothing to backup.");
      process_backup(Str_map_string(&temp,args[++a]));

    orif(equal(args[a],"module") && a+1<argc)
      if(!initialized)
        initialize(debugging_level,verbose_level,base_address,decommit_threshold,pliant_path,nb_methods_indices,true),initialized=true;
      #ifdef _TIMER_
        old=timer_set(timer_other);
      #endif
      module=load_module(Str_map_string(&temp,args[++a]),G.safe_module,0,null);
      #ifdef _TIMER_
        timer_set(old);
      #endif
      error_report();
      if(module==null) {
        consolen(Z,"Failed to load module ",S,&temp,EOL);
        process_exit(error_id_missing); }
      last_module=module;
    orif(equal(args[a],"command") && a+1<argc)
      if(!initialized)
        initialize(debugging_level,verbose_level,base_address,decommit_threshold,pliant_path,nb_methods_indices,true),initialized=true;
      line=entry_new(G.type_Str); string_Str(args[++a],line);
      text=entry_new(G.type_List);
      List_append(text,line);
      module=(struct Module *)entry_new(G.type_Module); entry_lock(module);
      string_Str("<command line>",module->name);
      Module_include(module,G.safe_module,0);
      if(last_module!=null) Module_include(module,last_module,0);
      Dictionary_insert(G.module_dictionary,module->name,true,module);
      #ifdef _TIMER_
        old=timer_set(timer_other);
      #endif
      compile_text(text,module);
      #ifdef _TIMER_
        timer_set(old);
      #endif
      error_report();
      entry_unlock(module);
      error_report();

    other
      if(!initialized)
        initialize(debugging_level,verbose_level,base_address,decommit_threshold,pliant_path,nb_methods_indices,true),initialized=true;
      #ifdef _TIMER_
        old=timer_set(timer_other);
      #endif
      script_args=args+a;
      module=load_module(Str_map_string(&temp,args[a]),G.safe_module,Module_flag_absolutepath,null);
      #ifdef _TIMER_
        timer_set(old);
      #endif
      error_report();
      if(module==null) {
        consolen(Z,"Failed to load program from file ",S,&temp,EOL);
        process_exit(error_id_missing); }
      break; } }
  if(initialized) {
    G.execution_phase=phase_shutdown;
    for(c=List_first(G.shutdown_actions); c!=G.null_constant; c=List_next(c)) {
      check(entry_type(*c)==G.type_DelayedAction);
      ea=(struct DelayedAction *)*c;
      ((ShutdownActionPrototype)ea->function->exe)(ea->parameter); }
    G.execution_phase=phase_exit;
    for(c=List_first(G.exit_actions); c!=G.null_constant; c=List_next(c)) {
      check(entry_type(*c)==G.type_DelayedAction);
      ea=(struct DelayedAction *)*c;
      ((ExitActionPrototype)ea->function->exe)(ea->parameter); }
    error_report();
    _check_( terminate(); )
    bulk_free();
  other
    consolen(
      Z,"Pliant dynamic reflexive compiler,\n  release ",
      S,Str_map_area(&temp,buffer,Int_str2(pliant_release_number,10,buffer)),
      Z,", debugging level ",
      S,Str_map_area(&temp2,buffer+8,Int_str2(c_debugging_level,10,buffer+8)),
      Z,",\n  for ",
      Z,computer_processor_name,
      #ifdef _PROCESSOR_EXTRA_INFO_
        Z," ",Z,computer_processor_extra_info,
      #endif
      Z," under ",Z,computer_os_kernel,
      #ifdef _OS_EXTRA_INFO_
        Z," ",Z,computer_os_extra_info,
      #endif
      #if defined(_LINUX_) && defined(_POSIX_API_)
        Z," (using Posix api)",
      #endif
      Z,",\n  compiled",
      #ifdef _DLL_
        Z," as a DLL",
      #endif
      #ifdef _GCC_
        Z," using GCC",
      #endif
      #ifdef _WATCOM_
        Z," using Watcom C",
      #endif
      #ifdef _REGISTERS_
        Z," (registers calling convention)",
      #else
        Z," (stack calling convention)",
      #endif
      Z,".\n",
      Z,"Copyright  Hubert Tonneau  hubert.tonneau@pliant.cx\n",
      Z,"Pliant web site is at http://pliant.cx/\n",
      Z,"\n",
      Z,"This program is free software; you can redistribute it and/or\n",
      Z,"modify it under the terms of the GNU General Public License version 2\n",
      Z,"as published by the Free Software Foundation.\n",
      Z,"This program is distributed in the hope that it will be useful,\n",
      Z,"but WITHOUT ANY WARRANTY; without even the implied warranty of\n",
      Z,"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n",
      Z,"GNU General Public License for more details.\n",
      Z,"You should have received a copy of the GNU General Public License\n",
      Z,"version 2 along with this program; if not, write to the Free Software\n",
      Z,"Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n",
      Z,"\n",
      Z,"Free peoples is even more important than free softwares.\n",
      Z,"I'd really like to make the world just a little bit better for my children,\n",
      Z,"I mean more friendly, and I believe that helping the Tibet get free is\n",
      Z,"an obvious way to start with.\n",
      Z,"You can get more informations about Tibet at http://www.tibet.com/",EOL); }
  #ifdef _EXE_
    return 0;
  #endif
  }


/*
doc
  section "free"
  [The following function is executed when the program exits and debugging level is 2 or more. It explains why leaving a program running at debugging level 2 or more is ... long.] ; eol
  [It is intended to free all objects, up to the last byte of allocated memory, in order to track any memory leak or reference count cycle. ]
  [It is conceptually buggy because there is no serious mechanism for granting that no object destructor function uses another already freed object, but it should work in practice for any simple configuration. ]
  [Please email stronger design proposals to ] ; link "Hubert Tonneau" "hubert.tonneau@pliant.cx"
*/

FUNCTION Void do_nothing() {}
#define TERMINATE(msg) // consolen(Z,msg,END)
#define TERMINATE(msg) consolen(Z,msg,END)

#ifdef _CHECK_
  FUNCTION Void terminate() {
    struct EntryHeader *h,*h2; struct DictNode *n,**l;
    struct Type *t; struct Module *m;
    Int i,j; struct Str temp,temp2; Char buffer[16],buffer2[16];
    TERMINATE("terminating (1");
    memory_checkup();
    TERMINATE("2");
    G.execution_phase=phase_free_objects;
    G.memory_allocate_hook=default_memory_allocate;
    G.memory_zallocate_hook=default_memory_zallocate;
    G.memory_free_hook=default_memory_free;
    G.memory_resize_hook=default_memory_resize;
    G.memory_zresize_hook=default_memory_zresize;
    G.memory_size_hook=default_memory_size;
    G.memory_checkup_hook=default_memory_checkup;
    G.memory_shrink_hook=default_memory_shrink;
    G.memory_enumerate_hook=default_memory_enumerate;
    G.memory_pre_extend_hook=default_pre_extend;
    G.memory_post_extend_hook=default_post_extend;
    G.entry_lock_hook=G.entry_unlock_hook=do_nothing;
    G.action_push_record_hook=default_action_push_record;
    G.action_pull_record_hook=default_action_pull_record;
    G.action_top_record_hook=default_action_top_record;
    G.error_push_record_hook=default_error_push_record;
    G.error_pull_record_hook=default_error_pull_record;
    G.error_top_record_hook=default_error_top_record;
    G.error_fatal_hook=default_error_fatal;
    G.pre_execute_hook=default_pre_execute;
    G.post_active_hook=default_post_active;

    List_destroy(G.execute_begin_hooks); List_build(G.execute_begin_hooks);
    List_destroy(G.execute_end_hooks); List_build(G.execute_end_hooks);
    Arrow_set(&G.bottom_error.context,null);
    for(h=G.entry_first; h!=null; h=h->next)
      if(h->type==G.type_Type)
        entry_lock(h+1);
    entry_lock(G.general_dictionary);
    for(h=G.entry_first; h!=null; h=h->next)
      h->index=int_bad;
    for(i=0; i<G.general_dictionary->hashsize; i++)
      for(n=G.general_dictionary->table[i]; n!=null; n=n->next) {
        h=(struct EntryHeader *)n->object-1;
        h->index=i; }
    for(h=G.entry_last,entry_lock(h+1); h!=null; h=h2) {
      if(h->index>=0)
        for(l=G.general_dictionary->table+h->index; (n=*l)!=null; l=&n->next)
          if(n->object==h+1) {
            *l=n->next;
            entry_unlock(n->object);
            Str_destroy(&n->label);
            memory_free(n);
            G.general_dictionary->count--;
            break; }
      h2=h->previous; if(h2!=null) entry_lock(h2+1); entry_unlock(h+1); }
    entry_unlock(G.general_dictionary);
    TERMINATE("3");
    G.execution_phase=phase_free_types;
    for(h=G.entry_first; h!=null; h=h->next)
      if(h->type==G.type_Type) {
              t=(struct Type *)(h+1);
        for(i=0; i<G.generic_nb_indices; i++)
          if(i!=G.generic_method_destroy)
            Arrow_set((Arrow *)&t->generic_methods[i].function,null);
        List_destroy(&t->maybe); List_build(&t->maybe);
        for(i=0; i<t->nb_field; i++)
          Arrow_set(&t->fields[i].initial_value,null); }
    TERMINATE("4");
    while(List_last(&G.entry_roots)!=G.null_constant)
      List_remove(&G.entry_roots,List_last(&G.entry_roots));
    List_destroy(&G.entry_roots);
    TERMINATE("5");
    Str_destroy(&G.pliant_root_path);
    Str_destroy(&G.bottom_error.message);
    for(i=0; i<G.generic_nb_indices; i++)
      List_destroy(&G.generic_indices[i].types);
    memory_free(G.generic_indices);
    #ifdef _LISTING_
      Str_destroy(&G.initial_listing_function_name);
      Str_destroy(&G.expanded_listing_function_name);
      Str_destroy(&G.middle_listing_function_name);
      Str_destroy(&G.final_listing_function_name);
    #endif
    TERMINATE("6");
    for(h=G.entry_last,entry_lock(h+1); h!=null; h=h2) {
      if(h->type==G.type_Type) {
              t=(struct Type *)(h+1);
        t=(struct Type *)(h+1);
        Arrow_set((Arrow *)&t->generic_methods[G.generic_method_destroy].function,null);
        if(t!=G.type_Type && t!=G.type_Function)
          entry_unlock(t); }
      h2=h->previous; if(h2!=null) entry_lock(h2+1); entry_unlock(h+1); }
    TERMINATE("7");
    if(entry_header(G.type_Function)->counter==1) {
      entry_unrecord(entry_header(G.type_Function)); Type_destroy(G.type_Function); memory_free(entry_header(G.type_Function)); }
    if(entry_header(G.type_Type)->counter==1) {
      entry_unrecord(entry_header(G.type_Type)); Type_destroy(G.type_Type); memory_free(entry_header(G.type_Type)); }
    TERMINATE("8)\n");
    TERMINATE("8)\r                                \r");
    if(G.memory_current_used!=0) {
      G.execution_phase=phase_free_report;
      consolen(Z,"\n-----------------------------------------",EOL);
      if(G.entry_first!=null) {
        for(h=G.entry_first,i=0,j=0; h!=null; h=h->next,i++)
          j+=h->counter;
        consolen(
          S,Str_map_area(&temp,buffer,Int_str2(i,10,buffer)),
          Z," object(s) have not been freed because of at most ",
          S,Str_map_area(&temp2,buffer2,Int_str2(j,10,buffer2)),
          Z," lost link(s).",EOL); }
      consolen(
        S,Str_map_area(&temp,buffer,Int_str2(G.memory_current_used,10,buffer)),
        Z," byte(s) have not been freed\n",
        Z,"-----------------------------------------",EOL);
      for(h=G.entry_first; h!=null; h=h->next) {
        t=h->type; if(t->signature!=Type_signature || t->objects_counter==0) continue;
        consolen(
          S,Str_map_area(&temp,buffer,Int_str2(t->objects_counter,10,buffer)),
          Z," object(s) with type ",
          S,&t->name,
          EOL);
        t->objects_counter=0; }
      if(G.memory_current_used<4096) {
        consolen(Z,"-----------------------------------------",EOL);
        memory_dump(); }
      consolen(Z,"-----------------------------------------",EOL); } }
#endif

FUNCTION Void bulk_free() {
  struct MemoryPool *pool;
  for(pool=&G.memory_pool; pool!=null; pool=pool->next)
    MemoryPool_destroy(pool); }


/// section "init"

FUNCTION Void initialize(Int debugging_level,Int verbose_level,Address base_address,Int decommit_threshold,Char *pliant_path,Int nb_methods_indices,Bool restore) {
  struct Function *f; struct Str temp; struct DelayedAction *ra;
  #ifndef _NO_INIT_
    struct Module *bparser_module;
    struct Module *bcompiler_module;
    struct Module *boptimizer_module;
    struct Module *bgenerator_module;
    struct Module *ultrasafe_module;
    struct Module *safe_module;
    struct Module *unsafe_module;
    struct Module *parser_module;
    struct Module *compiler_module;
    struct Module *optimizer_module;
    struct Module *generator_module;
    struct Module *context_module;
    struct Module *hooks_module;
    struct Module *unused_module;
    struct Module *extra_function_module;
    struct Module *extra_meta_module;
    struct Module *extra_type_module;
  #endif

  if(restore && process_restore(debugging_level,pliant_path,Str_map_string(&temp,"/binary/default.dump"))) {
    G.verbose_level=verbose_level;
    return; }

  #ifndef _NO_INIT_
    // var.c
    memory_clear(&G,sizeof(G));
    G.execution_phase=phase_startup;
    G.memory_base_address=base_address;
    G.memory_decommit_threshold=decommit_threshold;
    G.debugging_level=debugging_level;
    G.generator_level=2;
    G.verbose_level=verbose_level;
    G.memory_minimal_address=(Address)-1;
    _check_( G.entry_lock_hook=do_nothing; )
    _check_( G.entry_unlock_hook=do_nothing; )

    G.action_push_record_hook=default_action_push_record;
    G.action_pull_record_hook=default_action_pull_record;
    G.action_top_record_hook=default_action_top_record;

    G.error_push_record_hook=default_error_push_record;
    G.error_pull_record_hook=default_error_pull_record;
    G.error_top_record_hook=default_error_top_record;
    G.top_error=&G.bottom_error;
    G.error_first_available_id=error_id_user+1;
    G.error_fatal_hook=default_error_fatal;
    G.yield_hook=do_nothing;

    // memory.c
    MemoryPool_build(&G.memory_pool); 
    G.memory_allocate_hook=default_memory_allocate;
    G.memory_zallocate_hook=default_memory_zallocate;
    G.memory_free_hook=default_memory_free;
    G.memory_resize_hook=default_memory_resize;
    G.memory_zresize_hook=default_memory_zresize;
    G.memory_size_hook=default_memory_size;
    G.memory_checkup_hook=default_memory_checkup;
    G.memory_shrink_hook=default_memory_shrink;
    G.memory_enumerate_hook=default_memory_enumerate;
    G.memory_pre_extend_hook=default_pre_extend;
    G.memory_post_extend_hook=default_post_extend;

    // function.c
    G.first_function=G.last_function=null;
    G.function_lock_hook=do_nothing;
    G.function_unlock_hook=do_nothing;

    // parser.c
    G.pre_execute_hook=default_pre_execute;
    G.post_active_hook=default_post_active;

    // type.c
    G.null_constant=(Address *)entry_new1(null,sizeof(Address),(Void (*)(Address obj))null);
    *G.null_constant=null;

    G.general_dictionary=(struct Dictionary *)entry_new1(null,sizeof(struct Dictionary),(Void (*)(Address obj))Dictionary_build);
    safe_module=(struct Module *)entry_new1(null,sizeof(struct Module),(Void (*)(Address obj))Module_build);
    compiler_module=(struct Module *)entry_new1(null,sizeof(struct Module),(Void (*)(Address obj))Module_build);

    generic_set_nb_methods_indices(nb_methods_indices);
    G.type_Universal=C_type0("Universal",safe_module,0,Type_flag_non_universal,null,null,null);
    G.type_Universal->generic_level=0;
    G.generic_method_build=generic_allocate_method(G.type_Universal);
    G.generic_method_destroy=generic_allocate_method(G.type_Universal);
    G.generic_method_copy=generic_allocate_method(G.type_Universal);
    G.generic_method_active_type=generic_allocate_method(G.type_Universal);

    G.type_Function=C_type0("Function",compiler_module,sizeof(struct Function),Type_flag_do_not_copy,null,null,null);
    Type_set_generic_method(G.type_Function,G.generic_method_build,C_function0(Function_build));
    Type_set_generic_method(G.type_Function,G.generic_method_destroy,C_function0(Function_destroy));

    G.type_Type=C_type0("Type",compiler_module,sizeof(struct Type)+(G.generic_nb_indices-1)*sizeof(struct TypeGenericalMethod),Type_flag_do_not_copy,Type_build,Type_destroy,null);
    G.type_Dictionary=C_type0("Dictionary",safe_module,sizeof(struct Dictionary),0,Dictionary_build,Dictionary_destroy,Dictionary_copy); entry_root(G.general_dictionary);
    G.type_Module=C_type0("Module",compiler_module,sizeof(struct Module),0,Module_build,Module_destroy,null);
    G.type_Str=C_type0("Str",safe_module,sizeof(struct Str),0,Str_build,Str_destroy,Str_copy);
    G.type_ListingPosition=C_type0("ListingPosition",compiler_module,sizeof(struct ListingPosition),0,ListingPosition_build,ListingPosition_destroy,ListingPosition_copy);
    G.type_ListingPositions=C_type0("ListingPositions",compiler_module,sizeof(struct ListingPositions),0,ListingPositions_build,ListingPositions_destroy,ListingPositions_copy);

    entry_header(G.general_dictionary)->type=G.type_Dictionary;
    _check_( G.type_Dictionary->objects_counter+=1; )
    entry_header(safe_module)->type=G.type_Module;
    entry_header(compiler_module)->type=G.type_Module;
    _check_( G.type_Module->objects_counter+=2; )
    entry_header(G.type_Universal)->type=G.type_Type;
    entry_header(G.type_Function)->type=G.type_Type;
    entry_header(G.type_Type)->type=G.type_Type;
    _check_( G.type_Type->objects_counter+=3; )

    G.type_List=C_type0("List",safe_module,sizeof(struct List),0,List_build,List_destroy,List_copy);
    G.type_build_hooks=(struct List *)entry_new(G.type_List); entry_root(G.type_build_hooks);
    G.type_destroy_hooks=(struct List *)entry_new(G.type_List); entry_root(G.type_destroy_hooks);
    G.execute_begin_hooks=(struct List *)entry_new(G.type_List); entry_root(G.execute_begin_hooks);
    G.execute_end_hooks=(struct List *)entry_new(G.type_List); entry_root(G.execute_end_hooks);
    G.generator_context_begin_hooks=(struct List *)entry_new(G.type_List); entry_root(G.generator_context_begin_hooks);
    G.generator_context_end_hooks=(struct List *)entry_new(G.type_List); entry_root(G.generator_context_end_hooks);

    G.execution_phase=phase_run;

    Str_build(&G.pliant_root_path); string_Str(pliant_path,&G.pliant_root_path);
    G.module_dictionary=(struct Dictionary *)entry_new(G.type_Dictionary);
    G.bparser_module=bparser_module=C_module(null,"/pliant/language/parser/basic.pli");
    bcompiler_module=C_module(null,"/pliant/language/compiler/basic.pli");
    G.boptimizer_module=boptimizer_module=C_module(null,"/pliant/language/optimizer/basic.pli");
    bgenerator_module=C_module(null,"/pliant/language/generator/basic.pli");
    ultrasafe_module=C_module(null,"/pliant/language/basic/ultrasafe.pli");
    G.safe_module=C_module(safe_module,"/pliant/language/basic/safe.pli");
    G.unsafe_module=unsafe_module=C_module(null,"/pliant/language/basic/unsafe.pli");
    parser_module=C_module(null,"/pliant/language/parser/internals.pli");
    C_module(compiler_module,"/pliant/language/compiler/internals.pli");
    optimizer_module=C_module(null,"/pliant/language/optimizer/internals.pli");
    generator_module=C_module(null,"/pliant/language/generator/internals.pli");
    context_module=C_module(null,"/pliant/language/context/internals.pli");
    hooks_module=C_module(null,"/pliant/language/misc/hooks.pli");
    extra_function_module=C_module(null,"/pliant/language/compiler/function/extra.pli");
    extra_meta_module=C_module(null,"/pliant/language/compiler/meta/extra.pli");
    extra_type_module=C_module(null,"/pliant/language/compiler/type/extra.pli");
    G.unused_module=unused_module=C_module(null,"/pliant/language/misc/unused.pli");
    List_append(&safe_module->submodules,ultrasafe_module);
    List_append(&safe_module->submodules,bparser_module);
    List_append(&safe_module->submodules,bcompiler_module);
    List_append(&safe_module->submodules,boptimizer_module);
    List_append(&safe_module->submodules,bgenerator_module);

    G.type_Void=C_type0("Void",safe_module,0,Type_flag_scalar,null,null,null);
    C_type0("Byte",safe_module,1,Type_flag_scalar,null,null,null);
    G.type_CBool=C_type0("CBool",safe_module,sizeof(Bool),Type_flag_scalar|Type_flag_atomic,null,null,null);
    G.type_Int=C_type0("Int",safe_module,sizeof(Int),Type_flag_scalar|Type_flag_atomic,null,null,null);

    G.type_Address=C_type0("Address",safe_module,sizeof(Address),Type_flag_scalar|Type_flag_atomic|Type_flag_mapper,null,null,null);
    entry_header(G.null_constant)->type=G.type_Address;
    _check_( G.type_Address->objects_counter+=1; )

    G.function_translate_universal=C_function("translate Universal",unsafe_module,address_and_translate_universal,0, G.type_Universal,Ar, G.type_Int,Arv, G.type_Universal,AwmC, END);
    #ifdef _i386_
      Function_set_generate_assembly1(G.function_translate_universal,generate_address_and_translate_universal);
    #endif
    G.type_Argument=C_type0("Argument",compiler_module,sizeof(struct Argument),0,Argument_build,Argument_destroy,null);
    G.type_Argument2=C_type0("Argument2",compiler_module,sizeof(struct Argument2),0,Argument2_build,Argument2_destroy,null);
    G.type_Instruction=C_type0("Instruction",compiler_module,sizeof(struct Instruction),0,Instruction_build,Instruction_destroy,null);

    G.type_Arrow=C_type0("Arrow",safe_module,sizeof(Arrow),Type_flag_mapper,Arrow_build,Arrow_destroy,Arrow_copy);

    G.type_Ident=C_type0("Ident",compiler_module,sizeof(struct Str),0,Str_build,Str_destroy,Str_copy);
    G.type_InlineText=C_type0("InlineText",compiler_module,sizeof(struct Str),0,Str_build,Str_destroy,Str_copy);

    G.type_Array=C_type0("Array",safe_module,sizeof(struct Array),0,Array_build,Array_destroy,Array_copy);
    G.type_Relation=C_type0("Relation",safe_module,sizeof(struct Relation),0,Relation_build,Relation_destroy,Relation_copy);

    G.type_Expression=C_type0("Expression",compiler_module,sizeof(struct Expression),0,Expression_build,Expression_destroy,Expression_copy);
    G.type_Meta=C_type0("Meta",compiler_module,sizeof(struct Function),0,Function_build,Function_destroy,null);

    f=C_function("build",unsafe_module,Universal_build,Function_flag_generic|Function_flag_hidden, G.type_Universal,Aw, END); f->generic_index=G.generic_method_build;
    f=C_function("destroy",unsafe_module,Universal_destroy,Function_flag_generic|Function_flag_hidden, G.type_Universal,Aw, END); f->generic_index=G.generic_method_destroy;
    f=C_function("copy",unsafe_module,Universal_copy,Function_flag_generic|Function_flag_hidden, G.type_Universal,Ar, G.type_Universal,Aw, END); f->generic_index=G.generic_method_copy;
    f=C_function("active_type",unsafe_module,Universal_active_type,Function_flag_generic|Function_flag_hidden, G.type_Universal,Ar, G.type_Int,Arv, G.type_Expression,Arw, END); f->generic_index=G.generic_method_active_type;

    C_function("compare",safe_module,compare_bool,0, G.type_CBool,Arv, G.type_CBool,Arv, G.type_Int,AwvR, END);
    G.function_compare_int=C_function("compare",safe_module,compare_int,0, G.type_Int,Arv, G.type_Int,Arv, G.type_Int,AwvR, END);
    G.function_compare_address=C_function("compare",safe_module,compare_address,0, G.type_Address,Arv, G.type_Address,Arv, G.type_Int,AwvR, END);
    C_function("compare",safe_module,compare_str,0, G.type_Str,Ar, G.type_Str,Ar, G.type_Int,AwvR, END);
    C_function("compare",safe_module,compare_str,0, G.type_Ident,Ar, G.type_Ident,Ar, G.type_Int,AwvR, END);

    // pointer.c
    G.pointer_types=(struct Relation *)entry_new(G.type_Relation); entry_root(G.pointer_types);
    G.link_types=(struct Relation *)entry_new(G.type_Relation); entry_root(G.link_types);
    G.star_types=(struct Relation *)entry_new(G.type_Relation); entry_root(G.star_types);
    C_meta("Pointer",unsafe_module,Pointer_meta,0);
    C_meta("Link",unsafe_module,Link_meta,0);

    // back to type.c
    G.type_GeneratorContext=C_type0("GeneratorContext",optimizer_module,sizeof(struct GeneratorContext),0,GeneratorContext_build,GeneratorContext_destroy,null);
    G.type_FunctionPrototype=C_type0("FunctionPrototype",compiler_module,sizeof(struct FunctionPrototype),0,FunctionPrototype_build,FunctionPrototype_destroy,null);
    G.type_FunctionExternal=C_type("FunctionExternal",compiler_module,sizeof(struct FunctionExternal),
      "code_offset",G.type_Int,
      "to",G.type_Arrow, END);
    G.type_FunctionUse=C_type("FunctionUse",compiler_module,sizeof(struct FunctionUse),
      "in",G.type_Arrow,
      "code_offset",G.type_Int, END);
    G.type_FunctionName=C_type("FunctionName",compiler_module,sizeof(struct FunctionName),
      "dll_name",G.type_Str,
      "function_name",G.type_Str, END);
    G.type_LocalVariable=C_type("LocalVariable",compiler_module,sizeof(struct LocalVariable),
      "name",G.type_Str,
      "function",pointerto(G.type_Function),
      "body",linkto(G.type_Argument),
      "access",G.type_Int, END);
    G.type_GlobalVariable=C_type("GlobalVariable",compiler_module,sizeof(struct GlobalVariable),
      "name",G.type_Str,
      "position",G.type_ListingPosition,
      "variable",G.type_Arrow,
      "access",G.type_Int, END);
    G.type_TypeField=C_type("TypeField",compiler_module,sizeof(struct TypeField),
      "type",linkto(G.type_Type),
      "offset",G.type_Int,
      "initial_value",G.type_Arrow,
      "name",G.type_Str,
      "properties",G.type_Dictionary, END);

    // parser.c
    G.type_ParserContext=C_type("ParserContext",parser_module,sizeof(struct ParserContext),
      "text",linkto(G.type_List),
      "module",linkto(G.type_Module),
      "filename",G.type_Str,
      "delta_y",G.type_Int,
      "delta_x",G.type_Int,
      "y",G.type_Int,
      "x",G.type_Int,
      "current_line",pointerto(G.type_Arrow),
      "current_expr",pointerto(G.type_Expression),
      "root",linkto(G.type_Expression),
      "levels",G.type_List,
      "possible_side_effect",G.type_CBool,
      "locals",G.type_Dictionary,
      END);
    G.type_ParserFilter=C_type("ParserFilter",parser_module,sizeof(struct ParserFilter),
      "function",linkto(G.type_Function),
      "parameter",G.type_Arrow ,END);
    G.type_ParserPending=C_type("ParserPending",parser_module,sizeof(struct ParserPending),
      "y",G.type_Int,
      "x",G.type_Int,
      "function",linkto(G.type_Function),
      "parameter",G.type_Arrow ,END);
    G.type_ParserOperator=C_type("ParserOperator",parser_module,sizeof(struct ParserOperator),
      "function",linkto(G.type_Function),
      "parameter",G.type_Arrow,
      "priority",G.type_Int, END);
    G.type_ParserFilterOperatorT1=C_type("ParserFilterOperatorT1",parser_module,sizeof(struct ParserFilterOperatorT1),
      "name",G.type_Str,
      "unary",G.type_CBool,
      "ident",G.type_Str,
      "priority",G.type_Int,
      "nb_before",G.type_Int,
      "before_value",G.type_Arrow,
      "nb_after",G.type_Int,
      "after_value",G.type_Arrow, END);
    G.type_ParserFilterOperatorT2=C_type("ParserFilterOperatorT2",parser_module,sizeof(struct ParserFilterOperatorT2),
      "openop",G.type_Str,
      "closeop",G.type_Str,
      "ident",G.type_Str, END);

    G.type_DelayedAction=C_type("DelayedAction",unsafe_module,sizeof(struct DelayedAction),
      "function",linkto(G.type_Function),
      "parameter",G.type_Arrow, END);
    G.type_BacktrackingAction=C_type("BacktrackingAction",compiler_module,sizeof(struct BacktrackingAction),
      "function",linkto(G.type_Function),
      "parameter",G.type_Arrow, END);
    Type_set_generic_method(G.type_BacktrackingAction,G.generic_method_destroy,C_function("destroy",unsafe_module,BacktrackingAction_destroy,Function_flag_hidden, G.type_BacktrackingAction,Aw, END));
    G.type_BacktrackingDefinition=C_type("BacktrackingDefinition",compiler_module,sizeof(struct BacktrackingDefinition),
      "name",G.type_Str,
      "value",G.type_Arrow, END);
    G.function_backtrack_definition=C_function("backtrack definition",compiler_module,backtrack_definition,0, G.type_BacktrackingDefinition,Ar, END);

    G.type_ErrorID=C_type0("ErrorID",unsafe_module,sizeof(Int),Type_flag_scalar|Type_flag_atomic,null,null,null);
    G.type_ErrorRecord=C_type0("ErrorRecord",unsafe_module,sizeof(struct ErrorRecord),0,ErrorRecord_build,ErrorRecord_destroy,null);
    C_field(G.type_ErrorRecord,"id",unsafe_module,G.type_ErrorID,field_offset(struct ErrorRecord,id),AwmC);
    C_field(G.type_ErrorRecord,"context",unsafe_module,G.type_Arrow,field_offset(struct ErrorRecord,context),AwmC);
    C_field(G.type_ErrorRecord,"message",unsafe_module,G.type_Str,field_offset(struct ErrorRecord,message),AwmC);
    C_field(G.type_ErrorRecord,"filter",unsafe_module,G.type_ErrorID,field_offset(struct ErrorRecord,filter),AwmC);
    C_field(G.type_ErrorRecord,"next",unsafe_module,pointerto(G.type_ErrorRecord),field_offset(struct ErrorRecord,next),AwmC);
    G.type_ActionRecord=C_type0("ActionRecord",unsafe_module,sizeof(struct ActionRecord),0,ActionRecord_build,ActionRecord_destroy,null);
    C_field(G.type_ActionRecord,"action",unsafe_module,G.type_Str,field_offset(struct ActionRecord,action),AwmC);
    C_field(G.type_ActionRecord,"next",unsafe_module,pointerto(G.type_ActionRecord),field_offset(struct ActionRecord,next),AwmC);

    G.function_pending_open_bloc=C_function0(parser_pending_open_bloc); entry_root(G.function_pending_open_bloc);
    G.function_pending_close_bloc=C_function0(parser_pending_close_bloc); entry_root(G.function_pending_close_bloc);
    G.function_pending_close_instruction=C_function0(parser_pending_close_instruction); entry_root(G.function_pending_close_instruction);
    G.function_operator_t1=C_function0(parser_operator_t1); entry_root(G.function_operator_t1);
    G.function_filter_t1=C_function("parser_filter_t1",parser_module,parser_filter_t1,0, G.type_ParserContext,Arw, G.type_Str,Ar, G.type_Address,Arv, END);
    G.function_filter_openop=C_function("parser_filter_openop",parser_module,parser_filter_openop,0, G.type_ParserContext,Arw, G.type_Str,Ar, G.type_Address,Arv, END);
    G.function_filter_closeop=C_function("parser_filter_closeop",parser_module,parser_filter_closeop,0, G.type_ParserContext,Arw, G.type_Str,Ar, G.type_Address,Arv, END);

    G.parser_sections=(struct List *)entry_new(G.type_List);
    C_map("pliant parser sections",bparser_module,G.parser_sections,Arw);
    C_parser_section("pliant parser housekeeping");
    C_parser_section("pliant parser priority user operators");
    C_parser_section("pliant parser basic signs");
    C_parser_section("pliant parser several chars operators");
    C_parser_section("pliant parser 2 chars operators");
    C_parser_section("pliant parser 1 char operators");
    C_parser_section("pliant parser basic types");

    C_filter("pliant parser housekeeping",parser_filter_handle_pendings,null);
    C_filter("pliant parser housekeeping",parser_filter_execute,null);

    C_filter("pliant parser basic signs",parser_filter_newline,null);
    C_filter("pliant parser basic signs",parser_filter_space,null);
    C_filter("pliant parser basic signs",parser_filter_comment,null);
    C_filter("pliant parser basic signs",parser_filter_tab,null);

    C_operator_t1("pliant parser 2 chars operators","->",false,"->",0,0,null,0,null);
    C_operator_t1("pliant parser 2 chars operators","<-",false,"<-",0,0,null,0,null);
    C_operator_t2("pliant parser 1 char operators","(",")","()");
    C_operator_t2("pliant parser 1 char operators","{","}","{}");
    C_operator_t1("pliant parser 2 chars operators","or",false,"or",0x110,1,null,1,null);
    C_operator_t1("pliant parser several chars operators","and",false,"and",0x120,1,null,1,null);
    C_operator_t1("pliant parser several chars operators","not",false,"not",0x130,0,null,1,null);
    C_operator_t1("pliant parser 2 chars operators","<>",false,"<>",0x210,1,null,1,null);
    C_operator_t1("pliant parser 2 chars operators","<=",false,"<=",0x210,1,null,1,null);
    C_operator_t1("pliant parser 2 chars operators",">=",false,">=",0x210,1,null,1,null);
    C_operator_t1("pliant parser 1 char operators","=",false,"=",0x210,1,null,1,null);
    C_operator_t1("pliant parser 1 char operators","<",false,"<",0x210,1,null,1,null);
    C_operator_t1("pliant parser 1 char operators",">",false,">",0x210,1,null,1,null);
    C_operator_t1("pliant parser 1 char operators","+",false,"+",0x310,1,null,1,null);
    C_operator_t1("pliant parser 1 char operators","-",true,"-",0x490,0,null,1,null);
    C_operator_t1("pliant parser 1 char operators","-",false,"-",0x310,1,null,1,null);
    C_operator_t1("pliant parser 1 char operators","*",false,"*",0x320,1,null,1,null);
    C_operator_t1("pliant parser 1 char operators","/",false,"/",0x320,1,null,1,null);
    C_operator_t1("pliant parser 1 char operators","\\",false,"\\",0x320,1,null,1,null);
    C_operator_t1("pliant parser 1 char operators","%",false,"%",0x320,1,null,1,null);
    C_operator_t1("pliant parser 1 char operators","^",false,"^",0x330,1,null,1,null);
    C_operator_t1("pliant parser 1 char operators",":",false,"()",0x410,1,null,1,null);
    C_operator_t1("pliant parser 2 chars operators",":=",false,":=",0x510,int_max,"()",int_max,"()");
    C_operator_t1("pliant parser 2 chars operators",":>",false,":>",0x510,int_max,"()",int_max,"()");
    C_operator_t1("pliant parser 1 char operators",";",false,"{}",0x520,int_max,"()",int_max,"()");

    C_filter("pliant parser basic types",parser_filter_integer,null);
    C_filter("pliant parser basic types",parser_filter_string,null);
    C_filter("pliant parser basic types",parser_filter_text,null);
    C_filter("pliant parser basic types",parser_filter_ident,null);
    C_filter("pliant parser basic types",parser_filter_ident2,null);

    C_continue("eif");
    C_continue("else");

    C_precompile_rewrite(parser_rewrite_instruction);
    // C_precompile_rewrite(parser_rewrite_bloc);
    C_precompile_rewrite(parser_rewrite_if_eif_else);

    C_function(". add_token",parser_module,ParserContext_add_token,0, G.type_ParserContext,Arw, G.type_Address,Arv, G.type_Expression,AwmRW, END);
    C_function(". open_sublevel",parser_module,ParserContext_open_sublevel,0, G.type_ParserContext,Arw, G.type_Str,Ar, END);
    C_function(". close_sublevel",parser_module,ParserContext_close_sublevel,0, G.type_ParserContext,Arw, G.type_Str,Ar, END);
    C_function(". forward",parser_module,ParserContext_forward,0, G.type_ParserContext,Arw, G.type_Int,Arv, END);
    C_function(". add_pending",parser_module,ParserContext_add_pending,0, G.type_ParserContext,Arw, G.type_Int,Arv, G.type_Int,Arv, G.type_Function,Ar, G.type_Address,Arv, END);
    C_function(". execute",parser_module,ParserContext_execute,0, G.type_ParserContext,Arw, END);
    C_function("fold_arguments",parser_module,fold_arguments,0, G.type_Array,Arw, G.type_Int,Arv, G.type_Int,Arv, G.type_Address,Arv, G.type_Int,Arv, G.type_Address,Arv, END);

    // compile.c
    Type_set_generic_method(G.type_Ident,G.generic_method_active_type,C_function0(active_type_Ident));
    Type_set_generic_method(G.type_Function,G.generic_method_active_type,C_function0(active_type_Function));
    Type_set_generic_method(G.type_Meta,G.generic_method_active_type,C_function0(active_type_Meta));
    Type_set_generic_method(G.type_Argument,G.generic_method_active_type,C_function0(active_type_Argument));
    Type_set_generic_method(G.type_Argument2,G.generic_method_active_type,C_function0(active_type_Argument2));
    Type_set_generic_method(G.type_LocalVariable,G.generic_method_active_type,C_function0(active_type_LocalVariable));
    Type_set_generic_method(G.type_GlobalVariable,G.generic_method_active_type,C_function0(active_type_GlobalVariable));

    // i386.c
    G.function_i386_mov=C_binary_generator(C_function("i386_mov",generator_module,null,Function_flag_copy, G.type_Int,Arv, G.type_Int,Awv, END),generate_i386_mov);
    G.function_i386_lea=C_binary_generator(C_function("i386_lea",generator_module,null,0, G.type_Int,Ar, G.type_Int,Awv, END),generate_i386_lea);
    G.function_i386_lea->arguments[0].access=Access_read;
    G.function_i386_push=C_binary_generator(C_function("i386_push",generator_module,null,0, G.type_Int,Arv, END),generate_i386_push);
    G.function_i386_pop=C_binary_generator(C_function("i386_pop",generator_module,null,0, G.type_Int,Awv, END),generate_i386_pop);
    G.function_i386_jump=C_binary_generator(C_function("jump anyway",optimizer_module,null,0, END),generate_i386_jump);
    G.function_i386_jump_if=C_binary_generator(C_function("i386_jump_if",generator_module,null,0, G.type_Int,Arv, END),generate_i386_jump_if);
    G.function_i386_return=C_binary_generator(C_function("i386_return",generator_module,null,0, G.type_Int,Arv, END),generate_i386_return);
    G.function_i386_add=C_binary_generator(C_function("i386_add",generator_module,null,0, G.type_Int,Arv, G.type_Int,Arwv, END),generate_i386_add);
    G.function_i386_sub=C_binary_generator(C_function("i386_sub",generator_module,null,0, G.type_Int,Arv, G.type_Int,Arwv, END),generate_i386_sub);
    G.function_i386_cmp=C_binary_generator(C_function("i386_cmp",generator_module,null,0, G.type_Int,Arv, G.type_Int,Arv, END),generate_i386_cmp);
    G.function_i386_imul=C_binary_generator(C_function("i386_imul",generator_module,null,0, G.type_Int,Arv, G.type_Int,Arwv, END),generate_i386_imul);
    C_function("i386_memory",generator_module,i386_memory,0, G.type_Function,Arw, G.type_Int,Arv, G.type_Int,Arv, G.type_Int,Arv, G.type_Int,Arv, G.type_Int,Arv, G.type_Int,Arv, G.type_Int,Arv, END);
    C_function("i386_immediat",generator_module,i386_immediat,0, G.type_Function,Arw, G.type_Int,Arv, G.type_Int,Arv, G.type_Int,Arv, G.type_Int,Arv, G.type_Argument,Ar, END);
    C_function("i386_register",generator_module,i386_register,0, G.type_Function,Arw, G.type_Int,Arv, G.type_Int,Arv, G.type_Int,Arv, G.type_Argument,Ar, END);
    C_function("i386_regmem",generator_module,i386_regmem,0, G.type_Function,Arw, G.type_Int,Arv, G.type_Int,Arv, G.type_Int,Arv, G.type_Argument,Ar, END);

    // arithmetic.c
    G.function_plus_Int=C_function("+",safe_module,plus_Int,0, G.type_Int,Arv, G.type_Int,Arv, G.type_Int,AwvR, END);
    #ifdef _i386_
      Function_set_generate_assembly1(G.function_plus_Int,assembly_plus_Int);
    #endif
    C_function("-",safe_module,minus1_Int,0, G.type_Int,Arv, G.type_Int,AwvR, END);
    G.function_minus_Int=C_function("-",G.safe_module,minus_Int,0, G.type_Int,Arv, G.type_Int,Arv, G.type_Int,AwvR, END);
    #ifdef _i386_
      Function_set_generate_assembly1(G.function_minus_Int,assembly_minus_Int);
    #endif
    G.function_multiply_Int=C_function("*",safe_module,multiply_Int,0, G.type_Int,Arv, G.type_Int,Arv, G.type_Int,AwvR, END);
    #ifdef _i386_
      Function_set_generate_assembly1(G.function_multiply_Int,assembly_multiply_Int);
    #endif
    C_function("\\",safe_module,divide_Int,0, G.type_Int,Arv, G.type_Int,Arv, G.type_Int,AwvR, END);
    C_function("%",safe_module,modulus_Int,0, G.type_Int,Arv, G.type_Int,Arv, G.type_Int,AwvR, END);
    C_function("^",safe_module,power_Int,0, G.type_Int,Arv, G.type_Int,Arv, G.type_Int,AwvR, END);
    C_function(".or.",safe_module,or_Int,0, G.type_Int,Arv, G.type_Int,Arv, G.type_Int,AwvR, END);
    C_function(".and.",safe_module,and_Int,0, G.type_Int,Arv, G.type_Int,Arv, G.type_Int,AwvR, END);
    C_function(".not.",safe_module,not_Int,0, G.type_Int,Arv, G.type_Int,AwvR, END);

    // basics.c
    C_constant("void",safe_module,entry_new(G.type_Void));
    C_constant("null",unsafe_module,G.null_constant);

    G.true_constant=C_constant("true",safe_module,entry(G.type_CBool,true,END));
    G.false_constant=C_constant("false",safe_module,entry(G.type_CBool,false,END));
    C_function("not",safe_module,not_CBool,0, G.type_CBool,Arv, G.type_CBool,AwvR, END);
    C_meta("and",safe_module,and_meta,0);
    C_meta("or",safe_module,or_meta,0);

    C_function("+",safe_module,plus_Str,Function_flag_allow_shared_result, G.type_Str,Ar, G.type_Str,Ar, G.type_Str,AwR, END);
    C_function(". search",safe_module,Str_search,0, G.type_Str,Ar, G.type_Str,Ar, G.type_Int,Arv, G.type_Int,AwvR, END);

    C_meta(":=",safe_module,set_meta,0);
    C_meta(":>",unsafe_module,point_meta,0);
    C_meta("=",safe_module,equal_meta,0);
    C_meta("<>",safe_module,different_meta,0);
    C_meta("<",safe_module,inferior_meta,0);
    C_meta(">",safe_module,superior_meta,0);
    C_meta("<=",safe_module,inferior_or_equal_meta,0);
    C_meta(">=",safe_module,superior_or_equal_meta,0);

    C_function("memory_allocate",unsafe_module,memory_allocate,Function_flag_has_side_effects, G.type_Int,Arv, G.type_Address,Arv, G.type_Address,AwvR, END);
    C_function("memory_zallocate",unsafe_module,memory_zallocate,Function_flag_has_side_effects, G.type_Int,Arv, G.type_Address,Arv, G.type_Address,AwvR, END);
    C_function("memory_resize",unsafe_module,memory_resize,Function_flag_has_side_effects, G.type_Address,Arv , G.type_Int,Arv, G.type_Address,Arv, G.type_Address,AwvR, END);
    C_function("memory_zresize",unsafe_module,memory_zresize,Function_flag_has_side_effects, G.type_Address,Arv , G.type_Int,Arv, G.type_Address,Arv, G.type_Address,AwvR, END);
    C_function("memory_free",unsafe_module,memory_free,Function_flag_has_side_effects, G.type_Address,Arv, END);
    C_function("memory_size",unsafe_module,memory_size,Function_flag_has_side_effects, G.type_Address,Arv, G.type_Int,AwvR, END);
    C_function("memory_checkup",unsafe_module,memory_checkup,Function_flag_has_side_effects, END);
    C_function("memory_shrink",unsafe_module,memory_shrink,Function_flag_has_side_effects, G.type_CBool,Arv, END);
    #ifdef _MARK_OBJECTS_
      C_function("memory_enumerate",unsafe_module,memory_enumerate,Function_flag_has_side_effects, G.type_Address,Arv, END);
    #endif

    G.type_MemoryPool=C_type0("MemoryPool",compiler_module,sizeof(struct MemoryPool),Type_flag_do_not_copy,MemoryPool_build,MemoryPool_destroy,null);
    C_function(". allocate",unsafe_module,MemoryPool_allocate,Function_flag_has_side_effects, G.type_MemoryPool,Arw, G.type_Int,Arv, G.type_Address,Arv, G.type_Address,AwvR, END);
    C_function(". zallocate",unsafe_module,MemoryPool_zallocate,Function_flag_has_side_effects, G.type_MemoryPool,Arw, G.type_Int,Arv, G.type_Address,Arv, G.type_Address,AwvR, END);
    C_function(". resize",unsafe_module,MemoryPool_resize,Function_flag_has_side_effects, G.type_MemoryPool,Arw, G.type_Address,Arv , G.type_Int,Arv, G.type_Address,Arv, G.type_Address,AwvR, END);
    C_function(". zresize",unsafe_module,MemoryPool_zresize,Function_flag_has_side_effects, G.type_MemoryPool,Arw, G.type_Address,Arv , G.type_Int,Arv, G.type_Address,Arv, G.type_Address,AwvR, END);
    C_function(". free",unsafe_module,MemoryPool_free,Function_flag_has_side_effects, G.type_MemoryPool,Arw, G.type_Address,Arv, END);
    C_function(". checkup",unsafe_module,MemoryPool_checkup,Function_flag_has_side_effects, G.type_MemoryPool,Arw, END);
    C_function(". shrink",unsafe_module,MemoryPool_shrink,Function_flag_has_side_effects, G.type_MemoryPool,Arw, G.type_CBool,Arv, END);
    #ifdef _MARK_OBJECTS_
      C_function(". enumerate",unsafe_module,MemoryPool_enumerate,Function_flag_has_side_effects, G.type_MemoryPool,Arw, G.type_Address,Arv, END);
    #endif
    C_map("memory_default_pool",unsafe_module,entry(pointerto(G.type_MemoryPool),&G.memory_pool,END),Arw);

    C_map("memory_current_consumed",unsafe_module,entry(pointerto(G.type_Int),&G.memory_current_consumed,END),Ar);
    C_map("memory_current_used",unsafe_module,entry(pointerto(G.type_Int),&G.memory_current_used,END),Ar);
    C_map("memory_maximum_consumed",unsafe_module,entry(pointerto(G.type_Int),&G.memory_maximum_consumed,END),Ar);
    C_map("memory_base_address",context_module,entry(pointerto(G.type_Address),&G.memory_base_address,END),Arw);
    C_map("memory_limit_address",context_module,entry(pointerto(G.type_Address),&G.memory_limit_address,END),Arw);
    C_map("memory_decommit_threshold",context_module,entry(pointerto(G.type_Int),&G.memory_decommit_threshold,END),Arw);

    C_constant("memory_page_size",unsafe_module,entry(G.type_Int,memory_page_size,END));
    C_function("memory_page_reserve",unsafe_module,memory_page_reserve,Function_flag_has_side_effects, G.type_Address,Arv, G.type_Int,Arv, G.type_Address,AwvR, END);
    C_function("memory_page_commit",unsafe_module,memory_page_commit,Function_flag_has_side_effects, G.type_Address,Arv, G.type_Int,Arv, END);
    C_function("memory_page_decommit",unsafe_module,memory_page_decommit,Function_flag_has_side_effects, G.type_Address,Arv, G.type_Int,Arv, END);
    C_function("memory_page_release",unsafe_module,memory_page_release,Function_flag_has_side_effects, G.type_Address,Arv, G.type_Int,Arv, END);

    C_function("memory_clear",unsafe_module,memory_clear,Function_flag_has_side_effects, G.type_Address,Arv, G.type_Int,Arv, END);
    C_function("memory_random",unsafe_module,memory_random,Function_flag_has_side_effects, G.type_Address,Arv, G.type_Int,Arv, END);
    C_function("memory_copy",unsafe_module,memory_copy,Function_flag_has_side_effects, G.type_Address,Arv, G.type_Address,Arv, G.type_Int,Arv, END);
    C_function("memory_move",unsafe_module,memory_move,Function_flag_has_side_effects, G.type_Address,Arv, G.type_Address,Arv, G.type_Int,Arv, END);
    C_function("memory_compare",unsafe_module,memory_compare,Function_flag_has_side_effects, G.type_Address,Arv, G.type_Int,Arv, G.type_Address,Arv, G.type_Int,Arv, G.type_Int,AwvR, END);
    C_function("memory_different",unsafe_module,memory_different,Function_flag_has_side_effects, G.type_Address,Arv, G.type_Int,Arv, G.type_Address,Arv, G.type_Int,Arv, G.type_CBool,AwvR, END);
    C_function("memory_search",unsafe_module,memory_search,Function_flag_has_side_effects, G.type_Address,Arv, G.type_Int,Arv, G.type_Address,Arv, G.type_Int,Arv, G.type_Address,AwvR, END);

    C_function("action_push_record",unsafe_module,action_push_record,Function_flag_has_side_effects, G.type_ActionRecord,Aw, G.type_Str,Ar, END);
    C_function("action_pull_record",unsafe_module,action_pull_record,Function_flag_has_side_effects, G.type_ActionRecord,Arw, END);
    C_function("action_top_record",unsafe_module,action_top_record,Function_flag_has_side_effects, G.type_ActionRecord,AwmRW, END);

    C_function("error_notify_fatal",unsafe_module,error_notify_fatal,Function_flag_has_side_effects, G.type_ErrorID,Arv, G.type_Str,Ar, END);
    C_function("error_notify",unsafe_module,error_notify,Function_flag_has_side_effects|Function_flag_may_generate_error, G.type_ErrorID,Arv, G.type_Address,Arv, G.type_Str,Ar, END);
    C_function("error_renotify",unsafe_module,error_renotify,Function_flag_has_side_effects|Function_flag_may_generate_error, G.type_ErrorID,Arv, G.type_Address,Arv, G.type_Str,Ar, END);
    C_function("error_push_record",unsafe_module,error_push_record,Function_flag_has_side_effects, G.type_ErrorRecord,Aw, G.type_ErrorID,Arv, END);
    C_function("error_pull_record",unsafe_module,error_pull_record,Function_flag_has_side_effects, G.type_ErrorRecord,Arw, END);
    C_function("error_top_record",unsafe_module,error_top_record,Function_flag_has_side_effects, G.type_ErrorRecord,AwmRW, END);
    C_function("error_notified",safe_module,error_notified,Function_flag_has_side_effects, G.type_CBool,AwvR, END);
    C_function("error_propagate",unsafe_module,error_propagate,0, G.type_ErrorRecord,Ar, G.type_ErrorRecord,Arw, END);
    C_function("error_report",unsafe_module,error_report,Function_flag_has_side_effects, END);
    C_function("error_allocate_id",unsafe_module,error_allocate_id,Function_flag_has_side_effects, G.type_ErrorID,AwvR, END);

    C_function("console",safe_module,console,Function_flag_has_side_effects, G.type_Str,Ar, END);
    C_function("console_dump",hooks_module,console_dump,Function_flag_has_side_effects, G.type_Str,Ar, END);
    C_map("pliant_general_dictionary",compiler_module,G.general_dictionary,Arw);
    C_map("pliant_module_dictionary",compiler_module,G.module_dictionary,Arw);

    G.function_build_universal=C_function("build Universal",compiler_module,Type_build_instance,0, G.type_Type,Ar, G.type_Universal,Aw, END);
    G.function_destroy_universal=C_function("destroy Universal",compiler_module,Type_destroy_instance,0, G.type_Type,Ar, G.type_Universal,Aw, END);
    G.function_copy_universal=C_function("copy Universal",compiler_module,copy_universal,Function_flag_copy, G.type_Universal,Ar, G.type_Universal,Aw, G.type_Type,Ar, END);
    G.function_copy_atomic=C_function("copy atomic",compiler_module,null,Function_flag_copy, G.type_Int,Ar, G.type_Int,Aw, END);
    Function_set_generate_assembly1(G.function_copy_atomic,generate_copy_atomic);
    G.function_copy_scalar=C_function("copy scalar",compiler_module,memory_copy,Function_flag_copy, G.type_Universal,Ar, G.type_Universal,Aw, G.type_Int,Arv, END);
    G.function_compare_apply_mode=C_function("compare apply mode",compiler_module,compare_apply_mode,0, G.type_Int,Arv, G.type_Int,Arv, G.type_CBool,AwvR ,END);
    G.function_address_universal=C_function("address Universal",compiler_module,address_universal,0, G.type_Universal,Ar, G.type_Address,AwvC, END);
    #ifdef _i386_
      Function_set_generate_assembly1(G.function_address_universal,generate_address_universal);
    #endif
    G.function_arrow_universal=C_function("arrow Universal",compiler_module,arrow_universal,0, G.type_Universal,Ar, G.type_Arrow,AwC, END);

    // methods.c

    C_field(G.type_Str,"characters",unsafe_module,G.type_Address,field_offset(struct Str,chars),AwmR); /// section "string characters"
    C_function("",safe_module,Str_substring,0, G.type_Str,Ar, G.type_Int,Arv, G.type_Int,Arv, G.type_Str,AwR, END)->arguments[3].maps=1;
    C_function(". len",safe_module,Str_len,0, G.type_Str,Ar, G.type_Int,AwvR, END);
    C_function(". set",unsafe_module,Str_set,0, G.type_Str,Arw, G.type_Address,Arv, G.type_Int,Arv, G.type_CBool,Arv, END);
    C_function(". resize",unsafe_module,Str_resize,0, G.type_Str,Arw, G.type_Int,Arv, END);
    C_function("convert to string",safe_module,convert_to_string,0, G.type_Int,Arv, G.type_Str,AwR, END);

    C_function("position",compiler_module,ListingPosition_set,0, G.type_Module,Ar, G.type_Int,Arv, G.type_Int,Arv, G.type_ListingPosition,AwR, END);
    C_function("cast Str",compiler_module,ListingPosition_get,Function_flag_extension, G.type_ListingPosition,Ar, G.type_Str,AwR, END);
    C_function(". line",compiler_module,ListingPosition_line,0,G.type_ListingPosition,Ar, G.type_Int, AwvR, END);
    C_function(". column",compiler_module,ListingPosition_column,0,G.type_ListingPosition,Ar, G.type_Int, AwvR, END);

    C_function("cast ListingPositions",compiler_module,cast_ListingPositions,Function_flag_extension, G.type_ListingPosition,Ar, G.type_ListingPositions,AwR, END);
    C_function("+",compiler_module,ListingPositions_concat,0, G.type_ListingPositions,Ar,  G.type_ListingPositions,Ar, G.type_ListingPositions,AwR, END);
    C_function("cast Str",compiler_module,ListingPositions_get,Function_flag_extension, G.type_ListingPositions,Ar, G.type_Str,AwR, END);

    C_function(". first",unsafe_module,List_first,0, G.type_List,Ar, G.type_Arrow,AwmC, END);
    C_function(". last",unsafe_module,List_last,0, G.type_List,Ar, G.type_Arrow,AwmC, END);
    C_function(". next",unsafe_module,List_next2,0, G.type_List,Ar, G.type_Arrow,Ar, G.type_Arrow,AwmC, END);
    C_function(". previous",unsafe_module,List_previous2,0, G.type_List,Ar, G.type_Arrow,Ar, G.type_Arrow,AwmC, END);
    C_function(". append",unsafe_module,List_append,0, G.type_List,Arw, G.type_Address,Arv, G.type_Arrow,AwmRW, END);
    C_function(". insert_before",unsafe_module,List_insert_before,0, G.type_List,Arw, G.type_Arrow,Ar, G.type_Address,Arv, G.type_Arrow,AwmRW, END);
    C_function(". insert_after",unsafe_module,List_insert_after,0, G.type_List,Arw, G.type_Arrow,Ar, G.type_Address,Arv, G.type_Arrow,AwmRW, END);
    C_function(". remove",unsafe_module,List_remove,0, G.type_List,Arw, G.type_Arrow,Ar, G.type_Arrow,AwmC, END);

    C_field(G.type_Array,"size",safe_module,G.type_Int,field_offset(struct Array,nb),AwmR);
    C_function(". size :=",safe_module,Array_resize,0, G.type_Array,Arw, G.type_Int,Arv, END);
    C_function("",safe_module,Array_index,0, G.type_Array,Ar, G.type_Int,Arv, G.type_Arrow,AwmC, END);

    C_field(G.type_Dictionary,"hashsize",unsafe_module,G.type_Int,field_offset(struct Dictionary,hashsize),AwmR);
    C_function(". count",unsafe_module,Dictionary_count,0, G.type_Dictionary,Ar, G.type_Int,AwvR, END);
    C_function(". insert",unsafe_module,Dictionary_insert,0, G.type_Dictionary,Arw, G.type_Str,Ar, G.type_CBool,Arv, G.type_Address,Arv, END);
    C_function(". insert2",compiler_module,Dictionary_insert2,0, G.type_Dictionary,Arw, G.type_Str,Ar, G.type_CBool,Arv, G.type_Address,Arv, G.type_Module,Ar, END);
    C_function(". remove",unsafe_module,Dictionary_remove,0, G.type_Dictionary,Arw, G.type_Str,Ar, G.type_Address,Arv, END);
    C_function(". first",safe_module,Dictionary_first,0, G.type_Dictionary,Ar, G.type_Str,Ar, G.type_Arrow,AwmC, END);
    C_function(". next",unsafe_module,Dictionary_next,0, G.type_Dictionary,Ar, G.type_Str,Ar, G.type_Arrow,Ar, G.type_Arrow,AwmC, END);
    C_function(". hashsize :=",unsafe_module,Dictionary_resize,0, G.type_Dictionary,Arw, G.type_Int,Arv, END);
    C_function(". freeze",unsafe_module,Dictionary_freeze,0, G.type_Dictionary,Arw, END);

    C_field(G.type_Relation,"hashsize",safe_module,G.type_Int,field_offset(struct Relation,hashsize),AwmC);
    C_field(G.type_Relation,"count",safe_module,G.type_Int,field_offset(struct Relation,count),AwmC);
    C_function(". flags :=",unsafe_module,Relation_set_flags,0, G.type_Relation,Arw, G.type_Int,Arv, END);
    C_function(". flags",unsafe_module,Relation_get_flags,0, G.type_Relation,Ar, G.type_Int,AwvR, END);
    C_function(". define",unsafe_module,Relation_define,0, G.type_Relation,Arw, G.type_Address,Arv, G.type_Address,Arv, G.type_Address,Arv, G.type_Address,AwvR, END);
    C_function(". query",safe_module,Relation_query,0, G.type_Relation,Ar, G.type_Address,Arv, G.type_Address,Arv, G.type_Address,AwvC, END);
    C_function(". hashsize :=",unsafe_module,Relation_resize,0, G.type_Relation,Arw, G.type_Int,Arv, END);

    C_field(G.type_Module,"flags",compiler_module,G.type_Int,field_offset(struct Module,flags),AwmC);
    C_field(G.type_Module,"visibles",compiler_module,G.type_Relation,field_offset(struct Module,visibles),AwmC);
    C_field(G.type_Module,"submodules",compiler_module,G.type_List,field_offset(struct Module,submodules),AwmC);
    C_field(G.type_Module,"external",compiler_module,pointerto(G.type_Module),field_offset(struct Module,external),AwmC);
    C_field(G.type_Module,"name",compiler_module,linkto(G.type_Str),field_offset(struct Module,name),AwmC);
    C_field(G.type_Module,"properties",compiler_module,G.type_Dictionary,field_offset(struct Module,properties),AwmC);
    C_field(G.type_Module,"parent",compiler_module,pointerto(G.type_Module),field_offset(struct Module,parent),AwmC);
    C_field(G.type_Module,"scope",compiler_module,G.type_List,field_offset(struct Module,scope),AwmC);
    C_function(". define",compiler_module,Module_define,0, G.type_Module,Arw, G.type_Str,Ar, G.type_Address,Arv, END);
    G.function_module_add_scope=C_function(". add_scope",unused_module,Module_add_scope,0, G.type_Module,Arw, G.type_Str,Ar, END);
    G.function_module_set_ring=C_function(". set_ring",unused_module,Module_set_ring,0, G.type_Module,Arw, END);
    C_function(". mark",compiler_module,Module_mark,0, G.type_Module,Ar, G.type_Address,AwvR, END);
    C_function(". rewind",compiler_module,Module_rewind,0, G.type_Module,Arw, G.type_Address,Arv, END);
    C_function(". actual",compiler_module,Module_actual,0, G.type_Module,Ar, G.type_Module,AwmC, END);
    C_function(". include",compiler_module,Module_include,0, G.type_Module,Arw, G.type_Module,Ar, G.type_Int,Arv, END);
    C_function(". is_included",compiler_module,Module_is_included,0, G.type_Module,Ar, G.type_Module,Ar, G.type_CBool,AwvR, END);
    C_function(". first",compiler_module,Module_first,0, G.type_Module,Ar, G.type_Str,Ar, G.type_Arrow,AwmC, END);
    C_function(". next",compiler_module,Module_next,0, G.type_Module,Ar, G.type_Str,Ar, G.type_Arrow,Ar, G.type_Arrow,AwmC, END);

    C_field(G.type_Argument,"type",compiler_module,linkto(G.type_Type),field_offset(struct Argument,type),AwmC);
    C_field(G.type_Argument,"where",compiler_module,G.type_Int,field_offset(struct Argument,where),AwmR);
    C_field(G.type_Argument,"name",compiler_module,G.type_Str,field_offset(struct Argument,name),AwmC);
    C_field(G.type_Argument,"properties",compiler_module,G.type_Dictionary,field_offset(struct Argument,properties),AwmC);
    C_field(G.type_Argument,"requires",compiler_module,G.type_List,field_offset(struct Argument,requires),AwmC);
    C_field(G.type_Argument,"first_instruction",compiler_module,pointerto(G.type_Instruction),field_offset(struct Argument,first_instruction),AwmC);
    C_field(G.type_Argument,"last_instruction",compiler_module,pointerto(G.type_Instruction),field_offset(struct Argument,last_instruction),AwmC);
    C_field(G.type_Argument,"user_field",compiler_module,G.type_Address,field_offset(struct Argument,user_field),AwmC);
    C_function(". is_shared_with",compiler_module,Argument_is_shared,0, G.type_Argument,Ar, G.type_Argument,Ar, G.type_CBool,AwvR, END);
    C_function(". locate",compiler_module,Argument_locate,0, G.type_Argument,Arw, G.type_Type,Ar, G.type_Int,Arv, END);
    C_function(". constant",compiler_module,Argument_constant_field,0, G.type_Argument,Ar, G.type_Arrow,AwmC, END);
    C_function(". register",compiler_module,Argument_register_field,0, G.type_Argument,Ar, G.type_Int,AwmC, END);
    C_function(". pointer",compiler_module,Argument_pointer_field,0, G.type_Argument,Ar, linkto(G.type_Argument),AwmC, END);
    C_function(". offset",compiler_module,Argument_offset_field,0, G.type_Argument,Ar, G.type_Int,AwmC, END);
    C_function(". possible_registers",compiler_module,Argument_possible_registers_field,0, G.type_Argument,Ar, G.type_Int,AwmC, END);

    C_function(". is_byvalue",compiler_module,argument_is_byvalue,0, G.type_Argument,Ar, G.type_CBool,AwvR, END);
    C_function(". is_mapped",compiler_module,argument_is_mapped,0, G.type_Argument,Ar, G.type_CBool,AwvR, END);
    C_function(". is_simple",compiler_module,argument_is_simple,0, G.type_Argument,Ar, G.type_CBool,AwvR, END);

    C_field(G.type_Instruction,"function",compiler_module,linkto(G.type_Function),field_offset(struct Instruction,function),AwmC);
    C_field(G.type_Instruction,"arguments",compiler_module,G.type_Array,field_offset(struct Instruction,arguments),AwmC);
    C_field(G.type_Instruction,"jump",compiler_module,pointerto(G.type_Instruction),field_offset(struct Instruction,jump),AwmC);
    C_field(G.type_Instruction,"nested_with",compiler_module,pointerto(G.type_Instruction),field_offset(struct Instruction,nested_with),AwmC);
    C_field(G.type_Instruction,"next_instruction",compiler_module,linkto(G.type_Instruction),field_offset(struct Instruction,next_instruction),AwmC);
    C_field(G.type_Instruction,"previous_instruction",compiler_module,pointerto(G.type_Instruction),field_offset(struct Instruction,previous_instruction),AwmC);
    C_field(G.type_Instruction,"position",compiler_module,G.type_ListingPositions,field_offset(struct Instruction,position),AwmC);
    C_field(G.type_Instruction,"properties",compiler_module,G.type_Dictionary,field_offset(struct Instruction,properties),AwmC);
    C_field(G.type_Instruction,"section",compiler_module,G.type_Int,field_offset(struct Instruction,section),AwmC);
    C_field(G.type_Instruction,"order",compiler_module,G.type_Int,field_offset(struct Instruction,order),AwmC);
    C_field(G.type_Instruction,"stackdelta",compiler_module,G.type_Int,field_offset(struct Instruction,stackdelta),AwmC);
    C_field(G.type_Instruction,"backward_jumps",compiler_module,G.type_List,field_offset(struct Instruction,backward_jumps),AwmC);
    C_field(G.type_Instruction,"user_field",compiler_module,G.type_Address,field_offset(struct Instruction,user_field),AwmC);

    C_field(G.type_GeneratorContext,"first_instruction",compiler_module,linkto(G.type_Instruction),field_offset(struct GeneratorContext,first_instruction),AwmC);
    C_field(G.type_GeneratorContext,"last_instruction",compiler_module,pointerto(G.type_Instruction),field_offset(struct GeneratorContext,last_instruction),AwmC);
    C_field(G.type_GeneratorContext,"arguments",compiler_module,G.type_List,field_offset(struct GeneratorContext,arguments),AwmR);
    C_field(G.type_GeneratorContext,"locals",compiler_module,G.type_Dictionary,field_offset(struct GeneratorContext,locals),AwmC);
    C_function(". section",compiler_module,GeneratorContext_section,0, G.type_GeneratorContext,Ar, G.type_Int,Arv, G.type_Instruction,AwmC, END);
    C_function(". register",compiler_module,GeneratorContext_register,0, G.type_GeneratorContext,Ar, G.type_Int,Arv, G.type_Argument,AwmC, END);
    C_field(G.type_GeneratorContext,"function",compiler_module,linkto(G.type_Function),field_offset(struct GeneratorContext,function),AwmC);
    C_field(G.type_GeneratorContext,"module",compiler_module,linkto(G.type_Module),field_offset(struct GeneratorContext,module),AwmC);
    C_function(". setup",compiler_module,GeneratorContext_setup,0, G.type_GeneratorContext,Arw, G.type_Expression,Arw, G.type_Function,Arw, END);
    C_function(". insert_at_section_top",compiler_module,GeneratorContext_insert_at_section_top,0, G.type_GeneratorContext,Arw, G.type_Int,Arv, G.type_Instruction,Arw, G.type_Instruction,AwmRW, END);
    C_function(". insert_at_section_bottom",compiler_module,GeneratorContext_insert_at_section_bottom,0, G.type_GeneratorContext,Arw, G.type_Int,Arv, G.type_Instruction,Arw, G.type_Instruction,AwmRW, END);
    C_function(". insert_before_instruction",compiler_module,GeneratorContext_insert_before_instruction,0, G.type_GeneratorContext,Arw, G.type_Instruction,Ar, G.type_Instruction,Arw, G.type_Instruction,AwmRW, END);
    C_function(". insert_after_instruction",compiler_module,GeneratorContext_insert_after_instruction,0, G.type_GeneratorContext,Arw, G.type_Instruction,Ar, G.type_Instruction,Arw, G.type_Instruction,AwmRW, END);
    C_function(". remove",compiler_module,GeneratorContext_remove,0, G.type_GeneratorContext,Arw, G.type_Instruction,Arw, G.type_Instruction,AwmRW, END);
    C_function(". suckup",compiler_module,GeneratorContext_suckup,0, G.type_GeneratorContext,Arw, G.type_Argument,Arw, G.type_Argument,Arw, END);
    C_function(". rebuild",compiler_module,GeneratorContext_rebuild,0, G.type_GeneratorContext,Arw, END);
    C_function(". optimize",compiler_module,GeneratorContext_optimize,Function_flag_may_generate_error, G.type_GeneratorContext,Arw, END);

    C_function(". share_begin",compiler_module,share_begin,0, G.type_GeneratorContext,Arw, END);
    C_function(". share_end",compiler_module,share_end,0, G.type_GeneratorContext,Arw, END);
    C_function(". share_clash",compiler_module,share_clash,0, G.type_GeneratorContext,Arw, G.type_Argument,Ar, G.type_Argument,Ar, G.type_CBool,AwvR, END);
    C_function(". share_try",compiler_module,share_try,0, G.type_GeneratorContext,Arw, G.type_Argument,Arw, G.type_Argument,Arw, G.type_CBool,Arv, G.type_CBool,Arv, G.type_CBool,Arv, G.type_CBool,AwvR, END);
    C_function(". share_try",compiler_module,share_try2,0, G.type_GeneratorContext,Arw, G.type_Argument,Arw, G.type_Argument,Arw, G.type_CBool,AwvR, END);

    C_field(G.type_FunctionPrototype,"type",compiler_module,pointerto(G.type_Type),field_offset(struct FunctionPrototype,type),AwmC);
    C_field(G.type_FunctionPrototype,"access",compiler_module,G.type_Int,field_offset(struct FunctionPrototype,access),AwmC);
    C_field(G.type_FunctionPrototype,"register",compiler_module,G.type_Int,field_offset(struct FunctionPrototype,cpu_register),AwmC);
    C_field(G.type_FunctionPrototype,"maps",compiler_module,G.type_Int,field_offset(struct FunctionPrototype,maps),AwmC);
    C_field(G.type_FunctionPrototype,"name",compiler_module,G.type_Str,field_offset(struct FunctionPrototype,name),AwmC);
    C_field(G.type_FunctionPrototype,"properties",compiler_module,G.type_Dictionary,field_offset(struct FunctionPrototype,properties),AwmC);
    C_field(G.type_FunctionPrototype,"inline_argument",compiler_module,linkto(G.type_Argument),field_offset(struct FunctionPrototype,inline_argument),AwmC);

    C_field(G.type_Function,"executable",compiler_module,G.type_Address,field_offset(struct Function,exe),AwmC); // ->flags|=Function_flag_has_side_effects;
    C_field(G.type_Function,"executable_size",compiler_module,G.type_Int,field_offset(struct Function,exe_size),AwmC);
    C_function(". define_argument",compiler_module,Function_define_argument_prototype,0, G.type_Function,Arw, G.type_Type,Ar, G.type_Int,Arv, G.type_Str,Ar, G.type_Address,Arv, END);
    C_function(". terminate_arguments",compiler_module,Function_terminate_arguments_prototypes,0, G.type_Function,Arw, G.type_Int,Arv, END);
    C_function(". arg",compiler_module,Function_map_argument_prototype,0, G.type_Function,Ar, G.type_Int,Arv, G.type_FunctionPrototype,AwmC, END);
    C_field(G.type_Function,"nb_args",compiler_module,G.type_Int,field_offset(struct Function,nb_arg),AwmR);
    C_field(G.type_Function,"nb_args_with_result",compiler_module,G.type_Int,field_offset(struct Function,nb_argres),AwmR);
    C_field(G.type_Function,"flags",compiler_module,G.type_Int,field_offset(struct Function,flags),AwmC);
    C_field(G.type_Function,"definition",compiler_module,G.type_Int,field_offset(struct Function,definition),AwmC);
    C_field(G.type_Function,"modify_registers",compiler_module,G.type_Int,field_offset(struct Function,modify_registers),AwmC);
    C_field(G.type_Function,"stack_grow",compiler_module,G.type_Int,field_offset(struct Function,stack_grow),AwmC);
    C_field(G.type_Function,"generic_index",compiler_module,G.type_Int,field_offset(struct Function,generic_index),AwmC);
    C_field(G.type_Function,"name",compiler_module,G.type_Str,field_offset(struct Function,name),AwmC);
    C_field(G.type_Function,"position",compiler_module,G.type_ListingPosition,field_offset(struct Function,position),AwmC);
    C_field(G.type_Function,"properties",compiler_module,G.type_Dictionary,field_offset(struct Function,properties),AwmC);
    C_field(G.type_Function,"extra_module",compiler_module,linkto(G.type_Module),field_offset(struct Function,extra_module),AwmC);
    C_field(G.type_Function,"inline_instructions",compiler_module,G.type_List,field_offset(struct Function,inline_instructions),AwmC);
    C_field(G.type_Function,"generate_assembly",compiler_module,linkto(G.type_Function),field_offset(struct Function,generate_assembly),AwmR);
    C_function(". set_generate_assembly",compiler_module,Function_set_generate_assembly,0, G.type_Function,Arw, G.type_Function,Ar, END);
    C_field(G.type_Function,"generate_binary",compiler_module,linkto(G.type_Function),field_offset(struct Function,generate_binary),AwmR);
    C_function(". set_generate_binary",compiler_module,Function_set_generate_binary,0, G.type_Function,Arw, G.type_Function,Ar, END);
    C_field(G.type_Function,"externals",compiler_module,G.type_Arrow,field_offset(struct Function,externals),AwmC);
    C_field(G.type_Function,"next_function",compiler_module,pointerto(G.type_Function),field_offset(struct Function,next_function),AwmC);
    C_field(G.type_Function,"previous_function",compiler_module,pointerto(G.type_Function),field_offset(struct Function,previous_function),AwmC);
    C_function(". code_immediat",compiler_module,Function_code_immediat,0, G.type_Function,Arw, G.type_Int,Arv, G.type_Int,Arv ,END);
    C_function(". code_jump",compiler_module,Function_code_jump_instruction,0, G.type_Function,Arw, G.type_Instruction,Ar, END);
    C_function(". code_jump",compiler_module,Function_code_jump_function,0, G.type_Function,Arw, G.type_Function,Ar, END);
    C_function(". record_external",compiler_module,Function_record_external,0, G.type_Function,Arw, G.type_Address,Arv, G.type_CBool,Arv ,END);
    C_field(G.type_Function,"profiler_counter",compiler_module,G.type_Int,field_offset(struct Function,profiler_counter),AwmC);

    C_field(G.type_Expression,"value",compiler_module,G.type_Arrow,field_offset(struct Expression,value),AwmC);
    C_field(G.type_Expression,"arguments",compiler_module,G.type_Array,field_offset(struct Expression,arguments),AwmC);
    C_field(G.type_Expression,"module",compiler_module,linkto(G.type_Module),field_offset(struct Expression,module),AwmC);
    C_field(G.type_Expression,"position",compiler_module,G.type_ListingPosition,field_offset(struct Expression,position),AwmC);
    C_field(G.type_Expression,"properties",compiler_module,G.type_Dictionary,field_offset(struct Expression,properties),AwmC);
    C_field(G.type_Expression,"instructions",compiler_module,G.type_List,field_offset(struct Expression,instructions),AwmC);
    C_field(G.type_Expression,"result",compiler_module,linkto(G.type_Argument),field_offset(struct Expression,result),AwmC);
    C_field(G.type_Expression,"backtracking",compiler_module,G.type_List,field_offset(struct Expression,backtracking),AwmC);
    C_field(G.type_Expression,"access",compiler_module,G.type_Int,field_offset(struct Expression,access),AwmC);
    C_field(G.type_Expression,"last_uncasted_instruction",compiler_module,linkto(G.type_Instruction),field_offset(struct Expression,last_uncasted_instruction),AwmC);
    C_field(G.type_Expression,"uncasted_result",compiler_module,linkto(G.type_Argument),field_offset(struct Expression,uncasted_result),AwmC);
    C_field(G.type_Expression,"uncasted_access",compiler_module,G.type_Int,field_offset(struct Expression,uncasted_access),AwmC);
    C_field(G.type_Expression,"cast_level",compiler_module,G.type_Int,field_offset(struct Expression,cast_level),AwmC);
    C_field(G.type_Expression,"cast_flags",compiler_module,G.type_Int,field_offset(struct Expression,cast_flags),AwmC);
    C_field(G.type_Expression,"operator",compiler_module,linkto(G.type_ParserOperator),field_offset(struct Expression,op),AwmC);
    C_field(G.type_Expression,"selected_definition",compiler_module,G.type_Arrow,field_offset(struct Expression,op),AwmC);
    C_field(G.type_Expression,"close_operator_name",compiler_module,linkto(G.type_Str),field_offset(struct Expression,closeop),AwmC);
    C_field(G.type_Expression,"error_message",compiler_module,G.type_Str,field_offset(struct Expression,error_message),AwmC);
    C_function(". add",compiler_module,Expression_add,0, G.type_Expression,Arw, G.type_Instruction,Ar, END);
    C_function(". set_void_result",compiler_module,Expression_set_void_result,0, G.type_Expression,Arw, END);
    C_function(". set_constant_result",compiler_module,Expression_set_constant_result,0, G.type_Expression,Arw, G.type_Address,Arv, END);
    C_function(". set_result",compiler_module,Expression_set_result,0, G.type_Expression,Arw, G.type_Argument,Ar, G.type_Int,Arv, END);
    C_function(". suckup",compiler_module,Expression_suckup,0, G.type_Expression,Arw, G.type_Expression,Ar, END);
    C_function(". suckup_error",compiler_module,Expression_suckup_error,0, G.type_Expression,Arw, G.type_Expression,Ar, END);
    C_function(". precompile_rewrite",compiler_module,Expression_precompile_rewrite,Function_flag_may_generate_error, G.type_Expression,Arw, END);
    C_function(". postcompile_rewrite",compiler_module,Expression_postcompile_rewrite,Function_flag_may_generate_error, G.type_Expression,Arw, END);
    C_function(". is_compiled",compiler_module,Expression_is_compiled,0, G.type_Expression,Ar, G.type_CBool,AwvR, END);
    C_function(". compile",compiler_module,Expression_compile,Function_flag_external|Function_flag_may_generate_error, G.type_Expression,Arw, END);
    C_function(". uncompile",compiler_module,Expression_uncompile,0, G.type_Expression,Arw, END);
    C_function(". define",compiler_module,Expression_define,0, G.type_Expression,Arw, G.type_Str,Ar, G.type_Address,Arv, G.type_Module,Arw, END);
    C_function(". backtrack",compiler_module,Expression_backtrack,0, G.type_Expression,Arw, END);
    C_function(". cut_backtracking",compiler_module,Expression_cut_backtracking,0, G.type_Expression,Arw, END);
    C_function(". cast",compiler_module,Expression_cast,Function_flag_may_generate_error, G.type_Expression,Arw, G.type_Type,Ar, G.type_CBool,AwvR, END);
    C_function(". cast",compiler_module,Expression_cast2,Function_flag_may_generate_error, G.type_Expression,Arw, G.type_Type,Ar, G.type_Int,Arv, G.type_CBool,AwvR, END);
    C_function(". cast",compiler_module,Expression_cast3,Function_flag_may_generate_error, G.type_Expression,Arw, G.type_Argument,Arw, G.type_Int,Arv, G.type_Type,Ar, G.type_Int,Arv, G.type_Argument,AwmRW, END);
    C_function(". uncast",compiler_module,Expression_uncast,0, G.type_Expression,Arw, END);
    C_function(". constant",compiler_module,Expression_constant,Function_flag_may_generate_error, G.type_Expression,Arw, G.type_Type,Ar, G.type_Address,AwvRW, END);
    C_function(". constant",compiler_module,Expression_constant2,Function_flag_may_generate_error, G.type_Expression,Arw, G.type_Type,Ar, G.type_Int,Arv, G.type_Address,AwvRW, END);
    C_function(". execute",compiler_module,Expression_execute,Function_flag_external|Function_flag_may_generate_error, G.type_Expression,Arw, END);
    C_function(". evaluate",compiler_module,Expression_evaluate,Function_flag_external|Function_flag_may_generate_error, G.type_Expression,Arw, G.type_Address,AwvRW, END);
    C_function(". evaluate",compiler_module,Expression_evaluate2,Function_flag_may_generate_error, G.type_Expression,Arw, G.type_Type,Ar, G.type_Int,Arv, G.type_Address,AwvRW, END);
    C_function(". compile_step2",compiler_module,Expression_compile_step2,Function_flag_may_generate_error, G.type_Expression,Arw, END);
    C_function(". compile_step3",compiler_module,Expression_compile_step3,Function_flag_may_generate_error, G.type_Expression,Arw, END);
    C_function(". compile_step4",compiler_module,Expression_compile_step4,Function_flag_may_generate_error, G.type_Expression,Arw, G.type_Address,Arv, G.type_Int,Arv, END);
    C_function(". local_variable",compiler_module,local_variable1,Function_flag_has_side_effects|Function_flag_may_generate_error, G.type_Expression,Arw, G.type_Str,Ar, G.type_Type,Ar, G.type_Argument,AwmR, END);
    C_function(". local_variable",compiler_module,local_variable2,Function_flag_has_side_effects|Function_flag_may_generate_error, G.type_Expression,Arw, G.type_Expression,Arw, G.type_Type,Ar, G.type_Argument,AwmR, END);
    C_function("copy_properties", compiler_module,Expression_copy_properties,0,G.type_Expression,Ar,G.type_Expression,Arw,END);

    C_field(G.type_Type,"flags",compiler_module,G.type_Int,field_offset(struct Type,flags),AwmC);
    C_field(G.type_Type,"size",compiler_module,G.type_Int,field_offset(struct Type,size),AwmC);
    C_function(". field",compiler_module,Type_map_field,0, G.type_Type,Ar, G.type_Int,Arv, G.type_TypeField,AwmC ,END);
    C_field(G.type_Type,"nb_fields",compiler_module,G.type_Int,field_offset(struct Type,nb_field),AwmR);
    C_field(G.type_Type,"name",compiler_module,G.type_Str,field_offset(struct Type,name),AwmC);
    C_field(G.type_Type,"position",compiler_module,G.type_ListingPosition,field_offset(struct Type,position),AwmC);
    C_field(G.type_Type,"properties",compiler_module,G.type_Dictionary,field_offset(struct Type,properties),AwmC);
    C_field(G.type_Type,"generic_level",compiler_module,G.type_Int,field_offset(struct Type,generic_level),AwmC);
    C_field(G.type_Type,"maybe",compiler_module,G.type_List,field_offset(struct Type,maybe),AwmC);
    C_function(". define_field",compiler_module,Type_define_field,Function_flag_has_side_effects, G.type_Type,Arw, G.type_Type,Ar, G.type_Str,Ar, G.type_Address,Arv, END);
    C_function(". terminate_fields",compiler_module,Type_terminate_fields,Function_flag_has_side_effects, G.type_Type,Arw, END);
    C_function(". build_instance",compiler_module,Type_build_instance,0|Function_flag_has_side_effects, G.type_Type,Ar, G.type_Address,Arv, END);
    C_function(". destroy_instance",compiler_module,Type_destroy_instance,0|Function_flag_has_side_effects, G.type_Type,Ar, G.type_Address,Arv, END);
    C_function(". copy_instance",compiler_module,Type_copy_instance,0|Function_flag_has_side_effects, G.type_Type,Ar, G.type_Address,Arv, G.type_Address,Arv, END);
    C_function(". real_data_type",compiler_module,Type_real_data_type,0, G.type_Type,Ar, G.type_Type,AwmC, END);
    C_function("pointerto",compiler_module,pointerto,0, G.type_Type,Ar, G.type_Type,AwmC, END);
    C_function("linkto",compiler_module,linkto,0, G.type_Type,Ar, G.type_Type,AwmC, END);
    C_function("unpointerto",compiler_module,unpointerto,0, G.type_Type,Ar, G.type_Type,AwmC, END);
    C_function(". is_pointer",compiler_module,type_is_pointer,0, G.type_Type,Ar, G.type_CBool,AwvR, END);
    C_function(". is_link",compiler_module,type_is_link,0, G.type_Type,Ar, G.type_CBool,AwvR, END);
    C_function(". maybe",compiler_module,Type_may_be,0, G.type_Type,Arw, G.type_Type,Arw, END);
    C_function(". set_generic_method",compiler_module,Type_set_generic_method,0, G.type_Type,Arw, G.type_Int,Arv, G.type_Function,Ar, END);
    C_function(". get_generic_method",compiler_module,Type_get_generic_method,0, G.type_Type,Ar, G.type_Int,Arv, G.type_Function,AwmC, END);

    // casts.c
    C_function("cast Address",unsafe_module,cast_Arrow_Address,Function_flag_implicit, G.type_Arrow,Ar, G.type_Address,AwvC, END);
    C_function("cast Arrow",unsafe_module,cast_Address_Arrow,Function_flag_reduction, G.type_Address,Arv, G.type_Arrow,AwC, END);
    C_function("cast Int",unsafe_module,integer_from_address,Function_flag_explicit|Function_flag_copy, G.type_Address,Arv, G.type_Int,AwvR, END);
    C_function("cast Address",unsafe_module,address_from_integer,Function_flag_explicit|Function_flag_copy, G.type_Int,Arv, G.type_Address,AwvR, END);
    C_function("cast Ident",compiler_module,trivial_cast,Function_flag_explicit, G.type_Str,Ar, G.type_Ident,AwmR, END);
    C_function("cast Str",compiler_module,trivial_cast,Function_flag_explicit, G.type_Ident,Ar, G.type_Str,AwmR, END);

    // controls.c
    G.function_do_nothing=C_binary_generator(C_function("do nothing",optimizer_module,null,0, END),generate_do_nothing);
    #ifdef _EXPERIMENTAL_
      G.function_do_nothing1=C_binary_generator(C_function("do nothing",optimizer_module,null,0, G.type_Universal,Ar, END),generate_do_nothing);
    #endif
    G.function_jump_if=C_function("jump if",optimizer_module,null,0, G.type_CBool,Arv, END);
    Function_set_generate_assembly1(G.function_jump_if,generate_jump_if);
    G.function_jump_if_not=C_function("jump if not",optimizer_module,null,0, G.type_CBool,Arv, END);
    Function_set_generate_assembly1(G.function_jump_if_not,generate_jump_if_not);

    C_meta("()",ultrasafe_module,instr_meta,0);
    C_meta("{}",ultrasafe_module,bloc_meta,0);
    C_meta("gvar",safe_module,gvar_meta,0);
    C_meta("constant",safe_module,constant_meta,0);
    C_meta("if",safe_module,if_meta,0);
    C_meta("while",safe_module,while_meta,0);
    C_meta("for",safe_module,for_meta,0);

    C_meta("cast",safe_module,cast_meta,0);
    C_meta("addressof",unsafe_module,addressof_meta,0);
    C_meta("typeof",safe_module,typeof_meta,0);
    C_meta("the_function",compiler_module,the_function_meta,0);
    C_meta("the_meta",compiler_module,the_meta_meta,0);
    C_meta(". map",unsafe_module,map_meta,0);
    C_meta(". omap",unsafe_module,omap_meta,0);
    C_meta(". translate",unsafe_module,translate_meta,0);
    C_meta("new",unsafe_module,new_meta,0);

    // atomic.c
    C_function("atomic_increment",unsafe_module,atomic_increment,0, G.type_Int,Arw, END);
    C_function("atomic_add",unsafe_module,atomic_add,0, G.type_Int,Arw, G.type_Int,Arv, END);
    C_function("atomic_decrement_and_test_zero",unsafe_module,atomic_decrement_and_test_zero,0, G.type_Int,Arw, G.type_CBool,AwvR, END);
    C_function("atomic_read_and_set",unsafe_module,atomic_read_and_set,0, G.type_Int,Arw, G.type_Int,Arv, G.type_Int,AwvR, END);

    // extend.c
    C_meta("doc",safe_module,comment_meta,0);
    C_meta("abstract",safe_module,comment_meta,0);
    C_meta("module",safe_module,module_meta,0);
    C_meta("submodule",safe_module,submodule_meta,0);
    G.function_module_load=C_function("pliant_load_module",compiler_module,load_module,0, G.type_Str,Ar, G.type_Module,Ar, G.type_Int,Arv, G.type_Module,Arw, G.type_Module,AwmRW, END);
    C_meta("scope",safe_module,scope_meta,0);
    C_meta("ring_module",safe_module,ring_meta,0);
    C_meta("public",safe_module,public_meta,0);
    C_meta("private",safe_module,private_meta,0);
    C_meta("export",safe_module,export_meta,0);
    C_meta("alias",safe_module,alias_meta,0);

    C_function("arg_type",compiler_module,arg_type_meta,Function_flag_has_side_effects, G.type_Expression,Arw, G.type_Int,Arv, END);
    C_meta("arg",extra_function_module,arg_meta,0);
    C_meta("arg_r",extra_function_module,arg_r_meta,0);
    C_meta("arg_rw",extra_function_module,arg_rw_meta,0);
    C_meta("arg_w",extra_function_module,arg_w_meta,0);
    C_meta("arg_R",extra_function_module,arg_R_meta,0);
    C_meta("arg_RW",extra_function_module,arg_RW_meta,0);
    C_meta("arg_C",extra_function_module,arg_C_meta,0);
    C_meta("oarg",extra_function_module,oarg_meta,0);
    C_meta("oarg_rw",extra_function_module,oarg_rw_meta,0);
    C_meta("oarg_w",extra_function_module,oarg_w_meta,0);
    C_meta("oarg_R",extra_function_module,oarg_R_meta,0);
    C_meta("oarg_RW",extra_function_module,oarg_RW_meta,0);
    C_meta("oarg_C",extra_function_module,oarg_C_meta,0);
    C_constant("var",extra_meta_module,C_meta("var",extra_function_module,var_meta,0));
    C_constant("return",extra_meta_module,C_meta("return",extra_function_module,return_meta,0));
    C_meta("inline",extra_function_module,inline_meta,0);
    C_meta("varargs_calling_convention",extra_function_module,varargs_calling_convention_meta,0);
    C_meta("external_calling_convention",extra_function_module,external_calling_convention_meta,0);
    C_meta("generic",extra_function_module,generic_meta,0);
    C_meta("later",extra_function_module,later_meta,0);
    C_meta("hidden_function",extra_function_module,hidden_meta,0);
    C_meta("implicit",extra_function_module,implicit_meta,0);
    C_meta("extension",extra_function_module,extension_meta,0);
    C_meta("reduction",extra_function_module,reduction_meta,0);
    C_meta("explicit",extra_function_module,explicit_meta,0);
    C_meta("has_side_effects",extra_function_module,has_side_effects_meta,0);
    C_meta("has_no_side_effect",extra_function_module,has_no_side_effect_meta,0);
    C_meta("allow_shared_result",extra_function_module,allow_shared_result_meta,0);
    C_constant("weak_definition",extra_meta_module,C_meta("weak_definition",extra_function_module,definition_weak_meta,0));
    C_constant("strong_definition",extra_meta_module,C_meta("strong_definition",extra_function_module,definition_strong_meta,0));
    C_constant("always_weak_definition",extra_meta_module,C_meta("always_weak_definition",extra_function_module,definition_always_weak_meta,0));
    C_constant("always_strong_definition",extra_meta_module,C_meta("always_strong_definition",extra_function_module,definition_always_strong_meta,0));
    C_meta("indirect",extra_function_module,indirect_meta,0);
    #ifndef _STATIC_
      C_meta("external",extra_function_module,external_meta,0);
    #endif
    #if defined(_i386_) && defined(_LINUX_API_)
      C_meta("kernel_function",extra_function_module,kernel_function_meta,0);
    #endif
    Arrow_set((Arrow *)&C_meta("function",safe_module,function_meta,0)->extra_module,extra_function_module);
    Arrow_set((Arrow *)&C_meta("method",safe_module,method_meta,0)->extra_module,extra_function_module);
    Arrow_set((Arrow *)&C_meta("meta",compiler_module,macro_meta,0)->extra_module,extra_meta_module);

    Arrow_set((Arrow *)&C_meta("type",safe_module,type_meta,0)->extra_module,extra_type_module);
    C_meta("field",extra_type_module,field_meta,0);
    C_meta("packed",extra_type_module,packed_meta,0);
    C_meta("later",extra_type_module,later_type_Meta,0);
    C_meta("generic_level",extra_type_module,generic_level_meta,0);

    C_constant("pliant pointer types",compiler_module,G.pointer_types);
    C_constant("pliant link types",compiler_module,G.link_types);
    C_constant("pliant star types",compiler_module,G.star_types);

    G.function_entry_new=C_function("entry_new",unsafe_module,entry_new,Function_flag_has_side_effects, G.type_Type,Ar, G.type_Address,AwvRW, END);
    G.function_entry_lock=C_function("entry_lock",unsafe_module,entry_lock,Function_flag_has_side_effects, G.type_Address,Arv, END);
    G.function_entry_unlock=C_function("entry_unlock",unsafe_module,entry_unlock,Function_flag_has_side_effects, G.type_Address,Arv, END);
    C_function("entry_root",unsafe_module,entry_root,Function_flag_has_side_effects, G.type_Address,Arv, END);
    G.function_entry_type=C_function("entry_type",unsafe_module,entry_type,Function_flag_has_side_effects, G.type_Address,Arv, G.type_Type,AwmR, END);
    C_function("entry_counter",unsafe_module,entry_counter,Function_flag_has_side_effects, G.type_Address,Arv, G.type_Int,AwvR, END);

/// section "optimize"

    // optimize.c
    G.optimizer_sections=(struct List *)entry_new(G.type_List);
    C_map("pliant optimizer sections",boptimizer_module,G.optimizer_sections,Arw);
    _check_( C_optimizer_section("pliant optimizer listing1"); )
    C_optimizer_section("pliant optimizer initialize");
    C_optimizer_section("pliant optimizer initial study");
    C_optimizer_section("pliant optimizer inline functions");
    C_optimizer_section("pliant optimizer rewrite instructions");
    C_optimizer_section("pliant optimizer share locals");
    C_optimizer_section("pliant optimizer allocate locals");
    C_optimizer_section("pliant optimizer complete instructions");
    C_optimizer_section("pliant optimizer pre assembly");
    C_optimizer_section("pliant optimizer turn to assembly");
    C_optimizer_section("pliant optimizer allocate registers");
    C_optimizer_section("pliant optimizer complete assembly");
    C_optimizer_section("pliant optimizer adjust stack offsets");
    C_optimizer_section("pliant optimizer rewrite assembly");
    C_optimizer_section("pliant optimizer build binary");
    C_optimizer_section("pliant optimizer conclude");
    _check_( C_optimizer_section("pliant optimizer listing2"); )

    C_optimizer("pliant optimizer initialize",optimize_declare);
    C_optimizer("pliant optimizer initial study",optimize_check_side_effects);
    C_optimizer("pliant optimizer inline functions",optimize_inline_functions);
    C_optimizer("pliant optimizer rewrite instructions",optimize_remove_nouse_instructions);
    C_optimizer("pliant optimizer rewrite instructions",optimize_remove_next_instruction_jumps);
    C_optimizer("pliant optimizer rewrite instructions",optimize_rewrite_instructions);
    C_optimizer("pliant optimizer share locals",optimize_share_complex_locals);
    C_optimizer("pliant optimizer allocate locals",optimize_allocate_complex_locals);
    C_optimizer("pliant optimizer complete instructions",optimize_add_copy_instructions);
    C_optimizer("pliant optimizer pre assembly",optimize_int_compare_ifs);
    C_optimizer("pliant optimizer turn to assembly",optimize_turn_to_assembly);
    #ifdef _EXPERIMENTAL_
      C_optimizer("pliant optimizer allocate registers",optimize_rewrite_lea);
    #endif
    C_optimizer("pliant optimizer allocate registers",optimize_suppress_double_indirects);
    C_optimizer("pliant optimizer allocate registers",optimize_allocate_registrables);
    C_optimizer("pliant optimizer complete assembly",optimize_add_grow_stack_instructions);
    C_optimizer("pliant optimizer complete assembly",optimize_add_push_pop_instructions);
    C_optimizer("pliant optimizer complete assembly",optimize_add_return_instruction);
    C_optimizer("pliant optimizer adjust stack offsets",optimize_adjust_parameters_offsets);
    C_optimizer("pliant optimizer adjust stack offsets",optimize_adjust_stacked_offsets);
    C_optimizer("pliant optimizer rewrite assembly",optimize_rewrite_assembly);
    C_optimizer("pliant optimizer rewrite assembly",optimize_remove_nouse_instructions);
    C_optimizer("pliant optimizer build binary",optimize_build_binary);
    C_optimizer("pliant optimizer conclude",optimize_conclude);
    #ifdef _LISTING_
      Str_build(&G.initial_listing_function_name);
      Str_build(&G.expanded_listing_function_name);
      Str_build(&G.middle_listing_function_name);
      Str_build(&G.final_listing_function_name);
      C_map("pliant_initial_listing_function_name",unsafe_module,entry(pointerto(G.type_Str),&G.initial_listing_function_name,END),Arw);
      C_map("pliant_expanded_listing_function_name",unsafe_module,entry(pointerto(G.type_Str),&G.expanded_listing_function_name,END),Arw);
      C_map("pliant_middle_listing_function_name",unsafe_module,entry(pointerto(G.type_Str),&G.middle_listing_function_name,END),Arw);
      C_map("pliant_final_listing_function_name",unsafe_module,entry(pointerto(G.type_Str),&G.final_listing_function_name,END),Arw);
      C_optimizer("pliant optimizer initialize",optimize_initial_listing);
      C_optimizer("pliant optimizer inline functions",optimize_expanded_listing);
      C_optimizer("pliant optimizer turn to assembly",optimize_middle_listing);
      C_optimizer("pliant optimizer build binary",optimize_final_listing);
    #endif

    C_constant("os_api",context_module,entry(G.type_Str,computer_os_api,END));
    C_constant("os_kernel",context_module,entry(G.type_Str,computer_os_kernel,END));
    C_constant("os_extra_info",context_module,entry(G.type_Str,computer_os_extra_info,END));
    C_constant("processor_name",context_module,entry(G.type_Str,computer_processor_name,END));
    C_constant("processor_extra_info",context_module,entry(G.type_Str,computer_processor_extra_info,END));
    C_map("pliant_debugging_level_variable",context_module,entry(pointerto(G.type_Int),&G.debugging_level,END),Arw);
    C_map("pliant_generator_level",context_module,entry(pointerto(G.type_Int),&G.generator_level,END),Arw);
    C_map("pliant_verbose_level_variable",context_module,entry(pointerto(G.type_Int),&G.verbose_level,END),Arw);
    C_constant("pliant_c_debugging_level",context_module,entry(G.type_Int,c_debugging_level,END));
    C_constant("pliant_release_number",context_module,entry(G.type_Int,pliant_release_number,END));
    #ifdef _LINUX_API_
      C_map("linux_process_args",context_module,entry(pointerto(G.type_Address),&process_args,END),Arw);
      C_map("linux_process_env",context_module,entry(pointerto(G.type_Address),&process_env,END),Arw);
    #endif
    #ifdef _WIN32_API_
      C_map("win32_console_handle",context_module,entry(pointerto(G.type_Int),&console_handle,END),Arw);
    #endif
    C_map("pliant_script_args",context_module,entry(pointerto(G.type_Address),&script_args,END),Arw);
    C_map("pliant_root_path",context_module,entry(pointerto(G.type_Str),&G.pliant_root_path,END),Arw);
    C_constant("pliant_nb_generic_indices",context_module,entry(G.type_Int,G.generic_nb_indices,END));
    C_map("pliant_execution_phase",context_module,entry(pointerto(G.type_Int),&G.execution_phase,END),Arw);

    // file.c
    G.file_open_hook=file_open;
    G.file_read_hook=file_read;
    G.file_write_hook=file_write;
    G.file_close_hook=file_close;

    // hooks
    C_map("pliant_memory_allocate_hook",hooks_module,entry(pointerto(G.type_Address),&G.memory_allocate_hook,END),Arw);
    C_map("pliant_memory_zallocate_hook",hooks_module,entry(pointerto(G.type_Address),&G.memory_zallocate_hook,END),Arw);
    C_map("pliant_memory_free_hook",hooks_module,entry(pointerto(G.type_Address),&G.memory_free_hook,END),Arw);
    C_map("pliant_memory_resize_hook",hooks_module,entry(pointerto(G.type_Address),&G.memory_resize_hook,END),Arw);
    C_map("pliant_memory_zresize_hook",hooks_module,entry(pointerto(G.type_Address),&G.memory_zresize_hook,END),Arw);
    C_map("pliant_memory_size_hook",hooks_module,entry(pointerto(G.type_Address),&G.memory_size_hook,END),Arw);
    C_map("pliant_memory_checkup_hook",hooks_module,entry(pointerto(G.type_Address),&G.memory_checkup_hook,END),Arw);
    C_map("pliant_memory_shrink_hook",hooks_module,entry(pointerto(G.type_Address),&G.memory_shrink_hook,END),Arw);
    C_map("pliant_memory_enumerate_hook",hooks_module,entry(pointerto(G.type_Address),&G.memory_enumerate_hook,END),Arw);
    C_map("pliant_memory_pre_extend_hook",hooks_module,entry(pointerto(G.type_Address),&G.memory_pre_extend_hook,END),Arw);
    C_map("pliant_memory_post_extend_hook",hooks_module,entry(pointerto(G.type_Address),&G.memory_post_extend_hook,END),Arw);
    #ifdef _CHECK_
      C_map("pliant_entry_lock_hook",hooks_module,entry(pointerto(G.type_Address),&G.entry_lock_hook,END),Arw);
      C_map("pliant_entry_unlock_hook",hooks_module,entry(pointerto(G.type_Address),&G.entry_unlock_hook,END),Arw);
    #endif
    C_map("pliant_action_push_record_hook",hooks_module,entry(pointerto(G.type_Address),&G.action_push_record_hook,END),Arw);
    C_map("pliant_action_pull_record_hook",hooks_module,entry(pointerto(G.type_Address),&G.action_pull_record_hook,END),Arw);
    C_map("pliant_action_top_record_hook",hooks_module,entry(pointerto(G.type_Address),&G.action_top_record_hook,END),Arw);
    C_map("pliant_error_push_record_hook",hooks_module,entry(pointerto(G.type_Address),&G.error_push_record_hook,END),Arw);
    C_map("pliant_error_pull_record_hook",hooks_module,entry(pointerto(G.type_Address),&G.error_pull_record_hook,END),Arw);
    C_map("pliant_error_top_record_hook",hooks_module,entry(pointerto(G.type_Address),&G.error_top_record_hook,END),Arw);
    C_map("pliant_error_fatal_hook",hooks_module,entry(pointerto(G.type_Address),&G.error_fatal_hook,END),Arw);
    C_map("pliant_yield_hook",hooks_module,entry(pointerto(G.type_Address),&G.yield_hook,END),Arw);
    #ifdef _TIMER_
      C_constant("pliant_timers",context_module,entry(G.type_Address,timers,END));
      C_map("pliant_bytes_count",context_module,entry(pointerto(G.type_Int),&bytes_count,END),Arw);
    #endif

    C_map("pliant_first_function",compiler_module,entry(pointerto(pointerto(G.type_Function)),&G.first_function,END),Arw);
    C_map("pliant_last_function",compiler_module,entry(pointerto(pointerto(G.type_Function)),&G.last_function,END),Arw);
    G.default_function_flags=Function_flag_pliant_code_generator;
    C_map("pliant_default_function_flags",compiler_module,entry(pointerto(G.type_Int),&G.default_function_flags,END),Arw);
    C_map("pliant_function_lock_hook",hooks_module,entry(pointerto(G.type_Address),&G.function_lock_hook,END),Arw);
    C_map("pliant_function_unlock_hook",hooks_module,entry(pointerto(G.type_Address),&G.function_unlock_hook,END),Arw);

    G.wakeup_actions=C_map("pliant_wakeup_actions",unsafe_module,entry_new(G.type_List),Arw);
    G.shutdown_actions=C_map("pliant_shutdown_actions",unsafe_module,entry_new(G.type_List),Arw);
    G.backup_actions=C_map("pliant_backup_actions",unsafe_module,entry_new(G.type_List),Arw);
    G.restore_actions=C_map("pliant_restore_actions",unsafe_module,entry_new(G.type_List),Arw);
    G.exit_actions=C_map("pliant_exit_actions",unsafe_module,entry_new(G.type_List),Arw);
    C_map("pliant_file_open_hook",hooks_module,entry(pointerto(G.type_Address),&G.file_open_hook,END),Arw);
    C_map("pliant_file_read_hook",hooks_module,entry(pointerto(G.type_Address),&G.file_read_hook,END),Arw);
    C_map("pliant_file_write_hook",hooks_module,entry(pointerto(G.type_Address),&G.file_write_hook,END),Arw);
    C_map("pliant_file_close_hook",hooks_module,entry(pointerto(G.type_Address),&G.file_close_hook,END),Arw);
    C_map("pliant_type_build_hooks",hooks_module,G.type_build_hooks,Arw);
    C_map("pliant_type_destroy_hooks",hooks_module,G.type_destroy_hooks,Arw);
    C_map("pliant_execute_begin_hooks",hooks_module,G.execute_begin_hooks,Arw);
    C_map("pliant_execute_end_hooks",hooks_module,G.execute_end_hooks,Arw);
    C_map("pliant_generator_context_begin_hooks",hooks_module,G.generator_context_begin_hooks,Arw);
    C_map("pliant_generator_context_end_hooks",hooks_module,G.generator_context_end_hooks,Arw);

    C_function("compile_text",unsafe_module,compile_text,0, G.type_List,Ar, G.type_Module,Arw, END);

    // the following functions are declared only for the debugger stack walk
    #ifdef _DLL_
      #ifdef _GCC_
        C_function("pliant internal startup function",unused_module,pliant,Function_flag_varargs, END);
      #else
        C_function("pliant internal startup function",unused_module,pliant,Function_flag_external, END);
      #endif
    #endif
    C_function("pliant internal GeneratorContext_insert0 function",unused_module,GeneratorContext_insert0,0, G.type_GeneratorContext,Arw, G.type_Int,Arv, G.type_Instruction,Ar, G.type_Instruction,Arw, END);
    C_function("pliant internal parse_one_token function",unused_module,ParserContext_parse_one_token,0, G.type_ParserContext,Arw, END);
    C_function("pliant internal parser_filter_execute function",unused_module,parser_filter_execute,0, G.type_ParserContext,Arw, G.type_Str,Ar, G.type_Address,Arv, END);
    C_function("pliant internal execute function",unused_module,execute,0, G.type_Function,Ar, END);
    C_function("pliant internal Function_terminate_code function",unused_module,Function_terminate_code,0, G.type_Function,Arw, END);
    C_function("pliant internal C_function2 function",unused_module,C_function2,0, G.type_Address,Arv, G.type_Address,Arv, END);
    #ifdef _CHECK_
      C_function("pliant internal check_assertion function",unused_module,check_assertion,0, G.type_CBool,Arv, G.type_Address,Arv, G.type_Address,Arv, G.type_Int,Arv, END);
    #endif
    C_function("pliant breakpoint",hooks_module,breakpoint,0, END);
    C_map("pliant_parser_pre_execute_hook",parser_module,entry(pointerto(G.type_Address), &G.pre_execute_hook,END),Arw);
    C_map("pliant_compiler_post_active_hook",compiler_module,entry(pointerto(G.type_Address), &G.post_active_hook,END),Arw);

  #else
    error_notify_fatalz(error_id_unknown,"This executable does not contain the initialization code.");
  #endif
  }

#if defined(_GCC_) && defined(_WIN32_API_) && defined(_DLL_)
  int WINAPI init_pliant_dll(HANDLE hDll, DWORD reason, LPVOID reserved) {
    return TRUE; }
#endif

#if defined(_OS2_) && defined(_DLL_)
  #pragma aux __DLLstart_ "*" parm caller []
  unsigned __DLLstart_(unsigned hmod,unsigned termination) {
    return(1); }
#endif