14 #define errno errnoGet() 15 #define _setjmp(buf) setjmp(buf) 16 #define _longjmp(buf,val) longjmp(buf,val) 19 #define min(x,y) ((x<y)?x:y) 20 #define max(x,y) ((x<y)?y:x) 24 #define _setjmp(buf) setjmp(buf) 25 #define _longjmp(buf,val) longjmp(buf,val) 32 #define STOPPER makepointer(0) 33 #define UNBOUND makepointer(0) 36 #define V_CONSTANT makeint(0) 37 #define V_VARIABLE makeint(1) 38 #define V_SPECIAL makeint(2) 41 #define SUBR_FUNCTION makeint(0) 42 #define SUBR_MACRO makeint(1) 43 #define SUBR_SPECIAL makeint(2) 44 #define SUBR_ENTRY makeint(3) 47 #define BLOCKFRAME makeint(0) 48 #define TAGBODYFRAME makeint(1) 64 #define DEFAULTCHUNKINDEX 16 66 #define MAXSTACK 16384 69 #define KEYWORDPARAMETERLIMIT 32 70 #define ARRAYRANKLIMIT 7 77 typedef unsigned char byte;
78 typedef unsigned short word;
119 pointer intsymvector;
138 pointer resulttype;};
201 dim[ARRAYRANKLIMIT];};
252 #if vax || sun4 || news || mips 291 struct {
short low,high;} sval;
306 struct bcell rootcell;};
372 #define MAXMETHCACHE 256 375 pointer selector,
class,ownerclass,method;
379 pointer *stack, *vsp,*stacklimit;
527 #define carof(p,err) (islist(p)?(p)->c.cons.car:error(err)) 528 #define cdrof(p,err) (islist(p)?(p)->c.cons.cdr:error(err)) 529 #define ccar(p) ((p)->c.cons.car) 530 #define ccdr(p) ((p)->c.cons.cdr) 531 #define cixof(p) ((p)->cix) 532 #define classof(p) (classtab[(p)->cix].def) 533 #define subcixof(p) (classtab[(p)->cix].subcix) 534 #define spevalof(p) ((p)->c.sym.speval) 535 #define superof(p) ((p)->c.cls.super) 537 #if sun3 || apollo || system5 || sanyo || vxworks || NEXT 538 #define makepointer(bp) ((pointer)((int)(bp) | 2)) 539 #define isint(p) (!((int)(p) & 3)) 540 #define isflt(p) (((int)(p) & 3)==1) 541 #define isnum(p) (((int)(p) & 2)==0) 542 #define ispointer(p) ((int)(p) & 2) 543 #define makeint(v) ((pointer)(((int)v)<<2)) 544 #define bpointerof(p) ((bpointer)((int)(p)-2)) 547 #if vax || sun4 || news || mips 548 #define makepointer(bp) ((pointer)(bp)) 549 #define isint(p) (((int)(p) & 3)==2) 550 #define isflt(p) (((int)(p) & 3)==1) 551 #define isnum(p) (((int)(p) & 3)) 552 #define ispointer(p) (!((int)(p) & 3)) 553 #define makeint(v) ((pointer)((((int)v)<<2)+2)) 554 #define bpointerof(p) ((bpointer)(p)) 557 #define intval(p) (((int)(p))>>2) 558 #define ckintval(p) (isint(p)?intval(p):(int)error(E_NOINT)) 559 #define elmtypeof(p) (bpointerof(p)->h.elmtype) 560 #define bixof(p) (bpointerof(p)->h.bix) 562 #if sun3 || sun4 || system5 || apollo || news || sanyo || vxworks || mips || NEXT 563 #define fltval(p) (nu.ival=(int)p & 0xfffffffc, nu.fval) 564 #define makeflt(f) (nu.fval=(f), (pointer)((nu.ival & 0xfffffffc) | 1)) 565 #define ckfltval(p) (isflt(p)?fltval(p):(isint(p)?intval(p):(int)error(E_NONUMBER))) 569 #define pislist(p) (p->cix<=conscp.sub) 570 #define piscons(p) (p->cix<=conscp.sub) 571 #define pispropobj(p) (propobjcp.cix<=(p)->cix && (p)->cix<=propobjcp.sub) 572 #define ispropobj(p) (ispointer(p) && pispropobj(p)) 573 #define pissymbol(p) (symbolcp.cix<=(p)->cix && (p)->cix<=symbolcp.sub) 574 #define issymbol(p) (ispointer(p) && pissymbol(p)) 575 #define pisstring(p) (stringcp.cix<=(p)->cix && (p)->cix<=stringcp.sub) 576 #define isstring(p) (ispointer(p) && pisstring(p)) 577 #define islist(p) (ispointer(p) && pislist(p)) 578 #define iscons(p) (ispointer(p) && piscons(p)) 579 #define piscode(p) (codecp.cix<=(p)->cix && (p)->cix<=codecp.sub) 580 #define iscode(p) (ispointer(p) && piscode(p)) 581 #define pisfcode(p) (fcodecp.cix<=(p)->cix && (p)->cix<=fcodecp.sub) 582 #define isfcode(p) (ispointer(p) && pisfcode(p)) 583 #define pisldmod(p) (ldmodulecp.cix<=(p)->cix && (p)->cix<=ldmodulecp.sub) 584 #define isldmod(p) (ispointer(p) && pisldmod(p)) 585 #define pisstream(p) (streamcp.cix<=(p)->cix && (p)->cix<=streamcp.sub) 586 #define isstream(p) (ispointer(p) && pisstream(p)) 587 #define pisfilestream(p) (filestreamcp.cix<=(p)->cix && (p)->cix<=filestreamcp.sub) 588 #define isfilestream(p) (ispointer(p) && pisfilestream(p)) 589 #define pisiostream(p) (iostreamcp.cix<=(p)->cix && (p)->cix<=iostreamcp.sub) 590 #define isiostream(p) (ispointer(p) && pisiostream(p)) 591 #define pisreadtable(p) (readtablecp.cix<=((p)->cix) && ((p)->cix)<=readtablecp.sub) 592 #define isreadtable(p) (ispointer(p) && pisreadtable(p)) 593 #define pisarray(p) (arraycp.cix<=((p)->cix) && ((p)->cix)<=arraycp.sub) 594 #define isarray(p) (ispointer(p) && pisarray(p)) 595 #define pisvector(p) (elmtypeof(p)) 596 #define isvector(p) (ispointer(p) && pisvector(p)) 597 #define isfltvector(p) (ispointer(p) && (elmtypeof(p)==ELM_FLOAT)) 598 #define isptrvector(p) (ispointer(p) && (elmtypeof(p)==ELM_POINTER)) 599 #define isintvector(p) (ispointer(p) && (elmtypeof(p)==ELM_INT)) 600 #define pisclass(p) (metaclasscp.cix<=(p)->cix && (p)->cix<=metaclasscp.sub) 601 #define isclass(p) (ispointer(p) && pisclass(p)) 602 #define pisvecclass(p) (vecclasscp.cix<=(p)->cix && (p)->cix<=vecclasscp.sub) 603 #define isvecclass(p) (ispointer(p) && pisvecclass(p)) 604 #define pispackage(p) (packagecp.cix<=(p)->cix && (p)->cix<=packagecp.sub) 605 #define ispackage(p) (ispointer(p) && pispackage(p)) 606 #define pisclosure(p) (closurecp.cix<=(p)->cix && (p)->cix<=closurecp.sub) 607 #define isclosure(p) (ispointer(p) && pisclosure(p)) 608 #define pislabref(p) (labrefcp.cix<=(p)->cix && (p)->cix<=labrefcp.sub) 609 #define islabref(p) (ispointer(p) && pislabref(p)) 611 #define strlength(p) (intval((p)->c.str.length)) 612 #define vecsize(p) (intval((p)->c.vec.size)) 613 #define objsize(p) (vecsize(classof(p)->c.cls.vars)) 615 #define vpush(v) (*ctx->vsp++=((pointer)v)) 616 #define ckpush(v) (ctx->vsp<ctx->stacklimit?vpush(v):error(E_STACKOVER)) 617 #define vpop() (*(--(ctx->vsp))) 619 #define ckarg(req) if (n!=(req)) error(E_MISMATCHARG) 620 #define ckarg2(req1,req2) if ((n<(req1))||((req2)<n)) error(E_MISMATCHARG) 622 #define breakck if (intsig) sigbreak() 623 #define stackck if (ctx->vsp>ctx->stacklimit) error(E_STACKOVER) 624 #define debug (spevalof(QDEBUG)!=NIL) 721 extern pointer
csend();
737 extern pointer
memq();
742 extern pointer
makeclass(
context *, pointer, pointer, pointer,pointer, pointer,
762 pointer, pointer, pointer);
782 extern pointer
makeclosure(pointer,pointer,
int,pointer*, pointer*);
783 extern pointer
fcall();
786 extern pointer *
ovafptr(pointer,pointer);
struct fletframe * dynlink
pointer defvar(context *, char *, pointer, pointer)
struct bindframe * bindkeyparams(context *, pointer, pointer *, int, struct bindframe *, struct bindframe *)
pointer eval(context *, pointer)
int rank(int n, int p, MATRIX s)
pointer cons(context *, pointer, pointer)
void unbindspecial(context *, struct specialbindframe *)
struct protectframe * protlink
struct blockframe * lexklink
struct blockframe * dynklink
struct class_desc classtab[MAXCLASS]
struct bindframe * declare(context *, pointer, struct bindframe *)
struct buddybase buddy[MAXBUDDY+1]
pointer defun(context *, char *, pointer, pointer(*)())
pointer defmacro(context *, char *, pointer, pointer(*)())
pointer makemodule(context *, int)
pointer intern(context *, char *, int, pointer)
pointer makematrix(context *, int, int)
pointer defconst(context *, char *, pointer, pointer)
long alloccount[MAXBUDDY]
pointer makeobject(pointer)
struct bindframe * lexblink
pointer eval2(context *, pointer, pointer)
pointer reader(context *, pointer, pointer)
pointer makepkg(context *, pointer, pointer, pointer)
struct bindframe * vbind(context *, pointer, pointer, struct bindframe *, struct bindframe *)
pointer setval(context *, pointer, pointer)
makethreadport(context *)
pointer progn(context *, pointer)
struct methdef methcache[MAXMETHCACHE]
struct bindframe * dynblink
struct fletframe * lexlink
pointer getval(context *, pointer)
void addcmethod(context *, pointer, pointer(*)(), pointer, pointer, pointer)
pointer getfunc(context *, pointer)
void bindspecial(context *, pointer, pointer)
struct catchframe * nextcatch
context * euscontexts[MAXTHREAD]
pointer makevector(pointer, int)
pointer defunpkg(context *, char *, pointer, pointer(*)(), pointer)
pointer * ovafptr(pointer, pointer)
pointer makecode(pointer, pointer(*)(), pointer)
pointer rawcons(context *, pointer, pointer)
struct specialbindframe * sblink
pointer makesymbol(context *, char *, int, pointer)
pointer stacknlist(context *, int)
pointer makeclass(context *, pointer, pointer, pointer, pointer, pointer, int, pointer)
pointer defkeyword(context *, char *)
struct built_in_cid builtinclass[64]
pointer mkiostream(context *, pointer, pointer)
pointer prinx(context *, pointer, pointer)
pointer makestring(char *, int)
struct bindframe * fastbind(context *, pointer, pointer, struct bindframe *)
pointer mkstream(context *, pointer, pointer)
pointer defspecial(context *, char *, pointer, pointer(*)())
pointer mkfilestream(context *, pointer, pointer, int, pointer)
pointer ufuncall(context *, pointer, pointer, pointer, struct bindframe *, int)
pointer makeclosure(pointer, pointer, int, pointer *, pointer *)