mirror of
https://github.com/tweag/asterius.git
synced 2024-09-11 08:55:32 +03:00
WIP
This commit is contained in:
parent
3217ab838e
commit
0d86245f0f
@ -68,7 +68,6 @@ frontendPlugin = do
|
|||||||
GHC.sPgm_i = "false"
|
GHC.sPgm_i = "false"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`GHC.gopt_set` GHC.Opt_EagerBlackHoling
|
|
||||||
`GHC.gopt_set` GHC.Opt_ExternalInterpreter
|
`GHC.gopt_set` GHC.Opt_ExternalInterpreter
|
||||||
when is_debug $ do
|
when is_debug $ do
|
||||||
dflags <- GHC.getSessionDynFlags
|
dflags <- GHC.getSessionDynFlags
|
||||||
|
@ -63,31 +63,6 @@
|
|||||||
#define NEED_EVAL(__x__) GETTAG(__x__) == 0
|
#define NEED_EVAL(__x__) GETTAG(__x__) == 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ASTERIUS)
|
|
||||||
#define SELECTOR_CODE_UPD(offset) \
|
|
||||||
INFO_TABLE_SELECTOR(stg_sel_##offset##_upd, offset, THUNK_SELECTOR, "stg_sel_upd", "stg_sel_upd") \
|
|
||||||
(P_ node) \
|
|
||||||
{ \
|
|
||||||
P_ selectee, field, dest; \
|
|
||||||
TICK_ENT_DYN_THK(); \
|
|
||||||
STK_CHK_NP(node); \
|
|
||||||
UPD_BH_UPDATABLE(node); \
|
|
||||||
LDV_ENTER(node); \
|
|
||||||
selectee = StgThunk_payload(node,0); \
|
|
||||||
push (UPDATE_FRAME_FIELDS(,,stg_marked_upd_frame_info,CCCS,0,node)) { \
|
|
||||||
ENTER_CCS_THUNK(node); \
|
|
||||||
if (NEED_EVAL(selectee)) { \
|
|
||||||
SAVE_CCS; \
|
|
||||||
dest = UNTAG_IF_PROF(selectee); /* Note [untag for prof] */ \
|
|
||||||
(P_ constr) = call %GET_ENTRY(dest) (dest); \
|
|
||||||
RESTORE_CCS; \
|
|
||||||
selectee = constr; \
|
|
||||||
} \
|
|
||||||
field = StgClosure_payload(UNTAG(selectee),offset); \
|
|
||||||
jump stg_ap_0_fast(field); \
|
|
||||||
} \
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
#define SELECTOR_CODE_UPD(offset) \
|
#define SELECTOR_CODE_UPD(offset) \
|
||||||
INFO_TABLE_SELECTOR(stg_sel_##offset##_upd, offset, THUNK_SELECTOR, "stg_sel_upd", "stg_sel_upd") \
|
INFO_TABLE_SELECTOR(stg_sel_##offset##_upd, offset, THUNK_SELECTOR, "stg_sel_upd", "stg_sel_upd") \
|
||||||
(P_ node) \
|
(P_ node) \
|
||||||
@ -111,7 +86,6 @@
|
|||||||
jump stg_ap_0_fast(field); \
|
jump stg_ap_0_fast(field); \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
/* NOTE: no need to ENTER() here, we know the closure cannot
|
/* NOTE: no need to ENTER() here, we know the closure cannot
|
||||||
evaluate to a function, because we're going to do a field
|
evaluate to a function, because we're going to do a field
|
||||||
selection on the result. */
|
selection on the result. */
|
||||||
@ -199,11 +173,7 @@ INFO_TABLE(stg_ap_1_upd,1,0,THUNK_1_0,"stg_ap_1_upd_info","stg_ap_1_upd_info")
|
|||||||
STK_CHK_NP(node);
|
STK_CHK_NP(node);
|
||||||
UPD_BH_UPDATABLE(node);
|
UPD_BH_UPDATABLE(node);
|
||||||
LDV_ENTER(node);
|
LDV_ENTER(node);
|
||||||
#if defined(ASTERIUS)
|
|
||||||
push (UPDATE_FRAME_FIELDS(,,stg_marked_upd_frame_info, CCCS, 0, node)) {
|
|
||||||
#else
|
|
||||||
push (UPDATE_FRAME_FIELDS(,,stg_upd_frame_info, CCCS, 0, node)) {
|
push (UPDATE_FRAME_FIELDS(,,stg_upd_frame_info, CCCS, 0, node)) {
|
||||||
#endif
|
|
||||||
ENTER_CCS_THUNK(node);
|
ENTER_CCS_THUNK(node);
|
||||||
jump stg_ap_0_fast
|
jump stg_ap_0_fast
|
||||||
(StgThunk_payload(node,0));
|
(StgThunk_payload(node,0));
|
||||||
@ -217,11 +187,7 @@ INFO_TABLE(stg_ap_2_upd,2,0,THUNK_2_0,"stg_ap_2_upd_info","stg_ap_2_upd_info")
|
|||||||
STK_CHK_NP(node);
|
STK_CHK_NP(node);
|
||||||
UPD_BH_UPDATABLE(node);
|
UPD_BH_UPDATABLE(node);
|
||||||
LDV_ENTER(node);
|
LDV_ENTER(node);
|
||||||
#if defined(ASTERIUS)
|
|
||||||
push (UPDATE_FRAME_FIELDS(,,stg_marked_upd_frame_info, CCCS, 0, node)) {
|
|
||||||
#else
|
|
||||||
push (UPDATE_FRAME_FIELDS(,,stg_upd_frame_info, CCCS, 0, node)) {
|
push (UPDATE_FRAME_FIELDS(,,stg_upd_frame_info, CCCS, 0, node)) {
|
||||||
#endif
|
|
||||||
ENTER_CCS_THUNK(node);
|
ENTER_CCS_THUNK(node);
|
||||||
jump stg_ap_p_fast
|
jump stg_ap_p_fast
|
||||||
(StgThunk_payload(node,0),
|
(StgThunk_payload(node,0),
|
||||||
@ -236,11 +202,7 @@ INFO_TABLE(stg_ap_3_upd,3,0,THUNK,"stg_ap_3_upd_info","stg_ap_3_upd_info")
|
|||||||
STK_CHK_NP(node);
|
STK_CHK_NP(node);
|
||||||
UPD_BH_UPDATABLE(node);
|
UPD_BH_UPDATABLE(node);
|
||||||
LDV_ENTER(node);
|
LDV_ENTER(node);
|
||||||
#if defined(ASTERIUS)
|
|
||||||
push (UPDATE_FRAME_FIELDS(,,stg_marked_upd_frame_info, CCCS, 0, node)) {
|
|
||||||
#else
|
|
||||||
push (UPDATE_FRAME_FIELDS(,,stg_upd_frame_info, CCCS, 0, node)) {
|
push (UPDATE_FRAME_FIELDS(,,stg_upd_frame_info, CCCS, 0, node)) {
|
||||||
#endif
|
|
||||||
ENTER_CCS_THUNK(node);
|
ENTER_CCS_THUNK(node);
|
||||||
jump stg_ap_pp_fast
|
jump stg_ap_pp_fast
|
||||||
(StgThunk_payload(node,0),
|
(StgThunk_payload(node,0),
|
||||||
@ -256,11 +218,7 @@ INFO_TABLE(stg_ap_4_upd,4,0,THUNK,"stg_ap_4_upd_info","stg_ap_4_upd_info")
|
|||||||
STK_CHK_NP(node);
|
STK_CHK_NP(node);
|
||||||
UPD_BH_UPDATABLE(node);
|
UPD_BH_UPDATABLE(node);
|
||||||
LDV_ENTER(node);
|
LDV_ENTER(node);
|
||||||
#if defined(ASTERIUS)
|
|
||||||
push (UPDATE_FRAME_FIELDS(,,stg_marked_upd_frame_info, CCCS, 0, node)) {
|
|
||||||
#else
|
|
||||||
push (UPDATE_FRAME_FIELDS(,,stg_upd_frame_info, CCCS, 0, node)) {
|
push (UPDATE_FRAME_FIELDS(,,stg_upd_frame_info, CCCS, 0, node)) {
|
||||||
#endif
|
|
||||||
ENTER_CCS_THUNK(node);
|
ENTER_CCS_THUNK(node);
|
||||||
jump stg_ap_ppp_fast
|
jump stg_ap_ppp_fast
|
||||||
(StgThunk_payload(node,0),
|
(StgThunk_payload(node,0),
|
||||||
@ -277,11 +235,7 @@ INFO_TABLE(stg_ap_5_upd,5,0,THUNK,"stg_ap_5_upd_info","stg_ap_5_upd_info")
|
|||||||
STK_CHK_NP(node);
|
STK_CHK_NP(node);
|
||||||
UPD_BH_UPDATABLE(node);
|
UPD_BH_UPDATABLE(node);
|
||||||
LDV_ENTER(node);
|
LDV_ENTER(node);
|
||||||
#if defined(ASTERIUS)
|
|
||||||
push (UPDATE_FRAME_FIELDS(,,stg_marked_upd_frame_info, CCCS, 0, node)) {
|
|
||||||
#else
|
|
||||||
push (UPDATE_FRAME_FIELDS(,,stg_upd_frame_info, CCCS, 0, node)) {
|
push (UPDATE_FRAME_FIELDS(,,stg_upd_frame_info, CCCS, 0, node)) {
|
||||||
#endif
|
|
||||||
ENTER_CCS_THUNK(node);
|
ENTER_CCS_THUNK(node);
|
||||||
jump stg_ap_pppp_fast
|
jump stg_ap_pppp_fast
|
||||||
(StgThunk_payload(node,0),
|
(StgThunk_payload(node,0),
|
||||||
@ -299,11 +253,7 @@ INFO_TABLE(stg_ap_6_upd,6,0,THUNK,"stg_ap_6_upd_info","stg_ap_6_upd_info")
|
|||||||
STK_CHK_NP(node);
|
STK_CHK_NP(node);
|
||||||
UPD_BH_UPDATABLE(node);
|
UPD_BH_UPDATABLE(node);
|
||||||
LDV_ENTER(node);
|
LDV_ENTER(node);
|
||||||
#if defined(ASTERIUS)
|
|
||||||
push (UPDATE_FRAME_FIELDS(,,stg_marked_upd_frame_info, CCCS, 0, node)) {
|
|
||||||
#else
|
|
||||||
push (UPDATE_FRAME_FIELDS(,,stg_upd_frame_info, CCCS, 0, node)) {
|
push (UPDATE_FRAME_FIELDS(,,stg_upd_frame_info, CCCS, 0, node)) {
|
||||||
#endif
|
|
||||||
ENTER_CCS_THUNK(node);
|
ENTER_CCS_THUNK(node);
|
||||||
jump stg_ap_ppppp_fast
|
jump stg_ap_ppppp_fast
|
||||||
(StgThunk_payload(node,0),
|
(StgThunk_payload(node,0),
|
||||||
@ -322,11 +272,7 @@ INFO_TABLE(stg_ap_7_upd,7,0,THUNK,"stg_ap_7_upd_info","stg_ap_7_upd_info")
|
|||||||
STK_CHK_NP(node);
|
STK_CHK_NP(node);
|
||||||
UPD_BH_UPDATABLE(node);
|
UPD_BH_UPDATABLE(node);
|
||||||
LDV_ENTER(node);
|
LDV_ENTER(node);
|
||||||
#if defined(ASTERIUS)
|
|
||||||
push (UPDATE_FRAME_FIELDS(,,stg_marked_upd_frame_info, CCCS, 0, node)) {
|
|
||||||
#else
|
|
||||||
push (UPDATE_FRAME_FIELDS(,,stg_upd_frame_info, CCCS, 0, node)) {
|
push (UPDATE_FRAME_FIELDS(,,stg_upd_frame_info, CCCS, 0, node)) {
|
||||||
#endif
|
|
||||||
ENTER_CCS_THUNK(node);
|
ENTER_CCS_THUNK(node);
|
||||||
jump stg_ap_pppppp_fast
|
jump stg_ap_pppppp_fast
|
||||||
(StgThunk_payload(node,0),
|
(StgThunk_payload(node,0),
|
||||||
|
Loading…
Reference in New Issue
Block a user