diff options
Diffstat (limited to 'src/h/rproto.h')
-rw-r--r-- | src/h/rproto.h | 141 |
1 files changed, 52 insertions, 89 deletions
diff --git a/src/h/rproto.h b/src/h/rproto.h index 3a5cc30..6394726 100644 --- a/src/h/rproto.h +++ b/src/h/rproto.h @@ -46,7 +46,7 @@ void coclean (word *old); void coacttrace (struct b_coexpr *ccp,struct b_coexpr *ncp); void cofailtrace (struct b_coexpr *ccp,struct b_coexpr *ncp); void corettrace (struct b_coexpr *ccp,struct b_coexpr *ncp); -int coswitch (word *old, word *new, int first); +int coswitch (word *oldctx, word *newctx, int firsttime); int cplist (dptr dp1,dptr dp2,word i,word j); int cpset (dptr dp1,dptr dp2,word size); void cpslots (dptr dp1,dptr slotptr,word i, word j); @@ -116,7 +116,8 @@ int qtos (dptr dp,char *sbuf); int radix (int sign, register int r, register char *s, register char *end_s, union numeric *result); char *reserve (int region, word nbytes); -void retderef (dptr valp, word *low, word *high); +void resolve (void); +void retderef (dptr valp, word *low, word *high); void segvtrap (int); void stkdump (int); word sub (word a,word b); @@ -124,49 +125,31 @@ void syserr (char *s); struct b_coexpr *topact (struct b_coexpr *ce); void xmfree (void); -#ifdef MultiThread - void resolve (struct progstate *pstate); - struct b_coexpr *loadicode (char *name, struct b_file *theInput, - struct b_file *theOutput, struct b_file *theError, - C_integer bs, C_integer ss, C_integer stk); - void actparent (int eventcode); - int mt_activate (dptr tvalp, dptr rslt, struct b_coexpr *ncp); -#else /* MultiThread */ - void resolve (void); -#endif /* MultiThread */ - -#ifdef EventMon - void EVAsgn (dptr dx); -#endif /* EventMon */ - -#ifdef ExternalFunctions - dptr extcall (dptr x, int nargs, int *signal); -#endif /* ExternalFunctions */ - -#ifdef LargeInts - struct b_bignum *alcbignum (word n); - word bigradix (int sign, int r, char *s, char *x, +/* + * for large integers + */ +struct b_bignum *alcbignum (word n); +word bigradix (int sign, int r, char *s, char *x, union numeric *result); - double bigtoreal (dptr da); - int realtobig (dptr da, dptr dx); - int bigtos (dptr da, dptr dx); - void bigprint (FILE *f, dptr da); - int cpbignum (dptr da, dptr db); - int bigadd (dptr da, dptr db, dptr dx); - int bigsub (dptr da, dptr db, dptr dx); - int bigmul (dptr da, dptr db, dptr dx); - int bigdiv (dptr da, dptr db, dptr dx); - int bigmod (dptr da, dptr db, dptr dx); - int bigneg (dptr da, dptr dx); - int bigpow (dptr da, dptr db, dptr dx); - int bigpowri (double a, dptr db, dptr drslt); - int bigand (dptr da, dptr db, dptr dx); - int bigor (dptr da, dptr db, dptr dx); - int bigxor (dptr da, dptr db, dptr dx); - int bigshift (dptr da, dptr db, dptr dx); - word bigcmp (dptr da, dptr db); - int bigrand (dptr da, dptr dx); -#endif /* LargeInts */ +double bigtoreal (dptr da); +int realtobig (dptr da, dptr dx); +int bigtos (dptr da, dptr dx); +void bigprint (FILE *f, dptr da); +int cpbignum (dptr da, dptr db); +int bigadd (dptr da, dptr db, dptr dx); +int bigsub (dptr da, dptr db, dptr dx); +int bigmul (dptr da, dptr db, dptr dx); +int bigdiv (dptr da, dptr db, dptr dx); +int bigmod (dptr da, dptr db, dptr dx); +int bigneg (dptr da, dptr dx); +int bigpow (dptr da, dptr db, dptr dx); +int bigpowri (double a, dptr db, dptr drslt); +int bigand (dptr da, dptr db, dptr dx); +int bigor (dptr da, dptr db, dptr dx); +int bigxor (dptr da, dptr db, dptr dx); +int bigshift (dptr da, dptr db, dptr dx); +word bigcmp (dptr da, dptr db); +int bigrand (dptr da, dptr dx); #ifdef FAttrib char *make_mode(mode_t st_mode); @@ -385,10 +368,11 @@ void xmfree (void); * Prototypes for the run-time system. */ -struct b_external *alcextrnl (int n); +struct b_external *alcexternal (long nbytes, struct b_extlfuns *f, void *data); struct b_record *alcrecd (int nflds,union block *recptr); struct b_tvsubs *alcsubs (word len,word pos,dptr var); int bfunc (void); +struct descrip callextfunc (int (*)(int, dptr), dptr, dptr); long ckadd (long i, long j); long ckmul (long i, long j); long cksub (long i, long j); @@ -401,6 +385,10 @@ int cvcset (dptr dp,int * *cs,int *csbuf); int cvnum (dptr dp,union numeric *result); int cvreal (dptr dp,double *r); void deref (dptr dp1, dptr dp2); +int extlcmp (int argc, dptr argv); +int extlcopy (int argc, dptr argv); +int extlimage (int argc, dptr argv); +int extlname (int argc, dptr argv); void envset (void); int eq (dptr dp1,dptr dp2); int get_name (dptr dp1, dptr dp2); @@ -432,50 +420,25 @@ int tvcmp4 (struct dpair *dp1,struct dpair *dp2); int tvtbl_asgn (dptr dest, const dptr src); void varargs (dptr argp, int nargs, dptr rslt); -#ifdef MultiThread - struct b_coexpr *alccoexp (long icodesize, long stacksize); -#else /* MultiThread */ - struct b_coexpr *alccoexp (void); -#endif /* MultiThread */ - -#if COMPILER - - struct b_refresh *alcrefresh (int na, int nl, int nt, int wk_sz); - void atrace (void); - void ctrace (void); - void failtrace (void); - void initalloc (void); - int invoke (int n, dptr args, dptr rslt, continuation c); - void rtrace (void); - void strace (void); - void tracebk (struct p_frame *lcl_pfp, dptr argp); - int xdisp (struct p_frame *fp, dptr dp, int n, FILE *f); - -#else /* COMPILER */ - - struct b_refresh *alcrefresh (word *e, int nl, int nt); - void atrace (dptr dp); - void ctrace (dptr dp, int nargs, dptr arg); - void failtrace (dptr dp); - int invoke (int nargs, dptr *cargs, int *n); - void rtrace (dptr dp, dptr rval); - void strace (dptr dp, dptr rval); - void tracebk (struct pf_marker *lcl_pfp, dptr argp); - int xdisp (struct pf_marker *fp, dptr dp, int n, FILE *f); +struct b_coexpr *alccoexp (void); - #define Fargs dptr cargp - int Obscan (int nargs, Fargs); - int Ocreate (word *entryp, Fargs); - int Oescan (int nargs, Fargs); - int Ofield (int nargs, Fargs); - int Olimit (int nargs, Fargs); - int Ollist (int nargs, Fargs); - int Omkrec (int nargs, Fargs); +struct b_refresh *alcrefresh (word *e, int nl, int nt); +void atrace (dptr dp); +void ctrace (dptr dp, int nargs, dptr arg); +void failtrace (dptr dp); +int invoke (int nargs, dptr *cargs, int *n); +void rtrace (dptr dp, dptr rval); +void strace (dptr dp, dptr rval); +void tracebk (struct pf_marker *lcl_pfp, dptr argp); +int xdisp (struct pf_marker *fp, dptr dp, int n, FILE *f); - #ifdef MultiThread - void initalloc (word codesize, struct progstate *p); - #else /* MultiThread */ - void initalloc (word codesize); - #endif /* MultiThread */ +#define Fargs dptr cargp +int Obscan (int nargs, Fargs); +int Ocreate (word *entryp, Fargs); +int Oescan (int nargs, Fargs); +int Ofield (int nargs, Fargs); +int Olimit (int nargs, Fargs); +int Ollist (int nargs, Fargs); +int Omkrec (int nargs, Fargs); -#endif /* COMPILER */ +void initalloc (word codesize); |