application needs to retain earlier ports, it should save them in a
gc-protected location.
+** Removed compile time option MEMOIZE_LOCALS
+
+Now, caching of local variable positions during memoization is mandatory.
+However, the option to disable the caching has most probably not been used
+anyway.
+
** Removed definitions: scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify,
s_t_ify, scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify, scm_m_0_ify, s_1_ify,
scm_m_1_ify, scm_debug_newcell, scm_debug_newcell2, scm_tc16_allocated,
+2002-06-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
+
+ * __scm.h, eval.c, eval.h: Removed compile time option
+ MEMOIZE_LOCALS to clean up the code. Now, caching of local
+ variable positions during memoization is mandatory. However, the
+ option to disable the caching has most probably not been used
+ anyway.
+
2002-06-18 Marius Vollmer <mvo@zagadka.ping.de>
* print.c (scm_simple_format): Print missing part of format before
#define EXTEND_ENV SCM_EXTEND_ENV
-#ifdef MEMOIZE_LOCALS
-
SCM *
scm_ilookup (SCM iloc, SCM env)
{
return SCM_CDRLOC (er);
return SCM_CARLOC (SCM_CDR (er));
}
-#endif
#ifdef USE_THREADS
{
SCM env = genv;
register SCM *al, fl, var = SCM_CAR (vloc);
-#ifdef MEMOIZE_LOCALS
register SCM iloc = SCM_ILOC00;
-#endif
for (; SCM_NIMP (env); env = SCM_CDR (env))
{
if (!SCM_CONSP (SCM_CAR (env)))
{
if (SCM_EQ_P (fl, var))
{
-#ifdef MEMOIZE_LOCALS
#ifdef USE_THREADS
if (! SCM_EQ_P (SCM_CAR (vloc), var))
goto race;
#endif
SCM_SET_CELL_WORD_0 (vloc, SCM_UNPACK (iloc) + SCM_ICDR);
-#endif
return SCM_CDRLOC (*al);
}
else
al = SCM_CDRLOC (*al);
if (SCM_EQ_P (SCM_CAR (fl), var))
{
-#ifdef MEMOIZE_LOCALS
#ifndef SCM_RECKLESS /* letrec inits to SCM_UNDEFINED */
if (SCM_UNBNDP (SCM_CAR (*al)))
{
goto race;
#endif
SCM_SETCAR (vloc, iloc);
-#endif
return SCM_CARLOC (*al);
}
-#ifdef MEMOIZE_LOCALS
iloc = SCM_PACK (SCM_UNPACK (iloc) + SCM_IDINC);
-#endif
}
-#ifdef MEMOIZE_LOCALS
iloc = SCM_PACK ((~SCM_IDSTMSK) & (SCM_UNPACK(iloc) + SCM_IFRINC));
-#endif
}
{
SCM top_thunk, real_var;
var = SCM_CAR (vloc);
if (SCM_VARIABLEP (var))
return SCM_VARIABLE_LOC (var);
-#ifdef MEMOIZE_LOCALS
if (SCM_ITAG7 (var) == SCM_ITAG7 (SCM_ILOC00))
return scm_ilookup (var, genv);
-#endif
/* We can't cope with anything else than variables and ilocs. When
a special form has been memoized (i.e. `let' into `#@let') we
return NULL and expect the calling function to do the right
sym = sym_three_question_marks;
SCM_SETCAR (form, sym);
}
-#ifdef MEMOIZE_LOCALS
else if (SCM_ILOCP (c))
{
unsigned long int ir;
env = SCM_CDR (env);
SCM_SETCAR (form, SCM_ICDRP (c) ? env : SCM_CAR (env));
}
-#endif
return form;
}
}
{
SCM *location;
SCM variable = SCM_CAR (x);
-#ifdef MEMOIZE_LOCALS
if (SCM_ILOCP (variable))
location = scm_ilookup (variable, env);
else
-#endif
if (SCM_VARIABLEP (variable))
location = SCM_VARIABLE_LOC (variable);
else /* (SCM_SYMBOLP (variable)) is known to be true */
case scm_tc7_variable:
RETURN (SCM_VARIABLE_REF(x));
-#ifdef MEMOIZE_LOCALS
case SCM_BIT8(SCM_ILOC00):
proc = *scm_ilookup (SCM_CAR (x), env);
SCM_ASRTGO (SCM_NIMP (proc), badfun);
#endif
#endif
break;
-#endif /* ifdef MEMOIZE_LOCALS */
case scm_tcs_cons_nimcar:
if (SCM_SYMBOLP (SCM_CAR (x)))
? scm_misc_error (NULL, scm_s_expression, SCM_EOL), 0 \
: 0), \
(x))
-#ifdef MEMOIZE_LOCALS
#define SCM_EVALIM(x, env) (SCM_ILOCP (x) \
? *scm_ilookup ((x), env) \
: SCM_EVALIM2(x))
-#else
-#define SCM_EVALIM(x, env) SCM_EVALIM2(x)
-#endif
#ifdef DEBUG_EXTENSIONS
#define SCM_XEVAL(x, env) (SCM_IMP (x) \
? SCM_EVALIM2(x) \