Go to the documentation of this file.
12 #if (__SIZEOF_SIZE_T__ == 8) || (alpha || IRIX6 || x86_64 || aarch64 || ppc64le)
29 #define wordsizeof(type) (sizeof(type)>>WORDSHIFT)
31 #if GCC || Solaris2 || IRIX || Linux || IRIX6
46 #if defined(Darwin) || defined(Linux) || defined(Linux64)
65 #define errno errnoGet()
69 #define min(x,y) ((x<y)?x:y)
70 #define max(x,y) ((x<y)?y:x)
76 #define eussetjmp(buf) (_setjmp(buf)?setjmp_val:(euspointer_t)0)
77 #define euslongjmp(buf,val) (setjmp_val=(euspointer_t)(val),_longjmp(buf,1))
79 #if (Solaris2 || vxworks)
80 #define eussetjmp(buf) (eusinteger_t)setjmp(buf)
81 #define euslongjmp(buf,val) longjmp(buf,(int)(val))
84 #define eussetjmp(buf) (eusinteger_t)_setjmp(buf)
85 #define euslongjmp(buf,val) _longjmp(buf,(int)(val))
93 #define STOPPER ((pointer)0L)
94 #define UNBOUND ((pointer)0L)
97 #define V_CONSTANT ((pointer)((0<<2)+2)) // makeint(0)
98 #define V_VARIABLE ((pointer)((1<<2)+2)) // makeint(1)
99 #define V_GLOBAL ((pointer)((2<<2)+2)) // makeint(2)
100 #define V_SPECIAL ((pointer)((3<<2)+2)) // makeint(3)
103 #define SUBR_FUNCTION ((pointer)((0<<2)+2)) // makeint(0)
104 #define SUBR_MACRO ((pointer)((1<<2)+2)) // makeint(1)
105 #define SUBR_SPECIAL ((pointer)((2<<2)+2)) // makeint(2)
106 #define SUBR_ENTRY ((pointer)((3<<2)+2)) // makeint(3)
109 #define BLOCKFRAME ((pointer)((0<<2)+2)) // makeint(0)
110 #define TAGBODYFRAME ((pointer)((1<<2)+2)) // makeint(1)
119 #define ELM_FOREIGN 6
120 #define ELM_POINTER 7
125 #if (WORD_SIZE == 64)
126 #define MASK 0x7fffffffffffffff
127 #define MSB 0x8000000000000000
129 #define MASK 0x7fffffff
130 #define MSB 0x80000000
137 #define DEFAULTCHUNKINDEX 16
143 #define MAXTHRBUDDY 6
144 #define MAXSTACK 8388608
145 #define SYMBOLHASH 60
146 #define MAXCLASS 4096
147 #define KEYWORDPARAMETERLIMIT 128
148 #define ARRAYRANKLIMIT 7
150 #define MAX_SPECIALS 512
151 #if (WORD_SIZE == 64)
152 #define MAXPOSFIXNUM (0x1fffffffffffffff)
153 #define MINNEGFIXNUM (0xe000000000000000)
155 #define MAXPOSFIXNUM (0x1fffffff)
156 #define MINNEGFIXNUM (0xe0000000)
173 #define GC_REGION(cmp_statement) cmp_statement
383 #if vax || sun4 || news || mips || alpha || Linux
516 #define MAXMETHCACHE 256
547 #ifdef __RETURN_BARRIER
552 #ifdef __GC_ALLOC_DRIVEN
716 #define carof(p,err) (islist(p)?(p)->c.cons.car:(pointer)error(E_DUMMY5,(pointer)(err)))
717 #define cdrof(p,err) (islist(p)?(p)->c.cons.cdr:(pointer)error(E_DUMMY5,(pointer)(err)))
718 #define alloc rgc_alloc
720 #define carof(p,err) (islist(p)?(p)->c.cons.car:(pointer)error(E_DUMMY3,(pointer)(err)))
721 #define cdrof(p,err) (islist(p)?(p)->c.cons.cdr:(pointer)error(E_DUMMY3,(pointer)(err)))
722 #define alloc gc_alloc
724 #define ccar(p) ((p)->c.cons.car)
725 #define ccdr(p) ((p)->c.cons.cdr)
726 #define cixof(p) ((p)->cix)
727 #define classof(p) (ispointer(p)?classtab[(p)->cix].def:(pointer)error(E_NOOBJECT))
728 #define subcixof(p) (classtab[(p)->cix].subcix)
729 #define speval(p) ((p)->c.sym.speval)
730 #define spevalof(p,x) (ctx->specials->c.vec.v[x])
731 #define Spevalof(p) (ctx->specials->c.vec.v[intval((p)->c.sym.vtype)])
732 #define SPEVALOF(p) (((p)->c.sym.vtype>=V_SPECIAL)? \
733 ctx->specials->c.vec.v[intval((p)->c.sym.vtype)]: \
735 #define superof(p) ((p)->c.cls.super)
737 #if sun3 || apollo || (system5 && !alpha && !mips) || sanyo || vxworks || NEXT
738 #define makepointer(bp) ((pointer)((eusinteger_t)(bp) | 2))
739 #define isint(p) (!((eusinteger_t)(p) & 3))
740 #define isflt(p) (((eusinteger_t)(p) & 3)==1)
741 #define isnum(p) (((eusinteger_t)(p) & 2)==0)
742 #define numberp(p) (((isnum(p)) || (pisextnum(p)))) // predicates.c:NUMBERP
743 #define ispointer(p) ((eusinteger_t)(p) & 2)
744 #define makeint(v) ((pointer)(((eusinteger_t)v)<<2))
745 #define bpointerof(p) ((bpointer)((eusinteger_t)(p)-2))
748 #if vax || sun4 || news || mips || alpha || Linux
750 #define makepointer(bp) ((pointer)(bp))
752 #define isint(p) ( (((euspointer_t)(p)&3)==2) || (((euspointer_t)(p)&0x3)==0x3) )
753 #define isflt(p) (((euspointer_t)(p) & 3)==1)
754 #define isnum(p) (((euspointer_t)(p) & 3))
755 #define numberp(p) (((isnum(p)) || (pisextnum(p)))) // predicates.c:NUMBERP
756 #define ispointer(p) (!((euspointer_t)(p) & 3))
766 #define bpointerof(p) ((bpointer)((euspointer_t)(p)))
768 #define nextbuddy(p) ((bpointer)((euspointer_t)(p)+(buddysize[(p->h.bix)&TAGMASK]*sizeof(pointer))))
770 #define nextbuddy(p) ((bpointer)((euspointer_t)(p)+(buddysize[p->h.bix]*sizeof(pointer))))
772 #ifndef __USE_MARK_BITMAP
773 #define marked(p) (p->h.mark)
774 #define markon(p) p->h.mark=1
775 #define markoff(p) p->h.mark=0
787 #define ckintval(p) ((isint(p)|| \
789 ((vecsize((p)->c.bgnm.bv)==1)|| \
790 ((vecsize((p)->c.bgnm.bv)==2)&&((p)->c.bgnm.bv->c.ivec.iv[1]<2))))) \
791 ?intval(p):(eusinteger_t)error(E_NOINT))
792 #define bigintval(x) (isint(x)?intval(x):\
794 ((vecsize((x)->c.bgnm.bv)>=2)?\
795 (((x)->c.bgnm.bv->c.ivec.iv[1]<<(WORD_SIZE-1)) | ((x)->c.bgnm.bv->c.ivec.iv[0])): \
796 ((x)->c.bgnm.bv->c.ivec.iv[0])):\
797 (eusinteger_t)error(E_NOINT)) )
798 #define mkbigint(y) \
799 (pointer)((((y)^((y)>>1))&(eusinteger_t)3<<(WORD_SIZE-3))?makebig1(y):makeint(y))
801 #define elmtypeof(p) (bpointerof(p)->h.elmtype)
803 #define bixof(p) (bpointerof(p)->h.bix & TAGMASK)
805 #define bixof(p) (bpointerof(p)->h.bix)
808 #if sun3 || sun4 || system5 || apollo || news || sanyo || vxworks || mips || NEXT || Linux
809 #if (WORD_SIZE == 64)
810 #define fltval(p) (nu.ival=((eusinteger_t)(p) & ~3L), nu.fval)
811 #define makeflt(f) (nu.fval=(eusfloat_t)(f), (pointer)((nu.ival & ~3L) | 1L))
813 #define fltval(p) (nu.ival=((eusinteger_t)(p) & ~3), nu.fval)
814 #define makeflt(f) (nu.fval=(eusfloat_t)(f), (pointer)((nu.ival & ~3) | 1))
822 #define ckfltval(p) (isflt(p)?fltval(p):\
823 (isint(p)?intval(p):\
824 (pisbignum(p)?big_to_float(p):\
825 (pisratio(p)?ratio2flt(p):\
826 (eusinteger_t)error(E_NONUMBER)))))
830 #define pislist(p) (p->cix<=conscp.sub)
831 #define piscons(p) (p->cix<=conscp.sub)
832 #define pispropobj(p) (propobjcp.cix<=(p)->cix && (p)->cix<=propobjcp.sub)
833 #define ispropobj(p) (ispointer(p) && pispropobj(p))
834 #define pissymbol(p) (symbolcp.cix<=(p)->cix && (p)->cix<=symbolcp.sub)
835 #define issymbol(p) (ispointer(p) && pissymbol(p))
836 #define pisstring(p) (stringcp.cix<=(p)->cix && (p)->cix<=stringcp.sub)
837 #define isstring(p) (ispointer(p) && pisstring(p))
838 #define islist(p) (ispointer(p) && pislist(p))
839 #define iscons(p) (ispointer(p) && piscons(p))
840 #define piscode(p) (codecp.cix<=(p)->cix && (p)->cix<=codecp.sub)
841 #define iscode(p) (ispointer(p) && piscode(p))
842 #define pisfcode(p) (fcodecp.cix<=(p)->cix && (p)->cix<=fcodecp.sub)
843 #define isfcode(p) (ispointer(p) && pisfcode(p))
844 #define pisldmod(p) (ldmodulecp.cix<=(p)->cix && (p)->cix<=ldmodulecp.sub)
845 #define isldmod(p) (ispointer(p) && pisldmod(p))
846 #define pisstream(p) (streamcp.cix<=(p)->cix && (p)->cix<=streamcp.sub)
847 #define isstream(p) (ispointer(p) && pisstream(p))
848 #define pisfilestream(p) (filestreamcp.cix<=(p)->cix && (p)->cix<=filestreamcp.sub)
849 #define isfilestream(p) (ispointer(p) && pisfilestream(p))
850 #define pisiostream(p) (iostreamcp.cix<=(p)->cix && (p)->cix<=iostreamcp.sub)
851 #define isiostream(p) (ispointer(p) && pisiostream(p))
852 #define pisreadtable(p) (readtablecp.cix<=((p)->cix) && ((p)->cix)<=readtablecp.sub)
853 #define isreadtable(p) (ispointer(p) && pisreadtable(p))
854 #define pisarray(p) (arraycp.cix<=((p)->cix) && ((p)->cix)<=arraycp.sub)
855 #define isarray(p) (ispointer(p) && pisarray(p))
856 #define pisvector(p) (elmtypeof(p))
857 #define isvector(p) (ispointer(p) && pisvector(p))
858 #define isfltvector(p) (ispointer(p) && (elmtypeof(p)==ELM_FLOAT))
859 #define isptrvector(p) (ispointer(p) && (elmtypeof(p)==ELM_POINTER))
860 #define isintvector(p) (ispointer(p) && (elmtypeof(p)==ELM_INT))
861 #define pisclass(p) (metaclasscp.cix<=(p)->cix && (p)->cix<=metaclasscp.sub)
862 #define isclass(p) (ispointer(p) && pisclass(p))
863 #define pisvecclass(p) (vecclasscp.cix<=(p)->cix && (p)->cix<=vecclasscp.sub)
864 #define isvecclass(p) (ispointer(p) && pisvecclass(p))
865 #define pispackage(p) (packagecp.cix<=(p)->cix && (p)->cix<=packagecp.sub)
866 #define ispackage(p) (ispointer(p) && pispackage(p))
867 #define pisclosure(p) (closurecp.cix<=(p)->cix && (p)->cix<=closurecp.sub)
868 #define isclosure(p) (ispointer(p) && pisclosure(p))
869 #define pislabref(p) (labrefcp.cix<=(p)->cix && (p)->cix<=labrefcp.sub)
870 #define islabref(p) (ispointer(p) && pislabref(p))
872 #define pisextnum(p) (extnumcp.cix<=(p)->cix && (p)->cix<=extnumcp.sub)
873 #define isextnum(p) (ispointer(p) && pisextnum(p))
874 #define pisratio(p) (ratiocp.cix<=(p)->cix && (p)->cix<=ratiocp.sub)
875 #define isratio(p) (ispointer(p) && pisratio(p))
876 #define piscomplex(p) (complexcp.cix<=(p)->cix && (p)->cix<=complexcp.sub)
877 #define iscomplex(p) (ispointer(p) && piscomplex(p))
878 #define pisbignum(p) (bignumcp.cix<=(p)->cix && (p)->cix<=bignumcp.sub)
879 #define isbignum(p) (ispointer(p) && pisbignum(p))
881 #define strlength(p) ((int)intval((p)->c.str.length))
882 #define vecsize(p) ((int)intval((p)->c.vec.size))
883 #define objsize(p) ((int)vecsize(classof(p)->c.cls.vars))
886 #define bigsize(x) vecsize((x)->c.bgnm.bv)
887 #define bigvec(x) (x)->c.bgnm.bv->c.ivec.iv
890 #define current_ctx (euscontexts[thr_self()])
892 #define vpush(v) (*ctx->vsp++=p_print((pointer)(v),ctx))
893 #define vpop() (printf("vpop:[0x%lx]=0x%lx\n",ctx->vsp-1,(ctx->vsp)[-1]),*(--(ctx->vsp)))
895 #define vpush(v) (*ctx->vsp++=((pointer)v))
896 #define vpop() (*(--(ctx->vsp)))
898 #define ckpush(v) (ctx->vsp<ctx->stacklimit?vpush(v):(pointer)error(E_STACKOVER))
900 #define ckarg(req) if (n!=(req)) error(E_MISMATCHARG)
901 #define ckarg2(req1,req2) if ((n<(req1))||((req2)<n)) error(E_MISMATCHARG)
903 #define breakck if (ctx->intsig>0) sigbreak()
904 #define stackck if (ctx->vsp>ctx->stacklimit) error(E_STACKOVER)
905 #define debug (speval(QDEBUG)!=NIL)
908 #define pointer_update(l,r) { (l)=(r); }
1018 #if alpha || IRIX6 || Solaris2 || Linux || Cygwin
1097 #if !alpha && !IRIX6
1110 #if Solaris2 || SunOS4_1
pointer makemodule(context *, int)
pointer alloc(int, int, int, int)
pointer makeclass(context *, pointer, pointer, pointer, pointer, pointer, int, pointer)
struct class_desc classtab[MAXCLASS]
pointer mkfilestream(context *, pointer, pointer, int, pointer)
struct protectframe * protlink
struct bindframe * vbind(context *, pointer, pointer, struct bindframe *, struct bindframe *)
struct bindframe * fastbind(context *, pointer, pointer, struct bindframe *)
pointer mkstream(context *, pointer, pointer)
struct bindframe * dynblink
struct fletframe * lexlink
struct bindframe * declare(context *, pointer, struct bindframe *)
struct bindframe * lexblink
struct catchframe * catchfp
pointer deflocal(context *, char *, pointer, pointer)
pointer defkeyword(context *, char *)
pointer makevector(pointer, int)
pointer funlambda(context *, pointer, pointer, pointer, pointer *, struct bindframe *, int)
pointer defmacro(context *, char *, pointer, pointer(*)())
struct buddyfree buddy[MAXBUDDY+1]
struct buddyfree * thr_buddy
struct filestream fstream
struct blockframe * dynklink
struct blockframe * lexklink
pointer makestring(char *, int)
pointer eval2(context *, pointer, pointer)
pointer funcode(context *, pointer, pointer, int)
pointer makeobject(pointer)
void unbindspecial(context *, struct specialbindframe *)
pointer makeint(eusinteger_t v)
pointer rawcons(context *, pointer, pointer)
pointer defconst(context *, char *, pointer, pointer)
void bindspecial(context *, pointer, pointer)
pointer intern(context *, char *, int, pointer)
struct built_in_cid builtinclass[64]
pointer defvar(context *, char *, pointer, pointer)
pointer getval(context *, pointer)
struct bindframe * bindfp
pointer reader(context *, pointer, pointer)
struct protectframe * protfp
void addcmethod(context *, pointer, pointer(*)(), pointer, pointer, pointer)
pointer makeclosure(pointer, pointer, pointer(*)(), pointer, pointer *, pointer *)
pointer defunpkg(context *, char *, pointer, pointer(*)(), pointer)
eusinteger_t intval(pointer p)
pointer makesymbol(context *, char *, int, pointer)
eusinteger_t hide_ptr(pointer p)
pointer eusfloat_to_big(float)
pointer csend(context *,...)
context * euscontexts[MAXTHREAD]
struct catchframe * nextcatch
pointer prinx(context *, pointer, pointer)
unsigned long euspointer_t
pointer cons(context *, pointer, pointer)
struct fletframe * dynlink
pointer eval(context *, pointer)
pointer progn(context *, pointer)
pointer makematrix(context *, int, int)
struct specialbindframe * sbindfp
pointer findsymbol(unsigned char *, int, pointer, int *)
struct fletframe * newfletfp
struct bindframe * bindkeyparams(context *, pointer, pointer *, int, struct bindframe *, struct bindframe *)
pointer makecode(pointer, pointer(*)(), pointer)
pointer getfunc(context *, pointer)
pointer * ovafptr(pointer, pointer)
eusfloat_t big_to_float(pointer)
struct blockframe * blkfp
pointer makepkg(context *, pointer, pointer, pointer)
pointer defspecial(context *, char *, pointer, pointer(*)())
pointer stacknlist(context *, int)
pointer defun(context *, char *, pointer, pointer(*)(), char *)
struct callframe * callfp
pointer mkiostream(context *, pointer, pointer)
pointer ufuncall(context *, pointer, pointer, pointer, struct bindframe *, int)
pointer makethreadport(context *)
pointer setval(context *, pointer, pointer)
struct specialbindframe * sblink
struct numunion::@11 sval
long buddysize[MAXBUDDY+1]
long alloccount[MAXBUDDY]
struct methdef * methcache
euslisp
Author(s): Toshihiro Matsui
autogenerated on Thu Jun 15 2023 02:06:43