[Git][ghc/ghc][wip/interpolated-strings] 12 commits: JS: Basic cleanup for unused stuff to simplify things.
Brandon Chinn (@brandonchinn178)
gitlab at gitlab.haskell.org
Sun Dec 15 23:26:23 UTC 2024
Brandon Chinn pushed to branch wip/interpolated-strings at Glasgow Haskell Compiler / GHC
Commits:
63027593 by Serge S. Gulin at 2024-12-08T13:52:05+03:00
JS: Basic cleanup for unused stuff to simplify things.
1. Make `staticInitStat`, `staticDeclStat`, `allocUnboxedConStatic`, `allocateStaticList`, `jsStaticArg` local to modules.
2. Remove unused `hdRawStr`, `hdStrStr` from Haskell and JavaScript (`h$pstr`, `h$rstr`, `h$str`).
3. Introduce a special type `StaticAppKind` enumeration and `StaticApp` to represent boxed scalar static applications. Originally, StaticThunk supported to pass Maybe when it became Nothing for initializied thunks in an alternatie way but it is not used anymore.
- - - - -
a9f8f1fb by Serge S. Gulin at 2024-12-08T14:10:45+03:00
JS: Add trivial optimizations for `unpackCString` and `unpackCStringUtf8`.
It became possible due of introduction strings unfloating at Sinker pass (#13185). Earns few more bytes at optimizations.
- - - - -
b519c06b by Serge S. Gulin at 2024-12-08T15:50:26+03:00
JS: Specialize unpackCString# CAFs (fixes #24744)
Code analysis shown that such optimization would be possible out of the box if `cachedIdentForId` allowed to do that for Haskell `Id`s which are represented by few JavaScript `Ident`s. It is a usual for strings which are represented at JavaScript as a pair of 2 values: the string content and the offset where to start reading actual string from the full content. Usually offset is 0 but technically we need to allow such complex structures to be treated as "global".
Enabling it there shown that `genToplevelRhs` and `globalOccs` had inaccuracies in their implementations:
1. `globalOccs` operated over JavaScript's `Ident`s but for complex structures it didn't pay attention to the fact that different Idents actually could be pointed to same Id. Now the algo is changed to calculate occurencies for Ids.
2. `genToplevelRhs` didn't assume that different Idents pointed to same Id can have mixed order of occurence. But actually the order is important. Strings are encoded into 2 variables where first is content and second is offset and their order are not interchangeable. It is fixed by regeneration Idents from collected Ids which is fine because all Idents generation is passed through the Cache and they are quasi-stable.
- - - - -
a8ceccf3 by Brandon Chinn at 2024-12-09T16:25:43-05:00
Fix panic in multiline string with unterminated gap (#25530)
- - - - -
9e464ad0 by Brandon Chinn at 2024-12-09T16:25:43-05:00
Add test case for unterminated multiline string
- - - - -
ed1ed5c6 by Rodrigo Mesquita at 2024-12-09T16:26:19-05:00
Revert mapMG renaming
We had previously renamed this function for consistency, but that caused unnecessary breakage
- - - - -
158261f7 by Sylvain Henry at 2024-12-09T16:27:01-05:00
RTS: make Cabal flags manual
Cabal shouldn't automatically try to set them. We set them explicitly.
- - - - -
68a934bf by Brandon Chinn at 2024-12-09T19:29:36-08:00
Unify ITstring + ITstringMulti
- - - - -
f18000a3 by Brandon Chinn at 2024-12-15T15:25:35-08:00
Unify HsString + HsMultilineString
- - - - -
f5a7d44e by Brandon Chinn at 2024-12-15T15:25:36-08:00
Move multiline string processing functions to top-level
- - - - -
c69c7da8 by Brandon Chinn at 2024-12-15T15:25:36-08:00
Always use processCharsSingle to get StringLexError
- - - - -
40a9d445 by Brandon Chinn at 2024-12-15T15:25:36-08:00
Implement interpolated strings
- - - - -
30 changed files:
- compiler/GHC.hs
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/Hs/Lit.hs
- compiler/GHC/Hs/Syn/Type.hs
- compiler/GHC/Hs/Utils.hs
- compiler/GHC/HsToCore/Match/Literal.hs
- compiler/GHC/HsToCore/Quote.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/Lexer.x
- compiler/GHC/Parser/String.hs
- compiler/GHC/Rename/Expr.hs
- compiler/GHC/Rename/Pat.hs
- compiler/GHC/Rename/Splice.hs
- compiler/GHC/StgToJS/Apply.hs
- compiler/GHC/StgToJS/Arg.hs
- compiler/GHC/StgToJS/CodeGen.hs
- compiler/GHC/StgToJS/Expr.hs
- compiler/GHC/StgToJS/Ids.hs
- compiler/GHC/StgToJS/Linker/Linker.hs
- compiler/GHC/StgToJS/Monad.hs
- compiler/GHC/StgToJS/Object.hs
- compiler/GHC/StgToJS/Symbols.hs
- compiler/GHC/StgToJS/Types.hs
- compiler/GHC/Tc/Gen/HsType.hs
- compiler/GHC/Tc/Utils/Instantiate.hs
- compiler/GHC/Tc/Utils/TcMType.hs
- compiler/GHC/ThToHs.hs
- compiler/GHC/Unit/Module/Graph.hs
- compiler/Language/Haskell/Syntax/Expr.hs
- compiler/Language/Haskell/Syntax/Extension.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f560c8b4cc972354a489872b78b6078c4392cfe3...40a9d4458428aeab496a9ab1864da368a7ef15f4
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f560c8b4cc972354a489872b78b6078c4392cfe3...40a9d4458428aeab496a9ab1864da368a7ef15f4
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/20241215/d274a321/attachment-0001.html>
More information about the ghc-commits
mailing list