Commit abd4e66f authored by Marius Gerbershagen's avatar Marius Gerbershagen
Browse files

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.
parent 572cd5ee
......@@ -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--)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment