makes.new.c
Go to the documentation of this file.
1 /****************************************************************/
2 /* make eulisp objects
3 /* Copyright Toshihiro MATSUI, ETL, 1987
4 /****************************************************************/
5 static char *rcsid="@(#)$Id$";
6 
7 #if Solaris2
8 #include <errno.h>
9 #include <synch.h>
10 #include <thread.h>
11 #endif
12 
13 #include "eus.h"
14 
15 #if 0 /* move to eus.h */
16 #define nextbuddy(p) ((bpointer)((eusinteger_t)p+(buddysize[p->h.bix]*sizeof(pointer))))
17 #endif
18 
20 
21 /****************************************************************/
22 /* boxing and unboxing
23 /****************************************************************/
24 #if vax
25 float ckfltval(p)
26 register int p;
27 { numunion nu;
28  if (isflt(p)) {
29  nu.ival = p & 0xfffffffc;
30 #if vax
31  { register short s;
32  s=nu.sval.low; nu.sval.low=nu.sval.high; nu.sval.high=s;}
33 #endif
34  return(nu.fval);}
35  else if (isint(p)) { nu.fval=intval(p); return(nu.fval);} /*coerce to float*/
36  else error(E_NONUMBER);}
37 
38 float fltval(p)
39 int p;
40 { numunion nu;
41  nu.ival= p & 0xfffffffc;
42 #if vax
43  { register short s;
44  s=nu.sval.low; nu.sval.low=nu.sval.high; nu.sval.high=s;}
45 #endif
46  return(nu.fval);}
47 
49 double d;
50 { numunion u;
51  u.fval=d; /*double to short float*/
52 #if vax
53  { register short s;
54  s=u.sval.low; /*swap upper and lower short*/
55  u.sval.low=u.sval.high;
56  u.sval.high=s;}
57 #endif
58  return((pointer)((u.ival & 0xfffffffc) | 1));}
59 #endif
60 
62 register pointer s;
63 { if (issymbol(s)) s=s->c.sym.pname;
64  if (!isstring(s)) error(E_NOSTRING);
65  return(s);}
66 
68 register pointer s;
69 { if (isstring(s)) return(s->c.str.chars);
70  if (issymbol(s)) return(s->c.sym.pname->c.str.chars);
71  else error(E_NOSTRING);}
72 
73 /****************************************************************/
74 /* cons & list
75 /****************************************************************/
76 
77 #define allocobj(class,builtin,cid) \
78  ((class)? \
79  alloc(vecsize(speval(class)->c.cls.vars), ELM_FIXED, \
80  intval(speval(class)->c.cls.cix), \
81  wordsizeof(struct builtin)): \
82  alloc(wordsizeof(struct builtin), ELM_FIXED, cid, \
83  wordsizeof(struct builtin)))
84 
86 register context *ctx;
87 register pointer a,d;
88 { register pointer c;
89  vpush(a); vpush(d);
90  c = alloc(wordsizeof(struct cons), ELM_FIXED, conscp.cix,
91  wordsizeof(struct cons));
92  c->c.cons.cdr=vpop();
93  c->c.cons.car=vpop();
94  return(c);}
95 
96 pointer cons(ctx,a,d)
97 register context *ctx;
98 register pointer a,d;
99 {
100  register pointer c;
101  register bpointer b;
102  /*
103  if ((speval(QCONS)==C_CONS) && (b=buddy[1].bp)) {
104  b->h.elmtype=ELM_FIXED;
105  buddy[1].bp=b->b.nextbcell;
106  freeheap -= 3;
107  alloccount[1]++;
108  c=makepointer(b);
109  cixof(c)=conscp.cix;}
110  else*/
111  {
112  vpush(a); vpush(d); /*protect args from garbage collection*/
113  c=alloc(vecsize(speval(QCONS)->c.cls.vars), ELM_FIXED,
114  intval(speval(QCONS)->c.cls.cix),
115  wordsizeof(struct cons));
116  ctx->vsp-=2; }
117  c->c.cons.car=a; c->c.cons.cdr=d;
118  return(c);}
119 
120 pointer stackrawlist(ctx,n) /*make a list out of elements pushed on vstack*/
121 register context *ctx;
122 register int n;
123 { register pointer r=NIL, *fsp=ctx->vsp;
124  while (n-->0) r=rawcons(ctx,*--fsp,r);
125  ctx->vsp=fsp;
126  return(r);}
127 
128 pointer stacknlist(ctx,n) /*make a list out of elements pushed on vstack*/
129 register context *ctx;
130 register int n;
131 { register pointer r=NIL, *fsp=ctx->vsp;
132  while (n-->0) r=cons(ctx,*--fsp,r);
133  ctx->vsp=fsp;
134  return(r);}
135 
137 register int size;
138 { register pointer p;
139  p = alloc((size+2*sizeof(eusinteger_t))>>WORDSHIFT, ELM_CHAR, stringcp.cix, (size+2*sizeof(eusinteger_t))>>WORDSHIFT);
140  p->c.str.length=makeint(size);
141  return(p);}
142 
144 register char *s;
145 register int l;
146 { register pointer p;
147  p=alloc((l+2*sizeof(eusinteger_t))>>WORDSHIFT, ELM_CHAR, stringcp.cix, (l+2*sizeof(eusinteger_t))>>WORDSHIFT );
148  p->c.str.length=makeint(l);
149  p->c.ivec.iv[l/sizeof(long)]=0; /*terminator*/
150  memcpy((void *)p->c.str.chars, (void *)s, l);
151  return(p);}
152 
154 { register pointer p;
155  p=alloc(2, ELM_FOREIGN, stringcp.cix, 2);
156  p->c.str.length=makeint(size);
157  p->c.ivec.iv[0]=addr;
158  return(p);}
159 
160 pointer makesymbol(ctx,str,leng,home)
161 register context *ctx;
162 char *str;
163 int leng;
164 pointer home;
165 { register pointer sym;
166  int cid;
167  vpush(makestring(str,leng));
168  sym=allocobj(SYMBOL,symbol,symbolcp.cix);
169  sym->c.sym.speval=sym->c.sym.spefunc=UNBOUND;
170  sym->c.sym.vtype=V_VARIABLE;
171  sym->c.sym.homepkg=home;
172  sym->c.sym.plist=NIL;
173  sym->c.sym.pname=vpop();
174  return(sym);}
175 
176 pointer searchpkg(token,leng)
177 byte *token;
178 int leng;
179 { pointer pkg,pkgs,names;
180  pkgs=pkglist;
181  while (pkgs && islist(pkgs)) {
182  pkg=ccar(pkgs); pkgs=ccdr(pkgs);
183  names=pkg->c.pkg.names;
184  while (islist(names))
185  if (strlength(ccar(names))==leng &&
186  !memcmp((char *)ccar(names)->c.str.chars, (char *)token, leng)) return(pkg);
187  else names=ccdr(names);}
188  return(NULL);}
189 
190 pointer findpkg(pkgname)
191 register pointer pkgname; /*string or symbol*/
192 { register pointer pkg,pkgs,names;
193  if (ispackage(pkgname)) return(pkgname);
194  pkgname=Getstring(pkgname);
195  return(searchpkg(pkgname->c.str.chars,strlength(pkgname)));}
196 
197 pointer makepkg(ctx,namestr,nicks,uses)
198 register context *ctx;
199 register pointer namestr,nicks,uses;
200 { register pointer pkg,symvec,pkgs,names,p;
201  register int i;
202  /*check pkg name collision*/
203  namestr=Getstring(namestr);
204  if (findpkg(namestr)) error(E_PKGNAME,namestr);
205  vpush(namestr); vpush(nicks); vpush(uses);
206  i=0;
207  while (islist(nicks)) {
208  if (findpkg(ccar(nicks))) error(E_PKGNAME,ccar(nicks));
209  vpush(Getstring(ccar(nicks))); i++;
210  nicks=ccdr(nicks);}
211  nicks=stackrawlist(ctx,i); /*list up package nicknames*/
212  i=0;
213  while (islist(uses)) {
214  if (p=findpkg(ccar(uses))) { vpush(p); i++; uses=ccdr(uses);}
215  else error(E_PKGNAME,ccar(uses));}
216  uses=stackrawlist(ctx,i);
217  pkg=allocobj(PKGCLASS,package, packagecp.cix);
218  pkg->c.pkg.names=pkg->c.pkg.symvector=pkg->c.pkg.intsymvector=NULL;
219  pkg->c.pkg.symcount=pkg->c.pkg.intsymcount=makeint(0);
220  pkg->c.pkg.use=uses;
221  pkg->c.pkg.plist=NIL;
222  pkg->c.pkg.shadows=NIL;
223  pkg->c.pkg.used_by=NIL;
224  vpush(pkg);
225  pkg->c.pkg.names=rawcons(ctx,namestr,nicks);
226  symvec=makevector(C_VECTOR,SYMBOLHASH);
227  for (i=0; i<SYMBOLHASH; i++) symvec->c.vec.v[i]=makeint(0);
228  pkg->c.pkg.symvector=symvec;
229  symvec=makevector(C_VECTOR,SYMBOLHASH);
230  for (i=0; i<SYMBOLHASH; i++) symvec->c.vec.v[i]=makeint(0);
231  pkg->c.pkg.intsymvector=symvec;
232  pkglist=rawcons(ctx,pkg,pkglist);
233  ctx->lastalloc=pkg;
234  ctx->vsp -= 4;
235  return(pkg);}
236 
237 pointer mkstream(ctx,dir,string)
238 register context *ctx;
239 pointer dir,string;
240 { register pointer s;
241  vpush(string);
242  s=allocobj(STREAM, stream, streamcp.cix);
243  s->c.stream.direction=dir;
244  s->c.stream.count=s->c.stream.tail=makeint(0);
245  s->c.stream.buffer=vpop();
246  s->c.stream.plist=NIL;
247  return(s);}
248 
249 pointer mkfilestream(ctx,dir,string,fno,fname)
250 register context *ctx;
251 pointer dir,string,fname;
252 int fno;
253 { register pointer s;
254  if (dir!=K_IN && dir!=K_OUT) error(E_IODIRECTION);
255  vpush(string); vpush(fname);
256  s=allocobj(FILESTREAM, filestream, filestreamcp.cix);
257  s->c.fstream.direction=dir;
258  s->c.fstream.count=s->c.fstream.tail=makeint(0);
259  s->c.fstream.fname=vpop();
260  s->c.fstream.buffer=vpop();
261  s->c.fstream.fd=makeint(fno);
262  s->c.fstream.plist=NIL;
263  return(s);}
264 
265 pointer mkiostream(ctx,in,out)
266 register context *ctx;
267 register pointer in,out;
268 { register pointer ios;
269  if (!isstream(in) || !isstream(out)) error(E_STREAM);
270  vpush(in); vpush(out);
271  ios=allocobj(IOSTREAM, iostream, iostreamcp.cix);
272  ios->c.iostream.out=out;
273  ios->c.iostream.in=in;
274  ios->c.iostream.plist=NIL;
275  ctx->vsp -= 2;
276  return(ios);}
277 
278 pointer makecode(mod,f,ftype)
279 register pointer mod,ftype;
280 pointer (*f)();
281 /*actually, f is a pointer to a function returning a pointer*/
282 { register pointer cd;
283  eusinteger_t fentaddr;
284  cd=allocobj(CODE, code, codecp.cix);
285  cd->c.code.codevec=mod->c.code.codevec;
286  cd->c.code.quotevec=mod->c.code.quotevec;
287  cd->c.code.subrtype=ftype;
288  fentaddr= (eusinteger_t)f>>2;
289  cd->c.code.entry=makeint(fentaddr);
290  return(cd);}
291 
292 
293 /*
294 /* for DEFCLASS and INSTANTIATE
295 */
296 
298 int m,n;
299 { pointer super;
300  if (classtab[m].subcix<n) {
301  classtab[m].subcix=n;
302  super=classtab[m].def->c.cls.super;
303  if (isclass(super)) bumpcix(intval(super->c.cls.cix),n);}}
304 
305 recixobj(newcix)
306 register int newcix;
307 { register struct chunk *cp;
308  register bpointer p,tail;
309  register int s;
310 #if defined(BIX_DEBUG) || defined(DEBUG_COUNT)
311  static int count = 0;
312 
313  count++;
314 #endif
315 
316  for (cp=chunklist; cp!=0; cp=cp->nextchunk) {
317  s=buddysize[cp->chunkbix];
318  p= &cp->rootcell;
319  tail=(bpointer)((eusinteger_t)p+(s<<WORDSHIFT));
320  while (p<tail) {
321  if (p->h.cix>=newcix) p->h.cix++;
322 #ifdef BIX_DEBUG
323  printf( "recixobj:%d:p=0x%lx, bix = %d\n",
324  count, p, p->h.bix );
325 #endif
326  p=nextbuddy(p);}
327  } }
328 
329 resetcix(class,p)
330 pointer class;
331 cixpair *p;
332 { if (class) {
333  p->cix=intval(class->c.cls.cix);
334  p->sub=classtab[p->cix].subcix;} }
335 
336 enterclass(classobj)
337 pointer classobj;
338 { pointer super;
339  register int i,newcix,temp,supercix;
340 
341  if (nextcix>=MAXCLASS) error(E_CLASSOVER);
342  super= /*spevalof*/ (classobj->c.cls.super);
343  if (isclass(super)) {
344  supercix=intval(super->c.cls.cix);
345  newcix=classtab[supercix].subcix+1;
346  for (i=nextcix-1; i>=newcix; i--) {
347  /*reconfigure class hierarchy*/
348  bumpcix(i,i+1);
349  classtab[i+1]=classtab[i]; /*bump classtab entry*/
350  temp=intval(classtab[i].def->c.cls.cix);
351  classtab[i].def->c.cls.cix=makeint(temp+1); }
352  bumpcix(supercix,newcix);
353  /*scan chunks and bumps object's cix which is greater than newcix*/
354  if (newcix<nextcix) recixobj(newcix);
355  /*reset system defined class's cix*/
356  for (i=0; i<nextbclass; i++)
357  resetcix(builtinclass[i].cls, builtinclass[i].cp);
358  }
359  else newcix=nextcix;
360  classobj->c.cls.cix=makeint(newcix);
361  classtab[newcix].def=classobj;
362  classtab[newcix].subcix=newcix;
363  nextcix++; }
364 
365 pointer makeclass(ctx,name,superobj,vars,types,forwards,tag,metaclass)
366 register context *ctx;
367 pointer name,superobj,vars,types,metaclass,forwards;
368 int tag;
369 { pointer class;
370  extern pointer makeobject();
371 
372  /* make metaclass cell */
373  vpush(vars); vpush(types);
374  if (metaclass && isclass(metaclass)) class=makeobject(metaclass);
375  else {
376  if (tag==0)
377  class=allocobj(METACLASS, _class, metaclasscp.cix);
378  else
379  class=allocobj(VECCLASS, vecclass, vecclasscp.cix);}
380  class->c.cls.name=name;
381  class->c.cls.super=superobj;
382  class->c.cls.methods=NIL;
383  class->c.cls.vars=vars;
384  class->c.cls.types=types;
385  class->c.cls.forwards=forwards;
386  class->c.cls.plist=NIL;
387  if (tag) { /*vector type class*/
388  class->c.vcls.elmtype=makeint(tag);
389  class->c.vcls.size=makeint(-1);}
390  name->c.sym.speval=class;
391 /* name->c.sym.vtype=V_SPECIAL; */
392  name->c.sym.vtype=V_GLOBAL;
393  enterclass(class); /*determine cix and fill it in the cix slot*/
394  vpop(); vpop();
395  return(class); }
396 
398 register pointer class;
399 { register pointer obj,*v;
400  register int size;
401  size=vecsize(class->c.cls.vars);
402  obj=alloc(size, ELM_FIXED, intval(class->c.cls.cix), size);
403  v=obj->c.obj.iv;
404  while (size>0) v[--size]=NIL;
405  return(obj);}
406 
407 pointer makevector(vclass,size)
408 register pointer vclass;
409 register int size;
410 { register pointer v,init,*vv;
411  register int n,etype;
412 
413  etype=intval(vclass->c.vcls.elmtype);
414  switch(etype) {
415  case ELM_BIT: n=(size+WORD_SIZE-1)/WORD_SIZE; init=0; break;
416  case ELM_CHAR:
417  case ELM_BYTE: n=(size+sizeof(eusinteger_t))/sizeof(eusinteger_t); init=0; break;
418  case ELM_FLOAT: n=size; init=(pointer)0; break;
419  case ELM_INT: n=size; init=0; break;
420  case ELM_FOREIGN: n=1; init=0; break;
421  default: n=size; init=NIL;}
422  v=alloc(n+1,etype, intval(vclass->c.vcls.cix),n+1);
423  v->c.vec.size=makeint(size);
424  vv=v->c.vec.v;
425  while (--n>=0) vv[n]=init;
426  return(v);}
427 
429 register int s;
430 { register pointer v;
431  register bpointer b;
432  v=alloc(s+1,ELM_FLOAT, fltvectorcp.cix,s+1);
433  v->c.vec.size=makeint(s);
434  return(v);}
435 
436 pointer defvector(ctx,name,super,elm,size) /*define vector class*/
437 register context *ctx;
438 char *name;
439 pointer super;
440 int elm,size;
441 { pointer classsym,class,varvector,typevector,forwardvector;
442  int i;
443  classsym=intern(ctx,name,strlen(name),lisppkg);
444  varvector=makevector(C_VECTOR,1);
445  vpush(varvector);
446  typevector=makevector(C_VECTOR,1);
447  typevector->c.vec.v[0]=QINTEGER;
448  vpush(typevector);
449  forwardvector=makevector(C_VECTOR,1);
450  forwardvector->c.vec.v[0]=NIL;
451  vpush(forwardvector);
452  varvector->c.vec.v[0]=intern(ctx,"LENGTH",6,lisppkg);
453  class=makeclass(ctx,classsym,super,varvector,typevector,forwardvector,elm,0);
454  ctx->vsp -= 3;
455  return(classsym);}
456 
457 pointer makematrix(ctx,row,column)
458 register context *ctx;
459 int row,column;
460 { register pointer v,m;
461  register int i;
462  v=makefvector(row*column);
463  vpush(v);
464  m=allocobj(ARRAY, arrayheader, arraycp.cix);
465  m->c.ary.entity=v;
466  m->c.ary.fillpointer=NIL;
467  m->c.ary.rank=makeint(2);
468  m->c.ary.offset=makeint(0);
469  m->c.ary.dim[0]=makeint(row);
470  m->c.ary.dim[1]=makeint(column);
471  m->c.ary.plist=NIL;
472  for (i=2; i<ARRAYRANKLIMIT; i++) m->c.ary.dim[i]=NIL;
473  vpop();
474  return(m);}
475 
476 pointer makemodule(ctx,size) /*size in bytes*/
477 register context *ctx;
478 int size;
479 { register pointer mod,cvec;
480  cvec=makebuffer(size);
481  elmtypeof(cvec)=ELM_BYTE;
482  vpush(cvec);
483  mod=allocobj(LDMODULE, ldmodule, ldmodulecp.cix);
484  mod->c.ldmod.codevec=vpop();
485  mod->c.ldmod.quotevec=NIL;
486  mod->c.ldmod.entry=NIL;
487  mod->c.ldmod.subrtype=NIL;
488  mod->c.ldmod.symtab=NIL;
489  mod->c.ldmod.objname=NIL;
490  mod->c.ldmod.handle=NIL;
491  return(mod);}
492 
494 pointer code,quote,e0,*e1,*e2;
495 pointer (*f)();
496 { register pointer clo;
497  clo=allocobj(CLOSURE, closure, closurecp.cix);
498  clo->c.clo.codevec=code;
499  clo->c.clo.quotevec=quote;
500  clo->c.clo.subrtype=SUBR_FUNCTION;
501  clo->c.clo.entry=makeint((eusinteger_t)f>>2);
502  clo->c.clo.env0=e0;
503  clo->c.clo.env1=e1; /*makeint((int)e1>>2);*/
504  clo->c.clo.env2=e2; /*makeint((int)e2>>2);*/
505  return(clo);}
506 
508 register context *ctx;
509 { pointer rdtable,rdsyntax,rdmacro,rddispatch;
510  vpush((rdsyntax=makebuffer(256)));
511  vpush((rdmacro=makevector(C_VECTOR,256)));
512  rddispatch=makevector(C_VECTOR,256);
513  rdtable=allocobj(READTABLE, readtable, readtablecp.cix);
514  vpush(rdtable);
515  rdtable->c.rdtab.dispatch=rddispatch;
516  rdtable->c.rdtab.macro=rdmacro;
517  rdtable->c.rdtab.syntax=rdsyntax;
518  rdtable->c.rdtab.plist=NIL;
519  ctx->vsp -= 3;
520  return(rdtable);}
521 
523 pointer n,v,nxt;
524 { pointer l;
525  l=alloc(wordsizeof(struct labref), ELM_FIXED, labrefcp.cix,
526  wordsizeof(struct labref));
527  l->c.lab.label=n;
528  l->c.lab.value=v;
529  l->c.lab.next=nxt;
530  l->c.lab.unsolved=NIL;
531  return(l);}
532 
533 /****************************************************************
534 /* extended numbers
535 /****************************************************************/
536 pointer makeratio(num, denom)
537 int num, denom;
538 { pointer r;
539  r=allocobj(RATIO, ratio, ratiocp.cix);
540  r->c.ratio.numerator=makeint(num);
541  r->c.ratio.denominator=makeint(denom);
542  /* printf("ratio cid= %d r=0x%x\n", ratiocp.cix, r); */
543  return(r);}
544 
546 int n;
547 { register context *ctx=euscontexts[thr_self()];
548  register pointer p,v;
550  vpush(v);
551  p=allocobj(BIGNUM, bignum, bignumcp.cix);
552  p->c.bgnm.size=makeint(n);
553  p->c.bgnm.bv=v;
554  vpop();
555  return(p);}
556 
558 long x;
559 { register context *ctx=euscontexts[thr_self()];
560  register pointer p,v;
561 
562  v=makevector(C_INTVECTOR, 1);
563  vpush(v);
564  p=allocobj(BIGNUM, bignum, bignumcp.cix);
565  p->c.bgnm.size=makeint(1);
566  p->c.bgnm.bv=v;
567  v->c.ivec.iv[0]=x;
568  vpop();
569  return(p);}
570 
572 long hi, lo;
573 { register context *ctx=euscontexts[thr_self()];
574  register pointer p,v;
575 
576  v=makevector(C_INTVECTOR, 2);
577  vpush(v);
578  p=allocobj(BIGNUM, bignum, bignumcp.cix);
579  p->c.bgnm.size=makeint(2);
580  p->c.bgnm.bv=v;
581  v->c.ivec.iv[0]=lo;
582  v->c.ivec.iv[1]=hi;
583  vpop();
584  return(p);}
585 
586 
587 /****************************************************************/
588 /* defines
589 /****************************************************************/
590 
591 pointer defun(ctx,name,mod,f)
592 register context *ctx;
593 char *name;
594 pointer mod;
595 pointer (*f)();
596 { register pointer sym,pkg;
597 #if defined(DEFUN_DEBUG) || defined(DEBUG_COUNT)
598  static int count=0;
599 
600  count++;
601 #endif
602 #ifdef DEFUN_DEBUG
603  printf( "defun:%d:%s:", count, name );
604 #endif
605 
606  pkg=Spevalof(PACKAGE);
607  sym=intern(ctx,name,strlen(name),pkg);
608  sym->c.sym.spefunc=makecode(mod,f,SUBR_FUNCTION);
609 #ifdef DEFUN_DEBUG
610  printf( "0x%lx\n", sym->c.sym.spefunc->c.code.entry );
611 #endif
612  return(sym);}
613 
614 pointer defunpkg(ctx,name,mod,f,pkg)
615 register context *ctx;
616 char *name;
617 pointer mod,pkg;
618 pointer (*f)();
619 { pointer sym;
620  sym=intern(ctx,name,strlen(name),pkg);
621  sym->c.sym.spefunc=makecode(mod,f,SUBR_FUNCTION);
622  return(sym);}
623 
624 pointer defmacro(ctx,name,mod,f)
625 register context *ctx;
626 char *name;
627 pointer mod;
628 pointer (*f)();
629 { register pointer sym,pkg;
630  pkg=Spevalof(PACKAGE);
631  sym=intern(ctx,name,strlen(name),pkg);
632  sym->c.sym.spefunc=makecode(mod,f,SUBR_MACRO);
633  return(sym);}
634 
635 #if Solaris2
637 static mutex_t spex_lock;
638 
640 { int x;
641 
642  if (next_special_index==3) mutex_init(&spex_lock,USYNC_THREAD,NULL);
643  mutex_lock(&spex_lock);
644  x= next_special_index++;
645  mutex_unlock(&spex_lock);
646  if (x>=MAX_SPECIALS) { error(E_USER,(pointer)"too many special variables >=256"); }
647  return(x);}
648 #else
649 int next_special_index=3;
650 
651 int special_index()
652 { int x;
653 
654  x= next_special_index++;
655  if (x>=MAX_SPECIALS) { error(E_USER,(pointer)"too many special variables >=256"); }
656 
657  return(x);}
658 #endif
659 
660 pointer defspecial(ctx,name,mod,f) /*define special form*/
661 register context *ctx;
662 char *name;
663 pointer mod;
664 pointer (*f)();
665 { register pointer sym,pkg;
666  pkg=Spevalof(PACKAGE);
667  sym=intern(ctx,name,strlen(name),pkg);
668  sym->c.sym.spefunc=makecode(mod,f,SUBR_SPECIAL);
669  return(sym);}
670 
671 pointer defconst(ctx,name,val,pkg)
672 register context *ctx;
673 char *name;
674 pointer val,pkg;
675 { register pointer sym;
676  vpush(val);
677  sym=intern(ctx,name,strlen(name),pkg);
678  sym->c.sym.vtype=V_CONSTANT;
679  sym->c.sym.speval=vpop();
680  return(sym);}
681 
682 pointer defvar(ctx,name,val,pkg)
683 register context *ctx;
684 char *name;
685 pointer val,pkg;
686 { register pointer sym;
687  int x;
688  vpush(val);
689  sym=intern(ctx,name,strlen(name),pkg);
690  sym->c.sym.vtype=V_GLOBAL;
691  sym->c.sym.speval=vpop();
692  return(sym);}
693 
694 pointer deflocal(ctx,name,val,pkg)
695 register context *ctx;
696 char *name;
697 pointer val,pkg;
698 { register pointer sym;
699  int x;
700  vpush(val);
701  sym=intern(ctx,name,strlen(name),pkg);
702  x=special_index();
703  sym->c.sym.vtype=makeint(x);
704  /*sym->c.sym.speval=vpop();*/
705  /* put the same value in the global symbol-value
706  and in the thread's special binding table */
707  ctx->specials->c.vec.v[x]=vpop();
708  sym->c.sym.speval=val;
709  return(sym);}
710 
712 register context *ctx;
713 char *name;
714 { register pointer sym;
715  sym=intern(ctx,name,strlen(name),keywordpkg);
716  return(sym);}
717 
718 /*
719 /* for making compiled function/macro
720 */
721 
722 extern pointer putprop();
723 
724 pointer compfun(ctx,sym,mod,entry,doc)
725 register context *ctx;
726 register pointer sym,mod,doc;
727 pointer (*entry)();
728 { sym->c.sym.spefunc=makecode(mod,entry,SUBR_FUNCTION);
729  if (doc!=NIL) putprop(ctx,sym,doc,K_FUNCTION_DOCUMENTATION);
730  return(sym);}
731 
732 pointer compmacro(ctx,sym,mod,entry,doc)
733 register context *ctx;
734 register pointer sym,mod,doc;
735 pointer (* entry)();
736 { sym->c.sym.spefunc=makecode(mod,entry,SUBR_MACRO);
737  if (doc!=NIL) putprop(ctx,sym, doc, K_FUNCTION_DOCUMENTATION);
738  return(sym);}
739 
740 /****************************************************************/
741 /* stack frames
742 /****************************************************************/
743 
744 struct blockframe *makeblock(ctx,kind,name,jbuf,link)
745 register context *ctx;
747 jmp_buf *jbuf;
748 struct blockframe *link;
749 { register struct blockframe *blk=ctx->blkfp;
750  *(ctx->vsp)=(pointer)ctx->blkfp; blk=(struct blockframe *)(ctx->vsp);
751  (ctx->vsp) += wordsizeof(struct blockframe);
752  blk->lexklink=link;
753  blk->dynklink=ctx->blkfp;
754  blk->kind=kind;
755  blk->name=name;
756  blk->jbp=jbuf;
757  ctx->blkfp=blk;
758  return(blk);}
759 
760 struct fletframe *makeflet(ctx,nm,def,scp,link)
761 register context *ctx;
762 pointer nm,def;
763 struct fletframe *scp,*link;
764 { register struct fletframe *ffp=(struct fletframe *)(ctx->vsp);
765  register pointer p;
766  int i;
767  for (i=0; i<sizeof(struct fletframe)/sizeof(pointer); i++)
768  vpush(makeint(0));
769  ffp->name=nm;
770  p=cons(ctx,makeint(scp),def);
771  p=cons(ctx,makeint(ctx->bindfp),p);
772  p=cons(ctx,nm,p);
773  ffp->fclosure=cons(ctx,LAMCLOSURE,p);
774  ffp->scope=scp;
775  ffp->lexlink=link; ffp->dynlink=ctx->fletfp; /*dynlink is not used*/
776  ctx->fletfp=ffp;
777  return(ffp);}
778 
779 void mkcatchframe(ctx,lab,jbuf)
780 context *ctx;
781 pointer lab;
782 jmp_buf jbuf;
783 { struct catchframe *cfp;
784  cfp=(struct catchframe *)ctx->vsp;
785  cfp->nextcatch=ctx->catchfp;
786  cfp->cf=ctx->callfp;
787  cfp->bf=ctx->bindfp;
788 /* cfp->blkf=blkfp; */
789  cfp->jbp=(jmp_buf *)jbuf;
790  cfp->label=lab;
791  cfp->ff=ctx->fletfp;
792  ctx->vsp += (sizeof(struct catchframe)/sizeof(pointer));
793  ctx->catchfp=cfp;}
794 
795 /****************************************************************/
796 /* new thread context
797 /****************************************************************/
798 extern context *mainctx;
799 
801 context *ctx;
802 register int n;
803 { register int i;
804  if (ctx->stack) cfree(ctx->stack);
805  n=max(1024,n);
806 #if 0 /* ???? */
807  i=(int)malloc((n+1)*sizeof(pointer));
808  if (i==NULL) error(E_STACKOVER);
809  ctx->stack=(pointer *)i;
810 #else
811  ctx->stack=(pointer *)malloc((n+1)*sizeof(pointer));
812  if (i==NULL) error(E_STACKOVER);
813 #endif
814  ctx->stacklimit= &ctx->stack[n-100];
815 #if STACK_DEBUG
816  printf( "allocate_stack: 0x%lx -- 0x%lx\n", ctx->stack, ctx->stacklimit );
817 #endif
818  }
819 
821 int bs_size;
822 { pointer *stk, specialtab;
823  context *cntx;
824  int i;
825  struct buddy_free *thrbuddy;
826 
827  cntx=(context *)malloc(sizeof(context));
828  if (cntx==NULL) error(E_ALLOCATION);
829  if (bs_size<4096) bs_size=4096;
830  stk=(pointer *)malloc(sizeof(pointer) * bs_size);
831  if (stk==NULL) error(E_ALLOCATION);
832  cntx->stack=stk;
833  cntx->vsp=stk;
834  cntx->stacklimit = stk+bs_size-64;
835 #if STACK_DEBUG
836  printf( "makelispcontext: stack: 0x%lx -- 0x%lx\n", cntx->stack, cntx->stacklimit );
837 #endif
838  cntx->callfp=NULL;
839  cntx->catchfp=NULL;
840  cntx->bindfp=NULL;
841  cntx->sbindfp=NULL;
842  cntx->blkfp=NULL;
843  cntx->protfp=NULL;
844  cntx->fletfp=NULL;
845  cntx->newfletfp=NULL;
846  cntx->lastalloc=NULL;
847  cntx->errhandler=NULL;
848  cntx->alloc_big_count=0;
849  cntx->alloc_small_count=0;
850  cntx->special_bind_count=0;
851  cntx->threadobj=NIL;
852  cntx->intsig=0;
853 
854  /* create a special variable table for this thread and link to specials slot*/
855  if (C_VECTOR) {
856  specialtab=makevector(C_VECTOR,MAX_SPECIALS);
857  /* copy initial values of special variables from the main context*/
858  for (i=0; i<MAX_SPECIALS; i++)
859  specialtab->c.vec.v[i]=mainctx->specials->c.vec.v[i];
860  cntx->specials=specialtab;}
861 
862  { register int i;
863  register struct methdef *mc;
864  mc=(struct methdef *)malloc(sizeof(struct methdef)*MAXMETHCACHE);
865  if (mc==NULL) error(E_ALLOCATION);
866  for (i=0; i<MAXMETHCACHE; i++) {
867  mc[i].selector=mc[i].class=mc[i].ownerclass=mc[i].method=NULL;}
868  cntx->methcache=mc;
869  thrbuddy=(struct buddyfree *)
870  malloc(sizeof(struct buddyfree) * (MAXTHRBUDDY+1));
871  if (thrbuddy==NULL) error(E_ALLOCATION);
872  cntx->thr_buddy=thrbuddy;
873  for (i=0; i<MAXTHRBUDDY; i++) {
874  cntx->thr_buddy[i].bp=0;
875  cntx->thr_buddy[i].count=0;}
876  cntx->thr_buddy[MAXTHRBUDDY].bp= (bpointer)-1;
877  }
878  return(cntx);}
879 
880 void deletecontext(id,ctx)
881 register context *ctx;
882 { if (id<MAXTHREAD) euscontexts[id]=NULL;
883  cfree(ctx->stack);
884  cfree(ctx);}
885 
886 #if THREADED
888 context *ctx;
889 { sema_t *sem;
890  pointer s;
891  pointer thrport;
892  thrport=allocobj(THREAD, threadport, threadcp.cix);
893 
894  thrport->c.thrp.plist=NIL;
895  thrport->c.thrp.requester=makeint(0);
896  vpush(thrport);
897 
898  /* make three semaphores; reqsem, runsem, donesem */
899  s=makevector(C_INTVECTOR, (sizeof(sema_t)+3)/sizeof(long));
900  sema_init((sema_t *)s->c.ivec.iv, 0, USYNC_THREAD, 0);
901  thrport->c.thrp.reqsem=s;
902 
903  s=makevector(C_INTVECTOR, (sizeof(sema_t)+3)/sizeof(long));
904  sema_init((sema_t *)s->c.ivec.iv, 0, USYNC_THREAD, 0);
905  thrport->c.thrp.runsem=s;
906 
907  s=makevector(C_INTVECTOR, (sizeof(sema_t)+3)/sizeof(long));
908  sema_init((sema_t *)s->c.ivec.iv, 0, USYNC_THREAD, 0);
909  thrport->c.thrp.donesem=s;
910 
911  sema_init(sem, 0, USYNC_THREAD, 0);
912  thrport->c.thrp.donesem=makeint(sem); */
913 
914  thrport->c.thrp.contex=makeint((eusinteger_t)ctx>>2);
915  thrport->c.thrp.func=NIL;
916  thrport->c.thrp.args=NIL;
917  thrport->c.thrp.result=NIL;
918  thrport->c.thrp.idle=NIL;
919  thrport->c.thrp.wait=NIL;
920  ctx->threadobj=thrport;
921  ctx->lastalloc=thrport;
922  vpop();
923  return(thrport);}
924 #endif
925 
pointer IOSTREAM
Definition: eus.c:151
pointer used_by
Definition: eus.h:227
context * euscontexts[MAXTHREAD]
Definition: eus.c:105
pointer K_IN
Definition: eus.c:130
Definition: eus.h:563
eusinteger_t iv[1]
Definition: eus.h:305
struct closure clo
Definition: eus.h:411
d
pointer speval
Definition: eus.h:203
pointer makemodule(context *ctx, int size)
Definition: makes.new.c:476
pointer makelabref(pointer n, pointer v, pointer nxt)
Definition: makes.new.c:522
Definition: eus.h:368
pointer * stack
Definition: eus.h:525
f
int nextcix
Definition: eus.c:139
pointer count
Definition: eus.h:284
pointer entry
Definition: eus.h:265
pointer * env2
Definition: eus.h:271
pointer symtab
Definition: eus.h:257
pointer cix
Definition: eus.h:327
pointer intern(context *, char *, int, pointer)
Definition: intern.c:105
allocate_stack(context *ctx, int n)
Definition: makes.new.c:800
pointer * env1
Definition: eus.h:270
Definition: eus.h:261
struct vector vec
Definition: eus.h:414
int special_index()
Definition: makes.new.c:639
struct fletframe * dynlink
Definition: eus.h:514
pointer * stacklimit
Definition: eus.h:525
struct chunk * chunklist
Definition: memory.c:57
struct _class cls
Definition: eus.h:418
struct protectframe * protfp
Definition: eus.h:534
cixpair iostreamcp
Definition: eus.c:76
pointer makeclosure(pointer code, pointer quote, pointer(*f)(), pointer e0, pointer *e1, pointer *e2)
Definition: makes.new.c:493
#define makeint(v)
Definition: sfttest.c:2
struct cell * pointer
Definition: eus.h:165
recixobj(int newcix)
Definition: makes.new.c:305
pointer plist
Definition: eus.h:312
struct fletframe * fletfp
Definition: eus.h:535
pointer C_VECTOR
Definition: eus.c:144
short high
Definition: eus.h:433
pointer K_OUT
Definition: eus.c:130
Definition: eus.h:524
struct filestream fstream
Definition: eus.h:406
context * makelispcontext(int bs_size)
Definition: makes.new.c:820
cixpair packagecp
Definition: eus.c:73
struct blockframe * makeblock(context *ctx, pointer kind, pointer name, jmp_buf *jbuf, struct blockframe *link)
Definition: makes.new.c:744
struct string str
Definition: eus.h:402
pointer vars
Definition: eus.h:328
eusfloat_t fval
Definition: eus.h:430
struct threadport thrp
Definition: eus.h:421
byte chars[1]
Definition: eus.h:212
int sema_init(sema_t *, unsigned int, int, void *)
Definition: pthreads.c:111
pointer * vsp
Definition: eus.h:525
pointer kind
Definition: eus.h:490
pointer fillpointer
Definition: eus.h:313
pointer rawcons(context *ctx, pointer a, pointer d)
Definition: makes.new.c:85
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
GLfloat n[6][3]
Definition: cube.c:15
struct bignum bgnm
Definition: eus.h:424
struct arrayheader ary
Definition: eus.h:413
pointer mkstream(context *ctx, pointer dir, pointer string)
Definition: makes.new.c:237
pointer stacknlist(context *ctx, int n)
Definition: makes.new.c:128
pointer makeflt(double d)
Definition: makes.new.c:48
pointer symvector
Definition: eus.h:222
pointer intsymvector
Definition: eus.h:224
pointer makethreadport(context *ctx)
Definition: makes.new.c:887
pointer defkeyword(context *ctx, char *name)
Definition: makes.new.c:711
pointer makereadtable(context *ctx)
Definition: makes.new.c:507
pointer makeobject(pointer class)
Definition: makes.new.c:397
struct specialbindframe * sbindfp
Definition: eus.h:532
bpointer bp
Definition: eus.h:565
pointer next
Definition: eus.h:297
struct blockframe * blkfp
Definition: eus.h:533
pointer BIGNUM
Definition: eus.c:156
pointer SYMBOL
Definition: eus.c:151
pointer VECCLASS
Definition: eus.c:154
cixpair codecp
Definition: eus.c:79
pointer bv
Definition: eus.h:378
pointer unsolved
Definition: eus.h:296
struct fletframe * newfletfp
Definition: eus.h:535
struct code code
Definition: eus.h:408
cixpair conscp
Definition: eus.c:70
cixpair symbolcp
Definition: eus.c:72
struct blockframe * lexklink
Definition: eus.h:491
pointer CODE
Definition: eus.c:151
#define intval(p)
Definition: sfttest.c:1
pointer defvar(context *ctx, char *name, pointer val, pointer pkg)
Definition: makes.new.c:682
pointer requester
Definition: eus.h:356
cixpair filestreamcp
Definition: eus.c:75
pointer errhandler
Definition: eus.h:537
pointer label
Definition: eus.h:294
pointer use
Definition: eus.h:221
pointer METACLASS
Definition: eus.c:151
pointer putprop()
pointer READTABLE
Definition: eus.c:154
pointer name
Definition: eus.h:510
Definition: eus.h:1006
Definition: eus.h:289
pointer entry
Definition: eus.h:234
pointer plist
Definition: eus.h:290
pointer codevec
Definition: eus.h:231
pointer makevector(pointer vclass, int size)
Definition: makes.new.c:407
Definition: eus.h:447
pointer syntax
Definition: eus.h:348
pointer compmacro(context *ctx, pointer sym, pointer mod, pointer(*entry)(), pointer doc)
Definition: makes.new.c:732
struct blockframe * dynklink
Definition: eus.h:491
short cix
Definition: eus.h:568
bumpcix(int m, int n)
Definition: makes.new.c:297
pointer numerator
Definition: eus.h:369
struct symbol sym
Definition: eus.h:401
pointer args
Definition: eus.h:361
pointer handle
Definition: eus.h:259
pointer mkfilestream(context *ctx, pointer dir, pointer string, int fno, pointer fname)
Definition: makes.new.c:249
Definition: eus.h:974
pointer offset
Definition: eus.h:313
int intsig
Definition: eus.h:546
pointer cdr
Definition: eus.h:196
pointer makepkg(context *ctx, pointer namestr, pointer nicks, pointer uses)
Definition: makes.new.c:197
Definition: eus_thr.h:96
pointer plist
Definition: eus.h:219
pointer wait
Definition: eus.h:365
Definition: eus.h:334
struct vecclass vcls
Definition: eus.h:419
pointer reqsem
Definition: eus.h:357
short low
Definition: eus.h:433
pointer defunpkg(context *ctx, char *name, pointer mod, pointer(*f)(), pointer pkg)
Definition: makes.new.c:614
struct ldmodule ldmod
Definition: eus.h:410
pointer RATIO
Definition: eus.c:156
pointer defconst(context *ctx, char *name, pointer val, pointer pkg)
Definition: makes.new.c:671
struct cons cons
Definition: eus.h:400
struct callframe * cf
Definition: eus.h:499
struct intvector ivec
Definition: eus.h:416
pointer plist
Definition: eus.h:281
pointer THREAD
Definition: eus.c:153
pointer forwards
Definition: eus.h:330
union cell::cellunion c
Definition: eus.h:376
pointer contex
Definition: eus.h:363
pointer types
Definition: eus.h:329
pointer makeclass(context *ctx, pointer name, pointer superobj, pointer vars, pointer types, pointer forwards, int tag, pointer metaclass)
Definition: makes.new.c:365
pointer out
Definition: eus.h:291
struct numunion::@11 sval
pointer quote(context *, pointer)
Definition: specials.c:33
cixpair vecclasscp
Definition: eus.c:78
pointer result
Definition: eus.h:362
pointer label
Definition: eus.h:497
pointer iv[2]
Definition: eus.h:321
pointer ownerclass
Definition: eus.h:519
pointer method
Definition: eus.h:519
pointer PKGCLASS
Definition: eus.c:151
short subcix
Definition: eus.h:569
pointer entity
Definition: eus.h:313
pointer donesem
Definition: eus.h:359
pointer lastalloc
Definition: eus.h:536
Definition: eus.h:428
struct fletframe * ff
Definition: eus.h:500
struct fletframe * makeflet(context *ctx, pointer nm, pointer def, struct fletframe *scp, struct fletframe *link)
Definition: makes.new.c:760
struct stream stream
Definition: eus.h:405
long l
Definition: structsize.c:3
pointer cix
Definition: eus.old.h:211
pointer homepkg
Definition: eus.h:203
pointer dispatch
Definition: eus.h:350
pointer denominator
Definition: eus.h:370
pointer cons(context *ctx, pointer a, pointer d)
Definition: makes.new.c:96
pointer compfun(context *ctx, pointer sym, pointer mod, pointer(*entry)(), pointer doc)
Definition: makes.new.c:724
pointer intsymcount
Definition: eus.h:225
pointer ARRAY
Definition: eus.c:155
struct readtable rdtab
Definition: eus.h:420
struct labref lab
Definition: eus.h:412
cixpair closurecp
Definition: eus.c:83
Definition: eus.h:381
Definition: eus.h:518
pointer fname
Definition: eus.h:287
float ckfltval(int p)
Definition: makes.new.c:25
struct cellheader h
Definition: eus.h:440
pointer LDMODULE
Definition: eus.c:151
pointer alloc(int, int, int, int)
Definition: memory.mutex.c:241
pointer value
Definition: eus.h:295
pointer CLOSURE
Definition: eus.c:151
pointer quotevec
Definition: eus.h:263
int chunkbix
Definition: eus.h:449
struct callframe * callfp
Definition: eus.h:529
pointer size
Definition: eus.h:377
long buddysize[MAXBUDDY+1]
Definition: eus.c:103
pointer subrtype
Definition: eus.h:264
pointer makebig1(long x)
Definition: makes.new.c:557
struct ratio ratio
Definition: eus.h:422
pointer QINTEGER
Definition: eus.c:120
pointer fclosure
Definition: eus.h:511
short s
Definition: structsize.c:2
cixpair metaclasscp
Definition: eus.c:77
static mutex_t spex_lock
Definition: makes.new.c:637
cixpair streamcp
Definition: eus.c:74
pointer buffer
Definition: eus.h:276
pointer size
Definition: eus.h:300
pointer defmacro(context *ctx, char *name, pointer mod, pointer(*f)())
Definition: makes.new.c:624
pointer elmtype
Definition: eus.h:343
pointer subrtype
Definition: eus.h:233
pointer entry
Definition: eus.h:253
pointer plist
Definition: eus.h:354
context * mainctx
Definition: eus.c:57
cixpair labrefcp
Definition: eus.c:84
pointer lisppkg
Definition: eus.c:109
short cix
Definition: eus.h:398
pointer defun(context *ctx, char *name, pointer mod, pointer(*f)())
Definition: makes.new.c:591
pointer vtype
Definition: eus.h:203
float fltval(int p)
Definition: makes.new.c:38
pointer makebig(int n)
Definition: makes.new.c:545
short sub
Definition: eus.h:454
struct fletframe * scope
Definition: eus.h:512
struct methdef * methcache
Definition: eus.h:539
pointer codevec
Definition: eus.h:262
struct fletframe * lexlink
Definition: eus.h:513
cixpair ratiocp
Definition: eus.c:95
pointer methods
Definition: eus.h:331
pointer rank
Definition: eus.h:313
pointer error(enum errorcode ec,...) pointer error(va_alist) va_dcl
Definition: eus.c:297
Definition: eus.h:273
long eusinteger_t
Definition: eus.h:19
pointer plist
Definition: eus.h:203
struct catchframe * nextcatch
Definition: eus.h:496
pointer dim[ARRAYRANKLIMIT]
Definition: eus.h:313
pointer makefvector(int s)
Definition: makes.new.c:428
pointer plist
Definition: eus.h:324
pointer func
Definition: eus.h:360
void deletecontext(id, context *ctx)
Definition: makes.new.c:880
cixpair stringcp
Definition: eus.c:91
#define string
Definition: test_foreign.c:14
pointer buffer
Definition: eus.h:283
struct bcell rootcell
Definition: eus.h:450
pointer makeratio(int num, int denom)
Definition: makes.new.c:536
pointer PACKAGE
Definition: eus.c:110
pointer searchpkg(byte *token, int leng)
Definition: makes.new.c:176
pointer direction
Definition: eus.h:275
pointer quotevec
Definition: eus.h:232
Definition: eus.h:230
int alloc_small_count
Definition: eus.h:542
void init(void)
Definition: cube.c:48
pointer LAMCLOSURE
Definition: eus.c:170
cixpair readtablecp
Definition: eus.c:87
struct catchframe * catchfp
Definition: eus.h:530
int next_special_index
Definition: makes.new.c:636
pointer K_FUNCTION_DOCUMENTATION
Definition: eus.c:175
jmp_buf * jbp
Definition: eus.h:501
pointer specials
Definition: eus.h:545
tail(char *cp)
Definition: eustags.c:1181
pointer makematrix(context *ctx, int row, int column)
Definition: makes.new.c:457
unsigned bix
Definition: eus.h:185
pointer idle
Definition: eus.h:364
cixpair bignumcp
Definition: eus.c:97
pointer makecode(pointer mod, pointer(*f)(), pointer ftype)
Definition: makes.new.c:278
pointer defvector(context *ctx, char *name, pointer super, int elm, int size)
Definition: makes.new.c:436
int count
Definition: thrtest.c:11
short cix
Definition: eus.h:190
pointer makebuffer(int size)
Definition: makes.new.c:136
cixpair threadcp
Definition: eus.c:85
pointer env0
Definition: eus.h:269
Definition: eus.h:218
pointer mkiostream(context *ctx, pointer in, pointer out)
Definition: makes.new.c:265
pointer tail
Definition: eus.h:278
pointer makesymbol(context *ctx, char *str, int leng, pointer home)
Definition: makes.new.c:160
pointer shadows
Definition: eus.h:226
struct buddyfree * thr_buddy
Definition: eus.h:540
pointer makebig2(long hi, long lo)
Definition: makes.new.c:571
pointer macro
Definition: eus.h:349
int alloc_big_count
Definition: eus.h:541
byte * get_string(pointer s)
Definition: makes.new.c:67
#define max(I1, I2)
Definition: eustags.c:134
#define NULL
Definition: transargv.c:8
pointer defspecial(context *ctx, char *name, pointer mod, pointer(*f)())
Definition: makes.new.c:660
struct iostream iostream
Definition: eus.h:407
pointer C_INTVECTOR
Definition: eus.c:146
struct object obj
Definition: eus.h:417
pointer super
Definition: eus.h:326
pointer pname
Definition: eus.h:203
pointer fd
Definition: eus.h:286
enterclass(pointer classobj)
Definition: makes.new.c:336
pointer deflocal(context *ctx, char *name, pointer val, pointer pkg)
Definition: makes.new.c:694
GLfloat v[8][3]
Definition: cube.c:21
pointer count
Definition: eus.h:277
Definition: eus.h:954
pointer direction
Definition: eus.h:282
pointer Getstring(pointer s)
Definition: makes.new.c:61
pointer QCONS
Definition: eus.c:151
pointer in
Definition: eus.h:291
pointer findpkg(pointer pkgname)
Definition: makes.new.c:190
jmp_buf * jbp
Definition: eus.h:493
Definition: eus.h:439
int special_bind_count
Definition: eus.h:543
pointer FILESTREAM
Definition: eus.c:151
unsigned char byte
Definition: eus.h:163
Definition: eus.h:202
pointer subrtype
Definition: eus.h:252
unsigned int thr_self()
Definition: eus.c:25
Definition: eus.h:452
pointer STREAM
Definition: eus.c:151
pointer plist
Definition: eus.h:347
pointer codevec
Definition: eus.h:250
struct chunk * nextchunk
Definition: eus.h:448
pointer plist
Definition: eus.h:274
pointer symcount
Definition: eus.h:223
pointer def
Definition: eus.h:570
void mkcatchframe(context *ctx, pointer lab, jmp_buf jbuf)
Definition: makes.new.c:779
pointer stackrawlist(context *ctx, int n)
Definition: makes.new.c:120
pointer spefunc
Definition: eus.h:203
short cix
Definition: eus.h:453
Definition: eus.h:323
pointer quotevec
Definition: eus.h:251
struct class_desc classtab[MAXCLASS]
Definition: eus.c:138
pointer pkglist
Definition: eus.c:109
resetcix(pointer class, cixpair *p)
Definition: makes.new.c:329
struct bindframe * bf
Definition: eus.h:498
int nextbclass
Definition: eus.c:101
Definition: eus.h:293
Definition: eus.old.h:207
struct bindframe * bindfp
Definition: eus.h:531
pointer NIL
Definition: eus.c:110
cixpair ldmodulecp
Definition: eus.c:82
Definition: eus.h:509
pointer selector
Definition: eus.h:519
int count
Definition: eus.h:564
pointer v[1]
Definition: eus.h:301
pointer class
Definition: eus.h:519
cixpair arraycp
Definition: eus.c:86
pointer make_foreign_string(eusinteger_t addr, int size)
Definition: makes.new.c:153
pointer makestring(char *s, int l)
Definition: makes.new.c:143
pointer car
Definition: eus.h:196
struct built_in_cid builtinclass[64]
Definition: eus.c:100
Definition: eus.h:249
pointer keywordpkg
Definition: eus.c:109
pointer threadobj
Definition: eus.h:538
pointer tail
Definition: eus.h:285
static char * rcsid
Definition: makes.new.c:5
char a[26]
Definition: freq.c:4
Definition: eus.h:346
pointer length
Definition: eus.h:211
struct package pkg
Definition: eus.h:404
eusinteger_t ival
Definition: eus.h:431
pointer name
Definition: eus.h:492
cixpair fltvectorcp
Definition: eus.c:89


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