static cl_index
ecl_bds_bind_special_case(cl_object s)
{
- if (s->symbol.binding == 0) {
- printf("\nFOO\n");
- abort();
- }
if (s->symbol.binding == ECL_MISSING_SPECIAL_BINDING) {
return ecl_new_binding_index(s);
} else {
}
location = env->thread_local_bindings + index;
slot = ++env->bds_top;
- if (slot >= env->bds_limit) {
- ecl_bds_overflow();
- slot = env->bds_top;
- }
+ if (slot >= env->bds_limit) slot = ecl_bds_overflow();
slot->symbol = s;
slot->value = *location;
*location = value;
}
location = env->thread_local_bindings + index;
slot = ++env->bds_top;
- if (slot >= env->bds_limit) {
- ecl_bds_overflow();
- slot = env->bds_top;
- }
+ if (slot >= env->bds_limit) slot = ecl_bds_overflow();
slot->symbol = s;
slot->value = *location;
if (!(*location)) *location = s->symbol.value;
ecl_symbol_slot(cl_env_ptr env, cl_object s)
{
if (Null(s)) {
- s = Cnil_symbol;
+ return &(Cnil_symbol->symbol.value);
} else {
cl_index index = s->symbol.binding;
if (index < env->thread_local_bindings_size) {
}
}
-void
+struct bds_bd *
ecl_bds_overflow(void)
{
cl_env_ptr env = ecl_process_env();
@'ext::stack-overflow', @':size', MAKE_FIXNUM(size),
@':type', @'ext::binding-stack');
ecl_bds_set_size(env, size + (size / 2));
+ return env->bds_top;
}
void
extern ECL_API cl_object si_set_limit(cl_object type, cl_object size);
extern ECL_API cl_object si_get_limit(cl_object type);
-extern ECL_API void ecl_bds_overflow(void) /*__attribute__((noreturn))*/;
extern ECL_API cl_index ecl_progv(cl_env_ptr env, cl_object vars, cl_object values);
extern ECL_API void ecl_bds_unwind(cl_env_ptr env, cl_index new_bds_top_index);
extern ECL_API void ecl_unwind(cl_env_ptr env, ecl_frame_ptr fr) /*__attribute__((noreturn))*/;
typedef struct cl_env_struct *cl_env_ptr;
+extern ECL_API struct bds_bd *ecl_bds_overflow(void) /*__attribute__((noreturn))*/;
#ifdef ECL_THREADS
#define ECL_MISSING_SPECIAL_BINDING (~((cl_index)0))
extern ECL_API void ecl_bds_bind(cl_env_ptr env, cl_object symbol, cl_object v);