[Git][ghc/ghc][wip/aforemny/parameterize-source-text-lits-over-pass] 22 commits: Replace '?callStack' implicit param with HasCallStack in GHC.Internal.Exception.throw
Alexander Foremny (@aforemny)
gitlab at gitlab.haskell.org
Mon Jun 10 06:35:33 UTC 2024
Alexander Foremny pushed to branch wip/aforemny/parameterize-source-text-lits-over-pass at Glasgow Haskell Compiler / GHC
Commits:
edfe6140 by qqwy at 2024-06-08T11:23:54-04:00
Replace '?callStack' implicit param with HasCallStack in GHC.Internal.Exception.throw
- - - - -
35a64220 by Cheng Shao at 2024-06-08T11:24:30-04:00
rts: cleanup inlining logic
This patch removes pre-C11 legacy code paths related to
INLINE_HEADER/STATIC_INLINE/EXTERN_INLINE macros, ensure EXTERN_INLINE
is treated as static inline in most cases (fixes #24945), and also
corrects the comments accordingly.
- - - - -
9ea90ed2 by Andrew Lelechenko at 2024-06-08T11:25:06-04:00
CODEOWNERS: add @core-libraries to track base interface changes
A low-tech tactical solution for #24919
- - - - -
580fef7b by Ben Gamari at 2024-06-09T01:27:21-04:00
ghc-internal: Update CHANGELOG to reflect current version
- - - - -
391ecff5 by Ben Gamari at 2024-06-09T01:27:21-04:00
ghc-internal: Update prologue.txt to reflect package description
- - - - -
3dca3b7d by Ben Gamari at 2024-06-09T01:27:57-04:00
compiler: Clarify comment regarding need for MOVABS
The comment wasn't clear in stating that it was only applicable to
immediate source and memory target operands.
- - - - -
1c04f3c1 by Adriaan Leijnse at 2024-06-09T15:14:32+02:00
ttg: Remove SourceText from OverloadedLabel
Progress towards #21592
- - - - -
a4ca52f4 by Alexander Foremny at 2024-06-09T15:14:33+02:00
AST: GHC.Prelude -> Prelude
Refactor occurrences to GHC.Prelude with Prelude within
Language/Haskell.
Progress towards #21592
- - - - -
08bfba21 by Alexander Foremny at 2024-06-09T15:14:33+02:00
AST: remove occurrences of GHC.Unit.Module.ModuleName
`GHC.Unit.Module` re-exports `ModuleName` from
`Language.Haskell.Syntax.Module.Name`.
Progress towards #21592
- - - - -
d367235b by Fabian Kirchner at 2024-06-09T15:14:33+02:00
AST: move Data instance definition for ModuleName to GHC.Unit.Types
To remove the dependency on GHC.Utils.Misc inside
Language.Haskell.Syntax.Module.Name, the instance definition is moved
from there into GHC.Unit.Types.
Progress towards #21592
- - - - -
21baa04f by Fabian Kirchner at 2024-06-09T15:14:33+02:00
AST: move negateOverLitVal into GHC.Hs.Lit
The function negateOverLitVal is not used within Language.Haskell and
therefore can be moved to the respective module inside GHC.Hs.
Progress towards #21592
- - - - -
61e15aaa by Fabian Kirchner at 2024-06-09T15:14:33+02:00
AST: move conDetailsArity into GHC.Rename.Module
The function conDetailsArity is only used inside GHC.Rename.Module. We
therefore move it there from Language.Haskell.Syntax.Lit.
Progress towards #21592
- - - - -
4c28edd4 by Mauricio at 2024-06-09T15:14:33+02:00
AST: Remove GHC.Utils.Assert from GHC
Simple cleanup.
Progress towards #21592
- - - - -
d7e78217 by Jacco Krijnen at 2024-06-09T15:14:33+02:00
ttg: Use List instead of Bag in AST for LHsBindsLR
Considering that the parser used to create a Bag of binds using a
cons-based approach, it can be also done using lists. The operations in
the compiler don't really require Bag.
By using lists, there is no dependency on GHC.Data.Bag anymore from the
AST.
Progress towards #21592
- - - - -
1b781d60 by Fabian Kirchner at 2024-06-09T19:06:53+02:00
ttg: extract Specificity, ForAllTyFlag and helper functions from GHC.Types.Var
Progress towards #21592
Specificity, ForAllTyFlag and its' helper functions are extracted from
GHC.Types.Var and moved into a new module Language.Haskell.Syntax.Specificity.
Note: Eventually (i.e. after Language.Haskell.Syntax.Decls does not depend on
GHC.* anymore) these should be moved into Language.Haskell.Syntax.Decls.
At this point, this would cause cyclic dependencies.
- - - - -
f3df7507 by Fabian Kirchner at 2024-06-09T19:06:57+02:00
ttg: Move some AST types into Language.Haskell.Syntax.Basic
In particular, we move:
* TopLevelFlag
* TypeOrData
* TyConFlavour
Progress towards #21592
- - - - -
73a4f29b by Adowrath at 2024-06-09T19:07:13+02:00
ttg: Split HsSrcBang, remove ref to DataCon from Syntax.Type
Progress towards #21592
This splits HsSrcBang up, creating the new HsBang within
`Language.Haskell.Syntax.Basic`. `HsBang` holds the unpackedness
and strictness information, while `HsSrcBang` only adds the SourceText
for usage within the compiler directly.
Inside the AST, to preserve the SourceText, it is hidden behind the
pre-existing extension point `XBindTy`. All other occurrences of
`HsSrcBang` were adapted to deconstruct the inner `HsBang`, and when
interacting with the `BindTy` constructor, the hidden `SourceText` is
extracted/inserted into the `XBindTy` extension point.
`GHC.Core.DataCon` exports both `HsSrcBang` and `HsBang` for
convenience. A constructor function `mkHsSrcBang` that takes all
individual components has been added.
Two exceptions has been made though:
- The `Outputable HsSrcBang` instance is replaced by
`Outputable HsBang`. While being only GHC-internal, the only place
it's used is in outputting `HsBangTy` constructors -- which already
have `HsBang`. It wouldn't make sense to reconstruct a `HsSrcBang` just
to ignore the `SourceText` anyway.
- The error `TcRnUnexpectedAnnotation` did not use the `SourceText`,
so it too now only holds a `HsBang`.
- - - - -
68abf0c8 by Mauricio at 2024-06-09T19:18:36+02:00
AST: Moved definitions that use GHC.Utils.Panic to GHC namespace
Progress towards #21592
- - - - -
fcdb7818 by Alexander Foremny at 2024-06-10T08:27:29+02:00
AST: StringLiteral -> StringLit (type)
`GHC.Types.SourceText.StringLiteral` does not abbreviate "Literal",
while `GHC.Types.SourceText.{IntegralLit,FractionalLit}` do. To increase
consistency, `StringLiteral` was renamed to `StringLit`.
- - - - -
d6d00153 by Alexander Foremny at 2024-06-10T08:27:30+02:00
AST: StringLiteral -> SL (data constructor)
`GHC.Types.SourceText.StringLit` has data constructor `StringLiteral`,
while `GHC.Types.SourceText.{IntegralLit,FractionalLit}` have data
constructors `{IL,FL}`. To increase consistency, the data constructor
`StringLiteral` was renamed to `SL`.
- - - - -
b4b9c3ac by Alexander Foremny at 2024-06-10T08:30:07+02:00
AST: use `StringLit` for `HsIsString`
While `OverLitVal`'s data constructors `HsIntegral`, `HsFractional`
carried `IntegralLit`, `FractionalLit` types, `HsIsString` carries only
`SourceText` and `FastString`. We will want to parameterize over
`SourceText`, which `StringLit`s will support. So we change `HsIsString`
to carry a `StringLit`.
- - - - -
61f98f62 by Alexander Foremny at 2024-06-10T08:34:59+02:00
AST: parameterize `GHC.Types.SourceText`'s literals over `pass`
In order to move `GHC.Types.SourceText.SourceText` out of
`Language.Haskell`, we parameterize `GHC.Types.SourceText`'s literals by
`pass`, and replace, say, `IntegralLit`'s `SourceText` field by
`XIntegralLit pass`.
- - - - -
30 changed files:
- CODEOWNERS
- compiler/GHC.hs
- compiler/GHC/Builtin/Types.hs
- compiler/GHC/CmmToAsm/X86/Instr.hs
- compiler/GHC/Core/DataCon.hs
- compiler/GHC/Core/InstEnv.hs
- compiler/GHC/Core/TyCo/Rep.hs-boot
- compiler/GHC/CoreToIface.hs
- compiler/GHC/Hs/Binds.hs
- compiler/GHC/Hs/Decls.hs
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/Hs/ImpExp.hs
- compiler/GHC/Hs/Lit.hs
- compiler/GHC/Hs/Pat.hs
- compiler/GHC/Hs/Stats.hs
- compiler/GHC/Hs/Syn/Type.hs
- compiler/GHC/Hs/Type.hs
- compiler/GHC/Hs/Utils.hs
- compiler/GHC/HsToCore/Binds.hs
- compiler/GHC/HsToCore/Docs.hs
- compiler/GHC/HsToCore/Expr.hs
- compiler/GHC/HsToCore/Match.hs
- compiler/GHC/HsToCore/Match/Literal.hs
- compiler/GHC/HsToCore/Pmc/Desugar.hs
- compiler/GHC/HsToCore/Pmc/Solver/Types.hs
- compiler/GHC/HsToCore/Quote.hs
- compiler/GHC/HsToCore/Ticks.hs
- compiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Iface/Make.hs
- compiler/GHC/Iface/Syntax.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/fd42439c2bcb38dd889c27c0a0216573566702cd...61f98f622842296db099099dd29172309af23068
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/fd42439c2bcb38dd889c27c0a0216573566702cd...61f98f622842296db099099dd29172309af23068
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/20240610/2998b2ee/attachment-0001.html>
More information about the ghc-commits
mailing list