Changeset 14142


Ignore:
Timestamp:
Aug 5, 2010, 2:17:20 PM (9 years ago)
Author:
gb
Message:

Remove redundant/common struct and constant definitions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/x86-constants32.h

    r13627 r14142  
    216216#define function_boundary_marker subtag_function_boundary_marker
    217217
    218 typedef struct cons {
    219     LispObj cdr;
    220     LispObj car;
    221 } cons;
    222 
    223 typedef struct lispsymbol {
    224     LispObj header;
    225     LispObj pname;
    226     LispObj vcell;
    227     LispObj fcell;
    228     LispObj package_predicate;
    229     LispObj flags;
    230     LispObj plist;
    231     LispObj binding_index;
    232 } lispsymbol;
    233 
    234 typedef struct ratio {
    235     LispObj header;
    236     LispObj numer;
    237     LispObj denom;
    238 } ratio;
     218
    239219
    240220typedef struct double_float {
     
    250230} single_float;
    251231
    252 typedef struct macptr {
    253     LispObj header;
    254     LispObj address;
    255     LispObj class;
    256     LispObj type;
    257 } macptr;
    258 
    259 typedef struct xmacptr {
    260     LispObj header;
    261     LispObj address;
    262     LispObj class;
    263     LispObj type;
    264     LispObj flags;
    265     LispObj link;
    266 } xmacptr;
    267 
    268 typedef struct special_binding {
    269     struct special_binding *link;
    270     struct lispsymbol *sym;
    271     LispObj value;
    272 } special_binding;
    273232
    274233typedef struct lisp_frame {
     
    290249} xcf;
    291250
    292 /* The GC (at least) needs to know what a
    293    package looks like, so that it can do GCTWA. */
    294 typedef struct package {
    295     LispObj header;
    296     LispObj itab;               /* itab and etab look like (vector (fixnum . fixnum) */
    297     LispObj etab;
    298     LispObj used;
    299     LispObj used_by;
    300     LispObj names;
    301     LispObj shadowed;
    302 } package;
    303251
    304252typedef struct catch_frame {
     
    329277#define fixnum_bitmask(n)  (1<<((n)+fixnumshift))
    330278
    331 /*
    332   The GC (at least) needs to know about hash-table-vectors and their flag bits.
    333 */
    334 
    335 typedef struct hash_table_vector_header {
    336   LispObj header;
    337   LispObj link;                 /* If weak */
    338   LispObj flags;                /* a fixnum; see below */
    339   LispObj gc_count;             /* gc-count kernel global */
    340   LispObj free_alist;           /* preallocated conses for finalization_alist */
    341   LispObj finalization_alist;   /* key/value alist for finalization */
    342   LispObj weak_deletions_count; /* incremented when GC deletes weak pair */
    343   LispObj hash;                 /* backpointer to hash-table */
    344   LispObj deleted_count;        /* number of deleted entries [not maintained if lock-free] */
    345   LispObj count;                /* number of valid entries [not maintained if lock-free] */
    346   LispObj cache_idx;            /* index of last cached pair */
    347   LispObj cache_key;            /* value of last cached key */
    348   LispObj cache_value;          /* last cached value */
    349   LispObj size;                 /* number of entries in table */
    350   LispObj size_reciprocal;      /* shifted reciprocal of size */
    351 } hash_table_vector_header;
    352 
    353 /*
    354   Bits (masks) in hash_table_vector.flags:
    355 */
    356 
    357 /* GC should track keys when addresses change */
    358 #define nhash_track_keys_mask fixnum_bitmask(28)
    359 
    360 /* GC should set when nhash_track_keys_bit & addresses change */
    361 #define nhash_key_moved_mask  fixnum_bitmask(27)
    362 
    363 /* weak on key or value (need new "weak both" encoding.) */
    364 #define nhash_weak_mask       fixnum_bitmask(12)
    365 
    366 /* weak on value */
    367 #define nhash_weak_value_mask fixnum_bitmask(11)
    368 
    369 /* finalizable */
    370 #define nhash_finalizable_mask fixnum_bitmask(10)
    371 
    372 /* keys frozen, i.e. don't clobber keys, only values */
    373 #define nhash_keys_frozen_mask fixnum_bitmask(9)
    374 
    375 /* Lfun bits */
    376 
    377 #define lfbits_nonnullenv_mask fixnum_bitmask(0)
    378 #define lfbits_keys_mask fixnum_bitmask(1)
    379 #define lfbits_restv_mask fixnum_bitmask(7)
    380 #define lfbits_optinit_mask fixnum_bitmask(14)
    381 #define lfbits_rest_mask fixnum_bitmask(15)
    382 #define lfbits_aok_mask fixnum_bitmask(16)
    383 #define lfbits_lap_mask fixnum_bitmask(23)
    384 #define lfbits_trampoline_mask fixnum_bitmask(24)
    385 #define lfbits_evaluated_mask fixnum_bitmask(25)
    386 #define lfbits_cm_mask fixnum_bitmask(26)         /* combined_method */
    387 #define lfbits_nextmeth_mask fixnum_bitmask(26)   /* or call_next_method with method_mask */
    388 #define lfbits_gfn_mask fixnum_bitmask(27)        /* generic_function */
    389 #define lfbits_nextmeth_with_args_mask fixnum_bitmask(27)   /* or call_next_method_with_args with method_mask */
    390 #define lfbits_method_mask fixnum_bitmask(28)     /* method function */
    391 /* PPC only but want it defined for xcompile */
    392 #define lfbits_noname_mask fixnum_bitmask(29)
    393 
    394 
    395 /* Creole */
    396 
    397 #define doh_quantum 400
    398 #define doh_block_slots ((doh_quantum >> 2) - 3)
    399 
    400 typedef struct doh_block {
    401   struct doh_block *link;
    402   unsigned size;
    403   unsigned free;
    404   LispObj data[doh_block_slots];
    405 } doh_block, *doh_block_ptr;
    406 
    407 #define population_weak_list (0<<fixnum_shift)
    408 #define population_weak_alist (1<<fixnum_shift)
    409 #define population_termination_bit (16+fixnum_shift)
    410 #define population_type_mask ((1<<population_termination_bit)-1)
    411 
    412 #define gc_retain_pages_bit fixnum_bitmask(0)
    413 #define gc_integrity_check_bit fixnum_bitmask(2)
    414 #define egc_verbose_bit fixnum_bitmask(3)
    415 #define gc_verbose_bit fixnum_bitmask(4)
    416 #define gc_allow_stack_overflows_bit fixnum_bitmask(5)
    417 #define gc_postgc_pending fixnum_bitmask(26)
     279
     280
     281
     282
    418283
    419284#include "lisp-errors.h"
Note: See TracChangeset for help on using the changeset viewer.