Ticket #793 (closed task: fixed)
Use gcc's libffi to replace Adjustor.c and ByteCodeFFI.hs?
| Reported by: | simonmar | Owned by: | simonmar |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.10.1 |
| Component: | Runtime System | Version: | 6.4.1 |
| Keywords: | Cc: | pho@… | |
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | Difficulty: | Moderate (less than a day) | |
| Test Case: | N/A | Blocked By: | |
| Blocking: | Related Tickets: |
Description
libffi is a library that comes with gcc and provides FFI functionality (dynamic calls, closures) for a wide range of platforms. It has a liberal license that is compatible with GHC's.
libffi could replace Adjustor.c in the RTS and the ByteCodeFFI module in GHCi. The benefits would be:
- It works on more platforms than we currently support, and it handles more of the dark corners than we do (eg. struct returns?).
- It would ease the task of porting GHC
- Replaces a wad of very difficult non-portable code in GHC with code written and actively maintained by others.
On the other hand, it is possible that our Adjustor.c code is faster, because it is more specialised to the task.
Change History
Note: See
TracTickets for help on using
tickets.
