Add a missing untag to the non-updatable selector thunks (#7978)
authorSimon Marlow <marlowsd@gmail.com>
Tue, 13 Aug 2013 11:06:03 +0000 (12:06 +0100)
committerSimon Marlow <marlowsd@gmail.com>
Tue, 13 Aug 2013 11:06:03 +0000 (12:06 +0100)
rts/StgStdThunks.cmm

index 53e4cb1..979f749 100644 (file)
@@ -111,10 +111,10 @@ SELECTOR_CODE_UPD(15)
       UPD_BH_UPDATABLE(node);                                           \
       LDV_ENTER(node);                                                  \
       selectee = StgThunk_payload(node,0);                              \
+      ENTER_CCS_THUNK(node);                                            \
       if (NEED_EVAL(selectee)) {                                        \
-          ENTER_CCS_THUNK(node);                                        \
           SAVE_CCS;                                                     \
-          (P_ constr) = call %GET_ENTRY(selectee) (selectee);           \
+          (P_ constr) = call %GET_ENTRY(UNTAG_IF_PROF(selectee)) (selectee);           \
           RESTORE_CCS;                                                  \
           selectee = constr;                                            \
       }                                                                 \