eus.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* eus.h Etl, Umezono, Sakura-mura Lisp
3 /* @(#)$Id$
4 /* Copyright(c)1988, Toshihiro Matsui, Electrotechnical Laboratory,
5 /* all rights reserved, all wrongs left.
6 /* created on: 1986-May
7 /* needed to be included by all euslisp kernel (.c) files and
8 /* user functions compiled by euscomp.
9 /****************************************************************/
10 
11 
12 #if (__SIZEOF_SIZE_T__ == 8) || (alpha || IRIX6 || x86_64 || aarch64 || ppc64le)
13 #define WORD_SIZE 64
14 #else
15 #define WORD_SIZE 32
16 #endif
17 
18 #if (WORD_SIZE == 64)
19 typedef long eusinteger_t;
20 typedef unsigned long euspointer_t;
21 typedef double eusfloat_t;
22 #define WORDSHIFT 3
23 #else
24 typedef int eusinteger_t;
25 typedef unsigned int euspointer_t;
26 typedef float eusfloat_t;
27 #define WORDSHIFT 2
28 #endif
29 #define wordsizeof(type) (sizeof(type)>>WORDSHIFT)
30 
31 #if GCC || Solaris2 || IRIX || Linux || IRIX6
32 #define USE_STDARG
33 #include <stdlib.h>
34 #include <string.h>
35 #include <unistd.h>
36 #include <ctype.h>
37 #endif
38 
39 #if alpha
40 #include <stdlib.h>
41 #include <unistd.h>
42 #include <values.h>
43 #define USE_STDARG
44 #endif
45 
46 #if defined(Darwin) || defined(Linux) || defined(Linux64)
47 #define cfree free
48 #endif
49 
50 #ifdef USE_STDARG
51 #include <stdarg.h>
52 #else
53 #include <varargs.h>
54 #endif
55 
56 #if Cygwin
57 #define T LISPT
58 #define READ LISPREAD
59 #define cfree free
60 #endif
61 
62 #if vxworks
63 #include <vxWorks.h>
64 #include <stdioLib.h>
65 #define errno errnoGet()
66 #else
67 #include <stdio.h>
68 #ifndef __cplusplus
69 #define min(x,y) ((x<y)?x:y)
70 #define max(x,y) ((x<y)?y:x)
71 #endif
72 #endif
73 
74 #if (WORD_SIZE == 64)
76 #define eussetjmp(buf) (_setjmp(buf)?setjmp_val:(euspointer_t)0)
77 #define euslongjmp(buf,val) (setjmp_val=(euspointer_t)(val),_longjmp(buf,1))
78 #else
79 #if (Solaris2 || vxworks)
80 #define eussetjmp(buf) (eusinteger_t)setjmp(buf)
81 #define euslongjmp(buf,val) longjmp(buf,(int)(val))
82 #include <synch.h>
83 #else
84 #define eussetjmp(buf) (eusinteger_t)_setjmp(buf)
85 #define euslongjmp(buf,val) _longjmp(buf,(int)(val))
86 #endif
87 #endif
88 
89 #include <setjmp.h>
90 #include <string.h>
91 
92 #define ERR (-1)
93 #define STOPPER ((pointer)0L) /*impossible pointer object*/
94 #define UNBOUND ((pointer)0L)
95 
96 /* dynamic value type */
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)
101 
102 /* function types*/
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)
107 
108 /* stack frame types (lots more)*/
109 #define BLOCKFRAME ((pointer)((0<<2)+2)) // makeint(0)
110 #define TAGBODYFRAME ((pointer)((1<<2)+2)) // makeint(1)
111 
112 /*vector element types*/
113 #define ELM_FIXED 0
114 #define ELM_BIT 1
115 #define ELM_CHAR 2
116 #define ELM_BYTE 3
117 #define ELM_INT 4
118 #define ELM_FLOAT 5
119 #define ELM_FOREIGN 6
120 #define ELM_POINTER 7
121 
122 /* machine architecture dependent constants*/
123 /* MASK & long removes the MSB (sign bit) */
124 
125 #if (WORD_SIZE == 64)
126 #define MASK 0x7fffffffffffffff
127 #define MSB 0x8000000000000000
128 #else
129 #define MASK 0x7fffffff
130 #define MSB 0x80000000
131 #endif
132 
133 /****************************************************************/
134 /* configuration constants */
135 /****************************************************************/
136 
137 #define DEFAULTCHUNKINDEX 16 /*fib2(12)=754*/
138 #define MAXBUDDY 40 /*fib(30) is big enough*/
139  /*MAXBUDDY must be smaller than 2^bix, where bix is 6bit,
140  63 at most.
141  fib(29) nealy equals to 2.4M,
142  fib(30) to 4M words*/
143 #define MAXTHRBUDDY 6 /*small free cells cached thread-locally*/
144 #define MAXSTACK 8388608 /* patched: default stack size 16bit -> 23bit, can be expanded by sys:newstack*/
145 #define SYMBOLHASH 60 /*initial obvector size in package*/
146 #define MAXCLASS 4096 /* by M.Inaba from 64 */
147 #define KEYWORDPARAMETERLIMIT 128 /* patched: default keyword size 32->128 */
148 #define ARRAYRANKLIMIT 7 /*minimal requirement for CommonLisp*/
149 #define MAXTHREAD 64 /*maximum number of threads*/
150 #define MAX_SPECIALS 512 /*maximum number of special variables*/
151 #if (WORD_SIZE == 64)
152 #define MAXPOSFIXNUM (0x1fffffffffffffff)
153 #define MINNEGFIXNUM (0xe000000000000000)
154 #else
155 #define MAXPOSFIXNUM (0x1fffffff)
156 #define MINNEGFIXNUM (0xe0000000)
157 #endif
158 
159 /* type definitions:
160  bix is buddy index,
161  and cix is class index, which is sometimes refered as cid */
162 
163 typedef unsigned char byte;
164 typedef unsigned short word; /*seldom used*/
165 typedef struct cell *pointer;
166 
167 #ifdef RGC
168 #include "external_markbits.h"
169 #include "time.h"
170 #include "collector.h"
171 #else
172 #define GC_POINT
173 #define GC_REGION(cmp_statement) cmp_statement
174 #endif
175 
176 struct cellheader {
177  unsigned mark:1; /* GC mark*/
178  unsigned b:1; /* buddy: indicates the side in which its buddy should be found */
179  unsigned m:1; /* memory: records b or m of parent cell when it's split*/
180  unsigned smark:1; /* shared mark*/
181  unsigned pmark:1; /* print mark*/
182  unsigned elmtype:3;
183  unsigned nodispose:1;
184 #ifdef RGC
185  unsigned bix:7;
186 #else
187  unsigned extra:1;
188  unsigned bix:6; /*5 bits are enough*/
189 #endif
190  short cix;}; /*8 bits may be enough*/
191 
192 /****************************************************************/
193 /* struct definition for lisp object cell
194 /****************************************************************/
195 struct cons {
196  pointer car, /*cons is made of a car and a cdr*/
197  cdr;}; /*what a familiar structure!*/
198 
200  pointer plist;};
201 
202 struct symbol {
203  pointer plist, /*inherited from prop_obj*/
204  speval,
205  vtype, /*const,var,special*/
206  spefunc,
207  pname,
208  homepkg;};
209 
210 struct string { /*resembles with vector*/
211  pointer length; /*boxed*/
212  byte chars[1];}; /*long word aligned*/
213 
214 struct foreign {
215  pointer length;
216  byte *chars; };
217 
218 struct package {
219  pointer plist;
220  pointer names; /*package name at car, nicknames in cdr*/
221  pointer use; /*spreaded use-package list*/
222  pointer symvector; /*hashed obvector*/
223  pointer symcount; /*number of interned symbols in this package*/
224  pointer intsymvector;
225  pointer intsymcount;
226  pointer shadows;
227  pointer used_by;
228  };
229 
230 struct code {
231  pointer codevec;
232  pointer quotevec;
233  pointer subrtype; /*function,macro,special*/
234  pointer entry; /*offset from beginning of codevector*/
235 #if ARM
236  pointer entry2; /* some archtecture did not set code on 4 byte alignment */
237 #endif
238  };
239 
240 struct fcode { /*foreign function code*/
241  pointer codevec;
242  pointer quotevec;
243  pointer subrtype;
244  pointer entry;
245  pointer entry2; /* kanehiro's patch 2000.12.13 */
246  pointer paramtypes;
247  pointer resulttype;};
248 
249 struct ldmodule { /*foreign language object module*/
250  pointer codevec;
251  pointer quotevec;
252  pointer subrtype; /*function,macro,special*/
253  pointer entry;
254 #if ARM
255  pointer entry2; /* some archtecture did not set code on 4 byte alignment */
256 #endif
257  pointer symtab;
258  pointer objname;
259  pointer handle;}; /* dl's handle */
260 
261 struct closure {
262  pointer codevec;
263  pointer quotevec;
264  pointer subrtype; /*function,macro,special*/
265  pointer entry; /*offset from beginning of codevector*/
266 #if ARM
267  pointer entry2; /* some archtecture did not set code on 4 byte alignment */
268 #endif
269  pointer env0; /*upper closure link*/
270  pointer *env1; /*argument pointer: argv*/
271  pointer *env2;}; /*local variable frame: local*/
272 
273 struct stream {
274  pointer plist;
275  pointer direction;
276  pointer buffer;
277  pointer count;
278  pointer tail;};
279 
280 struct filestream {
281  pointer plist;
282  pointer direction;
283  pointer buffer;
284  pointer count;
285  pointer tail;
286  pointer fd;
287  pointer fname;};
288 
289 struct iostream {
290  pointer plist;
291  pointer in,out;};
292 
293 struct labref { /*used for reading labeled forms: #n#,#n=*/
294  pointer label;
295  pointer value;
296  pointer unsolved;
297  pointer next; };
298 
299 struct vector {
300  pointer size;
301  pointer v[1];};
302 
303 struct intvector {
304  pointer length;
305  eusinteger_t iv[1];};
306 
307 struct floatvector {
308  pointer length;
309  eusfloat_t fv[1];};
310 
311 struct arrayheader {
312  pointer plist;
313  pointer entity,
314  rank,
315  fillpointer,
316  offset,
317  dim[ARRAYRANKLIMIT];};
318 
319 /* structs for object oriented programming */
320 struct object {
321  pointer iv[2];}; /*instance variables*/
322 
323 struct _class {
324  pointer plist;
325  pointer name; /*class name symbol*/
326  pointer super; /*super class*/
327  pointer cix;
328  pointer vars; /*var names including inherited ones*/
329  pointer types;
330  pointer forwards;
331  pointer methods; /*method list*/
332  };
333 
334 struct vecclass { /*vector class*/
335  pointer plist;
336  pointer name;
337  pointer super;
338  pointer cix;
339  pointer vars;
340  pointer types;
341  pointer forwards;
342  pointer methods;
343  pointer elmtype;
344  pointer size;};
345 
346 struct readtable {
347  pointer plist;
348  pointer syntax;
349  pointer macro;
350  pointer dispatch;
351  pointer readcase;};
352 
353 struct threadport {
354  pointer plist;
355  pointer id;
356  pointer requester;
357  pointer reqsem;
358  pointer runsem;
359  pointer donesem;
360  pointer func;
361  pointer args;
362  pointer result;
363  pointer contex;
364  pointer idle;
365  pointer wait;};
366 
367 /* extended numbers */
368 struct ratio {
369  pointer numerator;
370  pointer denominator;};
371 
372 struct complex {
373  pointer real;
374  pointer imaginary;};
375 
376 struct bignum {
377  pointer size;
378  pointer bv;}; /*bignum vector*/
379 
380 /****************************************************************/
381 typedef
382  struct cell {
383 #if vax || sun4 || news || mips || alpha || Linux
384  unsigned mark:1;
385  unsigned b:1;
386  unsigned m:1;
387  unsigned smark:1;
388  unsigned pmark:1;
389  unsigned elmtype:3;
390  unsigned nodispose:1;
391 #ifdef RGC
392  unsigned bix:7;
393 #else
394  unsigned extra:1;
395  unsigned bix:6;
396 #endif
397 #endif
398  short cix;
399  union cellunion {
400  struct cons cons;
401  struct symbol sym;
402  struct string str;
403  struct foreign foreign;
404  struct package pkg;
405  struct stream stream;
406  struct filestream fstream;
408  struct code code;
409  struct fcode fcode;
410  struct ldmodule ldmod;
411  struct closure clo;
412  struct labref lab;
413  struct arrayheader ary;
414  struct vector vec;
415  struct floatvector fvec;
416  struct intvector ivec;
417  struct object obj;
418  struct _class cls;
419  struct vecclass vcls;
420  struct readtable rdtab;
421  struct threadport thrp;
422  struct ratio ratio;
423  struct complex cmplx;
424  struct bignum bgnm;
425  } c;
426  } cell;
427 
428 typedef
429  union numunion {
432 #if vax
433  struct {short low,high;} sval;
434 #endif
435 /* struct { signed sival:30; unsigned tag:2;} tval; */
436  } numunion;
437 
438 /* buddy cell */
439 struct bcell {
440  struct cellheader h;
441  union {
442  struct bcell *nextbcell;
443  struct cell *c[2];} b;} /* bcell */;
444 
445 typedef struct bcell *bpointer;
446 
447 struct chunk {
448  struct chunk *nextchunk;
449  int chunkbix;
450  struct bcell rootcell;};
451 
452 typedef struct {
453  short cix;
454  short sub;} cixpair;
455 
456 enum ch_type {
466 
467 enum ch_attr {
469 
470 
471 /****************************************************************/
472 /* stack frames and context
473 /****************************************************************/
474 struct callframe {
475  struct callframe *vlink;
476  pointer form;
477  };
478 
479 struct bindframe { /*to achieve lexical binding in the interpreter*/
480  struct bindframe *dynblink, *lexblink; /*links to upper level*/
481  pointer sym; /*symbol*/
482  pointer val;}; /*bound value*/
483 
484 struct specialbindframe { /*special value binding frame*/
486  pointer sym; /*pointer to the symbol word(dynval or dynfunc)*/
487  pointer oldval;};
488 
489 struct blockframe {
490  pointer kind;
492  pointer name;
493  jmp_buf *jbp;};
494 
495 struct catchframe {
497  pointer label;
498  struct bindframe *bf; /*bind frame save*/
499  struct callframe *cf; /*call frame save*/
500  struct fletframe *ff;
501  jmp_buf *jbp;
502  };
503 
504 struct protectframe {
506  pointer cleaner; /*cleanup form closure*/
507  };
508 
509 struct fletframe {
510  pointer name;
511  pointer fclosure;
512  struct fletframe *scope;
514  struct fletframe *dynlink;};
515 
516 #define MAXMETHCACHE 256 /*must be power to 2*/
517 
518 struct methdef {
519  pointer selector,class,ownerclass,method;
520  } /*methcache[MAXMETHCACHE]*/;
521 
522 /* thread context */
523 
524 typedef struct {
525  pointer *stack, *vsp,*stacklimit;
526 #ifdef RGC
527  pointer *gcstack, *gsp, *gcstacklimit;
528 #endif
529  struct callframe *callfp;
531  struct bindframe *bindfp;
533  struct blockframe *blkfp;
535  struct fletframe *fletfp, *newfletfp;
536  pointer lastalloc;
537  pointer errhandler;
538  pointer threadobj;
545  pointer specials;
546  int intsig;
547 #ifdef __RETURN_BARRIER
548  rbar_t rbar; /* some extra words are needed? */
549 #else
550  long extra[10]; /* 32 long words */
551 #endif
552 #ifdef __GC_ALLOC_DRIVEN
554 #endif
555  }
556  context;
557 
558 /****************************************************************
559 /* memory and class management structures
560 /****************************************************************/
561 extern long buddysize[MAXBUDDY+1];
562 
563 extern struct buddyfree {
564  int count; /*number of free cells*/
565  bpointer bp;} buddy[MAXBUDDY+1];
566 
567 struct class_desc { /* per- class descripter */
568  short cix;
569  short subcix;
570  pointer def; };
571 
572 struct built_in_cid {
573  pointer cls;
574  cixpair *cp; };
575 
576 #if THREADED
577 #include "eus_thr.h" /* thread definition by APT */
578 #endif
579 
580 
581 /****************************************************************/
582 /* global variables for eus
583 /* date: 1986-Apr
584 /* 1987-Apr
585 /****************************************************************/
586 /* process id and program name*/
587 extern eusinteger_t mypid;
588 extern char *progname;
589 
590 /* heap management */
591 /* every free cell is linked to the buddybase structure*/
592 extern struct buddyfree buddy[MAXBUDDY+1];
593 extern struct chunk *chunklist;
594 extern char *maxmemory;
595 extern long freeheap, totalheap; /*size of heap left and allocated*/
596 
597 /* memory management timers for performance evaluation */
598 extern long gccount,marktime,sweeptime;
599 extern long alloccount[MAXBUDDY];
600 
601 /* System internal objects are connected to sysobj list
602 /* to protect from garbage-collection */
603 extern pointer sysobj;
604 extern pointer lastalloc;
605 
606 /* thread euscontexts */
607 extern context *euscontexts[MAXTHREAD];
608 
609 /****************************************************************/
610 /* system defined (built-in) class index
611 /* modified to accept dynamic type extension (1987-Jan)
612 /****************************************************************/
613 
614 extern cixpair objectcp;
615 extern cixpair conscp;
616 extern cixpair propobjcp;
617 extern cixpair lockablecp;
618 extern cixpair symbolcp;
619 extern cixpair packagecp;
620 extern cixpair streamcp;
621 extern cixpair filestreamcp;
622 extern cixpair iostreamcp;
623 extern cixpair metaclasscp;
624 extern cixpair vecclasscp;
625 extern cixpair codecp;
626 extern cixpair fcodecp;
627 /*cixpair modulecp; */
628 extern cixpair ldmodulecp;
629 extern cixpair closurecp;
630 extern cixpair labrefcp;
631 extern cixpair threadcp;
632 extern cixpair arraycp;
633 extern cixpair readtablecp;
634 extern cixpair vectorcp;
635 extern cixpair fltvectorcp;
636 extern cixpair intvectorcp;
637 extern cixpair stringcp;
638 extern cixpair bitvectorcp;
639 /*extended numbers*/
640 extern cixpair extnumcp;
641 extern cixpair ratiocp;
642 extern cixpair complexcp;
643 extern cixpair bignumcp;
644 
645 extern struct built_in_cid builtinclass[64];
646 extern int nextbclass;
647 
648 
649 /*symbol management*/
651 extern pointer NIL,PACKAGE,T,QUOTE;
652 extern pointer FUNCTION;
653 extern pointer QDECLARE,QSPECIAL;
654 #if SunOS4_1 /* SELF is already used on SunOS 4.1.x. */
655 extern pointer QSELF;
656 #else
657 extern pointer SELF;
658 #endif
659 extern pointer CLASS;
660 extern pointer STDIN,STDOUT,ERROUT,QSTDIN,QSTDOUT,QERROUT;
661 extern pointer QINTEGER,QFIXNUM,QFLOAT,QNUMBER;
662 extern pointer TOPLEVEL,QEVALHOOK,ERRHANDLER;
663 extern pointer QGCHOOK, QEXITHOOK;
664 extern pointer QUNBOUND,QDEBUG;
665 extern pointer QTHREADS;
666 extern pointer QEQ,QEQUAL,QNOT;
667 extern pointer QAND, QOR, QNOT;
668 
669 /*memory management parameters*/
670 extern pointer GCMERGE,GCMARGIN;
671 
672 /* keywords */
673 extern pointer K_IN,K_OUT,K_IO; /*direction keyword*/
674 extern pointer K_FLUSH,K_FILL,K_FILE,K_STRING;
678 
679 /*class management*/
680 extern struct class_desc classtab[MAXCLASS];
681 extern int nextcix;
682 
683 /*class cells*/
684 extern pointer C_CONS, C_OBJECT, C_SYMBOL, C_PACKAGE;
685 extern pointer C_STREAM, C_FILESTREAM, C_IOSTREAM, C_CODE, C_FCODE;
686 extern pointer C_LDMOD;
687 extern pointer C_VECTOR, C_METACLASS, C_CLOSURE, C_LABREF;
688 extern pointer C_THREAD;
690 extern pointer C_FOREIGNCODE,C_ARRAY,C_READTABLE;
691 extern pointer C_EXTNUM, C_RATIO, C_COMPLEX, C_BIGNUM;
692 
693 /*class names*/
694 extern pointer QCONS,STRING,STREAM,FILESTREAM,IOSTREAM,SYMBOL,
696 extern pointer THREAD;
698 extern pointer FOREIGNCODE,ARRAY,BITVECTOR;
699 extern pointer EXTNUM, RATIO, COMPLEX, BIGNUM;
700 
701 /*toplevel & evaluation control*/
702 extern int intsig; /*0:no signal, 1-32:pending, -1:in progress*/
703 extern int intcode;
704 extern int ehbypass;
705 
706 /*reader variables*/
707 extern pointer charmacro[256];
708 extern pointer sharpmacro[256];
709 extern int export_all;
710 
711 /****************************************************************/
712 /* macro definition for euslisp
713 /****************************************************************/
714 
715 #ifdef RGC
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
719 #else
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
723 #endif
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)]: \
734  (p)->c.sym.speval)
735 #define superof(p) ((p)->c.cls.super)
736 
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))
746 #endif
747 
748 #if vax || sun4 || news || mips || alpha || Linux
749 
750 #define makepointer(bp) ((pointer)(bp))
751 // #define isint(p) (((euspointer_t)(p) & 3)==2) // org
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))
757 // #define makeint(v) ((pointer)((((euspointer_t)(v))<<2)+2)) // org
758 #ifdef __cplusplus
759 extern "C" {
760 #endif
761 extern pointer makeint(eusinteger_t v);
762 #ifdef __cplusplus
763 }
764 #endif
765 
766 #define bpointerof(p) ((bpointer)((euspointer_t)(p)))
767 #ifdef RGC
768 #define nextbuddy(p) ((bpointer)((euspointer_t)(p)+(buddysize[(p->h.bix)&TAGMASK]*sizeof(pointer))))
769 #else
770 #define nextbuddy(p) ((bpointer)((euspointer_t)(p)+(buddysize[p->h.bix]*sizeof(pointer))))
771 #endif
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
776 #endif
777 #endif
778 
779 // #define intval(p) (((eusinteger_t)(p))>>2) // org
780 #ifdef __cplusplus
781 extern "C" {
782 #endif
783 extern eusinteger_t intval(pointer p);
784 #ifdef __cplusplus
785 }
786 #endif
787 #define ckintval(p) ((isint(p)|| \
788  (isbignum(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):\
793  (isbignum(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))
800 
801 #define elmtypeof(p) (bpointerof(p)->h.elmtype)
802 #ifdef RGC
803 #define bixof(p) (bpointerof(p)->h.bix & TAGMASK)
804 #else
805 #define bixof(p) (bpointerof(p)->h.bix)
806 #endif
807 
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))
812 #else
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))
815 #endif
816 
817 /*#if GCC
818 #define makeflt(f) (nu.fval=(f), (pointer)((nu.ival & (~2)) | 1))
819 #define makeflt(f) (nu.fval=(f),nu.tval.tag=1,(pointer)(nu.ival))
820 #endif */
821 
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)))))
827 #endif
828 
829 /*predicates to test object type*/
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))
871 /* extended numbers */
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))
880 
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))
884 
885 /* bignum */
886 #define bigsize(x) vecsize((x)->c.bgnm.bv)
887 #define bigvec(x) (x)->c.bgnm.bv->c.ivec.iv
888 
889 /*stack*/
890 #define current_ctx (euscontexts[thr_self()])
891 #ifdef STACK_DEBUG
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)))
894 #else
895 #define vpush(v) (*ctx->vsp++=((pointer)v))
896 #define vpop() (*(--(ctx->vsp)))
897 #endif
898 #define ckpush(v) (ctx->vsp<ctx->stacklimit?vpush(v):(pointer)error(E_STACKOVER))
899 
900 #define ckarg(req) if (n!=(req)) error(E_MISMATCHARG)
901 #define ckarg2(req1,req2) if ((n<(req1))||((req2)<n)) error(E_MISMATCHARG)
902 
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)
906 
907 #ifndef RGC
908 #define pointer_update(l,r) { (l)=(r); }
909 #define take_care(p)
910 
911 #endif
912 
913 
914 /****************************************************************/
915 /* error code definition
916 /* 1986-Jun-17
917 /****************************************************************/
918 
919 enum errorcode {
920 /* first 10 codes are fatal errors */
921  E_NORMAL, /*0*/
922  E_STACKOVER, /*stack overflow*/
924 #ifdef RGC
927 #else
930 #endif
937 #define E_FATAL 10
938 /* followings are not fatal errors */
939  E_SETCONST, /*11 attempt to set to constant*/
947  E_LONGSTRING, /*19: string too long*/
948  E_NOSYMBOL, /*20: symbol expected*/
949  E_NOLIST, /*list expected*/
950  E_LAMBDA, /*illegal lambda form*/
951  E_PARAMETER, /*illegal lambda parameter syntax*/
952  E_NOCATCHER, /*no catch block */
953  E_NOBLOCK, /*no block to return*/
954  E_STREAM, /*stream expected*/
955  E_IODIRECTION, /*io stream direction keyword*/
956  E_NOINT, /*integer value expected*/
957  E_NOSTRING, /*string expected*/
958  E_OPENFILE, /*30: error in open*/
959  E_EOF, /*EOF encountered*/
960  E_NONUMBER, /*number expected*/
961  E_CLASSOVER, /*class table overflow*/
962  E_NOCLASS, /*class expected*/
963  E_NOVECTOR, /*vector expected*/
964  E_VECSIZE, /*error of vector size*/
965  E_DUPOBJVAR, /*duplicated object variable name*/
966  E_INSTANTIATE, /*38: cannot make an instance*/
968  E_NOMETHOD, /*40*/
970  E_SHARPMACRO, /*unknown sharp macro*/
971  E_ALIST, /*list expected for an element of an alist*/
972  E_NOMACRO, /*macro expected*/
973  E_NOPACKAGE, /*no such package */
974  E_PKGNAME, /*the package already exists*/
975  E_NOOBJ, /*invalid form*/
976  E_NOOBJVAR, /*48: not an object variable*/
977  E_NOSEQ, /*sequence(list,string,vector) expected*/
978  E_STARTEND, /*illegal subsequence index*/
979  E_NOSUPER, /*no superclass*/
980  E_FORMATSTRING, /*invalid format string character*/
981  E_FLOATVECTOR, /*float vector expected*/
982  E_CHARRANGE, /*0..255*/
983  E_VECINDEX, /*vector index mismatch*/
984  E_NOOBJECT, /*other than numbers expected*/
985  E_TYPEMISMATCH, /*the: type mismatch*/
986  E_DECLARE, /*illegal declaration*/
987  E_DECLFORM, /*invalid declaration form*/
988  E_NOVARIABLE, /*constant is used in let or lambda*/
989  E_ROTAXIS, /*illegal rotation axis spec*/
991  E_READLABEL, /*illegal #n= or #n# label*/
992  E_READFVECTOR, /*error of #f( expression*/
993  E_READOBJECT, /*error in #V or #J format*/
994  E_SOCKET, /*error of socket address*/
995  E_NOARRAY, /*array expected*/
996  E_ARRAYDIMENSION, /*array dimension mismatch*/
997  E_KEYPARAM, /*keyword parameter expected*/
998  E_NOKEYPARAM, /*no such keyword*/
999  E_NOINTVECTOR, /*integer vector expected*/
1000  E_SEQINDEX, /*sequence index out of range*/
1001  E_BITVECTOR, /*not a bit vector*/
1002  E_EXTSYMBOL, /*no such external symbol*/
1003  E_SYMBOLCONFLICT, /*symbol conflict in a package*/
1004 
1005 /* the following error is added by APT */
1007 
1008 /* E_END must locate at the end of the error list */
1010  };
1011 
1012 /* function prototypes */
1013 
1014 #ifdef __cplusplus
1015 extern "C" {
1016 #endif
1017 /*eval*/
1018 #if alpha || IRIX6 || Solaris2 || Linux || Cygwin
1019 #include "eus_proto.h"
1020 #else
1021 extern pointer eval(context *, pointer);
1022 extern pointer eval2(context *, pointer, pointer);
1023 extern pointer ufuncall(context *, pointer, pointer, pointer,
1024  struct bindframe *, int);
1025 extern pointer funlambda(context *, pointer, pointer, pointer, pointer *,
1026  struct bindframe *, int);
1027 extern pointer funcode(context *, pointer, pointer, int);
1028 extern pointer progn(context *, pointer);
1029 extern pointer csend(context *, ...);
1030 extern pointer getval(context *, pointer);
1031 extern pointer setval(context *, pointer, pointer);
1032 extern pointer getfunc(context *, pointer);
1033 extern struct bindframe *declare(context *, pointer, struct bindframe *);
1034 extern struct bindframe *vbind(context *, pointer, pointer,
1035  struct bindframe *, struct bindframe*);
1036 extern struct bindframe *fastbind(context *, pointer, pointer,
1037  struct bindframe *);
1038 extern void bindspecial(context *, pointer, pointer);
1039 extern void unbindspecial(context *, struct specialbindframe *);
1040 extern struct bindframe *bindkeyparams(context *, pointer, pointer *,
1041  int, struct bindframe *, struct bindframe *);
1042 
1043 extern pointer Getstring();
1044 extern pointer findpkg();
1045 extern pointer memq();
1046 
1047 /*allocater*/
1048 extern pointer alloc(int, int, int, int);
1049 extern pointer makebuffer(int);
1050 extern pointer makevector(pointer, int);
1051 extern pointer makeclass(context *, pointer, pointer, pointer,pointer, pointer,
1052  int, pointer);
1053 extern pointer makecode(pointer, pointer(*)(), pointer);
1054 extern pointer makematrix(context *, int, int);
1055 extern pointer makeobject(pointer);
1056 extern pointer rawcons(context *, pointer, pointer);
1057 extern pointer cons(context *, pointer, pointer);
1058 extern pointer makestring(char *, int);
1059 extern pointer findsymbol(unsigned char *, int, pointer, int *);
1060 extern pointer makesymbol(context *, char *, int, pointer);
1061 extern pointer intern(context *, char *, int, pointer);
1062 extern pointer makepkg(context *, pointer, pointer, pointer);
1063 extern pointer mkstream(context *, pointer, pointer);
1064 extern pointer mkfilestream(context *, pointer,pointer,int,pointer);
1065 extern pointer mkiostream(context *, pointer,pointer);
1066 extern pointer makemodule(context *, int);
1067 extern pointer makebig1(long);
1068 extern pointer eusfloat_to_big(float);
1069 extern eusfloat_t big_to_float(pointer);
1070 extern pointer defun(context *, char *, pointer, pointer(*)(), char *);
1071 extern pointer defmacro(context *, char *, pointer, pointer(*)());
1072 extern pointer defspecial(context *, char *, pointer, pointer(*)());
1073 extern pointer defunpkg(context *, char *, pointer, pointer(*)(),pointer);
1074 extern void addcmethod(context *, pointer, pointer (*)(),
1075  pointer, pointer, pointer);
1076 extern pointer defkeyword(context *, char *);
1077 extern pointer defvar(context *, char *, pointer, pointer);
1078 extern pointer deflocal(context *, char *, pointer, pointer);
1079 extern pointer defconst(context *, char *, pointer, pointer);
1080 extern pointer stacknlist(context *, int);
1081 #endif
1082 
1083 #if THREADED
1084 extern pointer makethreadport(context *);
1085 #endif
1086 
1087 /*boxing,unboxing*/
1088 #if vax
1089 extern float fltval(),ckfltval(),bit_to_float();
1090 extern pointer makeflt();
1091 #else
1092 #ifndef makeflt
1093 extern pointer makeflt();
1094 #endif
1095 #endif
1096 
1097 #if !alpha && !IRIX6
1098 /*io*/
1099 extern pointer reader(context *, pointer, pointer);
1100 extern pointer prinx(context *, pointer, pointer);
1101 
1102 /*for compiled code*/
1103 extern pointer makeclosure(pointer,pointer,pointer(*)(),pointer, pointer*, pointer*);
1104 extern pointer fcall();
1105 extern pointer xcar(pointer), xcdr(pointer), xcadr(pointer);
1106 extern pointer *ovafptr(pointer,pointer);
1107 #endif
1108 
1109 /* mutex locks*/
1110 #if Solaris2 || SunOS4_1
1111 extern mutex_t mark_lock;
1112 extern char *mark_locking;
1113 extern int mark_lock_thread;
1114 extern mutex_t p_mark_lock;
1115 extern rwlock_t gc_lock;
1116 
1117 extern mutex_t alloc_lock;
1118 extern mutex_t free_thread_lock;
1119 extern mutex_t qthread_lock;
1120 extern mutex_t qsort_lock;
1121 extern sema_t free_thread_sem;
1122 #endif
1123 #ifdef __cplusplus
1124 }
1125 #endif
1126 
1127 extern eusinteger_t hide_ptr (pointer p);
1128 
pointer used_by
Definition: eus.h:227
Definition: eus.h:563
pointer prinx(context *, pointer, pointer)
Definition: printer.c:611
unsigned pmark
Definition: eus.h:181
eusinteger_t hide_ptr(pointer p)
Definition: eus.c:1407
pointer resulttype
Definition: eus.h:247
pointer K_FLOAT
Definition: eus.c:133
cixpair symbolcp
Definition: eus.c:72
Definition: eus.h:368
pointer CODE
Definition: eus.c:151
pointer makesymbol(context *, char *, int, pointer)
Definition: makes.c:164
pointer defconst(context *, char *, pointer, pointer)
Definition: makes.c:693
pointer QTHREADS
Definition: eus.c:124
pointer rawcons(context *, pointer, pointer)
Definition: makes.c:86
pointer userpkg
Definition: eus.c:109
pointer count
Definition: eus.h:284
pointer entry
Definition: eus.h:265
pointer K_BYTE
Definition: eus.c:132
Definition: eus.h:299
pointer * env2
Definition: eus.h:271
unsigned elmtype
Definition: eus.h:182
pointer symtab
Definition: eus.h:257
pointer C_CODE
Definition: eus.c:143
pointer FLTVECTOR
Definition: eus.c:154
pointer cix
Definition: eus.h:327
cixpair propobjcp
Definition: eus.c:71
Definition: eus.h:975
pointer intern(context *, char *, int, pointer)
Definition: intern.c:105
pointer * env1
Definition: eus.h:270
Definition: eus.h:261
Definition: eus.h:932
pointer K_FILL
Definition: eus.c:131
struct fletframe * dynlink
Definition: eus.h:514
pointer K_UPCASE
Definition: eus.c:134
pointer EXTNUM
Definition: eus.c:156
struct chunk * chunklist
Definition: memory.c:57
struct protectframe * protfp
Definition: eus.h:534
pointer COMPLEX
Definition: eus.c:156
rwlock_t gc_lock
Definition: mthread.c:18
pointer K_STRING
Definition: eus.c:131
unsigned b
Definition: eus.h:385
cixpair fcodecp
Definition: eus.c:80
struct cell * pointer
Definition: eus.h:165
pointer C_LABREF
Definition: eus.c:144
cixpair readtablecp
Definition: eus.c:87
pointer plist
Definition: eus.h:312
eusinteger_t intval(pointer p)
Definition: eus.c:1365
pointer ARRAY
Definition: eus.c:155
pointer vars
Definition: eus.h:339
pointer types
Definition: eus.h:340
cixpair closurecp
Definition: eus.c:83
Definition: eus.h:524
pointer cons(context *, pointer, pointer)
Definition: makes.c:97
pointer K_FOREIGN
Definition: eus.c:133
pointer QNOT
Definition: eus.h:667
unsigned nodispose
Definition: eus.h:390
pointer makecode(pointer, pointer(*)(), pointer)
Definition: makes.c:282
eusinteger_t mypid
Definition: eus.c:38
pointer INTVECTOR
Definition: eus.c:154
pointer K_FOREIGN_STRING
Definition: eus.c:133
pointer C_LDMOD
Definition: eus.c:143
pointer mkfilestream(context *, pointer, pointer, int, pointer)
Definition: makes.c:253
cixpair complexcp
Definition: eus.c:96
pointer vars
Definition: eus.h:328
pointer LDMODULE
Definition: eus.c:151
eusfloat_t fval
Definition: eus.h:430
pointer length
Definition: eus.h:304
Definition: eus.h:972
pointer entry2
Definition: eus.h:236
int slashflag
Definition: eus.h:544
pointer C_OBJECT
Definition: eus.c:142
pointer syspkg
Definition: eus.c:109
long buddysize[MAXBUDDY+1]
Definition: eus.c:103
pointer makeclosure(pointer, pointer, pointer(*)(), pointer, pointer *, pointer *)
Definition: makes.c:506
cixpair bignumcp
Definition: eus.c:97
pointer QINTEGER
Definition: eus.c:120
pointer QSPECIAL
Definition: eus.c:112
eusfloat_t big_to_float(pointer)
Definition: big.c:954
pointer * vsp
Definition: eus.h:525
pointer Getstring()
pointer kind
Definition: eus.h:490
pointer C_COMPLEX
Definition: eus.c:148
pointer ERROUT
Definition: eus.c:119
euspointer_t setjmp_val
Definition: eus.c:41
pointer val
Definition: eus.h:482
Definition: eus.h:195
struct bcell * bpointer
Definition: eus.h:445
pointer runsem
Definition: eus.h:358
pointer objname
Definition: eus.h:258
pointer names
Definition: eus.h:220
pointer xcdr(pointer)
Definition: compsub.c:55
mutex_t qthread_lock
Definition: mthread.c:14
unsigned long euspointer_t
Definition: eus.h:20
cixpair labrefcp
Definition: eus.c:84
pointer K_BIT
Definition: eus.c:132
pointer imaginary
Definition: eus.h:374
pointer lisppkg
Definition: eus.c:109
pointer THREAD
Definition: eus.c:153
pointer C_RATIO
Definition: eus.c:148
pointer K_DOWNCASE
Definition: eus.c:134
void addcmethod(context *, pointer, pointer(*)(), pointer, pointer, pointer)
Definition: leo.c:133
int ehbypass
Definition: eus.c:160
pointer symvector
Definition: eus.h:222
pointer intsymvector
Definition: eus.h:224
pointer makethreadport(context *)
Definition: makes.c:916
pointer K_DOUBLE
Definition: eus.c:133
pointer QSELF
Definition: eus.c:114
cixpair vecclasscp
Definition: eus.c:78
pointer methods
Definition: eus.h:342
byte * chars
Definition: eus.h:216
struct specialbindframe * sbindfp
Definition: eus.h:532
bpointer bp
Definition: eus.h:565
void bindspecial(context *, pointer, pointer)
Definition: eval.c:131
pointer makepkg(context *, pointer, pointer, pointer)
Definition: makes.c:201
pointer next
Definition: eus.h:297
pointer BITVECTOR
Definition: eus.c:155
pointer PKGCLASS
Definition: eus.c:151
pointer C_ARRAY
Definition: eus.c:147
Definition: eus.h:949
struct bindframe * declare(context *, pointer, struct bindframe *)
Definition: eval.c:220
Definition: eus.h:995
struct blockframe * blkfp
Definition: eus.h:533
pointer defunpkg(context *, char *, pointer, pointer(*)(), pointer)
Definition: makes.c:636
pointer QSTDOUT
Definition: eus.c:119
pointer K_IO
Definition: eus.c:130
pointer defkeyword(context *, char *)
Definition: makes.c:733
context * euscontexts[MAXTHREAD]
Definition: eus.c:105
pointer bv
Definition: eus.h:378
pointer GCMARGIN
Definition: eus.c:173
pointer csend(context *,...)
pointer unsolved
Definition: eus.h:296
struct fletframe * newfletfp
Definition: eus.h:535
cixpair stringcp
Definition: eus.c:91
Definition: eus.h:979
struct protectframe * protlink
Definition: eus.h:505
pointer name
Definition: eus.h:325
mutex_t p_mark_lock
pointer K_CAPITALIZE
Definition: eus.c:134
struct blockframe * lexklink
Definition: eus.h:491
int nextcix
Definition: eus.c:139
char * progname
Definition: eus.c:39
pointer requester
Definition: eus.h:356
pointer STREAM
Definition: eus.c:151
pointer name
Definition: eus.h:336
pointer ufuncall(context *, pointer, pointer, pointer, struct bindframe *, int)
Definition: eval.c:1469
pointer errhandler
Definition: eus.h:537
pointer plist
Definition: eus.h:335
pointer label
Definition: eus.h:294
pointer progn(context *, pointer)
Definition: eval.c:1679
pointer use
Definition: eus.h:221
unsigned smark
Definition: eus.h:387
Definition: eus.h:950
Definition: eus.h:303
pointer pkglist
Definition: eus.c:109
int intsig
Definition: eus.c:159
long alloccount[MAXBUDDY]
Definition: memory.c:60
pointer FUNCTION
Definition: eus.c:111
pointer name
Definition: eus.h:510
pointer QFIXNUM
Definition: eus.c:120
Definition: eus.h:1006
Definition: eus.h:458
Definition: eus.h:468
pointer NIL
Definition: eus.c:110
Definition: eus.h:289
pointer entry
Definition: eus.h:234
pointer plist
Definition: eus.h:290
pointer codevec
Definition: eus.h:231
cixpair ldmodulecp
Definition: eus.c:82
Definition: eus.h:921
Definition: eus.h:447
pointer syntax
Definition: eus.h:348
struct blockframe * dynklink
Definition: eus.h:491
Definition: eus.h:943
int my_gc_pri
Definition: eus.h:553
short cix
Definition: eus.h:568
pointer makevector(pointer, int)
Definition: makes.c:417
pointer K_FILE
Definition: eus.c:131
pointer numerator
Definition: eus.h:369
pointer args
Definition: eus.h:361
pointer handle
Definition: eus.h:259
cixpair threadcp
Definition: eus.c:85
cixpair arraycp
Definition: eus.c:86
pointer GCMERGE
Definition: eus.c:173
pointer QSTDIN
Definition: eus.c:119
Definition: eus.h:964
Definition: eus.h:974
float ckfltval()
int intsig
Definition: eus.h:546
pointer makemodule(context *, int)
Definition: makes.c:486
struct bindframe * fastbind(context *, pointer, pointer, struct bindframe *)
Definition: eval.c:180
pointer cdr
Definition: eus.h:196
cixpair * cp
Definition: eus.h:574
pointer xcar(pointer)
Definition: compsub.c:49
ch_attr
Definition: eus.h:467
Definition: eus_thr.h:96
cixpair objectcp
Definition: eus.c:69
Definition: eus.h:320
pointer mkstream(context *, pointer, pointer)
Definition: makes.c:241
pointer plist
Definition: eus.h:219
pointer wait
Definition: eus.h:365
Definition: eus.h:334
pointer reqsem
Definition: eus.h:357
short low
Definition: eus.h:433
Definition: eus.h:994
pointer charmacro[256]
Definition: eus.c:163
pointer C_FILESTREAM
Definition: eus.c:143
pointer oldval
Definition: eus.h:487
Definition: eus.h:935
struct callframe * cf
Definition: eus.h:499
Definition: eus.h:962
pointer plist
Definition: eus.h:281
unsigned short word
Definition: eus.h:164
mutex_t mark_lock
Definition: mthread.c:25
pointer length
Definition: eus.h:308
pointer forwards
Definition: eus.h:330
union numunion numunion
union cell::cellunion c
Definition: eus.h:376
pointer contex
Definition: eus.h:363
pointer types
Definition: eus.h:329
pointer C_BITVECTOR
Definition: eus.c:146
pointer out
Definition: eus.h:291
pointer K_POINTER
Definition: eus.c:132
void unbindspecial(context *, struct specialbindframe *)
Definition: eval.c:165
pointer C_PACKAGE
Definition: eus.c:142
pointer result
Definition: eus.h:362
pointer label
Definition: eus.h:497
pointer deflocal(context *, char *, pointer, pointer)
Definition: makes.c:716
Definition: eus.h:474
short subcix
Definition: eus.h:569
Definition: eus.h:479
pointer donesem
Definition: eus.h:359
pointer lastalloc
Definition: eus.h:536
pointer C_CONS
Definition: eus.c:142
long gccount
Definition: memory.c:59
char * maxmemory
Definition: memory.c:50
Definition: eus.h:428
pointer * ovafptr(pointer, pointer)
Definition: eval.c:120
pointer ERRHANDLER
Definition: eus.c:121
pointer QDEBUG
Definition: eus.c:123
struct fletframe * ff
Definition: eus.h:500
unsigned elmtype
Definition: eus.h:389
char * mark_locking
Definition: mthread.c:26
float bit_to_float()
pointer xpkg
Definition: eus.c:109
cixpair conscp
Definition: eus.c:70
pointer sym
Definition: eus.h:481
ch_type
Definition: eus.h:456
pointer FCODE
Definition: eus.c:151
pointer setval(context *, pointer, pointer)
Definition: eval.c:68
pointer id
Definition: eus.h:355
unsigned smark
Definition: eus.h:180
pointer dispatch
Definition: eus.h:350
pointer mkiostream(context *, pointer, pointer)
Definition: makes.c:269
int nextbclass
Definition: eus.c:101
pointer C_FOREIGNCODE
Definition: eus.c:147
pointer denominator
Definition: eus.h:370
pointer real
Definition: eus.h:373
pointer intsymcount
Definition: eus.h:225
pointer subrtype
Definition: eus.h:243
struct bindframe * bindkeyparams(context *, pointer, pointer *, int, struct bindframe *, struct bindframe *)
Definition: eval.c:270
int mark_lock_thread
Definition: mthread.c:27
Definition: eus.h:986
pointer K_OUT
Definition: eus.c:130
struct callframe * vlink
Definition: eus.h:475
pointer defvar(context *, char *, pointer, pointer)
Definition: makes.c:704
Definition: eus.h:381
Definition: eus.h:518
pointer QUNBOUND
Definition: eus.c:123
Definition: eus.h:931
pointer fname
Definition: eus.h:287
unsigned extra
Definition: eus.h:394
pointer QAND
Definition: eus.c:127
struct built_in_cid builtinclass[64]
Definition: eus.c:100
pointer alloc(int, int, int, int)
Definition: memory.mutex.c:241
pointer value
Definition: eus.h:295
pointer C_BIGNUM
Definition: eus.c:148
int chunkbix
Definition: eus.h:449
pointer quotevec
Definition: eus.h:263
pointer keywordpkg
Definition: eus.c:109
pointer OBJECT
Definition: eus.c:154
struct callframe * callfp
Definition: eus.h:529
pointer FOREIGNCODE
Definition: eus.c:155
pointer form
Definition: eus.h:476
pointer entry2
Definition: eus.h:267
mutex_t free_thread_lock
Definition: mthread.c:13
pointer readcase
Definition: eus.h:351
pointer size
Definition: eus.h:377
pointer C_VCLASS
Definition: eus.c:146
pointer subrtype
Definition: eus.h:264
pointer getfunc(context *, pointer)
Definition: eval.c:97
Definition: eus.h:929
pointer C_INTVECTOR
Definition: eus.c:146
struct bindframe * lexblink
Definition: eus.h:480
pointer fclosure
Definition: eus.h:511
pointer C_EXTNUM
Definition: eus.c:148
struct bcell * nextbcell
Definition: eus.h:442
pointer QEQ
Definition: eus.c:127
pointer buffer
Definition: eus.h:276
pointer size
Definition: eus.h:300
pointer elmtype
Definition: eus.h:343
pointer makebuffer(int)
Definition: makes.c:140
pointer C_SYMBOL
Definition: eus.c:142
errorcode
Definition: eus.h:919
pointer sym
Definition: eus.h:486
pointer subrtype
Definition: eus.h:233
pointer size
Definition: eus.h:344
pointer eusfloat_to_big(float)
Definition: big.c:968
pointer K_SHORT
Definition: eus.c:132
pointer fcall()
pointer entry
Definition: eus.h:253
pointer plist
Definition: eus.h:354
cixpair fltvectorcp
Definition: eus.c:89
pointer C_FLTVECTOR
Definition: eus.c:146
pointer QUOTE
Definition: eus.c:110
pointer codevec
Definition: eus.h:241
pointer QCONS
Definition: eus.c:151
short cix
Definition: eus.h:398
pointer sharpmacro[256]
Definition: eus.c:164
pointer vtype
Definition: eus.h:203
pointer cix
Definition: eus.h:338
struct bindframe * vbind(context *, pointer, pointer, struct bindframe *, struct bindframe *)
Definition: eval.c:194
pointer sysobj
Definition: eus.c:54
short sub
Definition: eus.h:454
pointer FILESTREAM
Definition: eus.c:151
struct fletframe * scope
Definition: eus.h:512
pointer RATIO
Definition: eus.c:156
pointer K_INTEGER
Definition: eus.c:132
Definition: eus.h:953
pointer length
Definition: eus.h:215
pointer C_STREAM
Definition: eus.c:143
struct methdef * methcache
Definition: eus.h:539
pointer codevec
Definition: eus.h:262
pointer QDECLARE
Definition: eus.c:112
struct bindframe * dynblink
Definition: eus.h:480
struct fletframe * lexlink
Definition: eus.h:513
pointer methods
Definition: eus.h:331
pointer QNUMBER
Definition: eus.c:120
pointer C_CLOSURE
Definition: eus.c:144
pointer rank
Definition: eus.h:313
Definition: eus.h:273
pointer funcode(context *, pointer, pointer, int)
Definition: eval.c:1410
pointer CLASS
Definition: eus.c:118
long eusinteger_t
Definition: eus.h:19
pointer memq()
pointer QOR
Definition: eus.c:127
pointer VECCLASS
Definition: eus.c:154
cixpair codecp
Definition: eus.c:79
cixpair vectorcp
Definition: eus.c:88
struct catchframe * nextcatch
Definition: eus.h:496
pointer makeint(eusinteger_t v)
Definition: eus.c:1357
int export_all
Definition: intern.c:11
pointer plist
Definition: eus.h:324
pointer K_LONG
Definition: eus.c:132
pointer func
Definition: eus.h:360
pointer C_IOSTREAM
Definition: eus.c:143
long freeheap
Definition: memory.c:56
pointer C_FCODE
Definition: eus.c:143
pointer buffer
Definition: eus.h:283
cixpair lockablecp
Definition: eus.h:210
struct class_desc classtab[MAXCLASS]
Definition: eus.c:138
pointer defun(context *, char *, pointer, pointer(*)(), char *)
Definition: makes.c:606
pointer QFLOAT
Definition: eus.c:120
cixpair iostreamcp
Definition: eus.c:76
pointer makematrix(context *, int, int)
Definition: makes.c:467
pointer direction
Definition: eus.h:275
pointer quotevec
Definition: eus.h:232
Definition: eus.h:230
unsigned mark
Definition: eus.h:177
pointer STRING
Definition: eus.c:151
int alloc_small_count
Definition: eus.h:542
Definition: eus.h:240
pointer LABREF
Definition: eus.c:151
pointer stacknlist(context *, int)
Definition: makes.c:129
struct catchframe * catchfp
Definition: eus.h:530
Definition: eus.h:977
jmp_buf * jbp
Definition: eus.h:501
pointer STDOUT
Definition: eus.c:119
Definition: eus.h:989
pointer METACLASS
Definition: eus.c:151
sema_t free_thread_sem
Definition: mthread.c:11
float fltval()
pointer specials
Definition: eus.h:545
mutex_t qsort_lock
Definition: mthread.c:21
rbar_t rbar
Definition: eus.h:548
pointer READTABLE
Definition: eus.c:154
unsigned pmark
Definition: eus.h:388
pointer STDIN
Definition: eus.c:119
pointer unixpkg
Definition: eus.c:109
pointer C_THREAD
Definition: eus.c:145
unsigned bix
Definition: eus.h:185
pointer VECTOR
Definition: eus.c:154
Definition: eus.h:928
pointer idle
Definition: eus.h:364
cixpair intvectorcp
Definition: eus.c:90
short cix
Definition: eus.h:190
pointer quotevec
Definition: eus.h:242
pointer super
Definition: eus.h:337
pointer findsymbol(unsigned char *, int, pointer, int *)
Definition: intern.c:23
pointer K_NOMETHOD
Definition: eus.c:132
Definition: eus.h:971
pointer funlambda(context *, pointer, pointer, pointer, pointer *, struct bindframe *, int)
Definition: eval.c:346
pointer makestring(char *, int)
Definition: makes.c:147
pointer paramtypes
Definition: eus.h:246
struct specialbindframe * sblink
Definition: eus.h:485
pointer env0
Definition: eus.h:269
Definition: eus.h:218
pointer xcadr(pointer)
Definition: compsub.c:61
pointer T
Definition: eus.c:110
pointer tail
Definition: eus.h:278
pointer C_METACLASS
Definition: eus.c:144
pointer shadows
Definition: eus.h:226
struct buddyfree * thr_buddy
Definition: eus.h:540
pointer makeclass(context *, pointer, pointer, pointer, pointer, pointer, int, pointer)
Definition: makes.c:375
pointer macro
Definition: eus.h:349
int alloc_big_count
Definition: eus.h:541
pointer IOSTREAM
Definition: eus.c:151
Definition: eus.h:941
pointer K_IN
Definition: eus.c:130
unsigned mark
Definition: eus.h:384
unsigned extra
Definition: eus.h:187
pointer K_CHAR
Definition: eus.c:132
Definition: eus.h:959
Definition: eus.h:1009
unsigned bix
Definition: eus.h:392
pointer super
Definition: eus.h:326
cixpair bitvectorcp
Definition: eus.c:92
pointer C_READTABLE
Definition: eus.c:147
int intcode
Definition: eus.c:159
pointer fd
Definition: eus.h:286
cixpair streamcp
Definition: eus.c:74
pointer forwards
Definition: eus.h:341
pointer TOPLEVEL
Definition: eus.c:121
pointer makebig1(long)
Definition: makes.c:573
Definition: eus.h:933
GLfloat v[8][3]
Definition: cube.c:21
pointer count
Definition: eus.h:277
pointer QERROUT
Definition: eus.c:119
pointer BIGNUM
Definition: eus.c:156
unsigned b
Definition: eus.h:178
pointer SYMBOL
Definition: eus.c:151
Definition: eus.h:954
pointer direction
Definition: eus.h:282
jmp_buf * jbp
Definition: eus.h:493
Definition: eus.h:439
int special_bind_count
Definition: eus.h:543
pointer findpkg()
pointer makeobject(pointer)
Definition: makes.c:407
cixpair extnumcp
Definition: eus.c:94
Definition: eus.h:946
Definition: eus.h:372
unsigned char byte
Definition: eus.h:163
Definition: eus.h:202
pointer subrtype
Definition: eus.h:252
cixpair ratiocp
Definition: eus.c:95
Definition: eus.h:452
pointer SELF
Definition: eus.c:116
pointer cleaner
Definition: eus.h:506
pointer QGCHOOK
Definition: eus.c:122
pointer plist
Definition: eus.h:347
pointer codevec
Definition: eus.h:250
cixpair filestreamcp
Definition: eus.c:75
pointer * gsp
Definition: eus.h:527
struct chunk * nextchunk
Definition: eus.h:448
pointer plist
Definition: eus.h:200
Definition: eus.h:936
pointer C_VECTOR
Definition: eus.c:144
long sweeptime
Definition: memory.c:59
pointer QEXITHOOK
Definition: eus.c:122
unsigned nodispose
Definition: eus.h:183
pointer K_INVERT
Definition: eus.c:134
pointer plist
Definition: eus.h:274
pointer symcount
Definition: eus.h:223
pointer def
Definition: eus.h:570
Definition: eus.h:940
Definition: eus.h:214
short cix
Definition: eus.h:453
Definition: eus.h:323
pointer quotevec
Definition: eus.h:251
unsigned m
Definition: eus.h:179
pointer * gcstack
Definition: memory.c:414
Definition: eus.h:460
double eusfloat_t
Definition: eus.h:21
pointer PACKAGE
Definition: eus.c:110
cixpair packagecp
Definition: eus.c:73
struct bindframe * bf
Definition: eus.h:498
Definition: eus.h:293
struct bindframe * bindfp
Definition: eus.h:531
pointer entry
Definition: eus.h:244
pointer eval(context *, pointer)
Definition: eval.c:1622
Definition: eus.h:509
pointer C_STRING
Definition: eus.c:146
pointer selector
Definition: eus.h:519
pointer entry2
Definition: eus.h:245
long totalheap
Definition: memory.c:56
int count
Definition: eus.h:564
struct buddyfree buddy[MAXBUDDY+1]
Definition: eus.h:592
mutex_t alloc_lock
Definition: memory.mutex.c:42
Definition: eus.h:944
pointer cls
Definition: eus.h:573
Definition: eus.h:945
pointer K_FLUSH
Definition: eus.c:131
pointer entry2
Definition: eus.h:255
pointer QEQUAL
Definition: eus.c:127
Definition: eus.h:249
pointer K_FLOAT32
Definition: eus.c:133
pointer CLOSURE
Definition: eus.c:151
pointer threadobj
Definition: eus.h:538
pointer reader(context *, pointer, pointer)
Definition: reader.c:1016
pointer defmacro(context *, char *, pointer, pointer(*)())
Definition: makes.c:646
pointer eval2(context *, pointer, pointer)
Definition: eval.c:1664
pointer tail
Definition: eus.h:285
Definition: eus.h:956
Definition: eus.h:934
pointer QEVALHOOK
Definition: eus.c:121
long marktime
Definition: memory.c:59
Definition: eus.h:346
pointer lastalloc
pointer length
Definition: eus.h:211
struct cell cell
cixpair metaclasscp
Definition: eus.c:77
unsigned m
Definition: eus.h:386
pointer makeflt()
pointer getval(context *, pointer)
Definition: eval.c:33
eusinteger_t ival
Definition: eus.h:431
pointer name
Definition: eus.h:492
pointer K_PRESERVE
Definition: eus.c:134
pointer defspecial(context *, char *, pointer, pointer(*)())
Definition: makes.c:682


euslisp
Author(s): Toshihiro Matsui
autogenerated on Mon Feb 28 2022 22:18:27