diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2016-11-02 15:06:31 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-11-02 15:42:01 -0400 |
commit | 80076fa68f68e337d74c42311f9c3ebebbdc4680 (patch) | |
tree | a8dc28d1b3f165740e576d11007dd88453f0b640 /includes | |
parent | dc4d59621dff31908dc7646082a2c5a362deb10f (diff) | |
download | haskell-80076fa68f68e337d74c42311f9c3ebebbdc4680.tar.gz |
Add notes describing SRT concepts
Test Plan: Read it
Reviewers: austin, erikd, simonmar
Reviewed By: simonmar
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2663
Diffstat (limited to 'includes')
-rw-r--r-- | includes/rts/storage/InfoTables.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/includes/rts/storage/InfoTables.h b/includes/rts/storage/InfoTables.h index fb14ac5821..bb1bac0c65 100644 --- a/includes/rts/storage/InfoTables.h +++ b/includes/rts/storage/InfoTables.h @@ -223,10 +223,21 @@ typedef struct StgInfoTable_ { them doesn't affect the layout). - If srt_bitmap (in the std info table part) is zero, then the srt - field may be omitted. This only applies if the slow_apply and + field needn't be set. This only applies if the slow_apply and bitmap fields have also been omitted. -------------------------------------------------------------------------- */ +/* + Note [Encoding static reference tables] + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + As static reference tables appear frequently in code, we use a special + compact encoding for the common case of a module defining only a few CAFs: We + produce one table containing a list of CAFs in the module and then include a + bitmap in each info table describing which entries of this table the closure + references. + */ + typedef struct StgFunInfoExtraRev_ { OFFSET_FIELD(slow_apply_offset); /* apply to args on the stack */ union { |