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


euslisp
Author(s): Toshihiro Matsui
autogenerated on Thu Jun 6 2019 20:00:43