Diff for /gforth/vmgen-ex/profile.c between versions 1.2 and 1.4

version 1.2, 2001/05/01 10:20:56 version 1.4, 2002/06/02 17:02:56
Line 29 Line 29
 #define HASH_SIZE (1<<20)  #define HASH_SIZE (1<<20)
 #define hash(p) ((((Cell)(p))/sizeof(Inst))&(HASH_SIZE-1))  #define hash(p) ((((Cell)(p))/sizeof(Inst))&(HASH_SIZE-1))
   
   #ifdef __GNUC__
   typedef long long long_long;
   #else
   typedef long long_long;
   #endif
   
 typedef struct block_count {  typedef struct block_count {
   struct block_count *next; /* next in hash table */    struct block_count *next; /* next in hash table */
   struct block_count *fallthrough; /* the block that this one falls    struct block_count *fallthrough; /* the block that this one falls
                                        through to without SUPER_END */                                         through to without SUPER_END */
   Inst *ip;    Inst *ip;
   long long count;    long_long count;
   char **insts;    char **insts;
   size_t ninsts;    size_t ninsts;
 } block_count;  } block_count;
Line 63  block_count *block_insert(Inst *ip) Line 69  block_count *block_insert(Inst *ip)
   new->next = blocks[hash(ip)];    new->next = blocks[hash(ip)];
   new->fallthrough = NULL;    new->fallthrough = NULL;
   new->ip = ip;    new->ip = ip;
   new->count = 0LL;    new->count = (long_long)0;
   new->insts = malloc(0);    new->insts = malloc(0);
   assert(new->insts != NULL);    assert(new->insts != NULL);
   new->ninsts = 0;    new->ninsts = 0;
Line 82  void vm_count_block(Inst *ip) Line 88  void vm_count_block(Inst *ip)
   block_insert(ip)->count++;    block_insert(ip)->count++;
 }  }
   
 #define VM_IS_INST(inst, n) ((inst) == vm_prim[n])  
   
 void postprocess_block(block_count *b)  void postprocess_block(block_count *b)
 {  {
   Inst *ip = b->ip;    Inst *ip = b->ip;

Removed from v.1.2  
changed lines
  Added in v.1.4


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