- Oct 17, 2024
-
-
Cheng Shao authored
This commit bumps ci-image revision to use updated wasm toolchain, and use host_fully_static instead of fully_static for wasm jobs so to ensure wasm shared libraries can be properly built.
-
Cheng Shao authored
This commit adds the host_fully_static flavour transformer to hadrian, which ensures stage0 is fully statically linked while still permitting stage1 libdir to contain shared libraries. This is intended to be used by the wasm backend to build portable linux bindists that contain wasm shared libraries.
-
Cheng Shao authored
This commit re-enables --with-pic=yes configuration option of gmp when building for wasm, given we're about to include support for shared libraries, TH and ghci.
-
Cheng Shao authored
This commit adds -fvisibility=default to CFLAGS of gmp when building for wasm. This is required to generate the ghc-bignum shared library without linking errors. Clang defaults to -fvisibility=hidden for wasm targets, which will cause issues when a symbol is expected to be exported in a shared library but without explicit visibility attribute annotation.
-
Cheng Shao authored
This commit enables internal-interpreter flag for ghc-bin even when compiling stage0, as long as target supports ghci. It enables ghci functionality for cross targets that support ghci, since cross ghc-bin is really stage0.
-
Cheng Shao authored
This commit disable the internal-interpreter flag of ghc library when cross compiling, only external interpreter works in such cases.
-
Cheng Shao authored
This commit changes the hostSupportsRPaths predicate to targetSupportsRPaths and use that to decide whether to pass RPATH-related link-time options. It's not applied to stage0, we should just use the default link-time options of stageBoot ghc.
-
Cheng Shao authored
This commit fixes conflicting StgRun definition when building dynamic ways of RTS for wasm in unregisterised mode.
-
Cheng Shao authored
This commit wraps the predefined GlobalRegs in Wasm.S under a CPP guard to prevent building for PIC mode. When building dynamic ways of RTS, the wasm globals that represent STG GlobalRegs will be created and supplied by dyld.mjs. The current wasm dylink convention doesn't properly support exporting relocatable wasm globals at all, any wasm global exported by a .so is assumed to be a GOT.mem entry.
-
Cheng Shao authored
This commit drops interpretBCO support from non dynamic rts ways on wasm. The bytecode interpreter is only useful when the RTS linker also works, and on wasm it only works for dynamic ways anyway. An additional benefit of dropping interpretBCO is reduction in code size of linked wasm modules, especially since interpretBCO references ffi_call which is an auto-generated large function in libffi-wasm and unused by most user applications.
-
Cheng Shao authored
-
Cheng Shao authored
This commit wraps imported freeJSVal in a __wrapped_freeJSVal C function for wasm backend RTS. In general, wasm imports are only supposed to be directly called by C; they shouldn't be used as function pointers, which confuses wasm-ld at link-time when generating shared libraries.
-
Cheng Shao authored
This commit renames prelude.js to prelude.mjs for wasm backend rts jsbits, and slightly adjusts the jsbits contents. This is for preparing the implementation of dyld.mjs that contains wasm dynamic linker logic, which needs to import prelude.mjs as a proper ESM module.
-
Cheng Shao authored
This patch adds some missing CPP guards to ghc-internal, given those functions are non existent on wasm and would cause linking issues.
-
Cheng Shao authored
This patch avoids using mmap() to allocate executable memory for mkConInfoTable on platforms without tables-next-to-code, see added comment for explanation.
-
Cheng Shao authored
This patch mitigates a severe host/target word size mismatch issue in BCOByteArray serialization logic introduced since !12142, see added note for detailed explanation.
-
-
EPA: Remove [AddEpAnn] from HsDocTy EPA: Remove [AddEpAnn] from HsBangTy EPA: Remove [AddEpAnn] from HsExplicitListTy EPA: Remove [AddEpAnn] from HsExplicitTupleTy EPA: Remove [AddEpAnn] from HsTypedBracket EPA: Remove [AddEpAnn] from HsUntypedBracket EPA: Remove [AddEpAnn] from PatBuilderOpApp EPA: break out 'EpToken "|"' from ClassDecl anns EPA: Remove [AddEpAnn] from ClassDecl EPA: Remove [AddEpAnn] from SynDecl
-
- Oct 16, 2024
-
- Oct 15, 2024
-
-
Hassan Al-Awwadi authored
Progresses #21592 For some reason we still imported GHC.Types.Fixity when the definitino of Fixity and LexicalFixity have already been moved to Language.Haskell.Syntax.Basic. This fixes that for
-
Fixes #22033
-
-
In the main MR, -Wall now includes -Wincomplete-record-selectors. However `hadrian-multi` has many, many warnings about incomplete record selectors, so this patch stops those warnings being treated as errors. (See discussion on !13308.) A better fix would be to remove the use of incomplete record selectors, since each of them represents a potential crash.
-
This patch is a pure refactor of GHC's source code, to avoid the use of partial record selectors. It was provoked by adding -Wincomplete-record-selectors to -Wall (as the GHC Proposal specified), which in turn showed up lots of places where GHC was using incomplete record selectors. This patch does mostly-simple refactoring to make it clear to the pattern match checker that there is in fact no partiality. There is one externally-visible change: I changed the data type HoleFit to split out the two cases data HoleFit = TcHoleFit TcHoleFit | RawHoleFit SDoc data TcHoleFit = HoleFit { ...lots of fields } There are large swathes of code that just deal with `TcHoleFit`, and having it as a separate data types makes it apparent that `RawHoleFit` can't occur. This makes it much better -- but the change is visible in the HolePlugin interface. I decided that there are so few clients of this API that it's worth the change. I moved several functions from Language.Haskell.Syntax to GHC.Hs. Reason, when instantiated at (GhcPass _), the extension data construtcor is guaranteed unused, and that justifies omitted patterns in these functions. By putting them in GHC.Hs.X I can specialise the type for (GhcPass _) and thereby make the function total. An interesting side-light is that there were a few local function definitions without a type signature, like this one in GHC.Parser.Header convImport (L _ i) = (ideclPkgQual i, reLoc $ ideclName i) This is fully closed, and so is generalised; but that generalises it to any old pass, not (GhcPass _), so GHC rightly complains about the use of the selector `ideclPkgQual`. I added a type signature to `i`, thus convImport (L _ (i::ImportDecl GhcPs)) = (ideclPkgQual i, reLoc $ ideclName i) which specialised the function enough to make the record selector complete. Quite a surprising consequence of local let-generalisation!
-
This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: https://github.com/haskell/cabal/issues/10402 2.6% decrease in compile time allocation in RecordUpPerf Metric Decrease: RecordUpdPerf
-
- Oct 14, 2024
-
-
EPA: Remove [AddEpAnn] from LazyPat EPA: Remove [AddEpAnn] from RecordCon/RecordUpd/ConPat EPA: Remove [AddEpAnn] from HsFieldBind EPA: Remove [AddEpAnn] from PatSynBind EPA: Remove [AddEpAnn] from IPBind EPA: Remove [AddEpAnn] from FixSig EPA: Remove [AddEpAnn] from activation rules EPA: Remove [AddEpann] from SpecInstSig EPA: Remove [AddEpAnn] from MinimalSig EPA: Remove [AddEpAnn] from SCCFunSig EPA: Remove [AddEpAnn] from CompleteMatchSig EPA: Remove [AddEpAnn] from AnnSig, as used in PatSynSig, ClassOpSig, TypeSig EPA: Remove [AddEpAnn] from IEThingAbs EPA: Remove [AddEpAnn] from IEThingAll / IEThingWith EPA: Remove [AddEpAnn] from IEModuleContents EPA: Remove [AddEpAnn] from HsOpTy EPA: Remove [AddEpAnn] for various binders EPA: Remove [AddEpAnn] for HsIParamTy
-
Resolve #24509.
-
- Oct 12, 2024
-
-
Cabal 3.14 introduced a broken symlink in its testsuite. Unfortunately, this broke our source distribution as we use use `tar --dereference` to avoid issues with symlink compatibility on windows, and `tar --dereference` chokes when it encounters any broken symlinks. We can't get rid of `--dereference` because symlinks are generally broken on windows, so the only option is to exclude this file from source archives. see also https://github.com/haskell/cabal/issues/10442
-
There are macros in MachRegs.h to figure those out.
-
Tuples with prefix/suffix strings weren't always properly encoded with their shortcut notations. Fix this.
-
Closes #25296.
-
Also, fix a bug in RST with missing newline before a listing. Co-authored-by:
Arnaud Spiwack <arnaud@spiwack.net>
-
These constructors were only used during the TC stage, or during template haskell. It seemed clear that it was independent of the source syntax represented in L.H.S, and thus we removed it according to #21592.
-
-
-
As noted in #25066, the exception backtrace proposal introduced a rather subtle performance regression due to simplification producing Core which the demand analyser concludes may diverge with a precise exception. The nature of the problem is more completely described in the new Note [Hiding precise exception signature in throw]. The (rather hacky) solution we use here hides the problematic optimisation through judicious use of `noinline`. Ultimately however we will want a more principled solution (e.g. #23847). Fixes #255066 CLC proposal: https://github.com/haskell/core-libraries-committee/issues/290 Metric Decrease: T9872d