Skip to content

Instantly share code, notes, and snippets.

@osa1
Created June 10, 2016 11:13
Show Gist options
  • Save osa1/37aafffef95866553334410f54cf6c0f to your computer and use it in GitHub Desktop.
Save osa1/37aafffef95866553334410f54cf6c0f to your computer and use it in GitHub Desktop.
typedef struct {
StgInt closure_type_off;
StgInt closure_desc_off;
} StgProfInfo;
extern StgWord16 closure_flags[];
typedef struct {
StgWord size;
StgWord bitmap[];
} StgLargeBitmap;
typedef StgClosure *StgSRT[];
typedef struct StgLargeSRT_ {
StgSRT *srt;
StgLargeBitmap l;
} StgLargeSRT;
typedef union {
struct {
StgHalfWord ptrs;
StgHalfWord nptrs;
} payload;
StgWord bitmap;
StgInt large_bitmap_offset;
StgWord selector_offset;
} StgClosureInfo;
typedef struct StgInfoTable_ {
StgClosureInfo layout;
StgHalfWord type;
StgHalfWord srt_bitmap;
StgCode code[];
} * StgInfoTablePtr;
typedef struct StgFunInfoExtraRev_ {
StgInt slow_apply_offset;
union {
StgWord bitmap;
StgInt bitmap_offset;
} b;
StgInt srt_offset;
StgHalfWord fun_type;
StgHalfWord arity;
} StgFunInfoExtraRev;
typedef struct StgFunInfoExtraFwd_ {
StgHalfWord fun_type;
StgHalfWord arity;
StgSRT *srt;
union {
StgWord bitmap;
} b;
StgFun *slow_apply;
} StgFunInfoExtraFwd;
typedef struct {
StgFunInfoExtraRev f;
StgInfoTable i;
} StgFunInfoTable;
extern StgWord stg_arg_bitmaps[];
typedef struct {
StgInt srt_offset;
StgInfoTable i;
} StgRetInfoTable;
typedef struct StgThunkInfoTable_ {
StgInt srt_offset;
StgInfoTable i;
} StgThunkInfoTable;
typedef struct StgConInfoTable_ {
StgInt con_desc;
StgInfoTable i;
} StgConInfoTable;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment