1 Accumulation of half-understood design decisions eventually
2 chokes a program as a water weed chokes a canal. By refactoring
3 you can ensure that your full understanding of how the program
4 should be designed is always reflected in the program. As a
5 water weed quickly spreads its tendrils, partially understood
6 design decisions quickly spread their effects throughout your
7 program. No one or two or even ten individual actions will be
8 enough to eradicate the problem.
9 -- Martin Fowler, _Refactoring: Improving the Design
10 of Existing Code_, p. 360
11 ===============================================================================
12 some things that I'd like to do in 0.6.x, in no particular order:
13 -------------------------------------------------------------------------------
15 The batch-related command line options for SBCL don't work
17 A small part of making them work properly is making sure that
18 verbose GC messages end up piped to error output.
19 Make sure that when the system dies due to an unhandled error
20 in batch mode, the error is printed successfully, whether
21 FINISH-OUTPUT or an extra newline or whatever is required.
22 Make sure that make.sh dies gracefully when one of the SBCLs
23 it's running dies with an error.
25 Actually, the ANSI *DEBUGGER-HOOK* variable might be a better
26 place to put the die-on-unhandled-error functionality.
29 -------------------------------------------------------------------------------
31 As long as I'm working on the batch-related command-line options,
32 it would be reasonable to add one more option to "do what I'd want",
33 testing standard input for non-TTY-ness and running in no-programmer
37 -------------------------------------------------------------------------------
39 In order to make a well-behaved backtrace when a batch program
40 terminates abnormally, it should be limited in length.
42 ?? Add a *DEBUG-BACKTRACE-COUNT* variable, initially set to 64,
43 to provide a default for the COUNT argument to BACKTRACE.
44 -------------------------------------------------------------------------------
46 I used CMU CL for years, and dozens of times I cursed the
47 inadequate breakpoint-based TRACE facility which doesn't work on
48 some functions, and I never realized that there's a wrapper-based
49 facility too until I was wading through the source code for SBCL.
50 Yes, I know I should have RTFM, but there is a lot of M..
51 (By the way, it would also be nice to have tracing behave
52 better with generic functions. TRACEing a generic function probably
53 shouldn't prevent DEFMETHOD from being used to redefine its
54 methods, and should perhaps trace each of its methods as well
55 as the generic function itself.)
57 ?? possibility 1: Add error-handling code in ntrace.lisp to
58 catch failure to set breakpoints and retry using
59 wrapper-based tracing.
60 ?? possibility 2: Add error-handling code in ntrace.lisp to
61 catch failure to catch failure to set breakpoints and output
62 a message suggesting retrying with wrapper-based breakpoints
63 ?? possibility 3: Fix the breakpoint-based TRACE facility so that
65 -------------------------------------------------------------------------------
67 My system of parallel build directories seems to add
68 complexity without adding value.
70 ?? Replace it with a system where fasl output files live in the
71 same directories as the sources and have names a la
72 "foo.fasl-from-host and "foo.fasl-from-xc".
73 -------------------------------------------------------------------------------
75 It might be good to use the syntax (DEBUGGER-SPECIAL *PRINT-LEVEL*)
76 etc. to control the in-the-debug-context special variables. Then we
77 wouldn't have to pick and choose which variables we shadow in the
79 The shadowing values could also be made persistent between
80 debugger invocations, so that entering the debugger, doing
81 (SETF *PRINT-LEVEL* 2), and exiting the debugger would leave
82 (DEBUGGER-SPECIAL *PRINT-LEVEL*) set to 2, and upon reentry to the
83 debugger, *PRINT-LEVEL* would be set back to 2.
86 -------------------------------------------------------------------------------
88 The :SB-TEST target feature should do something.
91 -------------------------------------------------------------------------------
93 I still haven't cleaned up the cut-and-paste programming in
94 * DEF-BOOLEAN-ATTRIBUTE, DELETEF-IN, and PUSH-IN
95 * SB!SYS:DEF!MACRO ASSEMBLE and SB!XC:DEFMACRO ASSEMBLE
98 -------------------------------------------------------------------------------
100 We be able to get rid of the IR1 interpreter, which would
101 not only get rid of all the code in *eval*.lisp, but also allow us to
102 reduce the number of special cases elsewhere in the system. (Try
103 grepping for 'interpret' sometime.:-) Making this usable might
104 require cleaning up %DEFSTRUCT, %DEFUN, etc. to use EVAL-WHEN
105 instead of IR1 transform magic, which would be a good
106 thing in itself, but might be a fair amount of work.)
108 ?? Delete, delete, delete.
109 ===============================================================================
110 other known issues with no particular target date:
112 bugs listed on the man page
114 more regression tests
116 byte compilation of appropriate parts of the system, so that the
117 system core isn't so big
119 Search for unused external symbols (ones which are not bound, fbound,
120 types, or whatever, and also have no other uses as e.g. flags) and
121 delete them. This should make the system core a little smaller, but
122 is mostly useful just to make the source code smaller and simpler.
124 The eventual plan is for SBCL to bootstrap itself in two phases. In
125 the first phase, the cross-compilation host is any old ANSI Common
126 Lisp (not necessarily SBCL) and the cross-compiler won't handle some
127 optimizations because the code it uses to implement them is not
128 portable. In the second phase, the cross-compilation host will be
129 required to be a compatible version of SBCL, and the cross-compiler
130 will take advantage of that to implement all optimizations. The
131 current version of SBCL only knows how to do the first of those two
132 phases, with a fully-portable cross-compiler, so some optimizations
133 are not done. Probably the most important consequence of this is that
134 because the fully-portable cross-compiler isn't very smart about
135 dealing with immediate values which are of specialized array type
136 (e.g. (SIMPLE-ARRAY (UNSIGNED-BYTE 4) 1)) the system sometimes has to
137 use unnecessarily-general array types internally.
139 adding new FOPs to provide something like CMU CL's FOP-SYMBOL-SAVE and
140 FOP-SMALL-SYMBOL-SAVE functionality, so that fasl files will be more
141 compact. (FOP-SYMBOL-SAVE used *PACKAGE*, which was concise but allowed
142 obscure bugs. Something like FOP-LAST-PACKAGE-SYMBOL-SAVE could have
143 much of the same conciseness advantage without the bugs.)
145 hundreds of FIXME notes in the sources from WHN
147 various other unfinished business from CMU CL and before, marked with
148 "XX" or "XXX" or "###" or "***" or "???" or "pfw" or "@@@@" or "zzzzz"
149 or probably also other codes that I haven't noticed or have forgotten.
151 (Things marked as KLUDGE are in general things which are ugly or
152 confusing, but that, for whatever reason, may stay that way