summaryrefslogtreecommitdiff
path: root/rts/Printer.c
diff options
context:
space:
mode:
authorLuite Stegeman <stegeman@gmail.com>2021-01-22 00:09:17 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-03-20 07:49:15 -0400
commit1f94e0f7601f8e22fdd81a47f130650265a44196 (patch)
treed06d02317049b56763b2f1da27f71f3663efa5a0 /rts/Printer.c
parent7de3532f0317032f75b76150c5d3a6f76178be04 (diff)
downloadhaskell-1f94e0f7601f8e22fdd81a47f130650265a44196.tar.gz
Generate GHCi bytecode from STG instead of Core and support unboxed
tuples and sums. fixes #1257
Diffstat (limited to 'rts/Printer.c')
-rw-r--r--rts/Printer.c60
1 files changed, 45 insertions, 15 deletions
diff --git a/rts/Printer.c b/rts/Printer.c
index ef9a52719b..7d9614cfd7 100644
--- a/rts/Printer.c
+++ b/rts/Printer.c
@@ -529,17 +529,7 @@ printStackChunk( StgPtr sp, StgPtr spBottom )
case RET_SMALL: {
StgWord c = *sp;
- if (c == (StgWord)&stg_ctoi_R1p_info) {
- debugBelch("tstg_ctoi_ret_R1p_info\n" );
- } else if (c == (StgWord)&stg_ctoi_R1n_info) {
- debugBelch("stg_ctoi_ret_R1n_info\n" );
- } else if (c == (StgWord)&stg_ctoi_F1_info) {
- debugBelch("stg_ctoi_ret_F1_info\n" );
- } else if (c == (StgWord)&stg_ctoi_D1_info) {
- debugBelch("stg_ctoi_ret_D1_info\n" );
- } else if (c == (StgWord)&stg_ctoi_V_info) {
- debugBelch("stg_ctoi_ret_V_info\n" );
- } else if (c == (StgWord)&stg_ap_v_info) {
+ if (c == (StgWord)&stg_ap_v_info) {
debugBelch("stg_ap_v_info\n" );
} else if (c == (StgWord)&stg_ap_f_info) {
debugBelch("stg_ap_f_info\n" );
@@ -595,11 +585,51 @@ printStackChunk( StgPtr sp, StgPtr spBottom )
}
case RET_BCO: {
- StgBCO *bco;
-
- bco = ((StgBCO *)sp[1]);
+ StgWord c = *sp;
+ StgBCO *bco = ((StgBCO *)sp[1]);
- debugBelch("RET_BCO (%p)\n", sp);
+ if (c == (StgWord)&stg_ctoi_R1p_info) {
+ debugBelch("stg_ctoi_R1p_info" );
+ } else if (c == (StgWord)&stg_ctoi_R1unpt_info) {
+ debugBelch("stg_ctoi_R1unpt_info" );
+ } else if (c == (StgWord)&stg_ctoi_R1n_info) {
+ debugBelch("stg_ctoi_R1n_info" );
+ } else if (c == (StgWord)&stg_ctoi_F1_info) {
+ debugBelch("stg_ctoi_F1_info" );
+ } else if (c == (StgWord)&stg_ctoi_D1_info) {
+ debugBelch("stg_ctoi_D1_info" );
+ } else if (c == (StgWord)&stg_ctoi_V_info) {
+ debugBelch("stg_ctoi_V_info" );
+ } else if (c == (StgWord)&stg_BCO_info) {
+ debugBelch("stg_BCO_info" );
+ } else if (c == (StgWord)&stg_apply_interp_info) {
+ debugBelch("stg_apply_interp_info" );
+ } else if (c == (StgWord)&stg_ret_t_info) {
+ debugBelch("stg_ret_t_info" );
+ } else if (c == (StgWord)&stg_ctoi_t0_info) {
+ debugBelch("stg_ctoi_t0_info" );
+ } else if (c == (StgWord)&stg_ctoi_t1_info) {
+ debugBelch("stg_ctoi_t1_info" );
+ } else if (c == (StgWord)&stg_ctoi_t2_info) {
+ debugBelch("stg_ctoi_t2_info" );
+ } else if (c == (StgWord)&stg_ctoi_t3_info) {
+ debugBelch("stg_ctoi_t3_info" );
+ } else if (c == (StgWord)&stg_ctoi_t4_info) {
+ debugBelch("stg_ctoi_t4_info" );
+ } else if (c == (StgWord)&stg_ctoi_t5_info) {
+ debugBelch("stg_ctoi_t5_info" );
+ } else if (c == (StgWord)&stg_ctoi_t6_info) {
+ debugBelch("stg_ctoi_t6_info" );
+ } else if (c == (StgWord)&stg_ctoi_t7_info) {
+ debugBelch("stg_ctoi_t7_info" );
+ } else if (c == (StgWord)&stg_ctoi_t8_info) {
+ debugBelch("stg_ctoi_t8_info" );
+ /* there are more stg_ctoi_tN_info frames,
+ but we don't print them all */
+ } else {
+ debugBelch("RET_BCO");
+ }
+ debugBelch(" (%p)\n", sp);
printLargeBitmap(spBottom, sp+2,
BCO_BITMAP(bco), BCO_BITMAP_SIZE(bco));
continue;