Diff for /gforth/engine/main.c between versions 1.103 and 1.104

version 1.103, 2003/03/09 15:17:03 version 1.104, 2003/05/04 08:55:32
Line 131  Cell last_jump=0; /* if the last prim wa Line 131  Cell last_jump=0; /* if the last prim wa
 static int no_super=0;   /* true if compile_prim should not fuse prims */  static int no_super=0;   /* true if compile_prim should not fuse prims */
 static int no_dynamic=NO_DYNAMIC_DEFAULT; /* if true, no code is generated  static int no_dynamic=NO_DYNAMIC_DEFAULT; /* if true, no code is generated
                                              dynamically */                                               dynamically */
   static int print_codesize=0; /* if true, print code size on exit */
   
 #ifdef HAS_DEBUG  #ifdef HAS_DEBUG
 int debug=0;  int debug=0;
Line 732  int forget_dyncode(Address code) Line 733  int forget_dyncode(Address code)
 #endif /* !defined(NO_DYNAMIC) */  #endif /* !defined(NO_DYNAMIC) */
 }  }
   
   long dyncodesize(void)
   {
   #ifndef NO_DYNAMIC
     struct code_block_list *p, **pp;
     long size=0;
     for (p=code_block_list; p!=NULL; p=p->next) {
       if (code_here >= p->block && code_here < p->block+p->size)
         return size + (code_here - p->block);
       else
         size += p->size;
     }
   #endif /* !defined(NO_DYNAMIC) */
     return 0;
   }
   
 Label decompile_code(Label _code)  Label decompile_code(Label _code)
 {  {
 #ifdef NO_DYNAMIC  #ifdef NO_DYNAMIC
Line 1187  void gforth_args(int argc, char ** argv, Line 1203  void gforth_args(int argc, char ** argv,
       {"no-super", no_argument, &no_super, 1},        {"no-super", no_argument, &no_super, 1},
       {"no-dynamic", no_argument, &no_dynamic, 1},        {"no-dynamic", no_argument, &no_dynamic, 1},
       {"dynamic", no_argument, &no_dynamic, 0},        {"dynamic", no_argument, &no_dynamic, 0},
         {"print-codesize", no_argument, &print_codesize, 1},
       {0,0,0,0}        {0,0,0,0}
       /* no-init-file, no-rc? */        /* no-init-file, no-rc? */
     };      };
Line 1229  Engine Options:\n\ Line 1246  Engine Options:\n\
   --no-super                        No dynamically formed superinstructions\n\    --no-super                        No dynamically formed superinstructions\n\
   --offset-image                    Load image at a different position\n\    --offset-image                    Load image at a different position\n\
   -p PATH, --path=PATH              Search path for finding image and sources\n\    -p PATH, --path=PATH              Search path for finding image and sources\n\
     --print-codesize                  Print size of generated native code on exit\n\
   -r SIZE, --return-stack-size=SIZE Specify return stack size\n\    -r SIZE, --return-stack-size=SIZE Specify return stack size\n\
   -v, --version                     Print engine version and exit\n\    -v, --version                     Print engine version and exit\n\
 SIZE arguments consist of an integer followed by a unit. The unit can be\n\  SIZE arguments consist of an integer followed by a unit. The unit can be\n\
Line 1325  int main(int argc, char **argv, char **e Line 1343  int main(int argc, char **argv, char **e
 #endif  #endif
     deprep_terminal();      deprep_terminal();
   }    }
     if (print_codesize) {
       fprintf(stderr, "code size = %ld\n", dyncodesize());
     }
   return retvalue;    return retvalue;
 }  }

Removed from v.1.103  
changed lines
  Added in v.1.104


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>