Go to the documentation of this file.
5 static char *
rcsid=
"@(#)$Id$";
16 #define nextbuddy(p) ((bpointer)((eusinteger_t)p+(buddysize[p->h.bix]*sizeof(pointer))))
29 nu.
ival = p & 0xfffffffc;
41 nu.
ival= p & 0xfffffffc;
63 {
if (issymbol(
s))
s=
s->c.sym.pname;
69 {
if (isstring(
s))
return(
s->c.str.chars);
70 if (issymbol(
s))
return(
s->c.sym.pname->c.str.chars);
77 #define allocobj(class,builtin,cid) \
79 alloc(vecsize(speval(class)->c.cls.vars), ELM_FIXED, \
80 intval(speval(class)->c.cls.cix), \
82 vecsize(speval(class)->c.cls.vars)) : \
83 alloc(wordsizeof(struct builtin), ELM_FIXED, cid, \
84 wordsizeof(struct builtin)))
92 wordsizeof(
struct cons));
114 c=
alloc(vecsize(speval(
QCONS)->c.cls.vars), ELM_FIXED,
116 wordsizeof(
struct cons));
125 while (
n-->0) r=
rawcons(ctx,*--fsp,r);
133 while (
n-->0) r=
cons(ctx,*--fsp,r);
185 while (pkgs && islist(pkgs)) {
186 pkg=ccar(pkgs); pkgs=ccdr(pkgs);
188 while (islist(names))
189 if (strlength(ccar(names))==leng &&
190 !memcmp((
char *)ccar(names)->c.str.chars, (
char *)token, leng))
return(pkg);
191 else names=ccdr(names);}
196 {
register pointer pkg,pkgs,names;
197 if (ispackage(pkgname))
return(pkgname);
199 return(
searchpkg(pkgname->c.str.chars,strlength(pkgname)));}
203 register pointer namestr,nicks,uses;
204 {
register pointer pkg,symvec,pkgs,names,p;
209 vpush(namestr); vpush(nicks); vpush(uses);
211 while (islist(nicks)) {
217 while (islist(uses)) {
218 if ((p=
findpkg(ccar(uses)))) { vpush(p); i++; uses=ccdr(uses);}
231 for (i=0; i<SYMBOLHASH; i++) symvec->
c.
vec.
v[i]=
makeint(0);
234 for (i=0; i<SYMBOLHASH; i++) symvec->
c.
vec.
v[i]=
makeint(0);
247 s->c.stream.direction=dir;
248 s->c.stream.count=
s->c.stream.tail=
makeint(0);
249 s->c.stream.buffer=vpop();
250 s->c.stream.plist=
NIL;
259 vpush(
string); vpush(fname);
261 s->c.fstream.direction=dir;
262 s->c.fstream.count=
s->c.fstream.tail=
makeint(0);
263 s->c.fstream.fname=vpop();
264 s->c.fstream.buffer=vpop();
266 s->c.fstream.plist=
NIL;
274 vpush(in); vpush(out);
314 {
register struct chunk *cp;
317 #if defined(BIX_DEBUG) || defined(DEBUG_COUNT)
318 static int count = 0;
330 printf(
"recixobj:%d:p=0x%lx, bix = %d\n",
346 register int i,newcix,temp,supercix;
349 super= (classobj->c.cls.super);
350 if (isclass(super)) {
353 for (i=
nextcix-1; i>=newcix; i--) {
367 classobj->c.cls.cix=
makeint(newcix);
377 pointer name,superobj,vars,types,metaclass,forwards;
383 vpush(vars); vpush(types);
384 if (metaclass && isclass(metaclass))
class=
makeobject(metaclass);
390 class->c.cls.name=name;
399 class->c.vcls.size=
makeint(-1);}
414 while (size>0)
v[--size]=
NIL;
421 register int n,etype;
423 etype=
intval(vclass->c.vcls.elmtype);
425 case ELM_BIT:
n=(size+WORD_SIZE-1)/WORD_SIZE;
init=0;
break;
429 case ELM_INT:
n=size;
init=0;
break;
430 case ELM_FOREIGN:
n=1;
init=0;
break;
435 while (--
n>=0) vv[
n]=
init;
451 {
pointer classsym,
class,varvector,typevector,forwardvector;
461 vpush(forwardvector);
463 class=
makeclass(ctx,classsym,super,varvector,typevector,forwardvector,elm,0);
482 for (i=2; i<ARRAYRANKLIMIT; i++) m->
c.
ary.
dim[i]=
NIL;
491 elmtypeof(cvec)=ELM_BYTE;
525 {
pointer rdtable,rdsyntax,rdmacro,rddispatch;
542 wordsizeof(
struct labref));
546 l->c.lab.unsolved=
NIL;
612 {
register pointer sym,pkg,pdoc;
613 #if defined(DEFUN_DEBUG) || defined(DEBUG_COUNT)
619 printf(
"defun:%d:%s:",
count, name );
623 sym=
intern(ctx,name,strlen(name),pkg);
630 if (doc !=
NULL) vpop();
642 sym=
intern(ctx,name,strlen(name),pkg);
653 sym=
intern(ctx,name,strlen(name),pkg);
657 #if Solaris2 || PTHREAD
689 sym=
intern(ctx,name,strlen(name),pkg);
699 sym=
intern(ctx,name,strlen(name),pkg);
711 sym=
intern(ctx,name,strlen(name),pkg);
723 sym=
intern(ctx,name,strlen(name),pkg);
729 pointer_update(ctx->specials->c.vec.v[x],vpop());
811 cfp->
jbp=(jmp_buf *)jbuf;
826 if (ctx->stack) cfree(ctx->stack);
829 i=(int)malloc((
n+1)*
sizeof(
pointer));
834 ctx->stacklimit= &ctx->stack[
n-100];
836 printf(
"allocate_stack: 0x%lx -- 0x%lx\n", ctx->stack, ctx->stacklimit );
847 if (bs_size<4096) bs_size=4096;
853 printf(
"makelispcontext: stack: 0x%lx -- 0x%lx\n", cntx->
stack, cntx->
stacklimit );
874 #ifdef __GC_ALLOC_DRIVEN
880 #ifdef __RETURN_BARRIER
889 for (i=0; i<MAX_SPECIALS; i++)
896 for (i=0; i<MAXMETHCACHE; i++) {
900 malloc(
sizeof(
struct buddyfree) * (MAXTHRBUDDY+1));
901 for (i=0; i<MAXTHRBUDDY; i++) {
pointer alloc(int, int, int, int)
pointer defvar(context *ctx, char *name, pointer val, pointer pkg)
eusinteger_t hide_ptr(pointer p)
void recixobj(int newcix)
pointer rawcons(context *ctx, pointer a, pointer d)
pointer defkeyword(context *ctx, char *name)
pointer make_foreign_string(eusinteger_t addr, int size)
pointer mkfilestream(context *ctx, pointer dir, pointer string, int fno, pointer fname)
struct fletframe * lexlink
pointer cons(context *ctx, pointer a, pointer d)
struct catchframe * catchfp
pointer Getstring(pointer s)
pointer makereadtable(context *ctx)
pointer defvector(context *ctx, char *name, pointer super, int elm, int size)
pointer K_FUNCTION_DOCUMENTATION
pointer searchpkg(byte *token, int leng)
pointer defspecial(context *ctx, char *name, pointer mod, pointer(*f)())
byte * get_string(pointer s)
pointer defconst(context *ctx, char *name, pointer val, pointer pkg)
pointer defmacro(context *ctx, char *name, pointer mod, pointer(*f)())
pointer quote(context *, pointer)
pointer makesymbol(context *ctx, char *str, int leng, pointer home)
struct built_in_cid builtinclass[64]
struct buddyfree * thr_buddy
struct blockframe * dynklink
struct blockframe * lexklink
struct blockframe * makeblock(context *ctx, pointer kind, pointer name, jmp_buf *jbuf, struct blockframe *link)
pointer stackrawlist(context *ctx, int n)
int sema_init(sema_t *, unsigned int, int, void *)
pointer deflocal(context *ctx, char *name, pointer val, pointer pkg)
pointer compmacro(context *ctx, pointer sym, pointer mod, pointer(*entry)(), pointer doc)
context * makelispcontext(int bs_size)
pointer makeclass(context *ctx, pointer name, pointer superobj, pointer vars, pointer types, pointer forwards, int tag, pointer metaclass)
void mkcatchframe(context *ctx, pointer lab, jmp_buf *jbuf)
struct fletframe * makeflet(context *ctx, pointer nm, pointer def, struct fletframe *scp, struct fletframe *link)
pointer intern(context *, char *, int, pointer)
pointer makemodule(context *ctx, int size)
pointer makestring(char *s, int l)
pointer makeratio(int num, int denom)
struct bindframe * bindfp
struct protectframe * protfp
pointer makebuffer(int size)
pointer defunpkg(context *ctx, char *name, pointer mod, pointer(*f)(), pointer pkg)
pointer makematrix(context *ctx, int row, int column)
pointer makeclosure(pointer code, pointer quote, pointer(*f)(), pointer e0, pointer *e1, pointer *e2)
struct fletframe * fletfp
context * euscontexts[MAXTHREAD]
struct class_desc classtab[MAXCLASS]
struct catchframe * nextcatch
pointer mkstream(context *ctx, pointer dir, pointer string)
struct fletframe * dynlink
struct specialbindframe * sbindfp
void allocate_stack(context *ctx, int n)
pointer makevector(pointer vclass, int size)
struct fletframe * newfletfp
pointer makeflt(double d)
pointer error(enum errorcode ec,...) pointer error(va_alist) va_dcl
void enterclass(pointer classobj)
pointer compfun(context *ctx, pointer sym, pointer mod, pointer(*entry)(), pointer doc)
struct blockframe * blkfp
pointer findpkg(pointer pkgname)
void bumpcix(int m, int n)
long buddysize[MAXBUDDY+1]
pointer defun(context *ctx, char *name, pointer mod, pointer(*f)(), char *doc)
pointer makecode(pointer mod, pointer(*f)(), pointer ftype)
struct callframe * callfp
pointer makebig2(long hi, long lo)
pointer makefvector(int s)
pointer makethreadport(context *ctx)
pointer makelabref(pointer n, pointer v, pointer nxt)
pointer stacknlist(context *ctx, int n)
pointer makepkg(context *ctx, pointer namestr, pointer nicks, pointer uses)
pointer mkiostream(context *ctx, pointer in, pointer out)
struct numunion::@11 sval
void deletecontext(int id, context *ctx)
void rgc_add_to_classtable(pointer newclass)
pointer makeobject(pointer class)
void resetcix(pointer class, cixpair *p)
struct methdef * methcache
euslisp
Author(s): Toshihiro Matsui
autogenerated on Thu Jun 15 2023 02:06:43