]>
gcc.gnu.org Git - gcc.git/blob - gcc/cpphash.h
1 /* different kinds of things that can appear in the value field
2 of a hash node. Actually, this may be useless now. */
7 struct hashnode
*aschain
; /* for #assert */
11 struct hashnode
*next
; /* double links for easy deletion */
12 struct hashnode
*prev
;
13 struct hashnode
**bucket_hdr
; /* also, a back pointer to this node's hash
14 chain is kept, in case the node is the head
15 of the chain and gets deleted. */
16 enum node_type type
; /* type of special token */
17 int length
; /* length of token, for quick comparison */
18 U_CHAR
*name
; /* the actual name */
19 union hashval value
; /* pointer to expansion, or whatever */
22 typedef struct hashnode HASHNODE
;
24 /* Some definitions for the hash table. The hash function MUST be
25 computed as shown in hashf () below. That is because the rescan
26 loop computes the hash value `on the fly' for most tokens,
27 in order to avoid the overhead of a lot of procedure calls to
28 the hashf () function. Hashf () only exists for the sake of
29 politeness, for use when speed isn't so important. */
32 #define HASHSTEP(old, c) ((old << 2) + c)
33 #define MAKE_POS(v) (v & 0x7fffffff) /* make number positive */
35 extern HASHNODE
*install
PARAMS ((U_CHAR
*,int,enum node_type
, int,char *,int));
36 extern int hashf
PARAMS ((const U_CHAR
*, int, int));
37 extern void delete_macro
PARAMS ((HASHNODE
*));
This page took 0.045006 seconds and 6 git commands to generate.