summaryrefslogtreecommitdiff
path: root/compiler/GHC/StgToJS
Commit message (Collapse)AuthorAgeFilesLines
* JS: Fix implementation of MK_JSVALJosh Meredith2023-03-101-2/+2
|
* JS: fix for overlap with copyMutableByteArray# (#23033)Sylvain Henry2023-02-281-9/+2
| | | | | | The code wasn't taking into account some kind of overlap. cgrun070 has been extended to test the missing case.
* JS: make some arithmetic primops faster (#22835)Sylvain Henry2023-02-241-2/+2
| | | | | | Don't use BigInt for wordAdd2, mulWord32, and timesInt32. Co-authored-by: Matthew Craven <5086-clyring@users.noreply.gitlab.haskell.org>
* Factor JS Rts generation for h$c{_,0,1,2} into h$c{n} and improve name cachingJosh Meredith2023-02-164-77/+107
|
* JS: disable debugging info for heap objectsSylvain Henry2023-02-161-1/+3
|
* JS: avoid head/tail and unpackFSSylvain Henry2023-02-071-9/+7
|
* Improve exprOkForSpeculation for classopsSimon Peyton Jones2023-01-311-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes #22745 and #15205, which are about GHC's failure to discard unnecessary superclass selections that yield coercions. See GHC.Core.Utils Note [exprOkForSpeculation and type classes] The main changes are: * Write new Note [NON-BOTTOM_DICTS invariant] in GHC.Core, and refer to it * Define new function isTerminatingType, to identify those guaranteed-terminating dictionary types. * exprOkForSpeculation has a new (very simple) case for ClassOpId * ClassOpId has a new field that says if the return type is an unlifted type, or a terminating type. This was surprisingly tricky to get right. In particular note that unlifted types are not terminating types; you can write an expression of unlifted type, that diverges. Not so for dictionaries (or, more precisely, for the dictionaries that GHC constructs). Metric Decrease: LargeRecord
* Assorted changes to avoid Data.List.{head,tail}Bodigrim2023-01-281-2/+3
|
* Misc cleanupKrzysztof Gogolewski2023-01-051-1/+1
| | | | | | | | | - Remove unused uniques and hs-boot declarations - Fix types of seq and unsafeCoerce# - Remove FastString/String roundtrip in JS - Use TTG to enforce totality - Remove enumeration in Heap/Inspect; the 'otherwise' clause serves the primitive types well.
* JS: fix support for -outputdir (#22641)Sylvain Henry2022-12-221-39/+29
| | | | | | | The `-outputdir` option wasn't correctly handled with the JS backend because the same code path was used to handle both objects produced by the JS backend and foreign .js files. Now we clearly distinguish the two in the pipeline, fixing the bug.
* Add Javascript backendSylvain Henry2022-11-2931-0/+11004
Add JS backend adapted from the GHCJS project by Luite Stegeman. Some features haven't been ported or implemented yet. Tests for these features have been disabled with an associated gitlab ticket. Bump array submodule Work funded by IOG. Co-authored-by: Jeffrey Young <jeffrey.young@iohk.io> Co-authored-by: Luite Stegeman <stegeman@gmail.com> Co-authored-by: Josh Meredith <joshmeredith2008@gmail.com>