Commit e562e59a authored by Simon Marlow's avatar Simon Marlow

fix _BTM field of closureFlags[], and document what it means (#5923)

parent 93299cce
......@@ -77,7 +77,7 @@ typedef struct {
/* The type flags provide quick access to certain properties of a closure. */
#define _HNF (1<<0) /* head normal form? */
#define _BTM (1<<1) /* bitmap-style layout? */
#define _BTM (1<<1) /* uses info->layout.bitmap */
#define _NS (1<<2) /* non-sparkable */
#define _STA (1<<3) /* static? */
#define _THU (1<<4) /* thunk? */
......
......@@ -37,14 +37,14 @@ StgWord16 closure_flags[] = {
[FUN_1_1] = (_HNF| _NS| _SRT ),
[FUN_0_2] = (_HNF| _NS| _SRT ),
[FUN_STATIC] = (_HNF| _NS|_STA| _SRT ),
[THUNK] = ( _BTM| _THU| _SRT ),
[THUNK_1_0] = ( _BTM| _THU| _SRT ),
[THUNK_0_1] = ( _BTM| _THU| _SRT ),
[THUNK_2_0] = ( _BTM| _THU| _SRT ),
[THUNK_1_1] = ( _BTM| _THU| _SRT ),
[THUNK_0_2] = ( _BTM| _THU| _SRT ),
[THUNK_STATIC] = ( _BTM| _STA|_THU| _SRT ),
[THUNK_SELECTOR] = ( _BTM| _THU| _SRT ),
[THUNK] = ( _THU| _SRT ),
[THUNK_1_0] = ( _THU| _SRT ),
[THUNK_0_1] = ( _THU| _SRT ),
[THUNK_2_0] = ( _THU| _SRT ),
[THUNK_1_1] = ( _THU| _SRT ),
[THUNK_0_2] = ( _THU| _SRT ),
[THUNK_STATIC] = ( _STA|_THU| _SRT ),
[THUNK_SELECTOR] = ( _THU| _SRT ),
[BCO] = (_HNF| _NS ),
[AP] = ( _THU ),
[PAP] = (_HNF| _NS ),
......@@ -52,7 +52,7 @@ StgWord16 closure_flags[] = {
[IND] = ( _NS| _IND ),
[IND_PERM] = ( _NS| _IND ),
[IND_STATIC] = ( _NS|_STA| _IND ),
[RET_BCO] = ( _BTM ),
[RET_BCO] = ( 0 ),
[RET_SMALL] = ( _BTM| _SRT ),
[RET_BIG] = ( _SRT ),
[RET_DYN] = ( _SRT ),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment