mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-22 20:42:03 -08:00
stop ecl_frs_push from setting frs_val to often
The following code `(LOOP (BLOCK NIL (RETURN)))` would produce an
error. ecl_frs_push would correctly set __frame->frs_val the first
time, however later on control would jump to the statement after
ecl_setjmp and __frame->frs_val would be set again, this time to a
wrong value. Fixes #446.
Also, we don't need to pass val to _ecl_frs_push anymore, so this
argument has been removed.
This commit is contained in:
parent
572cd5ee6f
commit
abd4e66f48
2 changed files with 4 additions and 4 deletions
|
|
@ -557,7 +557,7 @@ frs_overflow(void) /* used as condition in list.d */
|
|||
}
|
||||
|
||||
ecl_frame_ptr
|
||||
_ecl_frs_push(register cl_env_ptr env, register cl_object val)
|
||||
_ecl_frs_push(register cl_env_ptr env)
|
||||
{
|
||||
/* We store a dummy tag first, to make sure that it is safe to
|
||||
* interrupt this method with a call to ecl_unwind. Otherwise, a
|
||||
|
|
|
|||
|
|
@ -313,12 +313,12 @@ typedef struct ecl_frame {
|
|||
cl_index frs_sp;
|
||||
} *ecl_frame_ptr;
|
||||
|
||||
extern ECL_API ecl_frame_ptr _ecl_frs_push(register cl_env_ptr, register cl_object);
|
||||
extern ECL_API ecl_frame_ptr _ecl_frs_push(register cl_env_ptr);
|
||||
#define ecl_frs_push(env,val) \
|
||||
ecl_frame_ptr __frame = _ecl_frs_push(env,val); \
|
||||
ecl_frame_ptr __frame = _ecl_frs_push(env); \
|
||||
ecl_disable_interrupts_env(env); \
|
||||
int __ecl_frs_push_result = ecl_setjmp(__frame->frs_jmpbuf); \
|
||||
__frame->frs_val = val; \
|
||||
int __ecl_frs_push_result = ecl_setjmp(__frame->frs_jmpbuf); \
|
||||
ecl_enable_interrupts_env(env)
|
||||
|
||||
#define ecl_frs_pop(env) ((env)->frs_top--)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue