diff options
author | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2019-06-24 14:24:58 +0300 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-06-25 01:36:50 -0400 |
commit | ebd63e8de30470ccf8b65c11f0fc82705960b5cf (patch) | |
tree | cbcd810761be6aca88b9deb1d01c92d40c8294ff | |
parent | 15b262237ab055f4afbf79588f76631a194a332f (diff) | |
download | haskell-ebd63e8de30470ccf8b65c11f0fc82705960b5cf.tar.gz |
Simplify link_caf and mkForeignLabel functions
-rw-r--r-- | compiler/cmm/CLabel.hs | 3 | ||||
-rw-r--r-- | compiler/codeGen/StgCmmBind.hs | 5 |
2 files changed, 3 insertions, 5 deletions
diff --git a/compiler/cmm/CLabel.hs b/compiler/cmm/CLabel.hs index 95f5a41a23..0c3dae8001 100644 --- a/compiler/cmm/CLabel.hs +++ b/compiler/cmm/CLabel.hs @@ -579,8 +579,7 @@ mkForeignLabel -> FunctionOrData -> CLabel -mkForeignLabel str mb_sz src fod - = ForeignLabel str mb_sz src fod +mkForeignLabel = ForeignLabel -- | Update the label size field in a ForeignLabel diff --git a/compiler/codeGen/StgCmmBind.hs b/compiler/codeGen/StgCmmBind.hs index f8bdc0d37e..6e6e6ac791 100644 --- a/compiler/codeGen/StgCmmBind.hs +++ b/compiler/codeGen/StgCmmBind.hs @@ -664,7 +664,7 @@ setupUpdate closure_info node body ; if closureUpdReqd closure_info then do -- Blackhole the (updatable) CAF: - { upd_closure <- link_caf node True + { upd_closure <- link_caf node ; pushUpdateFrame mkBHUpdInfoLabel upd_closure body } else do {tickyUpdateFrameOmitted; body} } @@ -704,11 +704,10 @@ emitUpdateFrame dflags frame lbl updatee = do -- See Note [CAF management] in rts/sm/Storage.c link_caf :: LocalReg -- pointer to the closure - -> Bool -- True <=> updatable, False <=> single-entry -> FCode CmmExpr -- Returns amode for closure to be updated -- This function returns the address of the black hole, so it can be -- updated with the new value when available. -link_caf node _is_upd = do +link_caf node = do { dflags <- getDynFlags -- Call the RTS function newCAF, returning the newly-allocated -- blackhole indirection closure |