diff options
author | Pepe Iborra <mnislaih@gmail.com> | 2006-12-10 11:29:44 +0000 |
---|---|---|
committer | Pepe Iborra <mnislaih@gmail.com> | 2006-12-10 11:29:44 +0000 |
commit | ab5b8aa357c685a7c702262903bce04c66f79156 (patch) | |
tree | d4f56e32bc2246ccefc730ad900fcda6ebcf9e44 /includes/Linker.h | |
parent | d308d910efa702ebf5a2f76db628d690fcf6fa51 (diff) | |
download | haskell-ab5b8aa357c685a7c702262903bce04c66f79156.tar.gz |
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
Diffstat (limited to 'includes/Linker.h')
-rw-r--r-- | includes/Linker.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/includes/Linker.h b/includes/Linker.h index 681a7f9199..624d389b17 100644 --- a/includes/Linker.h +++ b/includes/Linker.h @@ -33,6 +33,9 @@ HsInt resolveObjs( void ); /* load a dynamic library */ char *addDLL( char* dll_name ); +/* lookup an address in the datacon tbl */ +char *lookupDataCon( StgWord addr); + extern void markRootPtrTable(void (*)(StgClosure **)); #endif /* LINKER_H */ |