1 /* caches.h 2 * Copyright (C) 2001-2004, Parrot Foundation. 3 * Overview: 4 * Cache and direct freelist handling for various items. 5 * Data Structure and Algorithms: 6 * History: 7 * Notes: 8 * References: 9 */ 10 11 #ifndef PARROT_CACHES_H_GUARD 12 #define PARROT_CACHES_H_GUARD 13 14 #define DISABLE_METH_CACHE 0 15 16 /* turn off this hack, we need something better */ 17 #define DISABLE_RETC_RECYCLING 1 18 19 /* 20 * object method cache entry 21 */ 22 typedef struct _meth_cache_entry { 23 void * strstart; /* string address */ 24 PMC * pmc; /* the method sub pmc */ 25 struct _meth_cache_entry *next; 26 } Meth_cache_entry; 27 28 /* 29 * method cache, continuation freelist, stack chunk freelist, regsave cache 30 */ 31 typedef struct _Caches { 32 UINTVAL mc_size; /* sizeof table */ 33 Meth_cache_entry ***idx; /* bufstart idx */ 34 /* PMC **hash */ /* for non-constant keys */ 35 } Caches; 36 37 #endif /* PARROT_CACHES_H_GUARD */ 38 39 /* 40 * Local variables: 41 * c-file-style: "parrot" 42 * End: 43 * vim: expandtab shiftwidth=4 cinoptions='\:2=2' : 44 */ 45