File: TODO

package info (click to toggle)
acl2 8.6%2Bdfsg-3
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 1,138,276 kB
  • sloc: lisp: 17,818,294; java: 125,359; python: 28,122; javascript: 23,458; cpp: 18,851; ansic: 11,569; perl: 7,678; xml: 5,591; sh: 3,978; makefile: 3,840; ruby: 2,633; yacc: 1,126; ml: 763; awk: 295; csh: 233; lex: 197; php: 178; tcl: 49; asm: 23; haskell: 17
file content (115 lines) | stat: -rw-r--r-- 4,692 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
-*- Text -*-

This is a collection of TODO items and ideas in no particular order.

### Testing

-> Test uffi-compat with more UFFI libraries.
-> Write more FOREIGN-GLOBALS.SET.* tests.
-> Finish tests/random-tester.lisp
-> Write benchmarks comparing CFFI vs. native FFIs and also demonstrating
   performance of each platform.
-> Write more STRUCT.ALIGNMENT.* tests (namely involving the :LONG-LONG
   and :UNSIGNED-LONG-LONG types) and test them in more ABIs.
-> Run tests with the different kinds of shared libraries available on
   MacOS X.

### Ports

-> Finish GCL port, port to MCL.
-> Update Corman port. [2007-02-22 LO]

### Features

-> Implement a declarative interface for FOREIGN-FUNCALL-PTR, similar to
   DEFCUN/FOREIGN-FUNCALL.
-> Implement the proposed interfaces (see doc/).
-> Extend FOREIGN-SLOT-VALUE and make it accept multiple "indices" for
   directly accessing structs inside structs, arrays inside structs, etc...
-> Implement EXPLAIN-FOREIGN-SLOT-VALUE.
-> Implement :in/:out/:in-out for DEFCFUN (and FOREIGN-FUNCALL?).
-> Add support for multiple memory allocation schemes (like CLISP), namely
   support for allocating with malloc() (so that it can be freed on the C
   side)>
-> Extend DEFCVAR's symbol macro in order to handle memory (de)allocation
   automatically (see CLISP).
-> Implement byte swapping routines (see /usr/include/linux/byteorder)
-> Warn about :void in places where it doesn't make sense.

### Underspecified Semantics

-> (setf (mem-ref ptr <aggregate-type> offset) <value>)
-> Review the interface for coherence across Lisps with regard to
   behaviour in "exceptional" situations. Eg: threads, dumping cores,
   accessing foreign symbols that don't exist, etc...
-> On Lispworks a Lisp float is a double and therefore won't necessarily
   fit in a C float. Figure out a way to handle this.
-> Allegro: callbacks' return values.
-> Lack of uniformity with regard to pointers. Allegro: 0 -> NULL.
   CLISP/Lispworks: NIL -> NULL.
-> Some lisps will accept a lisp float being passed to :double
   and a lisp double to :float. We should either coerce on lisps that
   don't accept this or check-type on lisps that do. Probably the former
   is better since on lispworks/x86 double == float.

### Possible Optimizations

-> More compiler macros on some of the CFFI-SYS implementations.
-> Optimize UFFI-COMPAT when the vector stuff is implemented.
-> Being able to declare that some C int will always fit in a Lisp
   fixnum. Allegro has a :fixnum ftype and CMUCL/SBCL can use
   (unsigned-byte 29) others could perhaps behave like :int?
-> An option for defcfun to expand into a compiler macro which would
   allow the macroexpansion-time translators to look at the forms
   passed to the functions.

### Known Issues

-> CLISP FASL portability is broken. Fix this by placing LOAD-TIME-VALUE
   forms in the right places and moving other calculations to load-time.
   (eg: calculating struct size/alignment.) Ideally we'd only move them
   to load-time when we actually care about fasl portability.
     (defmacro maybe-load-time-value (form)
       (if <we care about fasl portability>
           `(load-time-value ,form)
           form))
-> cffi-tests.asd's :c-test-lib component is causing the whole testsuite
   to be recompiled everytime. Figure that out.
-> The (if (constantp foo) (do-something-with (eval foo)) ...) pattern
   used in many places throughout the code is apparently not 100% safe.
-> On ECL platforms without DFFI we need to build a non-linked version
   of libtest.
-> foreign-enum-keyword/value should have their own error condition?
   <http://article.gmane.org/gmane.lisp.cffi.devel/975> [2007-02-22 LO]

### Documentation

-> Fill the missing sections in the CFFI User Manual.
-> Update the CFFI-SYS Specification.
-> have two versions of the manual on the website

### CFFI-Grovel

-> Look into making the C output more concise.

### CFFI-Toolchain

-> Port the toolchain parameter detection to more implementations
-> Port the static linking support to more implementations
-> Add a mechanism to configure and/or detect dynamic libraries against
   which to link for instance.
   It could be a variable in which flags are accumulated,
   or an autodetection after loading everything, see
    https://github.com/borodust/cl-bodge/blob/0.3.0/distribution/build.lisp#L79

### CFFI/C2FFI

-> Generate wrappers for C inline function definitions (and maybe for some
   #define's?)
-> It would be nice if c2ffi emitted its output in a stable order
   for details see https://github.com/rpav/c2ffi/issues/28
-> Handle va_list. For now it's treated as any other argument.

### Other

-> Type-checking pointer interface.