Changeset 9969


Ignore:
Timestamp:
Jul 10, 2008, 9:32:01 AM (11 years ago)
Author:
gb
Message:

Simplify some things (deref, etc.) since it seems that more complicated
expressions may not expand into what I think they do when low optimization
settings are in effect (and may lead to GC problems.)

ptr_from_lispobj() and ptr_to_lispobj() are mostly remnants of an early
attempt to port to a ppc64 environment where the size of a LispObj? (64-bits)
was larger than the size of a C pointer (32 bits.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711/ccl/lisp-kernel/macros.h

    r4348 r9969  
    2222#define __macros__
    2323
    24 #define ptr_to_lispobj(p) ((LispObj)((unsigned_of_pointer_size)(p)))
    25 #define ptr_from_lispobj(o) ((LispObj*)((unsigned_of_pointer_size)(o)))
     24#define ptr_to_lispobj(p) ((LispObj)(p))
     25#define ptr_from_lispobj(o) ((LispObj*)(o))
    2626#define lisp_reg_p(reg)  ((reg) >= fn)
    2727
     
    3232#define indirect_node(o) (*(LispObj *)(node_aligned(o)))
    3333
    34 #define deref(o,n) (*((LispObj*) (ptr_from_lispobj(untag((LispObj)o)))+(n)))
     34#define deref(o,n) ((((LispObj*) (untag((LispObj)o))))[(n)])
    3535#define header_of(o) deref(o,0)
    3636
     
    7575#endif
    7676
    77 
     77#ifdef VC
     78#define inline
     79#define __attribute__(x)
     80#endif
    7881
    7982/* lfuns */
Note: See TracChangeset for help on using the changeset viewer.