Retrieving the datacon of an arbitrary closure
authorPepe Iborra <mnislaih@gmail.com>
Sun, 10 Dec 2006 11:29:44 +0000 (11:29 +0000)
committerPepe Iborra <mnislaih@gmail.com>
Sun, 10 Dec 2006 11:29:44 +0000 (11:29 +0000)
commitab5b8aa357c685a7c702262903bce04c66f79156
treed4f56e32bc2246ccefc730ad900fcda6ebcf9e44
parentd308d910efa702ebf5a2f76db628d690fcf6fa51
Retrieving the datacon of an arbitrary closure

This patch extends the RTS linker and the dynamic linker so that it is possible to find out the datacon of a closure in heap at runtime:
- The RTS linker now carries a hashtable 'Address->Symbol' for data constructors
- The Persistent Linker State in the dynamic linker is extended in a similar way.

Finally, these two sources of information are consulted by:

> Linker.recoverDataCon :: a -> TcM Name
compiler/ghci/ByteCodeItbls.lhs
compiler/ghci/ByteCodeLink.lhs
compiler/ghci/Linker.lhs
compiler/ghci/ObjLink.lhs
compiler/prelude/TysWiredIn.lhs
includes/Linker.h
rts/Linker.c