diff --git a/femtolisp/print.c b/femtolisp/print.c index 9bab341..f50bb78 100644 --- a/femtolisp/print.c +++ b/femtolisp/print.c @@ -168,7 +168,8 @@ static inline int tinyp(value_t v) return (u8_strwidth(symbol_name(v)) < SMALL_STR_LEN); if (fl_isstring(v)) return (cv_len((cvalue_t*)ptr(v)) < SMALL_STR_LEN); - return (isfixnum(v) || isbuiltin(v)); + return (isfixnum(v) || isbuiltin(v) || v==FL_F || v==FL_T || v==FL_NIL || + v == FL_EOF); } static int smallp(value_t v) @@ -757,5 +758,8 @@ void fl_print(ios_t *f, value_t v) memset(consflags, 0, 4*bitvector_nwords(heapsize/sizeof(cons_t))); } - htable_reset(&printconses, 32); + if ((iscons(v) || isvector(v) || isfunction(v) || iscvalue(v)) && + !fl_isstring(v) && v!=FL_T && v!=FL_F && v!=FL_NIL) { + htable_reset(&printconses, 32); + } } diff --git a/femtolisp/todo b/femtolisp/todo index 1a17020..fe085d3 100644 --- a/femtolisp/todo +++ b/femtolisp/todo @@ -1189,3 +1189,11 @@ what needs more test coverage: - bitwise and logical ops - making a closure in a default value expression for an optional arg - gc during a catch block, then get stack trace + +----------------------------------------------------------------------------- + +5/4/10 todo: + +- flush and close open files on exit +- make function versions of opcode builtins by wrapping in a lambda, + stored in a table indexed by opcode. use in _applyn