Unbreak non-x86 builds
[sbcl.git] / TODO
blobe93e629b6b883b6812c003d5c5cd8d3851b9799d
1 SBCL TODO
2 =========
4      "There's nothing an agnostic can't do as long as he doesn't know
5      whether he believes in anything or not."
6        -- Monty Python.
8      "God grant me serenity to accept the code I cannot change, courage
9      to change the code I can, and wisdom to know the difference."
10        -- Erik Naggum
12      "Accumulation of half-understood design decisions eventually
13      chokes a program as a water weed chokes a canal. By refactoring
14      you can ensure that your full understanding of how the program
15      should be designed is always reflected in the program. As a water
16      weed quickly spreads its tendrils, partially understood design
17      decisions quickly spread their effects throughout your program. No
18      one or two or even ten individual actions will be enough to
19      eradicate the problem."
20        -- Martin Fowler, in _Refactoring: Improving the Design of Existing
21           Code_, p. 360
23      "I wish I didn't know now what I didn't know then."
24        -- Bob Seger
26   This files is maintained as part of the SBCL distribution, and
27   describes flying pies and moons on sticks that SBCL developers dream
28   about. The items are in no particular order.
30   The omission of an item is no guarantee that no-one would like it,
31   just like the inclusion of an item is no guarantee that someone is
32   actively working on it.
34   In addition to this file, there is the BUGS file, and there are also
35   hundreds of FIXME notes in the sources. (Things marked as KLUDGE are
36   in general things which are ugly or confusing, but that, for
37   whatever reason, may stay that way indefinitely.)
39 THREADING INTERFACE
41   SB-THREAD has some problems: recursivity of a mutex should probably
42   be a feature of the mutex, and not of the lexical location. Thread
43   local variables are needed. Sessions and sharing the terminal need
44   to be thought about.
46 PEEPHOLE OPTIMIZER
48   Have you ever read SBCL disassembly?
50 DEFGLOBAL
52   Global lexical variables. Esp. since with threads special variable
53   accesses is no speed daemon.
55 FINISHING EXTERNAL FORMATS
57   Byte order marks. Newline conventions. A way to specify an external
58   format without needing to duplicate code. Fixing the inefficiencies.
60 TIMEOUTS
62   Asyncronous unwinds suck horribly, but to implement reliable systems
63   one simply needs timeouts. These should probably be local, since
64   otherwise they effectively become asynchronous unwinds. Basically,
65   for any potentially blocking operation there should be a :TIMEOUT
66   arguent (or a version of the operation that accepts the argument).
68 ADVICE/FWRAP
70   SBCL has an internal function encapsulation mechanism, and is able to
71   install breakpoint to function start/end -- this is used to implement
72   the instrumentation based profiler and tracing. It would be good to
73   have this as an exported interface, and it would be good if the
74   SYMBOL-FUNCTION / FDEFINITION confusion was fixed: currently the
75   latter returns the underlying definition, whereas the first returns
76   the encapsulation.
78 GENERIC FUNCTION TRACING
80   This sucks currently. It would also be good to be able to trace
81   individual methods.
83 POLICY MADNESS
85   The interactions between various optimization policies are far from
86   obvious. Someone should figure out how to make this better, and fix
87   it. One option would be to have just a few (eg. DEBUG, SMALL,
88   FAST-SAFE, FAST-UNSAFE) "dominant" policies, and expose the rest
89   as separately declarable optimization toggles.
91   MAYBE-INLINE is also nice, but it would be good if someone could
92   figure out how to get rid of it while retaining the semantics it
93   provides. Inlining recursive functions is also something to think
94   about.
96   INHIBIT-WARNINGS really needs to go away.
98 WINDOWS
100   Needs love.
102 DARWIN
104   Needs love, particularly threads and exceptions/signals. slam.sh is
105   also broken there.
107 DRAGONFLY
108   Multithreading does not work. Possibly because of bug in mmap/munmap.
109   Hint: Comment out call to os_invalidate in perform_thread_post_mortem
110   and threads will work, but space will not be freed, of course.
112 FUNCTION NAMES
114   We'd like to be able to (SETF %FUNCTION-NAME) on a closure.
116 UNDEFINED FUNCTION / VARIABLE RESTARTS
118   You know, like Allegro is reputed to have.
120 MISC CLEANUPS
122   These need to be taken a good look at -- it might be that some of them
123   are already done, or otherwise no longer relevant.)
125    * EVAL/EVAL-WHEN/%COMPILE/DEFUN/DEFSTRUCT cleanups:
126         ** make %COMPILE understand magicality of DEFUN FOO
127                 w.r.t. e.g. preexisting inlineness of FOO
128         ** use %COMPILE where COMPILE-TOP-LEVEL used to be used
129         ** remove redundant COMPILE-TOP-LEVEL and
130                 FUNCTIONAL-KIND=:TOP-LEVEL stuff from the compiler
131    * outstanding embarrassments
132         ** :IGNORE-ERRORS-P cruft in stems-and-flags.lisp-expr. (It's
133                 reasonable to support this as a crutch when initially
134                 bootstrapping from balky xc hosts with their own
135                 idiosyncratic ideas of what merits FAILURE-P, but it's
136                 embarrassing to have to use it when bootstrapping
137                 under SBCL!),
138    * miscellaneous simple refactoring
139         * belated renaming:
140                 ** rename %PRIMITIVE to %VOP
141                 ** A few hundred things named FN should be named FUN
142         * These days ANSI C has inline functions, so..
143                 ** redo many cpp macros as inline functions:
144                         HeaderValue, Pointerp, CEILING, ALIGNED_SIZE,
145                         GET_FREE_POINTER, SET_FREE_POINTER,
146                         GET_GC_TRIGGER, SET_GC_TRIGGER, GetBSP, SetBSP,
147                         os_trunc_foo(), os_round_up_foo()
148                 ** remove various avoid-evaluating-C-macro-arg-twice
149                         cruft
150   * Some work on conditions emitted by the system
151         ** eliminate COMPILER-WARN and COMPILER-STYLE-WARN, which
152                 were simply limited versions of WARN and STYLE-WARN.
153         ** eliminate use of INHIBIT-WARNINGS by code emitted by the
154                 system from user code.
155         ** cause use of INHIBIT-WARNINGS to signal a STYLE-WARNING.
156         ** eliminate use of INHIBIT-WARNINGS within the system
157         ** deprecate INHIBIT-WARNINGS, causing its use to signal a
158                 full WARNING.
159         ** begin work on developing a class hierarchy of conditions
160                 along semantic lines.
162 PCL INTEGRATION
164   AKA CLOS in cold init.
166 HIGH LEVEL SOCKET INTERFACE
168   Something slightly above the level of BSD sockets would be nice.
170 RPC INTERFACE
172   For talking with other processes.
174 CROSS PLATFORM GUI
176   Since this is a high priority we're waiting for PHP coders to
177   offer their help to build a website about this.
179 BLOCK COMPILATION
181   You know, like CMUCL does.
183 (MOSTLY) PARALLEL GC
185   Several algorithms exist, even one would be nice.
187 INCREMENTAL GC
189   For those who need it.