[Git][ghc/ghc][wip/js-staging] start a subtransaction in a catchStm block
Luite Stegeman (@luite)
gitlab at gitlab.haskell.org
Thu Oct 13 14:39:39 UTC 2022
Luite Stegeman pushed to branch wip/js-staging at Glasgow Haskell Compiler / GHC
Commits:
f0d136d5 by Luite Stegeman at 2022-10-13T16:38:52+02:00
start a subtransaction in a catchStm block
- - - - -
2 changed files:
- compiler/GHC/StgToJS/Rts/Rts.hs
- rts/js/stm.js
Changes:
=====================================
compiler/GHC/StgToJS/Rts/Rts.hs
=====================================
@@ -674,7 +674,9 @@ rts' s =
<> appS "h$stmCommitTransaction" []
<> returnS (stack .! sp))
, closure (ClosureInfo "h$catchStm_e" (CIRegs 0 [PtrV]) "STM catch" (CILayoutFixed 3 [ObjV,PtrV,ObjV]) CIStackFrame mempty)
- (adjSpN' 4 <> returnS (stack .! sp))
+ (adjSpN' 4
+ <> appS "h$stmCommitTransaction" []
+ <> returnS (stack .! sp))
, closure (ClosureInfo "h$stmResumeRetry_e" (CIRegs 0 [PtrV]) "resume retry" (CILayoutFixed 0 []) CIStackFrame mempty)
(jVar $ \blocked ->
mconcat [ jwhenS (stack .! (sp - 2) .!==. var "h$atomically_e")
=====================================
rts/js/stm.js
=====================================
@@ -222,6 +222,7 @@ function h$stmCatchRetry(a,b) {
function h$catchStm(a,handler) {
h$p4(h$currentThread.transaction, h$currentThread.mask, handler, h$catchStm_e);
+ h$currentThread.transaction = new h$Transaction(handler, h$currentThread.transaction);
h$r1 = a;
return h$ap_1_0_fast();
}
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f0d136d5b49f1263a3cf79cae5799ae772204c6b
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f0d136d5b49f1263a3cf79cae5799ae772204c6b
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20221013/b8e98b59/attachment-0001.html>
More information about the ghc-commits
mailing list