Ben Gamari pushed to branch wip/T26166 at Glasgow Haskell Compiler / GHC
Commits:
-
930f716d
by Ben Gamari at 2025-09-27T15:30:26-04:00
-
3b3ef03e
by Ben Gamari at 2025-09-27T15:31:11-04:00
-
1929e6a7
by Ben Gamari at 2025-09-27T15:43:04-04:00
23 changed files:
- compiler/GHC/HsToCore/Foreign/C.hs
- + libraries/ghc-internal/cbits/RtsIface.c
- libraries/ghc-internal/ghc-internal.cabal.in
- + libraries/ghc-internal/include/RtsIfaceSymbols.h
- rts/BuiltinClosures.c
- rts/Compact.cmm
- rts/ContinuationOps.cmm
- rts/Exception.cmm
- rts/Prelude.h
- rts/PrimOps.cmm
- rts/RtsAPI.c
- rts/RtsStartup.c
- rts/RtsSymbols.c
- + rts/RtsToHsIface.c
- rts/Schedule.c
- rts/StgStdThunks.cmm
- rts/include/Rts.h
- rts/include/RtsAPI.h
- + rts/include/rts/RtsToHsIface.h
- rts/posix/Signals.c
- rts/rts.cabal
- rts/wasm/JSFFI.c
- utils/deriveConstants/Main.hs
Changes:
... | ... | @@ -517,8 +517,8 @@ mkFExportCBits dflags c_nm maybe_target arg_htys res_hty is_IO_res_ty cc |
517 | 517 | text "rts_apply" <> parens (
|
518 | 518 | cap
|
519 | 519 | <> (if is_IO_res_ty
|
520 | - then text "runIO_closure"
|
|
521 | - else text "runNonIO_closure")
|
|
520 | + then text "ghc_hs_iface->runIO_closure"
|
|
521 | + else text "ghc_hs_iface->runNonIO_closure")
|
|
522 | 522 | <> comma
|
523 | 523 | <> expr_to_run
|
524 | 524 | ) <+> comma
|
1 | +/*
|
|
2 | + * (c) The GHC Team, 2025-2026
|
|
3 | + *
|
|
4 | + * RTS/ghc-internal interface
|
|
5 | + *
|
|
6 | + * See Note [RTS/ghc-internal interface].
|
|
7 | + */
|
|
8 | + |
|
9 | +#include "Rts.h"
|
|
10 | + |
|
11 | +void init_ghc_hs_iface(void) __attribute__((constructor));
|
|
12 | + |
|
13 | +// Forward declarations
|
|
14 | +#define CLOSURE(module, symbol) \
|
|
15 | + extern StgClosure ghczminternal_##module##_##symbol;
|
|
16 | + |
|
17 | +#define UNDEF_CLOSURE(module, symbol)
|
|
18 | + |
|
19 | +#define INFO_TBL(module, symbol) \
|
|
20 | + extern StgInfoTable ghczminternal_##module##_##symbol;
|
|
21 | + |
|
22 | +#include "RtsIfaceSymbols.h"
|
|
23 | + |
|
24 | +#undef CLOSURE
|
|
25 | +#undef UNDEF_CLOSURE
|
|
26 | +#undef INFO_TBL
|
|
27 | + |
|
28 | +// HsIface definition
|
|
29 | +#define CLOSURE(module, symbol) \
|
|
30 | + .symbol = &ghczminternal_##module##_##symbol,
|
|
31 | + |
|
32 | +#define UNDEF_CLOSURE(module, symbol) \
|
|
33 | + .symbol = NULL,
|
|
34 | + |
|
35 | +#define INFO_TBL(module, symbol) \
|
|
36 | + .symbol = &ghczminternal_##module##_##symbol,
|
|
37 | + |
|
38 | +static const HsIface the_ghc_hs_iface = {
|
|
39 | +#include "RtsIfaceSymbols.h"
|
|
40 | +};
|
|
41 | + |
|
42 | +void init_ghc_hs_iface(void)
|
|
43 | +{
|
|
44 | + /*
|
|
45 | + * N.B. ghc-internal may be load multiple times, e.g., when the
|
|
46 | + * RTS linker is in use. For this reason we explicitly refuse to
|
|
47 | + * override ghc_hs_iface if it has already been initialized.
|
|
48 | + */
|
|
49 | + if (ghc_hs_iface == NULL) {
|
|
50 | + ghc_hs_iface = &the_ghc_hs_iface;
|
|
51 | + }
|
|
52 | +} |
... | ... | @@ -43,6 +43,7 @@ extra-source-files: |
43 | 43 | include/winio_structs.h
|
44 | 44 | include/WordSize.h
|
45 | 45 | include/HsIntegerGmp.h.in
|
46 | + include/RtsIfaceSymbols.h
|
|
46 | 47 | install-sh
|
47 | 48 | |
48 | 49 | source-repository head
|
... | ... | @@ -431,6 +432,10 @@ Library |
431 | 432 | |
432 | 433 | |
433 | 434 | if !arch(javascript)
|
435 | + -- See Note [RTS/ghc-internal interface].
|
|
436 | + ld-options: -uinit_ghc_hs_iface
|
|
437 | + -- To maximize usability
|
|
438 | + cc-options: -fPIC
|
|
434 | 439 | c-sources:
|
435 | 440 | cbits/DarwinUtils.c
|
436 | 441 | cbits/PrelIOUtils.c
|
... | ... | @@ -457,6 +462,7 @@ Library |
457 | 462 | cbits/vectorQuotRem.c
|
458 | 463 | cbits/word2float.c
|
459 | 464 | cbits/Stack_c.c
|
465 | + cbits/RtsIface.c
|
|
460 | 466 | |
461 | 467 | cmm-sources:
|
462 | 468 | cbits/StackCloningDecoding.cmm
|
1 | +// See Note [RTS/ghc-internal interface].
|
|
2 | + |
|
3 | +#if defined(mingw32_HOST_OS)
|
|
4 | +CLOSURE(GHCziInternalziEventziWindows, processRemoteCompletion_closure)
|
|
5 | +#else
|
|
6 | +UNDEF_CLOSURE(GHCziInternalziEventziWindows, processRemoteCompletion_closure)
|
|
7 | +#endif
|
|
8 | +CLOSURE(GHCziInternalziTopHandler, runIO_closure)
|
|
9 | +CLOSURE(GHCziInternalziTopHandler, runNonIO_closure)
|
|
10 | +CLOSURE(GHCziInternalziTuple, Z0T_closure)
|
|
11 | +CLOSURE(GHCziInternalziTypes, True_closure)
|
|
12 | +CLOSURE(GHCziInternalziTypes, False_closure)
|
|
13 | +CLOSURE(GHCziInternalziPack, unpackCString_closure)
|
|
14 | +CLOSURE(GHCziInternalziWeakziFinalizze, runFinalizzerBatch_closure)
|
|
15 | +CLOSURE(GHCziInternalziIOziException, stackOverflow_closure)
|
|
16 | +CLOSURE(GHCziInternalziIOziException, heapOverflow_closure)
|
|
17 | +CLOSURE(GHCziInternalziIOziException, allocationLimitExceeded_closure)
|
|
18 | +CLOSURE(GHCziInternalziIOziException, blockedIndefinitelyOnMVar_closure)
|
|
19 | +CLOSURE(GHCziInternalziIOziException, blockedIndefinitelyOnSTM_closure)
|
|
20 | +CLOSURE(GHCziInternalziIOziException, cannotCompactFunction_closure)
|
|
21 | +CLOSURE(GHCziInternalziIOziException, cannotCompactPinned_closure)
|
|
22 | +CLOSURE(GHCziInternalziIOziException, cannotCompactMutable_closure)
|
|
23 | +CLOSURE(GHCziInternalziControlziExceptionziBase, nonTermination_closure)
|
|
24 | +CLOSURE(GHCziInternalziControlziExceptionziBase, nestedAtomically_closure)
|
|
25 | +CLOSURE(GHCziInternalziControlziExceptionziBase, noMatchingContinuationPrompt_closure)
|
|
26 | +CLOSURE(GHCziInternalziEventziThread, blockedOnBadFD_closure)
|
|
27 | +CLOSURE(GHCziInternalziConcziSync, runSparks_closure)
|
|
28 | +CLOSURE(GHCziInternalziConcziIO, ensureIOManagerIsRunning_closure)
|
|
29 | +CLOSURE(GHCziInternalziConcziIO, interruptIOManager_closure)
|
|
30 | +CLOSURE(GHCziInternalziConcziIO, ioManagerCapabilitiesChanged_closure)
|
|
31 | +CLOSURE(GHCziInternalziConcziSignal, runHandlersPtr_closure)
|
|
32 | +CLOSURE(GHCziInternalziTopHandler, flushStdHandles_closure)
|
|
33 | +CLOSURE(GHCziInternalziTopHandler, runMainIO_closure)
|
|
34 | +INFO_TBL(GHCziInternalziTypes, Czh_con_info)
|
|
35 | +INFO_TBL(GHCziInternalziTypes, Izh_con_info)
|
|
36 | +INFO_TBL(GHCziInternalziTypes, Fzh_con_info)
|
|
37 | +INFO_TBL(GHCziInternalziTypes, Dzh_con_info)
|
|
38 | +INFO_TBL(GHCziInternalziTypes, Wzh_con_info)
|
|
39 | +CLOSURE(GHCziInternalziPrimziPanic, absentSumFieldError_closure)
|
|
40 | +CLOSURE(GHCziInternalziAllocationLimitHandler, runAllocationLimitHandler_closure)
|
|
41 | +INFO_TBL(GHCziInternalziPtr, Ptr_con_info)
|
|
42 | +INFO_TBL(GHCziInternalziPtr, FunPtr_con_info)
|
|
43 | +INFO_TBL(GHCziInternalziInt, I8zh_con_info)
|
|
44 | +INFO_TBL(GHCziInternalziInt, I16zh_con_info)
|
|
45 | +INFO_TBL(GHCziInternalziInt, I32zh_con_info)
|
|
46 | +INFO_TBL(GHCziInternalziInt, I64zh_con_info)
|
|
47 | +INFO_TBL(GHCziInternalziWord, W8zh_con_info)
|
|
48 | +INFO_TBL(GHCziInternalziWord, W16zh_con_info)
|
|
49 | +INFO_TBL(GHCziInternalziWord, W32zh_con_info)
|
|
50 | +INFO_TBL(GHCziInternalziWord, W64zh_con_info)
|
|
51 | +INFO_TBL(GHCziInternalziStable, StablePtr_con_info)
|
|
52 | +CLOSURE(GHCziInternalziStackziCloneStack, StackSnapshot_closure)
|
|
53 | +CLOSURE(GHCziInternalziExceptionziType, divZZeroException_closure)
|
|
54 | +CLOSURE(GHCziInternalziExceptionziType, underflowException_closure)
|
|
55 | +CLOSURE(GHCziInternalziExceptionziType, overflowException_closure)
|
|
56 | +CLOSURE(GHCziInternalziCString, unpackCStringzh_closure)
|
|
57 | +INFO_TBL(GHCziInternalziCString, unpackCStringzh_info)
|
|
58 | +INFO_TBL(GHCziInternalziCString, unpackCStringUtf8zh_info)
|
|
59 | +#if defined(wasm32_HOST_ARCH)
|
|
60 | +CLOSURE(GHCziInternalziWasmziPrimziImports, raiseJSException_closure)
|
|
61 | +CLOSURE(GHCziInternalziWasmziPrim, JSVal_con_info)
|
|
62 | +CLOSURE(GHCziInternalziWasmziPrim, threadDelay_closure)
|
|
63 | +#else
|
|
64 | +UNDEF_CLOSURE(GHCziInternalziWasmziPrimziImports, raiseJSException_closure)
|
|
65 | +UNDEF_CLOSURE(GHCziInternalziWasmziPrim, JSVal_con_info)
|
|
66 | +UNDEF_CLOSURE(GHCziInternalziWasmziPrim, threadDelay_closure)
|
|
67 | +#endif |
1 | 1 | #include "Rts.h"
|
2 | -#include "Prelude.h"
|
|
3 | 2 | #include "BuiltinClosures.h"
|
4 | 3 | |
5 | 4 | /*
|
... | ... | @@ -17,14 +16,14 @@ void initBuiltinClosures() { |
17 | 16 | // INTLIKE closures
|
18 | 17 | for (int i = MIN_INTLIKE; i <= MAX_INTLIKE; i++) {
|
19 | 18 | StgIntCharlikeClosure *c = &stg_INTLIKE_closure[i - MIN_INTLIKE];
|
20 | - SET_HDR((StgClosure* ) c, Izh_con_info, CCS_SYSTEM_OR_NULL);
|
|
19 | + SET_HDR((StgClosure* ) c, ghc_hs_iface->Izh_con_info, CCS_SYSTEM_OR_NULL);
|
|
21 | 20 | c->data = i;
|
22 | 21 | }
|
23 | 22 | |
24 | 23 | // CHARLIKE closures
|
25 | 24 | for (int i = MIN_CHARLIKE; i <= MAX_CHARLIKE; i++) {
|
26 | 25 | StgIntCharlikeClosure *c = &stg_CHARLIKE_closure[i - MIN_CHARLIKE];
|
27 | - SET_HDR((StgClosure* ) c, Czh_con_info, CCS_SYSTEM_OR_NULL);
|
|
26 | + SET_HDR((StgClosure* ) c, ghc_hs_iface->Czh_con_info, CCS_SYSTEM_OR_NULL);
|
|
28 | 27 | c->data = i;
|
29 | 28 | }
|
30 | 29 | } |
... | ... | @@ -10,9 +10,6 @@ |
10 | 10 | #include "Cmm.h"
|
11 | 11 | #include "sm/ShouldCompact.h"
|
12 | 12 | |
13 | -import CLOSURE ghczminternal_GHCziInternalziIOziException_cannotCompactFunction_closure;
|
|
14 | -import CLOSURE ghczminternal_GHCziInternalziIOziException_cannotCompactMutable_closure;
|
|
15 | -import CLOSURE ghczminternal_GHCziInternalziIOziException_cannotCompactPinned_closure;
|
|
16 | 13 | #if !defined(UnregisterisedCompiler)
|
17 | 14 | import CLOSURE g0;
|
18 | 15 | import CLOSURE large_alloc_lim;
|
... | ... | @@ -124,7 +121,7 @@ eval: |
124 | 121 | SMALL_MUT_ARR_PTRS_CLEAN,
|
125 | 122 | SMALL_MUT_ARR_PTRS_DIRTY,
|
126 | 123 | COMPACT_NFDATA: {
|
127 | - jump stg_raisezh(ghczminternal_GHCziInternalziIOziException_cannotCompactMutable_closure);
|
|
124 | + jump stg_raisezh(HsIface_cannotCompactMutable_closure(W_[ghc_hs_iface]));
|
|
128 | 125 | }
|
129 | 126 | |
130 | 127 | // We shouldn't see any functions, if this data structure was NFData.
|
... | ... | @@ -139,7 +136,7 @@ eval: |
139 | 136 | BCO,
|
140 | 137 | PAP,
|
141 | 138 | CONTINUATION: {
|
142 | - jump stg_raisezh(ghczminternal_GHCziInternalziIOziException_cannotCompactFunction_closure);
|
|
139 | + jump stg_raisezh(HsIface_cannotCompactFunction_closure(W_[ghc_hs_iface]));
|
|
143 | 140 | }
|
144 | 141 | |
145 | 142 | case ARR_WORDS: {
|
... | ... | @@ -147,7 +144,7 @@ eval: |
147 | 144 | (should) = ccall shouldCompact(compact "ptr", p "ptr");
|
148 | 145 | if (should == SHOULDCOMPACT_IN_CNF) { P_[pp] = p; return(); }
|
149 | 146 | if (should == SHOULDCOMPACT_PINNED) {
|
150 | - jump stg_raisezh(ghczminternal_GHCziInternalziIOziException_cannotCompactPinned_closure);
|
|
147 | + jump stg_raisezh(HsIface_cannotCompactPinned_closure(W_[ghc_hs_iface]));
|
|
151 | 148 | }
|
152 | 149 | |
153 | 150 | CHECK_HASH();
|
... | ... | @@ -12,7 +12,6 @@ |
12 | 12 | |
13 | 13 | #include "Cmm.h"
|
14 | 14 | |
15 | -import CLOSURE ghczminternal_GHCziInternalziControlziExceptionziBase_noMatchingContinuationPrompt_closure;
|
|
16 | 15 | #if !defined(UnregisterisedCompiler)
|
17 | 16 | import CLOSURE ALLOC_RTS_ctr;
|
18 | 17 | import CLOSURE ALLOC_RTS_tot;
|
... | ... | @@ -104,7 +103,7 @@ stg_control0zh_ll // explicit stack |
104 | 103 | |
105 | 104 | // see Note [When capturing the continuation fails] in Continuation.c
|
106 | 105 | if (cont == NULL) (likely: False) {
|
107 | - jump stg_raisezh(ghczminternal_GHCziInternalziControlziExceptionziBase_noMatchingContinuationPrompt_closure);
|
|
106 | + jump stg_raisezh(HsIface_noMatchingContinuationPrompt_closure(W_[ghc_hs_iface]));
|
|
108 | 107 | }
|
109 | 108 | |
110 | 109 | W_ apply_mask_frame;
|
... | ... | @@ -13,10 +13,6 @@ |
13 | 13 | #include "Cmm.h"
|
14 | 14 | #include "RaiseAsync.h"
|
15 | 15 | |
16 | -import CLOSURE ghczminternal_GHCziInternalziTypes_True_closure;
|
|
17 | -import CLOSURE ghczminternal_GHCziInternalziExceptionziType_divZZeroException_closure;
|
|
18 | -import CLOSURE ghczminternal_GHCziInternalziExceptionziType_underflowException_closure;
|
|
19 | -import CLOSURE ghczminternal_GHCziInternalziExceptionziType_overflowException_closure;
|
|
20 | 16 | #if !defined(UnregisterisedCompiler)
|
21 | 17 | import CLOSURE CATCHF_PUSHED_ctr;
|
22 | 18 | import CLOSURE RtsFlags;
|
... | ... | @@ -539,7 +535,7 @@ retry_pop_stack: |
539 | 535 | Sp(10) = exception;
|
540 | 536 | Sp(9) = stg_raise_ret_info;
|
541 | 537 | Sp(8) = exception;
|
542 | - Sp(7) = ghczminternal_GHCziInternalziTypes_True_closure; // True <=> an exception
|
|
538 | + Sp(7) = HsIface_True_closure(W_[ghc_hs_iface]); // True <=> an exception
|
|
543 | 539 | Sp(6) = stg_ap_ppv_info;
|
544 | 540 | Sp(5) = 0;
|
545 | 541 | Sp(4) = stg_ap_n_info;
|
... | ... | @@ -650,17 +646,17 @@ stg_raiseIOzh (P_ exception) |
650 | 646 | |
651 | 647 | stg_raiseDivZZerozh ()
|
652 | 648 | {
|
653 | - jump stg_raisezh(ghczminternal_GHCziInternalziExceptionziType_divZZeroException_closure);
|
|
649 | + jump stg_raisezh(HsIface_divZZeroException_closure(W_[ghc_hs_iface]));
|
|
654 | 650 | }
|
655 | 651 | |
656 | 652 | stg_raiseUnderflowzh ()
|
657 | 653 | {
|
658 | - jump stg_raisezh(ghczminternal_GHCziInternalziExceptionziType_underflowException_closure);
|
|
654 | + jump stg_raisezh(HsIface_underflowException_closure(W_[ghc_hs_iface]));
|
|
659 | 655 | }
|
660 | 656 | |
661 | 657 | stg_raiseOverflowzh ()
|
662 | 658 | {
|
663 | - jump stg_raisezh(ghczminternal_GHCziInternalziExceptionziType_overflowException_closure);
|
|
659 | + jump stg_raisezh(HsIface_overflowException_closure(W_[ghc_hs_iface]));
|
|
664 | 660 | }
|
665 | 661 | |
666 | 662 | /* The FFI doesn't support variadic C functions so we can't directly expose
|
... | ... | @@ -19,126 +19,69 @@ |
19 | 19 | #define PRELUDE_CLOSURE(i) extern StgClosure (i)
|
20 | 20 | #endif
|
21 | 21 | |
22 | -/* See Note [Wired-in exceptions are not CAFfy] in GHC.Core.Make. */
|
|
23 | -PRELUDE_CLOSURE(ghczminternal_GHCziInternalziPrimziPanic_absentSumFieldError_closure);
|
|
24 | 22 | |
25 | 23 | /* Define canonical names so we can abstract away from the actual
|
26 | 24 | * modules these names are defined in.
|
27 | 25 | */
|
28 | 26 | |
29 | -PRELUDE_CLOSURE(ghczminternal_GHCziInternalziTuple_Z0T_closure);
|
|
30 | -PRELUDE_CLOSURE(ghczminternal_GHCziInternalziTypes_True_closure);
|
|
31 | -PRELUDE_CLOSURE(ghczminternal_GHCziInternalziTypes_False_closure);
|
|
32 | -PRELUDE_CLOSURE(ghczminternal_GHCziInternalziPack_unpackCString_closure);
|
|
33 | -PRELUDE_CLOSURE(ghczminternal_GHCziInternalziPack_unpackCStringUtf8_closure);
|
|
34 | -PRELUDE_CLOSURE(ghczminternal_GHCziInternalziWeak_runFinalizzerBatch_closure);
|
|
35 | -PRELUDE_CLOSURE(ghczminternal_GHCziInternalziWeakziFinalizze_runFinalizzerBatch_closure);
|
|
36 | - |
|
37 | 27 | #if defined(IN_STG_CODE)
|
38 | 28 | extern W_ ZCMain_main_closure[];
|
39 | 29 | #else
|
40 | 30 | extern StgClosure ZCMain_main_closure;
|
41 | 31 | #endif
|
42 | 32 | |
43 | -PRELUDE_CLOSURE(ghczminternal_GHCziInternalziIOziException_stackOverflow_closure);
|
|
44 | -PRELUDE_CLOSURE(ghczminternal_GHCziInternalziIOziException_heapOverflow_closure);
|
|
45 | -PRELUDE_CLOSURE(ghczminternal_GHCziInternalziIOziException_allocationLimitExceeded_closure);
|
|
46 | -PRELUDE_CLOSURE(ghczminternal_GHCziInternalziIOziException_blockedIndefinitelyOnMVar_closure);
|
|
47 | -PRELUDE_CLOSURE(ghczminternal_GHCziInternalziIOziException_blockedIndefinitelyOnSTM_closure);
|
|
48 | -PRELUDE_CLOSURE(ghczminternal_GHCziInternalziIOziException_cannotCompactFunction_closure);
|
|
49 | -PRELUDE_CLOSURE(ghczminternal_GHCziInternalziIOziException_cannotCompactPinned_closure);
|
|
50 | -PRELUDE_CLOSURE(ghczminternal_GHCziInternalziIOziException_cannotCompactMutable_closure);
|
|
51 | -PRELUDE_CLOSURE(ghczminternal_GHCziInternalziControlziExceptionziBase_nonTermination_closure);
|
|
52 | -PRELUDE_CLOSURE(ghczminternal_GHCziInternalziControlziExceptionziBase_nestedAtomically_closure);
|
|
53 | -PRELUDE_CLOSURE(ghczminternal_GHCziInternalziEventziThread_blockedOnBadFD_closure);
|
|
54 | -PRELUDE_CLOSURE(ghczminternal_GHCziInternalziExceptionziType_divZZeroException_closure);
|
|
55 | -PRELUDE_CLOSURE(ghczminternal_GHCziInternalziExceptionziType_underflowException_closure);
|
|
56 | -PRELUDE_CLOSURE(ghczminternal_GHCziInternalziExceptionziType_overflowException_closure);
|
|
57 | - |
|
58 | -PRELUDE_CLOSURE(ghczminternal_GHCziInternalziConcziSync_runSparks_closure);
|
|
59 | -PRELUDE_CLOSURE(ghczminternal_GHCziInternalziConcziIO_ensureIOManagerIsRunning_closure);
|
|
60 | -PRELUDE_CLOSURE(ghczminternal_GHCziInternalziConcziIO_interruptIOManager_closure);
|
|
61 | -PRELUDE_CLOSURE(ghczminternal_GHCziInternalziConcziIO_ioManagerCapabilitiesChanged_closure);
|
|
62 | -PRELUDE_CLOSURE(ghczminternal_GHCziInternalziConcziSignal_runHandlersPtr_closure);
|
|
63 | -#if defined(mingw32_HOST_OS)
|
|
64 | -PRELUDE_CLOSURE(ghczminternal_GHCziInternalziEventziWindows_processRemoteCompletion_closure);
|
|
65 | -#endif
|
|
66 | - |
|
67 | -PRELUDE_CLOSURE(ghczminternal_GHCziInternalziTopHandler_flushStdHandles_closure);
|
|
68 | -PRELUDE_CLOSURE(ghczminternal_GHCziInternalziTopHandler_runMainIO_closure);
|
|
69 | -PRELUDE_CLOSURE(ghczminternal_GHCziInternalziAllocationLimitHandler_runAllocationLimitHandler_closure);
|
|
70 | - |
|
71 | -PRELUDE_INFO(ghczminternal_GHCziInternalziCString_unpackCStringzh_info);
|
|
72 | -PRELUDE_INFO(ghczminternal_GHCziInternalziTypes_Czh_con_info);
|
|
73 | -PRELUDE_INFO(ghczminternal_GHCziInternalziTypes_Izh_con_info);
|
|
74 | -PRELUDE_INFO(ghczminternal_GHCziInternalziTypes_Fzh_con_info);
|
|
75 | -PRELUDE_INFO(ghczminternal_GHCziInternalziTypes_Dzh_con_info);
|
|
76 | -PRELUDE_INFO(ghczminternal_GHCziInternalziTypes_Wzh_con_info);
|
|
77 | - |
|
78 | -PRELUDE_INFO(ghczminternal_GHCziInternalziPtr_Ptr_con_info);
|
|
79 | -PRELUDE_INFO(ghczminternal_GHCziInternalziPtr_FunPtr_con_info);
|
|
80 | -PRELUDE_INFO(ghczminternal_GHCziInternalziInt_I8zh_con_info);
|
|
81 | -PRELUDE_INFO(ghczminternal_GHCziInternalziInt_I16zh_con_info);
|
|
82 | -PRELUDE_INFO(ghczminternal_GHCziInternalziInt_I32zh_con_info);
|
|
83 | -PRELUDE_INFO(ghczminternal_GHCziInternalziInt_I64zh_con_info);
|
|
84 | -PRELUDE_INFO(ghczminternal_GHCziInternalziWord_W8zh_con_info);
|
|
85 | -PRELUDE_INFO(ghczminternal_GHCziInternalziWord_W16zh_con_info);
|
|
86 | -PRELUDE_INFO(ghczminternal_GHCziInternalziWord_W32zh_con_info);
|
|
87 | -PRELUDE_INFO(ghczminternal_GHCziInternalziWord_W64zh_con_info);
|
|
88 | -PRELUDE_INFO(ghczminternal_GHCziInternalziStable_StablePtr_con_info);
|
|
89 | - |
|
90 | -#define Unit_closure (&(ghczminternal_GHCziInternalziTuple_Z0T_closure))
|
|
91 | -#define True_closure (&(ghczminternal_GHCziInternalziTypes_True_closure))
|
|
92 | -#define False_closure (&(ghczminternal_GHCziInternalziTypes_False_closure))
|
|
93 | -#define unpackCString_closure (&(ghczminternal_GHCziInternalziPack_unpackCString_closure))
|
|
94 | -#define runFinalizerBatch_closure (&(ghczminternal_GHCziInternalziWeakziFinalizze_runFinalizzerBatch_closure))
|
|
33 | +#define Unit_closure ghc_hs_iface->Z0T_closure
|
|
34 | +#define True_closure ghc_hs_iface->True_closure
|
|
35 | +#define False_closure ghc_hs_iface->False_closure
|
|
36 | +#define unpackCString_closure ghc_hs_iface->unpackCString_closure
|
|
37 | +#define runFinalizerBatch_closure ghc_hs_iface->runFinalizzerBatch_closure
|
|
95 | 38 | #define mainIO_closure (&ZCMain_main_closure)
|
96 | 39 | |
97 | -#define runSparks_closure (&(ghczminternal_GHCziInternalziConcziSync_runSparks_closure))
|
|
98 | -#define ensureIOManagerIsRunning_closure (&(ghczminternal_GHCziInternalziConcziIO_ensureIOManagerIsRunning_closure))
|
|
99 | -#define interruptIOManager_closure (&(ghczminternal_GHCziInternalziConcziIO_interruptIOManager_closure))
|
|
100 | -#define ioManagerCapabilitiesChanged_closure (&(ghczminternal_GHCziInternalziConcziIO_ioManagerCapabilitiesChanged_closure))
|
|
101 | -#define runHandlersPtr_closure (&(ghczminternal_GHCziInternalziConcziSignal_runHandlersPtr_closure))
|
|
40 | +#define runSparks_closure ghc_hs_iface->runSparks_closure
|
|
41 | +#define ensureIOManagerIsRunning_closure ghc_hs_iface->ensureIOManagerIsRunning_closure
|
|
42 | +#define interruptIOManager_closure ghc_hs_iface->interruptIOManager_closure
|
|
43 | +#define ioManagerCapabilitiesChanged_closure ghc_hs_iface->ioManagerCapabilitiesChanged_closure
|
|
44 | +#define runHandlersPtr_closure ghc_hs_iface->runHandlersPtr_closure
|
|
102 | 45 | #if defined(mingw32_HOST_OS)
|
103 | -#define processRemoteCompletion_closure (&(ghczminternal_GHCziInternalziEventziWindows_processRemoteCompletion_closure))
|
|
46 | +#define processRemoteCompletion_closure ghc_hs_iface->processRemoteCompletion_closure
|
|
104 | 47 | #endif
|
105 | -#define runAllocationLimitHandler_closure (&(ghczminternal_GHCziInternalziAllocationLimitHandler_runAllocationLimitHandler_closure))
|
|
106 | - |
|
107 | -#define flushStdHandles_closure (&(ghczminternal_GHCziInternalziTopHandler_flushStdHandles_closure))
|
|
108 | -#define runMainIO_closure (&(ghczminternal_GHCziInternalziTopHandler_runMainIO_closure))
|
|
109 | - |
|
110 | -#define stackOverflow_closure (&(ghczminternal_GHCziInternalziIOziException_stackOverflow_closure))
|
|
111 | -#define heapOverflow_closure (&(ghczminternal_GHCziInternalziIOziException_heapOverflow_closure))
|
|
112 | -#define allocationLimitExceeded_closure (&(ghczminternal_GHCziInternalziIOziException_allocationLimitExceeded_closure))
|
|
113 | -#define blockedIndefinitelyOnMVar_closure (&(ghczminternal_GHCziInternalziIOziException_blockedIndefinitelyOnMVar_closure))
|
|
114 | -#define blockedIndefinitelyOnSTM_closure (&(ghczminternal_GHCziInternalziIOziException_blockedIndefinitelyOnSTM_closure))
|
|
115 | -#define cannotCompactFunction_closure (&(ghczminternal_GHCziInternalziIOziException_cannotCompactFunction_closure))
|
|
116 | -#define cannotCompactPinned_closure (&(ghczminternal_GHCziInternalziIOziException_cannotCompactPinned_closure))
|
|
117 | -#define cannotCompactMutable_closure (&(ghczminternal_GHCziInternalziIOziException_cannotCompactMutable_closure))
|
|
118 | -#define nonTermination_closure (&(ghczminternal_GHCziInternalziControlziExceptionziBase_nonTermination_closure))
|
|
119 | -#define nestedAtomically_closure (&(ghczminternal_GHCziInternalziControlziExceptionziBase_nestedAtomically_closure))
|
|
120 | -#define absentSumFieldError_closure (&(ghczminternal_GHCziInternalziPrimziPanic_absentSumFieldError_closure))
|
|
121 | -#define underflowException_closure (&(ghczminternal_GHCziInternalziExceptionziType_underflowException_closure))
|
|
122 | -#define overflowException_closure (&(ghczminternal_GHCziInternalziExceptionziType_overflowException_closure))
|
|
123 | -#define divZeroException_closure (&(ghczminternal_GHCziInternalziExceptionziType_divZZeroException_closure))
|
|
124 | - |
|
125 | -#define blockedOnBadFD_closure (&(ghczminternal_GHCziInternalziEventziThread_blockedOnBadFD_closure))
|
|
126 | - |
|
127 | -#define Czh_con_info (&(ghczminternal_GHCziInternalziTypes_Czh_con_info))
|
|
128 | -#define Izh_con_info (&(ghczminternal_GHCziInternalziTypes_Izh_con_info))
|
|
129 | -#define Fzh_con_info (&(ghczminternal_GHCziInternalziTypes_Fzh_con_info))
|
|
130 | -#define Dzh_con_info (&(ghczminternal_GHCziInternalziTypes_Dzh_con_info))
|
|
131 | -#define Wzh_con_info (&(ghczminternal_GHCziInternalziTypes_Wzh_con_info))
|
|
132 | -#define W8zh_con_info (&(ghczminternal_GHCziInternalziWord_W8zh_con_info))
|
|
133 | -#define W16zh_con_info (&(ghczminternal_GHCziInternalziWord_W16zh_con_info))
|
|
134 | -#define W32zh_con_info (&(ghczminternal_GHCziInternalziWord_W32zh_con_info))
|
|
135 | -#define W64zh_con_info (&(ghczminternal_GHCziInternalziWord_W64zh_con_info))
|
|
136 | -#define I8zh_con_info (&(ghczminternal_GHCziInternalziInt_I8zh_con_info))
|
|
137 | -#define I16zh_con_info (&(ghczminternal_GHCziInternalziInt_I16zh_con_info))
|
|
138 | -#define I32zh_con_info (&(ghczminternal_GHCziInternalziInt_I32zh_con_info))
|
|
139 | -#define I64zh_con_info (&(ghczminternal_GHCziInternalziInt_I64zh_con_info))
|
|
140 | -#define I64zh_con_info (&(ghczminternal_GHCziInternalziInt_I64zh_con_info))
|
|
141 | -#define Ptr_con_info (&(ghczminternal_GHCziInternalziPtr_Ptr_con_info))
|
|
142 | -#define FunPtr_con_info (&(ghczminternal_GHCziInternalziPtr_FunPtr_con_info))
|
|
143 | -#define StablePtr_static_info (&(ghczminternal_GHCziInternalziStable_StablePtr_static_info))
|
|
144 | -#define StablePtr_con_info (&(ghczminternal_GHCziInternalziStable_StablePtr_con_info)) |
|
48 | +#define runAllocationLimitHandler_closure ghc_hs_iface->runAllocationLimitHandler_closure
|
|
49 | + |
|
50 | +#define flushStdHandles_closure ghc_hs_iface->flushStdHandles_closure
|
|
51 | +#define runMainIO_closure ghc_hs_iface->runMainIO_closure
|
|
52 | + |
|
53 | +#define stackOverflow_closure ghc_hs_iface->stackOverflow_closure
|
|
54 | +#define heapOverflow_closure ghc_hs_iface->heapOverflow_closure
|
|
55 | +#define allocationLimitExceeded_closure ghc_hs_iface->allocationLimitExceeded_closure
|
|
56 | +#define blockedIndefinitelyOnMVar_closure ghc_hs_iface->blockedIndefinitelyOnMVar_closure
|
|
57 | +#define blockedIndefinitelyOnSTM_closure ghc_hs_iface->blockedIndefinitelyOnSTM_closure
|
|
58 | +#define cannotCompactFunction_closure ghc_hs_iface->cannotCompactFunction_closure
|
|
59 | +#define cannotCompactPinned_closure ghc_hs_iface->cannotCompactPinned_closure
|
|
60 | +#define cannotCompactMutable_closure ghc_hs_iface->cannotCompactMutable_closure
|
|
61 | +#define nonTermination_closure ghc_hs_iface->nonTermination_closure
|
|
62 | +#define nestedAtomically_closure ghc_hs_iface->nestedAtomically_closure
|
|
63 | +#define absentSumFieldError_closure ghc_hs_iface->absentSumFieldError_closure
|
|
64 | +#define underflowException_closure ghc_hs_iface->underflowException_closure
|
|
65 | +#define overflowException_closure ghc_hs_iface->overflowException_closure
|
|
66 | +#define divZeroException_closure ghc_hs_iface->divZZeroException_closure
|
|
67 | + |
|
68 | +#define blockedOnBadFD_closure ghc_hs_iface->blockedOnBadFD_closure
|
|
69 | + |
|
70 | +#define Czh_con_info ghc_hs_iface->Czh_con_info
|
|
71 | +#define Izh_con_info ghc_hs_iface->Izh_con_info
|
|
72 | +#define Fzh_con_info ghc_hs_iface->Fzh_con_info
|
|
73 | +#define Dzh_con_info ghc_hs_iface->Dzh_con_info
|
|
74 | +#define Wzh_con_info ghc_hs_iface->Wzh_con_info
|
|
75 | +#define W8zh_con_info ghc_hs_iface->W8zh_con_info
|
|
76 | +#define W16zh_con_info ghc_hs_iface->W16zh_con_info
|
|
77 | +#define W32zh_con_info ghc_hs_iface->W32zh_con_info
|
|
78 | +#define W64zh_con_info ghc_hs_iface->W64zh_con_info
|
|
79 | +#define I8zh_con_info ghc_hs_iface->I8zh_con_info
|
|
80 | +#define I16zh_con_info ghc_hs_iface->I16zh_con_info
|
|
81 | +#define I32zh_con_info ghc_hs_iface->I32zh_con_info
|
|
82 | +#define I64zh_con_info ghc_hs_iface->I64zh_con_info
|
|
83 | +#define I64zh_con_info ghc_hs_iface->I64zh_con_info
|
|
84 | +#define Ptr_con_info ghc_hs_iface->Ptr_con_info
|
|
85 | +#define FunPtr_con_info ghc_hs_iface->FunPtr_con_info
|
|
86 | +#define StablePtr_static_info ghc_hs_iface->StablePtr_static_info
|
|
87 | +#define StablePtr_con_info ghc_hs_iface->StablePtr_con_info |
... | ... | @@ -25,12 +25,8 @@ |
25 | 25 | #include "MachDeps.h"
|
26 | 26 | #include "SMPClosureOps.h"
|
27 | 27 | |
28 | -import CLOSURE ghczminternal_GHCziInternalziControlziExceptionziBase_nestedAtomically_closure;
|
|
29 | -import CLOSURE ghczminternal_GHCziInternalziIOziException_heapOverflow_closure;
|
|
30 | -import CLOSURE ghczminternal_GHCziInternalziIOziException_blockedIndefinitelyOnMVar_closure;
|
|
31 | 28 | import AcquireSRWLockExclusive;
|
32 | 29 | import ReleaseSRWLockExclusive;
|
33 | -import CLOSURE ghczminternal_GHCziInternalziTypes_False_closure;
|
|
34 | 30 | #if defined(PROFILING)
|
35 | 31 | import CLOSURE CCS_MAIN;
|
36 | 32 | #endif
|
... | ... | @@ -118,7 +114,7 @@ stg_newByteArrayzh ( W_ n ) |
118 | 114 | |
119 | 115 | ("ptr" p) = ccall allocateArrBytes(MyCapability() "ptr", n, CCCS);
|
120 | 116 | if (p == NULL) (likely: False) {
|
121 | - jump stg_raisezh(ghczminternal_GHCziInternalziIOziException_heapOverflow_closure);
|
|
117 | + jump stg_raisezh(HsIface_heapOverflow_closure(W_[ghc_hs_iface]));
|
|
122 | 118 | }
|
123 | 119 | return (p);
|
124 | 120 | }
|
... | ... | @@ -135,7 +131,7 @@ stg_newPinnedByteArrayzh ( W_ n ) |
135 | 131 | ("ptr" p) = ccall allocateArrBytesPinned(MyCapability() "ptr", n,
|
136 | 132 | BA_ALIGN, CCCS);
|
137 | 133 | if (p == NULL) (likely: False) {
|
138 | - jump stg_raisezh(ghczminternal_GHCziInternalziIOziException_heapOverflow_closure);
|
|
134 | + jump stg_raisezh(HsIface_heapOverflow_closure(W_[ghc_hs_iface]));
|
|
139 | 135 | }
|
140 | 136 | return (p);
|
141 | 137 | }
|
... | ... | @@ -149,7 +145,7 @@ stg_newAlignedPinnedByteArrayzh ( W_ n, W_ alignment ) |
149 | 145 | ("ptr" p) = ccall allocateArrBytesPinned(MyCapability() "ptr", n,
|
150 | 146 | alignment, CCCS);
|
151 | 147 | if (p == NULL) (likely: False) {
|
152 | - jump stg_raisezh(ghczminternal_GHCziInternalziIOziException_heapOverflow_closure);
|
|
148 | + jump stg_raisezh(HsIface_heapOverflow_closure(W_[ghc_hs_iface]));
|
|
153 | 149 | }
|
154 | 150 | return (p);
|
155 | 151 | }
|
... | ... | @@ -364,7 +360,7 @@ stg_newArrayzh ( W_ n /* words */, gcptr init ) |
364 | 360 | |
365 | 361 | ("ptr" arr) = ccall allocateMutArrPtrs(MyCapability() "ptr", n, CCCS);
|
366 | 362 | if (arr == NULL) (likely: False) {
|
367 | - jump stg_raisezh(ghczminternal_GHCziInternalziIOziException_heapOverflow_closure);
|
|
363 | + jump stg_raisezh(HsIface_heapOverflow_closure(W_[ghc_hs_iface]));
|
|
368 | 364 | }
|
369 | 365 | |
370 | 366 | // Initialise all elements of the array with the value init
|
... | ... | @@ -474,7 +470,7 @@ stg_newSmallArrayzh ( W_ n /* words */, gcptr init ) |
474 | 470 | |
475 | 471 | ("ptr" arr) = ccall allocateSmallMutArrPtrs(MyCapability() "ptr", n, CCCS);
|
476 | 472 | if (arr == NULL) (likely: False) {
|
477 | - jump stg_raisezh(ghczminternal_GHCziInternalziIOziException_heapOverflow_closure);
|
|
473 | + jump stg_raisezh(HsIface_heapOverflow_closure(W_[ghc_hs_iface]));
|
|
478 | 474 | }
|
479 | 475 | |
480 | 476 | // Initialise all elements of the array with the value init
|
... | ... | @@ -1090,7 +1086,7 @@ stg_listThreadszh () |
1090 | 1086 | ("ptr" arr) = ccall listThreads(MyCapability() "ptr");
|
1091 | 1087 | |
1092 | 1088 | if (arr == NULL) (likely: False) {
|
1093 | - jump stg_raisezh(ghczminternal_GHCziInternalziIOziException_heapOverflow_closure);
|
|
1089 | + jump stg_raisezh(HsIface_heapOverflow_closure(W_[ghc_hs_iface]));
|
|
1094 | 1090 | }
|
1095 | 1091 | |
1096 | 1092 | return (arr);
|
... | ... | @@ -1360,7 +1356,7 @@ stg_atomicallyzh (P_ stm) |
1360 | 1356 | |
1361 | 1357 | /* Nested transactions are not allowed; raise an exception */
|
1362 | 1358 | if (old_trec != NO_TREC) (likely: False) {
|
1363 | - jump stg_raisezh(ghczminternal_GHCziInternalziControlziExceptionziBase_nestedAtomically_closure);
|
|
1359 | + jump stg_raisezh(HsIface_nestedAtomically_closure(W_[ghc_hs_iface]));
|
|
1364 | 1360 | }
|
1365 | 1361 | |
1366 | 1362 | code = stm;
|
... | ... | @@ -2231,7 +2227,7 @@ stg_unpackClosurezh ( P_ closure ) |
2231 | 2227 | dat_arr_sz = SIZEOF_StgArrBytes + WDS(len);
|
2232 | 2228 | ("ptr" dat_arr) = ccall allocateMightFail(MyCapability() "ptr", BYTES_TO_WDS(dat_arr_sz));
|
2233 | 2229 | if (dat_arr == NULL) (likely: False) {
|
2234 | - jump stg_raisezh(ghczminternal_GHCziInternalziIOziException_heapOverflow_closure);
|
|
2230 | + jump stg_raisezh(HsIface_heapOverflow_closure(W_[ghc_hs_iface]));
|
|
2235 | 2231 | }
|
2236 | 2232 | TICK_ALLOC_PRIM(SIZEOF_StgArrBytes, WDS(len), 0);
|
2237 | 2233 | |
... | ... | @@ -2251,7 +2247,7 @@ for: |
2251 | 2247 | ("ptr" ptrArray) = foreign "C" heap_view_closurePtrs(MyCapability() "ptr", clos "ptr");
|
2252 | 2248 | |
2253 | 2249 | if (ptrArray == NULL) (likely: False) {
|
2254 | - jump stg_raisezh(ghczminternal_GHCziInternalziIOziException_heapOverflow_closure);
|
|
2250 | + jump stg_raisezh(HsIface_heapOverflow_closure(W_[ghc_hs_iface]));
|
|
2255 | 2251 | }
|
2256 | 2252 | |
2257 | 2253 | return (info, dat_arr, ptrArray);
|
... | ... | @@ -2518,13 +2514,13 @@ stg_getSparkzh () |
2518 | 2514 | W_ spark;
|
2519 | 2515 | |
2520 | 2516 | #if !defined(THREADED_RTS)
|
2521 | - return (0,ghczminternal_GHCziInternalziTypes_False_closure);
|
|
2517 | + return (0,HsIface_False_closure(W_[ghc_hs_iface]));
|
|
2522 | 2518 | #else
|
2523 | 2519 | ("ptr" spark) = ccall findSpark(MyCapability() "ptr");
|
2524 | 2520 | if (spark != 0) {
|
2525 | 2521 | return (1,spark);
|
2526 | 2522 | } else {
|
2527 | - return (0,ghczminternal_GHCziInternalziTypes_False_closure);
|
|
2523 | + return (0,HsIface_False_closure(W_[ghc_hs_iface]));
|
|
2528 | 2524 | }
|
2529 | 2525 | #endif
|
2530 | 2526 | }
|
... | ... | @@ -509,7 +509,7 @@ void rts_evalStableIOMain(/* inout */ Capability **cap, |
509 | 509 | SchedulerStatus stat;
|
510 | 510 | |
511 | 511 | p = (StgClosure *)deRefStablePtr(s);
|
512 | - w = rts_apply(*cap, &ghczminternal_GHCziInternalziTopHandler_runMainIO_closure, p);
|
|
512 | + w = rts_apply(*cap, runMainIO_closure, p);
|
|
513 | 513 | tso = createStrictIOThread(*cap, RtsFlags.GcFlags.initialStkSize, w);
|
514 | 514 | // async exceptions are always blocked by default in the created
|
515 | 515 | // thread. See #1048.
|
... | ... | @@ -961,7 +961,7 @@ void rts_done (void) |
961 | 961 | void hs_try_putmvar (/* in */ int capability,
|
962 | 962 | /* in */ HsStablePtr mvar)
|
963 | 963 | {
|
964 | - hs_try_putmvar_with_value(capability, mvar, TAG_CLOSURE(1, Unit_closure));
|
|
964 | + hs_try_putmvar_with_value(capability, mvar, TAG_CLOSURE(1, ghc_hs_iface->Z0T_closure));
|
|
965 | 965 | }
|
966 | 966 | |
967 | 967 | void hs_try_putmvar_with_value (/* in */ int capability,
|
... | ... | @@ -183,8 +183,8 @@ static void initBuiltinGcRoots(void) |
183 | 183 | * these closures `Id`s of these can be safely marked as non-CAFFY
|
184 | 184 | * in the compiler.
|
185 | 185 | */
|
186 | - getStablePtr((StgPtr)runIO_closure);
|
|
187 | - getStablePtr((StgPtr)runNonIO_closure);
|
|
186 | + getStablePtr((StgPtr)ghc_hs_iface->runIO_closure);
|
|
187 | + getStablePtr((StgPtr)ghc_hs_iface->runNonIO_closure);
|
|
188 | 188 | getStablePtr((StgPtr)flushStdHandles_closure);
|
189 | 189 | |
190 | 190 | getStablePtr((StgPtr)runFinalizerBatch_closure);
|
... | ... | @@ -263,6 +263,11 @@ hs_init_ghc(int *argc, char **argv[], RtsConfig rts_config) |
263 | 263 | |
264 | 264 | setlocale(LC_CTYPE,"");
|
265 | 265 | |
266 | + if (ghc_hs_iface == NULL) {
|
|
267 | + errorBelch("hs_init_ghc: ghc_hs_iface is uninitialized");
|
|
268 | + stg_exit(1);
|
|
269 | + }
|
|
270 | + |
|
266 | 271 | /* Initialise the stats department, phase 0 */
|
267 | 272 | initStats0();
|
268 | 273 |
... | ... | @@ -464,6 +464,7 @@ extern char **environ; |
464 | 464 | RTS_PROF_SYMBOLS \
|
465 | 465 | RTS_LIBDW_SYMBOLS \
|
466 | 466 | SymI_HasProto(StgReturn) \
|
467 | + SymI_HasDataProto(ghc_hs_iface) \
|
|
467 | 468 | SymI_HasDataProto(stg_gc_noregs) \
|
468 | 469 | SymI_HasDataProto(stg_ret_v_info) \
|
469 | 470 | SymI_HasDataProto(stg_ret_p_info) \
|
1 | +/*
|
|
2 | + * (c) The GHC Team, 2025-2026
|
|
3 | + *
|
|
4 | + * RTS/ghc-internal interface
|
|
5 | + *
|
|
6 | + *
|
|
7 | + * Note [RTS/ghc-internal interface]
|
|
8 | + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
9 | + *
|
|
10 | + * The runtime system depends upon a variety of symbols defined by Haskell
|
|
11 | + * modules living in `ghc-internal`. To avoid cyclic dependencies between
|
|
12 | + * ghc-internal and the RTS, these symbols are referenced indirectly via the
|
|
13 | + * the `HsIface` structure (specifically `ghc_hs_iface`):
|
|
14 | + *
|
|
15 | + * struct HsIface {
|
|
16 | + * StgClosure *runIO; // GHC.Internal.TopHandler.runIO
|
|
17 | + * StgClosure *Z0T; // GHC.Internal.Tuple.()
|
|
18 | + * // etc.
|
|
19 | + * };
|
|
20 | + *
|
|
21 | + * `ghc_hs_iface` is initialized during program loading via the
|
|
22 | + * `init_ghc_hs_iface` constructor in `ghc-interface`
|
|
23 | + *
|
|
24 | + * const struct HsIface the_hs_iface = {
|
|
25 | + * .runIO = &ghczminternal_GHCziInternalziTopHandler_runIO_closure,
|
|
26 | + * .Z0T = &ghczminternal_GHCziInternalziTuple_Z0T_closure,
|
|
27 | + * // etc.
|
|
28 | + * };
|
|
29 | + *
|
|
30 | + * void __attribute__((constructor)) init_ghc_hs_iface() {
|
|
31 | + * ghc_hs_iface = &the_hs_iface;
|
|
32 | + * }
|
|
33 | + *
|
|
34 | + * This effectively breaks the RTS's link-time dependency, replacing it with a
|
|
35 | + * run-time dependency at the cost of an indirection. It also has the pleasant
|
|
36 | + * side-effect of making the interface between the RTS and `ghc-internal`
|
|
37 | + * explicit.
|
|
38 | + *
|
|
39 | + * Note that the constructor is explicitly listed in `ld-options` of
|
|
40 | + * `ghc-internal.cabal` since we need to ensure that it is included
|
|
41 | + * in the final link, even when we link against `ghc-internal.a` (as
|
|
42 | + * only objects members which provide undefined symbols are included
|
|
43 | + * in the final object).
|
|
44 | + *
|
|
45 | + */
|
|
46 | + |
|
47 | +#include "Rts.h"
|
|
48 | + |
|
49 | +// This captures the symbols provided by ghc-internal which
|
|
50 | +// are needed by the RTS.
|
|
51 | +const HsIface *ghc_hs_iface = NULL; |
... | ... | @@ -1053,7 +1053,7 @@ scheduleProcessInbox (Capability **pcap USED_IF_THREADS) |
1053 | 1053 | while (p != NULL) {
|
1054 | 1054 | pnext = p->link;
|
1055 | 1055 | performTryPutMVar(cap, (StgMVar*)deRefStablePtr(p->mvar),
|
1056 | - Unit_closure);
|
|
1056 | + ghc_hs_iface->Z0T_closure);
|
|
1057 | 1057 | freeStablePtr(p->mvar);
|
1058 | 1058 | stgFree(p);
|
1059 | 1059 | p = pnext;
|
... | ... | @@ -13,8 +13,6 @@ |
13 | 13 | #include "Cmm.h"
|
14 | 14 | #include "Updates.h"
|
15 | 15 | |
16 | -import CLOSURE ghczminternal_GHCziInternalziCString_unpackCStringzh_info;
|
|
17 | -import CLOSURE ghczminternal_GHCziInternalziCString_unpackCStringUtf8zh_info;
|
|
18 | 16 | #if !defined(UnregisterisedCompiler)
|
19 | 17 | import CLOSURE STK_CHK_ctr;
|
20 | 18 | import CLOSURE stg_bh_upd_frame_info;
|
... | ... | @@ -348,7 +346,7 @@ stg_do_unpack_cstring(P_ node, P_ newCAF_ret) { |
348 | 346 | W_ str;
|
349 | 347 | str = StgThunk_payload(node, 2);
|
350 | 348 | push (UPDATE_FRAME_FIELDS(,,stg_bh_upd_frame_info, CCCS, 0, newCAF_ret)) {
|
351 | - jump %ENTRY_CODE(ghczminternal_GHCziInternalziCString_unpackCStringzh_info)(node, str);
|
|
349 | + jump %ENTRY_CODE(HsIface_unpackCStringzh_info(W_[ghc_hs_iface]))(node, str);
|
|
352 | 350 | }
|
353 | 351 | }
|
354 | 352 | |
... | ... | @@ -372,7 +370,7 @@ stg_do_unpack_cstring_utf8(P_ node, P_ newCAF_ret) { |
372 | 370 | W_ str;
|
373 | 371 | str = StgThunk_payload(node, 2);
|
374 | 372 | push (UPDATE_FRAME_FIELDS(,,stg_bh_upd_frame_info, CCCS, 0, newCAF_ret)) {
|
375 | - jump %ENTRY_CODE(ghczminternal_GHCziInternalziCString_unpackCStringUtf8zh_info)(node, str);
|
|
373 | + jump %ENTRY_CODE(HsIface_unpackCStringUtf8zh_info(W_[ghc_hs_iface]))(node, str);
|
|
376 | 374 | }
|
377 | 375 | }
|
378 | 376 |
... | ... | @@ -229,6 +229,7 @@ void _warnFail(const char *filename, unsigned int linenum); |
229 | 229 | #include "rts/storage/ClosureTypes.h"
|
230 | 230 | #include "rts/storage/TSO.h"
|
231 | 231 | #include "stg/MiscClosures.h" /* InfoTables, closures etc. defined in the RTS */
|
232 | + |
|
232 | 233 | #include "rts/storage/Block.h"
|
233 | 234 | #include "rts/storage/ClosureMacros.h"
|
234 | 235 | #include "rts/storage/MBlock.h"
|
... | ... | @@ -18,6 +18,7 @@ extern "C" { |
18 | 18 | #include "HsFFI.h"
|
19 | 19 | #include "rts/Time.h"
|
20 | 20 | #include "rts/Types.h"
|
21 | +#include "rts/RtsToHsIface.h"
|
|
21 | 22 | |
22 | 23 | /*
|
23 | 24 | * Running the scheduler
|
... | ... | @@ -584,11 +585,6 @@ void rts_done (void); |
584 | 585 | // Note that RtsAPI.h is also included by foreign export stubs in
|
585 | 586 | // the base package itself.
|
586 | 587 | //
|
587 | -extern StgClosure ghczminternal_GHCziInternalziTopHandler_runIO_closure;
|
|
588 | -extern StgClosure ghczminternal_GHCziInternalziTopHandler_runNonIO_closure;
|
|
589 | - |
|
590 | -#define runIO_closure (&(ghczminternal_GHCziInternalziTopHandler_runIO_closure))
|
|
591 | -#define runNonIO_closure (&(ghczminternal_GHCziInternalziTopHandler_runNonIO_closure))
|
|
592 | 588 | |
593 | 589 | /* ------------------------------------------------------------------------ */
|
594 | 590 |
1 | +/*
|
|
2 | + * (c) The GHC Team, 2025-2026
|
|
3 | + *
|
|
4 | + * RTS/ghc-internal interface
|
|
5 | + *
|
|
6 | + * See Note [RTS/ghc-internal interface].
|
|
7 | + */
|
|
8 | + |
|
9 | +typedef struct {
|
|
10 | + StgClosure *processRemoteCompletion_closure; // GHC.Internal.Event.Windows.processRemoteCompletion_closure
|
|
11 | + StgClosure *runIO_closure; // GHC.Internal.TopHandler.runIO_closure
|
|
12 | + StgClosure *runNonIO_closure; // GHC.Internal.TopHandler.runNonIO_closure
|
|
13 | + StgClosure *Z0T_closure; // GHC.Internal.Tuple.Z0T_closure
|
|
14 | + StgClosure *True_closure; // GHC.Internal.Types.True_closure
|
|
15 | + StgClosure *False_closure; // GHC.Internal.Types.False_closure
|
|
16 | + StgClosure *unpackCString_closure; // GHC.Internal.Pack.unpackCString_closure
|
|
17 | + StgClosure *runFinalizzerBatch_closure; // GHC.Internal.Weak.Finalizze.runFinalizzerBatch_closure
|
|
18 | + StgClosure *stackOverflow_closure; // GHC.Internal.IO.Exception.stackOverflow_closure
|
|
19 | + StgClosure *heapOverflow_closure; // GHC.Internal.IO.Exception.heapOverflow_closure
|
|
20 | + StgClosure *allocationLimitExceeded_closure; // GHC.Internal.IO.Exception.allocationLimitExceeded_closure
|
|
21 | + StgClosure *blockedIndefinitelyOnMVar_closure; // GHC.Internal.IO.Exception.blockedIndefinitelyOnMVar_closure
|
|
22 | + StgClosure *blockedIndefinitelyOnSTM_closure; // GHC.Internal.IO.Exception.blockedIndefinitelyOnSTM_closure
|
|
23 | + StgClosure *cannotCompactFunction_closure; // GHC.Internal.IO.Exception.cannotCompactFunction_closure
|
|
24 | + StgClosure *cannotCompactPinned_closure; // GHC.Internal.IO.Exception.cannotCompactPinned_closure
|
|
25 | + StgClosure *cannotCompactMutable_closure; // GHC.Internal.IO.Exception.cannotCompactMutable_closure
|
|
26 | + StgClosure *nonTermination_closure; // GHC.Internal.Control.Exception.Base.nonTermination_closure
|
|
27 | + StgClosure *nestedAtomically_closure; // GHC.Internal.Control.Exception.Base.nestedAtomically_closure
|
|
28 | + StgClosure *noMatchingContinuationPrompt_closure; // GHC.Internal.Control.Exception.Base.noMatchingContinuationPrompt_closure
|
|
29 | + StgClosure *blockedOnBadFD_closure; // GHC.Internal.Event.Thread.blockedOnBadFD_closure
|
|
30 | + StgClosure *runSparks_closure; // GHC.Internal.Conc.Sync.runSparks_closure
|
|
31 | + StgClosure *ensureIOManagerIsRunning_closure; // GHC.Internal.Conc.IO.ensureIOManagerIsRunning_closure
|
|
32 | + StgClosure *interruptIOManager_closure; // GHC.Internal.Conc.IO.interruptIOManager_closure
|
|
33 | + StgClosure *ioManagerCapabilitiesChanged_closure; // GHC.Internal.Conc.IO.ioManagerCapabilitiesChanged_closure
|
|
34 | + StgClosure *runHandlersPtr_closure; // GHC.Internal.Conc.Signal.runHandlersPtr_closure
|
|
35 | + StgClosure *flushStdHandles_closure; // GHC.Internal.TopHandler.flushStdHandles_closure
|
|
36 | + StgClosure *runMainIO_closure; // GHC.Internal.TopHandler.runMainIO_closure
|
|
37 | + StgInfoTable *Czh_con_info; // GHC.Internal.Types.Czh_con_info
|
|
38 | + StgInfoTable *Izh_con_info; // GHC.Internal.Types.Izh_con_info
|
|
39 | + StgInfoTable *Fzh_con_info; // GHC.Internal.Types.Fzh_con_info
|
|
40 | + StgInfoTable *Dzh_con_info; // GHC.Internal.Types.Dzh_con_info
|
|
41 | + StgInfoTable *Wzh_con_info; // GHC.Internal.Types.Wzh_con_info
|
|
42 | + StgClosure *absentSumFieldError_closure; // GHC.Internal.Prim.Panic.absentSumFieldError_closure
|
|
43 | + StgClosure *runAllocationLimitHandler_closure; // GHC.Internal.AllocationLimitHandler.runAllocationLimitHandler_closure
|
|
44 | + StgInfoTable *Ptr_con_info; // GHC.Internal.Ptr.Ptr_con_info
|
|
45 | + StgInfoTable *FunPtr_con_info; // GHC.Internal.Ptr.FunPtr_con_info
|
|
46 | + StgInfoTable *I8zh_con_info; // GHC.Internal.Int.I8zh_con_info
|
|
47 | + StgInfoTable *I16zh_con_info; // GHC.Internal.Int.I16zh_con_info
|
|
48 | + StgInfoTable *I32zh_con_info; // GHC.Internal.Int.I32zh_con_info
|
|
49 | + StgInfoTable *I64zh_con_info; // GHC.Internal.Int.I64zh_con_info
|
|
50 | + StgInfoTable *W8zh_con_info; // GHC.Internal.Word.W8zh_con_info
|
|
51 | + StgInfoTable *W16zh_con_info; // GHC.Internal.Word.W16zh_con_info
|
|
52 | + StgInfoTable *W32zh_con_info; // GHC.Internal.Word.W32zh_con_info
|
|
53 | + StgInfoTable *W64zh_con_info; // GHC.Internal.Word.W64zh_con_info
|
|
54 | + StgInfoTable *StablePtr_con_info; // GHC.Internal.Stable.StablePtr_con_info
|
|
55 | + StgClosure *StackSnapshot_closure; // GHC.Internal.Stack.CloneStack.StackSnapshot_closure
|
|
56 | + StgClosure *divZZeroException_closure; // GHC.Internal.Exception.Type.divZeroException_closure
|
|
57 | + StgClosure *underflowException_closure; // GHC.Internal.Exception.Type.underflowException_closure
|
|
58 | + StgClosure *overflowException_closure; // GHC.Internal.Exception.Type.overflowException_closure
|
|
59 | + StgClosure *unpackCStringzh_closure; // GHC.Internal.CString.unpackCStringzh_closure
|
|
60 | + StgInfoTable *unpackCStringzh_info; // GHC.Internal.CString.unpackCStringzh_info
|
|
61 | + StgInfoTable *unpackCStringUtf8zh_info; // GHC.Internal.CString.unpackCStringUtf8zh_info
|
|
62 | + StgClosure *raiseJSException_closure; // GHC.Internal.Wasm.Prim.Imports.raiseJSException_closure
|
|
63 | + StgClosure *JSVal_con_info; // GHC.Internal.Wasm.Prim.JSVal_con_info
|
|
64 | + StgClosure *threadDelay_closure; // GHC.Internal.Wasm.Prim.threadDelay_closure
|
|
65 | +} HsIface;
|
|
66 | + |
|
67 | +extern const HsIface *ghc_hs_iface; |
... | ... | @@ -222,7 +222,7 @@ ioManagerDie (void) |
222 | 222 | void
|
223 | 223 | ioManagerStartCap (Capability **cap)
|
224 | 224 | {
|
225 | - rts_evalIO(cap,&ghczminternal_GHCziInternalziConcziIO_ensureIOManagerIsRunning_closure,NULL);
|
|
225 | + rts_evalIO(cap,ensureIOManagerIsRunning_closure,NULL);
|
|
226 | 226 | }
|
227 | 227 | |
228 | 228 | void
|
... | ... | @@ -493,7 +493,7 @@ startSignalHandlers(Capability *cap) |
493 | 493 | RtsFlags.GcFlags.initialStkSize,
|
494 | 494 | rts_apply(cap,
|
495 | 495 | rts_apply(cap,
|
496 | - &ghczminternal_GHCziInternalziConcziSignal_runHandlersPtr_closure,
|
|
496 | + runHandlersPtr_closure,
|
|
497 | 497 | rts_mkPtr(cap, info)),
|
498 | 498 | rts_mkInt(cap, info->si_signo)));
|
499 | 499 | scheduleThread(cap, t);
|
... | ... | @@ -334,6 +334,7 @@ library |
334 | 334 | rts/storage/InfoTables.h
|
335 | 335 | rts/storage/MBlock.h
|
336 | 336 | rts/storage/TSO.h
|
337 | + rts/RtsToHsIface.h
|
|
337 | 338 | stg/MachRegs.h
|
338 | 339 | stg/MachRegs/arm32.h
|
339 | 340 | stg/MachRegs/arm64.h
|
... | ... | @@ -449,6 +450,7 @@ library |
449 | 450 | RtsStartup.c
|
450 | 451 | RtsSymbolInfo.c
|
451 | 452 | RtsSymbols.c
|
453 | + RtsToHsIface.c
|
|
452 | 454 | RtsUtils.c
|
453 | 455 | STM.c
|
454 | 456 | Schedule.c
|
... | ... | @@ -23,8 +23,8 @@ int __main_argc_argv(int argc, char *argv[]) { |
23 | 23 | hs_init_ghc(&argc, &argv, __conf);
|
24 | 24 | // See Note [threadDelay on wasm] for details.
|
25 | 25 | rts_JSFFI_flag = HS_BOOL_TRUE;
|
26 | - getStablePtr((StgPtr)&ghczminternal_GHCziInternalziWasmziPrimziImports_raiseJSException_closure);
|
|
27 | - rts_threadDelay_impl = getStablePtr((StgPtr)&ghczminternal_GHCziInternalziWasmziPrimziConcziInternal_threadDelay_closure);
|
|
26 | + getStablePtr((StgPtr)ghc_hs_iface->raiseJSException_closure);
|
|
27 | + rts_threadDelay_impl = getStablePtr((StgPtr)ghc_hs_iface->threadDelay_closure);
|
|
28 | 28 | return 0;
|
29 | 29 | }
|
30 | 30 | |
... | ... | @@ -112,7 +112,7 @@ HaskellObj rts_mkJSVal(Capability *cap, HsJSVal v) { |
112 | 112 | SET_HDR(w, &stg_WEAK_info, CCS_SYSTEM);
|
113 | 113 | w->cfinalizers = (StgClosure *)cfin;
|
114 | 114 | w->key = p;
|
115 | - w->value = Unit_closure;
|
|
115 | + w->value = ghc_hs_iface->Z0T_closure;
|
|
116 | 116 | w->finalizer = &stg_NO_FINALIZER_closure;
|
117 | 117 | w->link = cap->weak_ptr_list_hd;
|
118 | 118 | cap->weak_ptr_list_hd = w;
|
... | ... | @@ -123,7 +123,7 @@ HaskellObj rts_mkJSVal(Capability *cap, HsJSVal v) { |
123 | 123 | p->payload[0] = (HaskellObj)w;
|
124 | 124 | |
125 | 125 | HaskellObj box = (HaskellObj)allocate(cap, CONSTR_sizeW(1, 0));
|
126 | - SET_HDR(box, &ghczminternal_GHCziInternalziWasmziPrimziTypes_JSVal_con_info, CCS_SYSTEM);
|
|
126 | + SET_HDR(box, ghc_hs_iface->JSVal_con_info, CCS_SYSTEM);
|
|
127 | 127 | box->payload[0] = p;
|
128 | 128 | |
129 | 129 | return TAG_CLOSURE(1, box);
|
... | ... | @@ -139,7 +139,7 @@ STATIC_INLINE HsJSVal rts_getJSValzh(HaskellObj p) { |
139 | 139 | |
140 | 140 | HsJSVal rts_getJSVal(HaskellObj);
|
141 | 141 | HsJSVal rts_getJSVal(HaskellObj box) {
|
142 | - ASSERT(UNTAG_CLOSURE(box)->header.info == &ghczminternal_GHCziInternalziWasmziPrimziTypes_JSVal_con_info);
|
|
142 | + ASSERT(UNTAG_CLOSURE(box)->header.info == ghc_hs_iface->JSVal_con_info);
|
|
143 | 143 | return rts_getJSValzh(UNTAG_CLOSURE(box)->payload[0]);
|
144 | 144 | }
|
145 | 145 | |
... | ... | @@ -188,7 +188,7 @@ void rts_schedulerLoop(void) { |
188 | 188 | __attribute__((export_name("rts_promiseResolveUnit")))
|
189 | 189 | void rts_promiseResolveUnit(HsStablePtr);
|
190 | 190 | void rts_promiseResolveUnit(HsStablePtr sp)
|
191 | - mk_rtsPromiseCallback(TAG_CLOSURE(1, Unit_closure))
|
|
191 | + mk_rtsPromiseCallback(TAG_CLOSURE(1, ghc_hs_iface->Z0T_closure))
|
|
192 | 192 | |
193 | 193 | mk_rtsPromiseResolve(JSVal)
|
194 | 194 | mk_rtsPromiseResolve(Char)
|
... | ... | @@ -212,7 +212,7 @@ mk_rtsPromiseResolve(Bool) |
212 | 212 | __attribute__((export_name("rts_promiseReject")))
|
213 | 213 | void rts_promiseReject(HsStablePtr, HsJSVal);
|
214 | 214 | void rts_promiseReject(HsStablePtr sp, HsJSVal js_err)
|
215 | - mk_rtsPromiseCallback(rts_apply(cap, &ghczminternal_GHCziInternalziWasmziPrimziImports_raiseJSException_closure, rts_mkJSVal(cap, js_err)))
|
|
215 | + mk_rtsPromiseCallback(rts_apply(cap, ghc_hs_iface->raiseJSException_closure, rts_mkJSVal(cap, js_err)))
|
|
216 | 216 | |
217 | 217 | __attribute__((export_name("rts_promiseThrowTo")))
|
218 | 218 | void rts_promiseThrowTo(HsStablePtr, HsJSVal);
|
... | ... | @@ -229,7 +229,7 @@ void rts_promiseThrowTo(HsStablePtr sp, HsJSVal js_err) { |
229 | 229 | cap, tso,
|
230 | 230 | rts_apply(
|
231 | 231 | cap,
|
232 | - &ghczminternal_GHCziInternalziWasmziPrimziImports_raiseJSException_closure,
|
|
232 | + ghc_hs_iface->raiseJSException_closure,
|
|
233 | 233 | rts_mkJSVal(cap, js_err)));
|
234 | 234 | tryWakeupThread(cap, tso);
|
235 | 235 | rts_schedulerLoop();
|
... | ... | @@ -667,6 +667,59 @@ wanteds os = concat |
667 | 667 | ,structField C "StgAsyncIOResult" "errCode"]
|
668 | 668 | else []
|
669 | 669 | |
670 | + -- struct HsIface
|
|
671 | + ,structField C "HsIface" "processRemoteCompletion_closure"
|
|
672 | + ,structField C "HsIface" "runIO_closure"
|
|
673 | + ,structField C "HsIface" "runNonIO_closure"
|
|
674 | + ,structField C "HsIface" "Z0T_closure"
|
|
675 | + ,structField C "HsIface" "True_closure"
|
|
676 | + ,structField C "HsIface" "False_closure"
|
|
677 | + ,structField C "HsIface" "unpackCString_closure"
|
|
678 | + ,structField C "HsIface" "runFinalizzerBatch_closure"
|
|
679 | + ,structField C "HsIface" "stackOverflow_closure"
|
|
680 | + ,structField C "HsIface" "heapOverflow_closure"
|
|
681 | + ,structField C "HsIface" "allocationLimitExceeded_closure"
|
|
682 | + ,structField C "HsIface" "blockedIndefinitelyOnMVar_closure"
|
|
683 | + ,structField C "HsIface" "blockedIndefinitelyOnSTM_closure"
|
|
684 | + ,structField C "HsIface" "cannotCompactFunction_closure"
|
|
685 | + ,structField C "HsIface" "cannotCompactPinned_closure"
|
|
686 | + ,structField C "HsIface" "cannotCompactMutable_closure"
|
|
687 | + ,structField C "HsIface" "nonTermination_closure"
|
|
688 | + ,structField C "HsIface" "nestedAtomically_closure"
|
|
689 | + ,structField C "HsIface" "noMatchingContinuationPrompt_closure"
|
|
690 | + ,structField C "HsIface" "blockedOnBadFD_closure"
|
|
691 | + ,structField C "HsIface" "runSparks_closure"
|
|
692 | + ,structField C "HsIface" "ensureIOManagerIsRunning_closure"
|
|
693 | + ,structField C "HsIface" "interruptIOManager_closure"
|
|
694 | + ,structField C "HsIface" "ioManagerCapabilitiesChanged_closure"
|
|
695 | + ,structField C "HsIface" "runHandlersPtr_closure"
|
|
696 | + ,structField C "HsIface" "flushStdHandles_closure"
|
|
697 | + ,structField C "HsIface" "runMainIO_closure"
|
|
698 | + ,structField C "HsIface" "Czh_con_info"
|
|
699 | + ,structField C "HsIface" "Izh_con_info"
|
|
700 | + ,structField C "HsIface" "Fzh_con_info"
|
|
701 | + ,structField C "HsIface" "Dzh_con_info"
|
|
702 | + ,structField C "HsIface" "Wzh_con_info"
|
|
703 | + ,structField C "HsIface" "runAllocationLimitHandler_closure"
|
|
704 | + ,structField C "HsIface" "Ptr_con_info"
|
|
705 | + ,structField C "HsIface" "FunPtr_con_info"
|
|
706 | + ,structField C "HsIface" "I8zh_con_info"
|
|
707 | + ,structField C "HsIface" "I16zh_con_info"
|
|
708 | + ,structField C "HsIface" "I32zh_con_info"
|
|
709 | + ,structField C "HsIface" "I64zh_con_info"
|
|
710 | + ,structField C "HsIface" "W8zh_con_info"
|
|
711 | + ,structField C "HsIface" "W16zh_con_info"
|
|
712 | + ,structField C "HsIface" "W32zh_con_info"
|
|
713 | + ,structField C "HsIface" "W64zh_con_info"
|
|
714 | + ,structField C "HsIface" "StablePtr_con_info"
|
|
715 | + ,structField C "HsIface" "StackSnapshot_closure"
|
|
716 | + ,structField C "HsIface" "divZZeroException_closure"
|
|
717 | + ,structField C "HsIface" "underflowException_closure"
|
|
718 | + ,structField C "HsIface" "overflowException_closure"
|
|
719 | + ,structField C "HsIface" "unpackCStringzh_closure"
|
|
720 | + ,structField C "HsIface" "unpackCStringzh_info"
|
|
721 | + ,structField C "HsIface" "unpackCStringUtf8zh_info"
|
|
722 | + |
|
670 | 723 | -- pre-compiled thunk types
|
671 | 724 | ,constantWord Haskell "MAX_SPEC_SELECTEE_SIZE" "MAX_SPEC_SELECTEE_SIZE"
|
672 | 725 | ,constantWord Haskell "MAX_SPEC_AP_SIZE" "MAX_SPEC_AP_SIZE"
|