mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-16 06:12:25 -08:00
Renamed the frame structure to avoid name clashes with NetBSD/68k
This commit is contained in:
parent
784b761678
commit
21a2ebcfc0
7 changed files with 31 additions and 31 deletions
|
|
@ -148,7 +148,7 @@ aset_bv(cl_object x, cl_index index, int value)
|
|||
void
|
||||
cl_throw(cl_object tag)
|
||||
{
|
||||
frame_ptr fr = frs_sch_catch(tag);
|
||||
ecl_frame_ptr fr = frs_sch_catch(tag);
|
||||
if (fr == NULL)
|
||||
FEcontrol_error("THROW: The catch ~S is undefined.", 1, tag);
|
||||
unwind(fr);
|
||||
|
|
@ -157,7 +157,7 @@ cl_throw(cl_object tag)
|
|||
void
|
||||
cl_return_from(cl_object block_id, cl_object block_name)
|
||||
{
|
||||
frame_ptr fr = frs_sch(block_id);
|
||||
ecl_frame_ptr fr = frs_sch(block_id);
|
||||
if (fr == NULL)
|
||||
FEcontrol_error("RETURN-FROM: The block ~S with id ~S is missing.",
|
||||
2, block_name, block_id);
|
||||
|
|
@ -167,7 +167,7 @@ cl_return_from(cl_object block_id, cl_object block_name)
|
|||
void
|
||||
cl_go(cl_object tag_id, cl_object label)
|
||||
{
|
||||
frame_ptr fr = frs_sch(tag_id);
|
||||
ecl_frame_ptr fr = frs_sch(tag_id);
|
||||
if (fr == NULL)
|
||||
FEcontrol_error("GO: The tagbody ~S is missing.", 1, tag_id);
|
||||
VALUES(0)=label;
|
||||
|
|
|
|||
|
|
@ -439,7 +439,7 @@ mark_phase(void)
|
|||
register int i;
|
||||
register struct package *pp;
|
||||
register bds_ptr bdp;
|
||||
register frame_ptr frp;
|
||||
register ecl_frame_ptr frp;
|
||||
register ihs_ptr ihsp;
|
||||
|
||||
mark_object(Cnil);
|
||||
|
|
|
|||
|
|
@ -254,10 +254,10 @@ frs_overflow(void) /* used as condition in list.d */
|
|||
FEerror("Frame stack overflow.", 0);
|
||||
}
|
||||
|
||||
frame_ptr
|
||||
ecl_frame_ptr
|
||||
_frs_push(register enum fr_class clas, register cl_object val)
|
||||
{
|
||||
frame_ptr output = ++cl_env.frs_top;
|
||||
ecl_frame_ptr output = ++cl_env.frs_top;
|
||||
if (output >= cl_env.frs_limit) frs_overflow();
|
||||
output->frs_lex = cl_env.lex_env;
|
||||
output->frs_bds_top = cl_env.bds_top;
|
||||
|
|
@ -269,7 +269,7 @@ _frs_push(register enum fr_class clas, register cl_object val)
|
|||
}
|
||||
|
||||
void
|
||||
unwind(frame_ptr fr)
|
||||
unwind(ecl_frame_ptr fr)
|
||||
{
|
||||
cl_env.nlj_fr = fr;
|
||||
while (cl_env.frs_top != fr && cl_env.frs_top->frs_class == FRS_CATCH)
|
||||
|
|
@ -282,10 +282,10 @@ unwind(frame_ptr fr)
|
|||
/* never reached */
|
||||
}
|
||||
|
||||
frame_ptr
|
||||
ecl_frame_ptr
|
||||
frs_sch (cl_object frame_id)
|
||||
{
|
||||
frame_ptr top;
|
||||
ecl_frame_ptr top;
|
||||
|
||||
for (top = cl_env.frs_top; top >= cl_env.frs_org; top--)
|
||||
if (top->frs_val == frame_id && top->frs_class == FRS_CATCH)
|
||||
|
|
@ -293,10 +293,10 @@ frs_sch (cl_object frame_id)
|
|||
return(NULL);
|
||||
}
|
||||
|
||||
frame_ptr
|
||||
ecl_frame_ptr
|
||||
frs_sch_catch(cl_object frame_id)
|
||||
{
|
||||
frame_ptr top;
|
||||
ecl_frame_ptr top;
|
||||
|
||||
for(top = cl_env.frs_top; top >= cl_env.frs_org ;top--)
|
||||
if ((top->frs_val == frame_id && top->frs_class == FRS_CATCH)
|
||||
|
|
@ -305,10 +305,10 @@ frs_sch_catch(cl_object frame_id)
|
|||
return(NULL);
|
||||
}
|
||||
|
||||
static frame_ptr
|
||||
static ecl_frame_ptr
|
||||
get_frame_ptr(cl_object x)
|
||||
{
|
||||
frame_ptr p;
|
||||
ecl_frame_ptr p;
|
||||
|
||||
if (FIXNUMP(x)) {
|
||||
p = cl_env.frs_org + fix(x);
|
||||
|
|
@ -359,7 +359,7 @@ si_frs_ihs(cl_object arg)
|
|||
cl_object
|
||||
si_sch_frs_base(cl_object fr, cl_object ihs)
|
||||
{
|
||||
frame_ptr x;
|
||||
ecl_frame_ptr x;
|
||||
cl_index y;
|
||||
|
||||
y = fixnnint(ihs);
|
||||
|
|
@ -403,7 +403,7 @@ init_stacks(int *new_cs_org)
|
|||
cl_index size;
|
||||
|
||||
cl_env.frs_size = size = FRSSIZE + 2*FRSGETA;
|
||||
cl_env.frs_org = (frame_ptr)cl_alloc(size * sizeof(*cl_env.frs_org));
|
||||
cl_env.frs_org = (ecl_frame_ptr)cl_alloc(size * sizeof(*cl_env.frs_org));
|
||||
cl_env.frs_top = cl_env.frs_org-1;
|
||||
cl_env.frs_limit = &cl_env.frs_org[size - 2*FRSGETA];
|
||||
cl_env.bds_size = size = BDSSIZE + 2*BDSGETA;
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@
|
|||
|
||||
(defun c2unwind-protect (form body)
|
||||
(wt-nl "{ volatile bool unwinding = FALSE;")
|
||||
(wt-nl "frame_ptr next_fr; cl_object next_tag;")
|
||||
(wt-nl "ecl_frame_ptr next_fr; cl_object next_tag;")
|
||||
;; Here we compile the form which is protected. When this form
|
||||
;; is aborted, it continues at the frs_pop() with unwinding=TRUE.
|
||||
(wt-nl "if (frs_push(FRS_PROTECT,Cnil)) {")
|
||||
|
|
|
|||
|
|
@ -53,10 +53,10 @@ struct cl_env_struct {
|
|||
* to set return points.
|
||||
*/
|
||||
cl_index frs_size;
|
||||
struct frame *frs_org;
|
||||
struct frame *frs_top;
|
||||
struct frame *frs_limit;
|
||||
struct frame *nlj_fr;
|
||||
struct ecl_frame *frs_org;
|
||||
struct ecl_frame *frs_top;
|
||||
struct ecl_frame *frs_limit;
|
||||
struct ecl_frame *nlj_fr;
|
||||
|
||||
/*
|
||||
* The following pointers to the C Stack are used to ensure that a
|
||||
|
|
@ -1215,9 +1215,9 @@ extern cl_object si_reset_stack_limits(void);
|
|||
extern void bds_overflow(void) /*__attribute__((noreturn))*/;
|
||||
extern void bds_unwind(bds_ptr new_bds_top);
|
||||
extern int frs_overflow(void) /*__attribute__((noreturn))*/;
|
||||
extern void unwind(frame_ptr fr) /*__attribute__((noreturn))*/;
|
||||
extern frame_ptr frs_sch(cl_object frame_id);
|
||||
extern frame_ptr frs_sch_catch(cl_object frame_id);
|
||||
extern void unwind(ecl_frame_ptr fr) /*__attribute__((noreturn))*/;
|
||||
extern ecl_frame_ptr frs_sch(cl_object frame_id);
|
||||
extern ecl_frame_ptr frs_sch_catch(cl_object frame_id);
|
||||
extern cl_object new_frame_id(void);
|
||||
|
||||
/* string.c */
|
||||
|
|
|
|||
|
|
@ -34,12 +34,12 @@ typedef struct lpd {
|
|||
|
||||
/* stacks.h - The Frame stack */
|
||||
size_t lwp_frs_size;
|
||||
frame_ptr lwp_frs_org;
|
||||
frame_ptr lwp_frs_limit;
|
||||
frame_ptr lwp_frs_top;
|
||||
ecl_frame_ptr lwp_frs_org;
|
||||
ecl_frame_ptr lwp_frs_limit;
|
||||
ecl_frame_ptr lwp_frs_top;
|
||||
|
||||
/* Non-local jumps */
|
||||
frame_ptr lwp_nlj_fr;
|
||||
ecl_frame_ptr lwp_nlj_fr;
|
||||
cl_object lwp_nlj_tag;
|
||||
|
||||
/* lex.h - Lexical environment */
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ enum fr_class {
|
|||
FRS_PROTECT /* for protect-all */
|
||||
};
|
||||
|
||||
typedef struct frame {
|
||||
typedef struct ecl_frame {
|
||||
jmp_buf frs_jmpbuf;
|
||||
cl_object frs_lex;
|
||||
bds_ptr frs_bds_top;
|
||||
|
|
@ -120,9 +120,9 @@ typedef struct frame {
|
|||
cl_object frs_val;
|
||||
ihs_ptr frs_ihs;
|
||||
cl_index frs_sp;
|
||||
} *frame_ptr;
|
||||
} *ecl_frame_ptr;
|
||||
|
||||
extern frame_ptr _frs_push(register enum fr_class clas, register cl_object val);
|
||||
extern ecl_frame_ptr _frs_push(register enum fr_class clas, register cl_object val);
|
||||
|
||||
#define frs_push(class, val) ecl_setjmp(_frs_push(class, val)->frs_jmpbuf)
|
||||
|
||||
|
|
@ -176,7 +176,7 @@ cl_env.lex_env ------> ( tag0 value0 tag1 value1 ... )
|
|||
cl_env.lex_env = __env; }
|
||||
|
||||
#define CL_UNWIND_PROTECT_BEGIN {\
|
||||
bool __unwinding; frame_ptr __next_fr; \
|
||||
bool __unwinding; ecl_frame_ptr __next_fr; \
|
||||
cl_index __nr; \
|
||||
if (frs_push(FRS_PROTECT,Cnil)) { \
|
||||
__unwinding=1; __next_fr=cl_env.nlj_fr; \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue