[Git][ghc/ghc][wip/js-staging] GHCJS.Prim leftovers
Sylvain Henry (@hsyl20)
gitlab at gitlab.haskell.org
Wed Aug 17 16:26:35 UTC 2022
Sylvain Henry pushed to branch wip/js-staging at Glasgow Haskell Compiler / GHC
Commits:
4c9ec8a9 by Sylvain Henry at 2022-08-17T18:29:22+02:00
GHCJS.Prim leftovers
- - - - -
5 changed files:
- compiler/GHC/StgToJS/Linker/Utils.hs
- compiler/GHC/StgToJS/Rts/Rts.hs
- js/gc.js.pp
- js/rts.js.pp
- js/thread.js.pp
Changes:
=====================================
compiler/GHC/StgToJS/Linker/Utils.hs
=====================================
@@ -126,17 +126,17 @@ genCommonCppDefs profiling = mconcat
-- GHCJS.Prim.JSVal
, if profiling
- then "#define MK_JSVAL(x) (h$baseZCGHCJSziPrimziJSVal_con_e, (x), h$CCS_SYSTEM)\n"
- else "#define MK_JSVAL(x) (h$baseZCGHCJSziPrimziJSVal_con_e, (x))\n"
+ then "#define MK_JSVAL(x) (h$baseZCGHCziJSziPrimziJSVal_con_e, (x), h$CCS_SYSTEM)\n"
+ else "#define MK_JSVAL(x) (h$baseZCGHCziJSziPrimziJSVal_con_e, (x))\n"
, "#define JSVAL_VAL(x) ((x).d1)\n"
-- GHCJS.Prim.JSException
, if profiling
- then "#define MK_JSEXCEPTION(msg,hsMsg) (h$c2(h$baseZCGHCJSziPrimziJSException_con_e,(msg),(hsMsg),h$CCS_SYSTEM))\n"
- else "#define MK_JSEXCEPTION(msg,hsMsg) (h$c2(h$baseZCGHCJSziPrimziJSException_con_e,(msg),(hsMsg)))\n"
+ then "#define MK_JSEXCEPTION(msg,hsMsg) (h$c2(h$baseZCGHCziJSziPrimziJSException_con_e,(msg),(hsMsg),h$CCS_SYSTEM))\n"
+ else "#define MK_JSEXCEPTION(msg,hsMsg) (h$c2(h$baseZCGHCziJSziPrimziJSException_con_e,(msg),(hsMsg)))\n"
-- Exception dictionary for JSException
- , "#define HS_JSEXCEPTION_EXCEPTION h$baseZCGHCJSziPrimzizdfExceptionJSException\n"
+ , "#define HS_JSEXCEPTION_EXCEPTION h$baseZCGHCziJSziPrimzizdfExceptionJSException\n"
-- SomeException
, if profiling
=====================================
compiler/GHC/StgToJS/Rts/Rts.hs
=====================================
@@ -174,7 +174,7 @@ closureConstructors s = BlockStat
checkC :: JStat
checkC | csAssertRts s =
jVar $ \msg ->
- jwhenS (var "arguments" .! 0 .!==. jString "h$baseZCGHCJSziPrimziJSVal_con_e")
+ jwhenS (var "arguments" .! 0 .!==. jString "h$baseZCGHCziJSziPrimziJSVal_con_e")
(loop 1 (.<. var "arguments" .^ "length")
(\i ->
mconcat [msg |= jString "warning: undefined or null in argument: "
=====================================
js/gc.js.pp
=====================================
@@ -587,11 +587,11 @@ function h$resolveDeadlocks() {
// blocked on MVar
if(bo.m === mark) throw "assertion failed: thread should have been marked";
// MVar unreachable
- kill = h$baseZCGHCJSziPrimziInternalziblockedIndefinitelyOnMVar;
+ kill = h$baseZCGHCziJSziPrimziInternalziblockedIndefinitelyOnMVar;
break;
} else if(t.blockedOn instanceof h$TVarsWaiting) {
// blocked in STM transaction
- kill = h$baseZCGHCJSziPrimziInternalziblockedIndefinitelyOnSTM;
+ kill = h$baseZCGHCziJSziPrimziInternalziblockedIndefinitelyOnSTM;
break;
} else {
// blocked on something else, we can't do anything
=====================================
js/rts.js.pp
=====================================
@@ -2,7 +2,7 @@ var h$start = new Date();
function h$rts_eval(action, unbox) {
return new Promise((accept, reject) =>
- h$run(MK_AP3( h$baseZCGHCJSziPrimziresolveIO
+ h$run(MK_AP3( h$baseZCGHCziJSziPrimziresolveIO
, x => { accept(unbox(x))}
, e => { reject(new h$HaskellException(e))}
, action
@@ -13,7 +13,7 @@ function h$rts_eval(action, unbox) {
function h$rts_eval_sync(closure, unbox) {
var res, status = 0;
try {
- h$runSync(MK_AP3( h$baseZCGHCJSziPrimziresolveIO
+ h$runSync(MK_AP3( h$baseZCGHCziJSziPrimziresolveIO
, MK_JSVAL(x => { status = 1; res = unbox(x); })
, MK_JSVAL(e => { status = 2; res = new h$HaskellException(e); })
, closure), false);
@@ -149,7 +149,7 @@ function h$rts_getFunPtr(x) {
}
function h$rts_toIO(x) {
- return MK_AP1(h$baseZCGHCJSziPrimzitoIO, x);
+ return MK_AP1(h$baseZCGHCziJSziPrimzitoIO, x);
}
// running IO actions
=====================================
js/thread.js.pp
=====================================
@@ -817,7 +817,7 @@ function h$handleBlockedSyncThread(c) {
TRACE_SCHEDULER("blocking synchronous thread: exception");
h$sp += 2;
h$currentThread.sp = h$sp;
- h$stack[h$sp-1] = h$baseZCGHCJSziPrimziInternalziwouldBlock;
+ h$stack[h$sp-1] = h$baseZCGHCziJSziPrimziInternalziwouldBlock;
h$stack[h$sp] = h$raiseAsync_frame;
h$forceWakeupThread(h$currentThread);
c = h$raiseAsync_frame;
@@ -889,7 +889,7 @@ function h$setCurrentThreadResultValue(v) {
function h$runSyncReturn(a, cont) {
var t = new h$Thread();
TRACE_SCHEDULER("h$runSyncReturn created thread: " + h$threadString(t));
- var aa = MK_AP1(h$baseZCGHCJSziPrimziInternalzisetCurrentThreadResultValue, a);
+ var aa = MK_AP1(h$baseZCGHCziJSziPrimziInternalzisetCurrentThreadResultValue, a);
h$runSyncAction(t, aa, cont);
if(t.status === THREAD_FINISHED) {
if(t.resultIsException) {
@@ -932,7 +932,7 @@ function h$runSync(a, cont) {
function h$runSyncAction(t, a, cont) {
h$runInitStatic();
var c = h$return;
- t.stack[2] = h$baseZCGHCJSziPrimziInternalzisetCurrentThreadResultException;
+ t.stack[2] = h$baseZCGHCziJSziPrimziInternalzisetCurrentThreadResultException;
t.stack[4] = h$ap_1_0;
t.stack[5] = a;
t.stack[6] = h$return;
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4c9ec8a966d1b473a931a8c8a26a07e85b7d2b34
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4c9ec8a966d1b473a931a8c8a26a07e85b7d2b34
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/20220817/e616dd81/attachment-0001.html>
More information about the ghc-commits
mailing list