[Git][ghc/ghc][wip/js-staging] 323 commits: chore: extend `.editorconfig` for C files

doyougnu (@doyougnu) gitlab at gitlab.haskell.org
Sun Oct 9 20:04:45 UTC 2022



doyougnu pushed to branch wip/js-staging at Glasgow Haskell Compiler / GHC


Commits:
48ab9ca5 by Nicolas Trangez at 2022-10-04T20:34:10-04:00
chore: extend `.editorconfig` for C files

- - - - -
b8df5c72 by Brandon Chinn at 2022-10-04T20:34:46-04:00
Fix docs for pattern synonyms
- - - - -
463ffe02 by Oleg Grenrus at 2022-10-04T20:35:24-04:00
Use sameByteArray# in sameByteArray

- - - - -
fbe1e86e by Pierre Le Marre at 2022-10-05T15:58:43+02:00
Minor fixes following Unicode 15.0.0 update

- Fix changelog for Unicode 15.0.0
- Fix the checksums of the downloaded Unicode files, in base's tool: "ucd2haskell".

- - - - -
8a31d02e by Cheng Shao at 2022-10-05T20:40:41-04:00
rts: don't enforce aligned((8)) on 32-bit targets

We simply need to align to the word size for pointer tagging to work. On
32-bit targets, aligned((8)) is wasteful.

- - - - -
532de368 by Ryan Scott at 2022-10-06T07:45:46-04:00
Export symbolSing, SSymbol, and friends (CLC#85)

This implements this Core Libraries Proposal:
https://github.com/haskell/core-libraries-committee/issues/85

In particular, it:

1. Exposes the `symbolSing` method of `KnownSymbol`,
2. Exports the abstract `SSymbol` type used in `symbolSing`, and
3. Defines an API for interacting with `SSymbol`.

This also makes corresponding changes for `natSing`/`KnownNat`/`SNat` and
`charSing`/`KnownChar`/`SChar`. This fixes #15183 and addresses part (2)
of #21568.

- - - - -
d83a92e6 by sheaf at 2022-10-07T07:36:30-04:00
Remove mention of make from README.md

- - - - -
35cc5749 by Josh Meredith at 2022-10-09T15:26:01-04:00
Add ghcjs changes to deriveConstants:

- change String targetOS option in deriveConstants to an enum
- separate out getWantedGHSJS, removing generated c file in this path

- - - - -
71de9922 by doyougnu at 2022-10-09T15:26:01-04:00
Add JavaScript code generator

Adapt code generator of GHCJS to GHC head. Currently it is only enabled
with the hidden -fjavascript flag. It produces .o files that can't be
used yet except by GHCJS's linker.

Codegen: doc

Codegen: correctly return linkable object

Now we can build a static library (-staticlib)

Codegen: doc genLit

Codegen: use assignAll

Codegen: introduce TypedExpr

Refactor assignAll et al, add documentation

Codegen: minor changes

Doc

- - - - -
ef951bd2 by doyougnu at 2022-10-09T15:26:02-04:00
Add JS.Rts

JS.Rts: compiles

reword: progress on RtsTypes

StgToJS.Config: add SDoc Context

JSRts: move ppr, workaround def type

JSRts.Types: compiles

JS.Rts: closer to compiling

JS.Rts: move jsIdIdent' to StgToJS.Monad

JS.Rts: remove unused predicates

JS: cleanup, comment sections, math funcs to Make

JS.Rts.Types: compiles

StgToJS.Expr: fix compilation errors

StgToJS.DataCon: move initClosure

JS.Rts: remove Alloc module

JS.Rts: initalize Rts module, remove redundant fs

JS: init Rts.Alloc move initClosure

JS.Apply: unwinding combinators in progress

JS: add helpers and fixmes

JS.Rts.Apply: no more e's, add closure, reg helper

StgToJS: add ToStat instance ClosureInfo

JS.Rts.Apply: closer to compiling

JS.Rts.Apply: more removal of #

JS.Rts.Apply: (#) removed

JS.Rts.Apply: compiles

JS.Rts.Rts: just pretty printing left

JS.Rts: Add Notes

JS.Rts: add file headers and notes

JS.Rts.Rts: fixing stringy issues

JS.Rts.Rts: compiles

JS.Rts.Rts: fix non-exhaustive patterns warnings

- - - - -
16a2f5cf by Sylvain Henry at 2022-10-09T15:26:02-04:00
Doc has been moved into GHC.StgToJs top-level module

- - - - -
776fb310 by Sylvain Henry at 2022-10-09T15:26:02-04:00
JS.Rts; refactoring and move to StgToJS

* add closure manipulation helpers and use them in Apply
* add cache (Array) for pre-generated PAP names
* reduce line length:
  * use BlockArguments instead of parens
  * remove implicit mconcat in jVar's body

Rts: more refactorings

Rts: move into StgToJS hierarchy

- - - - -
0dae3eec by Sylvain Henry at 2022-10-09T15:26:02-04:00
JS: cleanup, renaming, better module layout

Various degrees of cleanup adapting GHCJS to GHC. We move several
functions to CoreUtils, remove duplication between the JS.Rts.Apply and
Apply module and factor out closure related code into a Closure module
for cohesion.

Deduplicate code between Rts.Apply and Apply

Move might_be_a_function into CoreUtils

Factorize closure stuff into Closure module

Rename closureExtra into closureField

Minor renamings, comments...

- - - - -
1e850381 by Sylvain Henry at 2022-10-09T15:26:02-04:00
JS.Backend: add FFI code but don't implement yet

FFI: don't crash on JavaScript foreign imports

Note that they are still not desugared properly!!

But the following cmd doesn't crash anymore:

  ghc -fjavascript Test.hs -fforce-recomp -ddump-tc -fno-code -ddump-ds

FFI: adapt GHCJS desugarer

FFI: support direct application

The following example:

  foo :: Int# -> Int#
  foo = add 50000#

  foreign import javascript
    "(function(x,y) { return (x + y) })"
    add :: Int# -> Int# -> Int#

is compiled into an application like this:

  var h$mainZCMzifoozur2_e;
  h$mainZCMzifoozur2_e = (function()
                            {
                            var h$mainZCMziaddzur1;
                            h$mainZCMziaddzur1 = h$r1.d1;
                            var h$$mainZCMzietazuB0_8KXnScrCjF5;
                            h$$mainZCMzietazuB0_8KXnScrCjF5 = h$r2;
                            h$r3 = h$$mainZCMzietazuB0_8KXnScrCjF5;
                            h$r2 = 50000;
                            h$r1 = h$mainZCMziaddzur1;
                            return h$ap_2_2_fast();
                            return h$rs();
                          });
  var h$mainZCMziaddzur1_e;
  h$mainZCMziaddzur1_e = (function()
                            {
                            var h$$mainZCMzidszusAk_236l8r0P8S9;
                            h$$mainZCMzidszusAk_236l8r0P8S9 = h$r2;
                            var h$$mainZCMzids1zusAl_336l8r0P8S9;
                            h$$mainZCMzids1zusAl_336l8r0P8S9 = h$r3;
                            var h$$mainZCM_2;
                            var h$$mainZCMziwildzusAn_536l8r0P8S9;
                            try
                              {
                              h$$mainZCMziwildzusAn_536l8r0P8S9 = (function(x,y) { return (x + y) })(h$$mainZCMzidszusAk_236l8r0P8S9, h$$mainZCMzids1zusAl_336l8r0P8S9)
                            }
                            catch(except)
                              {
                              return h$throwJSException(except)
                            };
                            var h$$mainZCMzids3zusAp_736l8r0P8S9;
                            h$$mainZCMzids3zusAp_736l8r0P8S9 = h$$mainZCMziwildzusAn_536l8r0P8S9;
                            h$r1 = h$$mainZCMzids3zusAp_736l8r0P8S9;
                            return h$rs();
                          });

FFI: correctly dispatch for foreign exports too

FFI: move C FFI desugaring into its own module

FFI: avoid DynFlags in toJsName (copy of toCName)

- - - - -
42d85173 by Sylvain Henry at 2022-10-09T15:26:02-04:00
Configure: preliminary support for triple js-unknown-ghcjs

- - - - -
66833b16 by Sylvain Henry at 2022-10-09T15:26:02-04:00
Driver: enable JS backend by default for JS arch

- - - - -
748e7b22 by doyougnu at 2022-10-09T15:26:02-04:00
JS.Backend: Add JS specific Linker

JS: initialize Linker, DynamicLinking

JS.Printer: adapted to GHC Head

JS.Printer: some cleanup and init Printer

StgToJS.Printer: Compiles

JS.Linker: Add types, expose JS keywords

JS.Syntax: add Binary instance on Ident's

JS.Linker: Migrate more Types to Data.Binary

JS.Linker.Types: compiles and adapted to GHC Head

JS.Linker.Types: compiles

JS.Linker.Types: add UseBase type

JS.Linker: Comments and Cleanup

JS.Linker.Types: add TH types, Env type, DepsLoc

JS.Linker: more FIXMEs numerous Linker fixes

JS.Linker: removed Text references

JS.UnitUtils: add package related helper functions

JS.Linker: more DynFlags removal

JS.Linker: Time for semantic errors

JS.Linker: DynFlags finally removed

JS.Linker: 107 compile errors to go

JS.Linker.Utils: initialized, adapted to GHC Head

JS.Linker.Utils: initialize Utils module

JS.Linker.Utils: more utils

JS.Rts: move rtsText to Rts

JS.Linker: linkerStats implemented

JS.Compactor: compiles, adapted to GHC Head

JS.Compactor: have to retrofit compact for linker

JS.Linker.Compactor: unwinding lenses

JS.Linker.Compactor: comments over addItem

JS.Linker.Compactor: Lenses removed

JS.Linker.Compactor: SHA256 removed

JS.Linker.Compactor: only missing instances left

JS.Linker.Compactor: compiles

JS.Linker: compiles, adapted to ghc Head

JS.Linker: More progress

JS.Linker: link in memory compiles

JS.Linker: just shims left

JS.Linker.DynamicLinking compiles: adapted to head

JS.Linker.DynamicLinking: initialization

JS.Linker.DynamicLinking: compiles up to Variants

JS.Variants: initialize

JS.Linker: numerous and various fixes

JS.Linker.DynamicLinking: only small errors left

JS.Linker.Archive: compiles, adapted to GHC Head

JS.Linker: initialize Archive compat module

JS.Linker.Archive: minor fixes

JS.Linker.DynamicLinking: compiles

JS.Linker: cleanup, remove Variants, add comments

fixup: more cleanup

JS.Linker: more cleanup and comments

- - - - -
9ea08ac7 by Sylvain Henry at 2022-10-09T15:26:02-04:00
Minor panic fix

- - - - -
ebd1d244 by Sylvain Henry at 2022-10-09T15:26:03-04:00
Linker: fix stage2 build

- - - - -
97724316 by Sylvain Henry at 2022-10-09T15:26:03-04:00
Configure: Add support fo JS as unregistered ABI

Configure: detect emscripten tools

e.g. on ArchLinux:

  EMSDK=/usr/lib/emscripten EMSDK_LLVM=/opt/emscripten-llvm ./configure --target=js-unknown-ghcjs

Configure: detect nm tool too, required by Hadrian

Configure: make StgToJS use non-unregisterised ABI

It should probably be a third kind of ABI...

- - - - -
f0d49495 by doyougnu at 2022-10-09T15:26:03-04:00
JS.Linker: Hook up to GHC.Driver.Pipeline

JS.Linker.Types: Add newGhcjsEnv function

JS.UnitUtils: fix encodeModule api

JS.Linker: more removal of HscEnv

JS.Linker: hooked into GHC.Driver.Pipeline

- - - - -
1db89f70 by Sylvain Henry at 2022-10-09T15:26:03-04:00
VERY WIP Hadrian/rts fixes

export EMSDK_LLVM=/opt/emscripten-llvm
export EMSDK=/usr/lib/emscripten
export PATH=./inplace/ghcjs_toolchain/bin:$PATH

./configure --target=js-unknown-ghcjs
./hadrian/build --flavour=quick-js -j --bignum=native --docs=none -V

- - - - -
a08f672b by Sylvain Henry at 2022-10-09T15:26:03-04:00
Force creation of rts library with dummy file

- - - - -
9e27218e by Sylvain Henry at 2022-10-09T15:26:03-04:00
ghc-prim: avoid building C files

- - - - -
da35a8d3 by Sylvain Henry at 2022-10-09T15:26:03-04:00
Hadrian: disable -fllvm

- - - - -
b3856db9 by Sylvain Henry at 2022-10-09T15:26:03-04:00
JS: fix caches

Note that the fact that we need index 0 may hide another issue...

- - - - -
cca64ce4 by Sylvain Henry at 2022-10-09T15:26:03-04:00
codegen: enhance genCon debug message

- - - - -
dd1f7394 by Sylvain Henry at 2022-10-09T15:26:04-04:00
RTS: fix stupid comment

- - - - -
95028071 by Sylvain Henry at 2022-10-09T15:26:04-04:00
RTS: embed headers

- - - - -
ad20f319 by Sylvain Henry at 2022-10-09T15:26:04-04:00
JS.StgToJS: add documentation header for JS Types

- - - - -
f0894bb9 by Sylvain Henry at 2022-10-09T15:26:04-04:00
CodeGen: refactor ExprCtx code

- - - - -
b8887cad by Sylvain Henry at 2022-10-09T15:26:04-04:00
CodeGen: cache LNE frame size

- - - - -
42a7791c by doyougnu at 2022-10-09T15:26:04-04:00
JS.Types: Add Outputable for TypedExpr

- - - - -
24104db0 by doyougnu at 2022-10-09T15:26:04-04:00
JS.CoreUtils: handle IOPort case

- - - - -
0154f97c by doyougnu at 2022-10-09T15:26:04-04:00
JS.Expr: Fix unhandled datacon for RuntimeRep

- - - - -
7f1fb526 by doyougnu at 2022-10-09T15:26:04-04:00
JS.Literals: Adapt genLit to new Literal domain

- - - - -
704b6fc8 by Sylvain Henry at 2022-10-09T15:26:05-04:00
RTS: expose more headers (required to build base)

- - - - -
6a44a96e by Sylvain Henry at 2022-10-09T15:26:05-04:00
Base: don't build C and Cmm sources with ghcjs

- - - - -
4394d668 by Sylvain Henry at 2022-10-09T15:26:05-04:00
Tentatively set NO_REGS for JS platforms

- - - - -
7f6f214f by Sylvain Henry at 2022-10-09T15:26:05-04:00
CodeGen: output LitRubbish as null JS values

- - - - -
a0abc133 by Sylvain Henry at 2022-10-09T15:26:05-04:00
base: disable forkOS and bound thread machinery

- - - - -
65cb1133 by Sylvain Henry at 2022-10-09T15:26:05-04:00
CodeGen: support StackSnapshot# in primTypeVt

- - - - -
01310944 by Sylvain Henry at 2022-10-09T15:26:05-04:00
CodeGen: better debug message for assignCoerce1

- - - - -
d189c7e9 by Sylvain Henry at 2022-10-09T15:26:05-04:00
Misc: enable HasDebugCallStack for zipWithEqual*

- - - - -
4b68d809 by Sylvain Henry at 2022-10-09T15:26:05-04:00
CodeGen: remove useless imports

- - - - -
b0fb1bc8 by Sylvain Henry at 2022-10-09T15:26:06-04:00
Stg: expose pprStgAlt

- - - - -
3f5c68e0 by Sylvain Henry at 2022-10-09T15:26:06-04:00
CodeGen: restore assignAll (instead of assignAllEqual)

- - - - -
e66ae05d by Sylvain Henry at 2022-10-09T15:26:06-04:00
CodeGen: handle proxy#

- - - - -
cbe82449 by doyougnu at 2022-10-09T15:26:06-04:00
ghc-heap: Don't compile Cmm file for JS-Backend

- - - - -
7bf25c0b by doyougnu at 2022-10-09T15:26:06-04:00
Driver.Main: minor refactor do_code_gen

To clearly separate the JS-Backend from any other backend

- - - - -
f6fa8dd5 by Sylvain Henry at 2022-10-09T15:26:06-04:00
Configure: fix echo on Mac, add ghcjs target OS

- - - - -
98a261e3 by Sylvain Henry at 2022-10-09T15:26:06-04:00
Configure: fix previous commit

- - - - -
272f8404 by Luite Stegeman at 2022-10-09T15:26:06-04:00
fix package name in module name field of system dependencies

- - - - -
101e3999 by Luite Stegeman at 2022-10-09T15:26:06-04:00
fix duplicate module name in symbols

- - - - -
22f7802e by doyougnu at 2022-10-09T15:26:07-04:00
GHCi.FFI: ignore ffi.h and friends for js-backend

- - - - -
beb9c5e4 by Sylvain Henry at 2022-10-09T15:26:07-04:00
RTS: fix build of native rts

- - - - -
7206d41c by Sylvain Henry at 2022-10-09T15:26:07-04:00
Remove temporary -fjavascript flag

- - - - -
0fccb36a by Sylvain Henry at 2022-10-09T15:26:07-04:00
Codegen: fix symbol names ppr

- - - - -
236ae54a by Sylvain Henry at 2022-10-09T15:26:07-04:00
Outputable: add ShortText instance

- - - - -
ed87f00e by Sylvain Henry at 2022-10-09T15:26:07-04:00
Linker: enhance debugging message

- - - - -
38da872d by Sylvain Henry at 2022-10-09T15:26:07-04:00
Remove unused ghcjs unit related code

- - - - -
d3bd2da0 by Sylvain Henry at 2022-10-09T15:26:07-04:00
ghci: Avoid unused-xyz warnings

- - - - -
d263a5a8 by Sylvain Henry at 2022-10-09T15:26:08-04:00
Linker: remove wiring of ghcjs-prim and ghcjs-th

They will be replaced by ghc-prim, base, template-haskell, etc.

- - - - -
2e906cce by Sylvain Henry at 2022-10-09T15:26:08-04:00
Add outputable instance for Deps

- - - - -
d3c1a3f5 by doyougnu at 2022-10-09T15:26:08-04:00
Docs: JS.Syntax, JS.Make docs done

JS-backend: Add documentation headers

Docs: JS.Syntax done

Docs: JS.Make done

Docs: JS.Make JS.Syntax refined a bit

- - - - -
398e5451 by Sylvain Henry at 2022-10-09T15:26:08-04:00
Rename u_env into unit_env (more common)

- - - - -
3bb2b12e by Sylvain Henry at 2022-10-09T15:26:08-04:00
Linker: deduplication + fixes

- deduplicate code that was copied from old GHC
- explicitly add preloadUnits to the link
- avoid calling getShims

- - - - -
f12d510e by Sylvain Henry at 2022-10-09T15:26:08-04:00
Linker: reenable packStrings (not yet implemented though)

- - - - -
5cac75a6 by Sylvain Henry at 2022-10-09T15:26:08-04:00
ShortText: add singleton

- - - - -
aad905f2 by Sylvain Henry at 2022-10-09T15:26:08-04:00
Linker: force less efficient (but working) static encoding

- - - - -
7c8e3583 by Luite Stegeman at 2022-10-09T15:26:08-04:00
add GHCJS modules to base package

- - - - -
f8e74165 by Sylvain Henry at 2022-10-09T15:26:09-04:00
Linker: remove JS Shims,tiny GHC.Linker refactor

- - - - -
80d6da85 by doyougnu at 2022-10-09T15:26:09-04:00
Hadrian: QuickJS ways [] --> Set

- - - - -
e58246e9 by doyougnu at 2022-10-09T15:26:09-04:00
JS-Backend: rebased to master 468f919b

First rebase of the JS-Backend. This rebase includes the JS backend
combined with !7442 (new backend design). Unfortunately we have to short
circuit the new backend design because the JS backend takes over after
STG and not after StgToCmm.

What's working:
  - hadrian builds JS backend
  - JS backend outputs .js files and "links" them

What still has to be done:
   - JS backend is missing core js libraries as we add these we
   discover bugs in the linker and js rts.

- - - - -
bcd06d79 by doyougnu at 2022-10-09T15:26:09-04:00
JS: silence haddock warnings

JS Backend: remove misc. warnings

- - - - -
bf8262d4 by doyougnu at 2022-10-09T15:26:09-04:00
JS Backend: ghcjs_HOST_OS --> js_HOST_ARCH

- - - - -
da86b426 by Sylvain Henry at 2022-10-09T15:26:09-04:00
JS.Linker: add shims

GHCJS uses JS files for primitive things like the GC and RTS. We call
these JS files "shims". This sequence of commits adds shims from JS and
includes them for linking. In addition the shim directory is controlled
via an evironment variable JS_RTS_PATH...at least for now.

Linker: implement tryReadShimFile

Linker: link with shims provided via an env variable

Use JS_RTS_PATH to provide a directory into which .js and .js.pp files
will be linked into rts.js

JS.Linker: add js dir at root, fix js cpp includes

JS.gc.pp: remove variadic macro

JS.RTS: add rts JS shims files, remove shim CPP

RTS: remove the need for rts.h and add rts JS files

rts.h only contained a few constants duplicated in the codegen. Let's
use the Haskell version as the single source of truth and pass defined
values explicitly to cpp command line ("-DXYZ=abc" arguments).

Also switch from "raw" (use_cpp_and_not_cc_dash_E = True) to the
opposite: in both case we call "cc -E" (meh), but with False the
preprocessor doesn't choke one varargs in macros.

RTS: remove integer.js.pp

We use the native ghc-bignum backend, so we don't need the GMP
compatible JS code.

In addition, this code was failing to run as it requires the JSBN
(https://www.npmjs.com/package/jsbn) "Javascript big number" library,
which we don't necessarily have installed.

RTS: fix typo in field name

RTS: generate CPP macros in Haskell

RTS: share common CPP def into CAFs

- - - - -
8f2adaad by Sylvain Henry at 2022-10-09T15:26:09-04:00
CPP: disable line markers

CPP: move option before input filename (to be squashed)

- - - - -
1d991126 by Sylvain Henry at 2022-10-09T15:26:09-04:00
Linker: add more types

Some cleanup

Enhance and fix LinkerStats

Document and refactor renderLinker

Split collectDeps

Fix collectDeps

Fix linker stats rendering

Remove unused seqListSpine

It isn't used in ghcjs either

- - - - -
6904cc48 by Sylvain Henry at 2022-10-09T15:26:09-04:00
Add some missing primops (Word32,Int32)

Also fix the rendering of missing primops (they must be z-encoded to
avoid having a "#" in their JS name)

- - - - -
d3bf0329 by Sylvain Henry at 2022-10-09T15:26:10-04:00
FFI: desugar every foreign import/export in JS with JS backend

It means we also desugar CApi calls into JS.

It's probably wrong but instead of generating invalid JS we will only
get the failure at runtime when we will use the function.

fixup

- - - - -
bb703fa4 by doyougnu at 2022-10-09T15:26:10-04:00
JS.Linker: remove dflags includePath workaround.

We implemented a workaround for shims that modified the dynflags
includePaths so that the JS backend would find the rts.h file during CPP
of shims. Since aebcca98 this is no longer required because we've
removed the need for rts.h completely. Thus, this commit reverts that
modification.

- - - - -
1a3c6974 by Sylvain Henry at 2022-10-09T15:26:10-04:00
Temporarily wire-in base's shim

Use JS_BASE_PATH env var to set base's shim directory (js_base for now)

Also minor other changes

base: fix encoding for JS arch

- - - - -
a0ace338 by Sylvain Henry at 2022-10-09T15:26:10-04:00
Add primops

Add primop

- - - - -
49b349af by doyougnu at 2022-10-09T15:26:10-04:00
Make Shims type, refactor JS Linker

This commit:
 - Adds a proper Shim type and associated utilities. These utitlies are
 purposefully limited to ensure the ShimLbl tag is preserved thus
 guarenteeing shim ordering at link time.
 - Refactors the JS backend linker to use this ordering and Shim API.
 The ordering is not correct (yet!) but with this API its much easier to
 triage, experiment and diagnose link time issues.

Refactor linker to compile time shim ordering

- - - - -
4725d939 by doyougnu at 2022-10-09T15:26:10-04:00
Base: Adapt primitives to JS backend, add base.js

- - - - -
9bb57096 by doyougnu at 2022-10-09T15:26:10-04:00
Base: Remove binding forms in JS ffi

- - - - -
aae076e2 by Josh Meredith at 2022-10-09T15:26:10-04:00
Replace GHCJS Objectable with GHC Binary

- - - - -
8bffa1ad by Sylvain Henry at 2022-10-09T15:26:10-04:00
Binary: remove unused Map instance

- - - - -
1eb4d06d by Sylvain Henry at 2022-10-09T15:26:11-04:00
CodeGen: Add export list

- - - - -
80e22889 by Sylvain Henry at 2022-10-09T15:26:11-04:00
Primops: add some Int64/Word64 primops

- - - - -
f01918eb by Sylvain Henry at 2022-10-09T15:26:11-04:00
base: fix one ffi import

- - - - -
a89c6f8b by doyougnu at 2022-10-09T15:26:11-04:00
base: CPP for JS-backend, adapt write in base shim

This commit ports over each CPP directive from GHCJS to base. In
addition, it adds struct.js.pp to Base shim directory and modifies
h$base_write to always take 6 arguments. Thereby avoiding errors such as
"c(bytesWritten) is not a function". The missing parameter was the file
descriptor object, fdo, which was looked up in the function itself and
is now passed through to comport with the FFI expectations.

- - - - -
1bb9c6f8 by doyougnu at 2022-10-09T15:26:11-04:00
fixup: remove redundant struct.js.pp in js_base

- - - - -
b391c14e by doyougnu at 2022-10-09T15:26:11-04:00
JS.Linker: enable linker RTS symbols

- - - - -
5337c478 by doyougnu at 2022-10-09T15:26:11-04:00
base.GHCJS: adapt Prim to direct call FFI format

- - - - -
38afb1c9 by doyougnu at 2022-10-09T15:26:11-04:00
Linker: Load JSVal from base not ghc-prim

- - - - -
ad777264 by doyougnu at 2022-10-09T15:26:11-04:00
fixup: caught one more reference to JSVal in prim

- - - - -
3ffea260 by Sylvain Henry at 2022-10-09T15:26:12-04:00
base: match on js arch , not ghcjs os

- - - - -
fae9f7a7 by Sylvain Henry at 2022-10-09T15:26:12-04:00
Fix MK_JSVAL

- - - - -
0884eff3 by doyougnu at 2022-10-09T15:26:12-04:00
Prim: cleanup comments

- - - - -
299c0d66 by doyougnu at 2022-10-09T15:26:12-04:00
JS.Prim: add Int64 PrimOps

- - - - -
5283f47d by Sylvain Henry at 2022-10-09T15:26:12-04:00
Vendor MD5 lib

- - - - -
c67bc88e by Sylvain Henry at 2022-10-09T15:26:12-04:00
More 64-bit primops

- - - - -
d96089e6 by Sylvain Henry at 2022-10-09T15:26:12-04:00
CodeGen: use if10 helper

- - - - -
be1e754d by Sylvain Henry at 2022-10-09T15:26:12-04:00
Ppr: fix selector to avoid adding a newline

- - - - -
cd925df6 by doyougnu at 2022-10-09T15:26:13-04:00
base: GHCJS.Prim make ffi imports use anon funcs

- - - - -
7ec12790 by Sylvain Henry at 2022-10-09T15:26:13-04:00
Linker: disable invalid constructors again

- - - - -
11a32208 by Sylvain Henry at 2022-10-09T15:26:13-04:00
More 64-bits primops

- - - - -
f1c83c42 by Sylvain Henry at 2022-10-09T15:26:13-04:00
Fix base_write function

- - - - -
dc5c3a43 by Sylvain Henry at 2022-10-09T15:26:13-04:00
Fix base_write for 32-bit size_t

- - - - -
84b0b015 by Sylvain Henry at 2022-10-09T15:26:13-04:00
Configure: fix detection of the target toolchain

- - - - -
563c8cfc by Sylvain Henry at 2022-10-09T15:26:13-04:00
Remove js_base directory

- - - - -
b98caf92 by Sylvain Henry at 2022-10-09T15:26:13-04:00
Kill Node when the main loop reports an unhandled exception

- - - - -
2b36baa8 by Sylvain Henry at 2022-10-09T15:26:13-04:00
CodeGen: preparation to make match on primops complete

- - - - -
7cf71a42 by Sylvain Henry at 2022-10-09T15:26:41-04:00
Primops: fix Compact primops

- - - - -
3a6c3df8 by Sylvain Henry at 2022-10-09T15:26:41-04:00
Ignore result arity for some exception primops

- - - - -
b8899558 by Sylvain Henry at 2022-10-09T15:26:41-04:00
Fix more primops. Bump array submodule!

- - - - -
f4021c52 by Sylvain Henry at 2022-10-09T15:26:41-04:00
Compact: fix return of 3 values

- - - - -
6ec9807e by Sylvain Henry at 2022-10-09T15:26:41-04:00
Configure: switch to absolute path

- - - - -
b81a7cff by Sylvain Henry at 2022-10-09T15:26:41-04:00
Add a few primops

- - - - -
cbf7ad2c by Sylvain Henry at 2022-10-09T15:26:41-04:00
Primop: implement WordAdd2

- - - - -
23d07897 by Luite Stegeman at 2022-10-09T15:26:41-04:00
quick fix for uTypeVt and typePrimRep panics

this may cause other panics, a full fix will require a bit
more rework and probably removal of VarType

- - - - -
41af93a2 by Josh Meredith at 2022-10-09T15:26:42-04:00
Replace ShortText with (Lexical)FastString in GHCJS backend

- - - - -
5d46445d by Sylvain Henry at 2022-10-09T15:26:42-04:00
Primops: add arithmetic ops

Primops: add decodeDoubleInt64 back

Primop: added timesInt2#

Primop: add mulWord32 and mul2Word32

- - - - -
3d7ab0e3 by Sylvain Henry at 2022-10-09T15:26:42-04:00
Reduce dependency on goog

- - - - -
67c954b2 by Sylvain Henry at 2022-10-09T15:26:42-04:00
Primop: implement quotWord32, remWord32, and quotRemWord32

- - - - -
44b021ad by Sylvain Henry at 2022-10-09T15:26:42-04:00
Primop: Implement quotRem2Word32, misc fixes

Primop: implement quotRem2Word32

Primop: fix timesInt2#

Primop: fix some shifting primops

- - - - -
61c48a91 by Sylvain Henry at 2022-10-09T15:26:42-04:00
Fix bug in upd_frame

I've introduced this bug when I've refactored the code to use helpers to
assign closures.

- - - - -
1f0fd890 by Sylvain Henry at 2022-10-09T15:26:42-04:00
Primop: throw an exception for unimplemented primops

- - - - -
f38cf6dc by Sylvain Henry at 2022-10-09T15:26:42-04:00
Primop: fix remWord32

- - - - -
b177de73 by Josh Meredith at 2022-10-09T15:26:42-04:00
Configure: add EMSDK_BIN, match emsdk expectations

Change EMSDK vars to match emscripten/emsdk_env.sh definitions

Add EMSDK_BIN environment variable to configure

- - - - -
cc3dbdae by Sylvain Henry at 2022-10-09T15:26:43-04:00
resultSize: correctly handle Void#

- - - - -
5ff65797 by Sylvain Henry at 2022-10-09T15:26:43-04:00
Primop: fix Sized test, more shifting fixes

Primop: ensure that we return u32 values for word primops

Also a refactoring from i3 to i32 for clarity.

Primop: add/fix more shifting primops

Primops: fix Sized test!

- - - - -
9c68c4a9 by Sylvain Henry at 2022-10-09T15:26:43-04:00
StgToJS.Apply: Docs

Doc

Doc

- - - - -
bb22fad9 by Josh Meredith at 2022-10-09T15:26:43-04:00
Fix EMSDK configure condition

- - - - -
06dcd4b0 by doyougnu at 2022-10-09T15:26:43-04:00
StgToJS.Arg: Unboxable Literal Optimization note

- - - - -
f2471294 by Sylvain Henry at 2022-10-09T15:26:43-04:00
Fix Outputable instances for JExpr/JVal

- Put orphan instances in JS.Ppr
- Also fix some redundant imports

- - - - -
6ede1a7d by doyougnu at 2022-10-09T15:26:43-04:00
configure: avoid CXX stdlib check for js backend

and some cleanup for a previously mis-applied commit during rebasing

- - - - -
d3d8ec31 by doyougnu at 2022-10-09T15:26:43-04:00
fixup: misc. fixes post rebase

- - - - -
09963e93 by Sylvain Henry at 2022-10-09T15:26:43-04:00
PrimOps: add more 64-bit primops

PrimOp: implement more 64-bit primops + PM fix

Ensure that we cover every primop explicitly

- - - - -
62e1ecd1 by Sylvain Henry at 2022-10-09T15:26:44-04:00
PrimOp: correclty (un)handle new thread related primops

- - - - -
619d7f25 by Sylvain Henry at 2022-10-09T15:26:44-04:00
PrimOp: disable LabelThreadOp for now

- - - - -
92e959ce by Sylvain Henry at 2022-10-09T15:26:44-04:00
Minor doc/cleanup

Fix more redundant imports

- - - - -
3f3b2018 by doyougnu at 2022-10-09T15:26:44-04:00
base: GHCJS.Prim directory --> GHC.JS.Prim

- - - - -
c476d412 by Luite Stegeman at 2022-10-09T15:26:44-04:00
implement KeepAlive primop

- - - - -
1c68d691 by Sylvain Henry at 2022-10-09T15:26:44-04:00
Remove orphan instance for StaticArg

- - - - -
bea6576f by Sylvain Henry at 2022-10-09T15:26:44-04:00
Remove redundant jsIdIdent' function

- - - - -
a46f8a0d by Sylvain Henry at 2022-10-09T15:26:44-04:00
Split StgToJS.Monad into StgToJS.{Monad,Ids,Stack}

- - - - -
b9ab556a by Sylvain Henry at 2022-10-09T15:26:44-04:00
Apply: remove commented case (wasn't optimized either in latest ghcjs)

- - - - -
00cd0a21 by Sylvain Henry at 2022-10-09T15:26:45-04:00
Doc: Apply

Apply: doc and refactoring

- use new types instead of Bool/Int
- factorize some code

- - - - -
e1813774 by Sylvain Henry at 2022-10-09T15:26:45-04:00
Primop: arith fixes

Primop: fix 64-bit shifting primops + add some traces

Primop: fix quotRem2Word32

Primop: fix timesInt2. Progress towards passing arith003

PrimOp: fix timesInt32

PrimOp: use mulWord32 when appropriate

- - - - -
12a2f3c8 by doyougnu at 2022-10-09T15:26:45-04:00
Configure: remove EMSDK hacks and wrapper scripts

configure JS: remove wrapper scripts

Configure: remove EMSDK hacks. Use emconfigure instead

emconfigure ./configure --target=js-unknown-ghcjs

- - - - -
0ed3da29 by Sylvain Henry at 2022-10-09T15:26:45-04:00
GHCJS.Prim leftovers

- - - - -
a7c0c506 by Sylvain Henry at 2022-10-09T15:26:45-04:00
Linker: fix linking issue for tuples

- - - - -
972961fa by Sylvain Henry at 2022-10-09T15:26:45-04:00
FFI: remove narrowing

Fix tests such as cgrun015 (Core lint error)

- - - - -
253e710a by Sylvain Henry at 2022-10-09T15:26:45-04:00
Linker: disable logs with default verbosity

- - - - -
6cdbae35 by Sylvain Henry at 2022-10-09T15:26:45-04:00
Append program name in top-level exception handler

- - - - -
d43e64e6 by doyougnu at 2022-10-09T15:26:45-04:00
GHC.JS: Remove FIXMEs

JS.Syntax: Remove FIXMEs

JS.Make: remove FIXMEs

JS.Ppr/Transform: Remove FIXMEs

- - - - -
bbc1ed43 by Sylvain Henry at 2022-10-09T15:26:46-04:00
Primop: fix timesInt2#

Pass arith003 test

- - - - -
d63abddc by doyougnu at 2022-10-09T15:26:46-04:00
JS.Linker.Linker: remove FIXMEs, clean dead code

- - - - -
1eed67d3 by Sylvain Henry at 2022-10-09T15:26:46-04:00
Linker: link platform shim before the others

- - - - -
7c80a317 by Sylvain Henry at 2022-10-09T15:26:46-04:00
Primops: rework 64-bit and Word32 primops

- Use BigInt instead of complex and buggy bit twiddling. We'll assess
  performance later. Let's use a correct and simple implementation for
  now.

- Implement previously missing 64-bit quot and rem

- Refactor logical operators and Prim module more generally

- - - - -
b1112405 by Sylvain Henry at 2022-10-09T15:26:46-04:00
PrimOp: fixup previous commit...

- - - - -
c918b596 by Sylvain Henry at 2022-10-09T15:26:46-04:00
Primop: fixup previous commit

- - - - -
5576ba27 by Sylvain Henry at 2022-10-09T15:26:46-04:00
Doc: minor changes

- - - - -
cbe2feab by Sylvain Henry at 2022-10-09T15:26:46-04:00
Add debug option to watch for insertion of undefined/null in the stack

- - - - -
775811c9 by Sylvain Henry at 2022-10-09T15:26:46-04:00
Apply: fix tag generation

- - - - -
36e9a750 by Sylvain Henry at 2022-10-09T15:26:47-04:00
Remove redundant import

- - - - -
1ecfa2a7 by Sylvain Henry at 2022-10-09T15:26:47-04:00
Testsuite: disable Cmm tests with the JS backend

- - - - -
d4a291d7 by Sylvain Henry at 2022-10-09T15:26:47-04:00
Base: fix c_interruptible_open

- - - - -
1d1670d2 by Sylvain Henry at 2022-10-09T15:26:47-04:00
Base: fix typo in long_from_number

- - - - -
08df8fae by Sylvain Henry at 2022-10-09T15:26:47-04:00
Env: only add program name to errors, not to traces

- - - - -
998bfbcf by Sylvain Henry at 2022-10-09T15:26:47-04:00
Testsuite: disable more Cmm tests

- - - - -
1a0f32b8 by doyougnu at 2022-10-09T15:26:47-04:00
JS.Linker: removes FIXMEs

JS.Linker.Linker: remove FIXMEs, clean dead code

StgToJS.Linker.Utils: remove FIXMEs

Compactor: Remove FIXMEs

StgToJS.Linker.Types: Remove FIXMEs

JS.Linker.Archive/Dynamic: remove FIXMEs

StgToJS.Linker.Shims: remove FIXMEs

- - - - -
fbb51305 by doyougnu at 2022-10-09T15:26:47-04:00
JS RTS: remove FIXMEs

StgToJS.Rts.Types: Remove FIXMEs

- - - - -
b48161c5 by Sylvain Henry at 2022-10-09T15:26:47-04:00
Primop: fix bswap32/64 (cf cgrun072)

- - - - -
9bf42ba4 by Sylvain Henry at 2022-10-09T15:26:48-04:00
Testsuite: normalise ghc program name

- - - - -
13e86921 by doyougnu at 2022-10-09T15:26:48-04:00
JS Backend: Remove FIXMEs

StgToJS.Apply: Remove FIXMEs

StgToJS.FFI: remove FIXMEs

StgToJS.Expr: remove FIXMEs

StgToJS: Remove FIXMEs

- - - - -
751e97cc by Sylvain Henry at 2022-10-09T15:26:48-04:00
Enable RTS args filtering (cf cgrun025)

- - - - -
931d4fe5 by Sylvain Henry at 2022-10-09T15:26:48-04:00
Remove trailing whitespaces (whitespace test)

- - - - -
f705834b by Sylvain Henry at 2022-10-09T15:26:48-04:00
Testsuite: remove platform prefix for unlit tool

- - - - -
505ba980 by Sylvain Henry at 2022-10-09T15:26:48-04:00
Primop: fix Int64 conversion/negate (integerConversions test)

- - - - -
7f1a03a7 by Sylvain Henry at 2022-10-09T15:26:48-04:00
Linker: remove message with default verbosity

- - - - -
93a42249 by Sylvain Henry at 2022-10-09T15:26:48-04:00
Testsuite: normalise .jsexe suffix

- - - - -
8777d6da by Sylvain Henry at 2022-10-09T15:26:48-04:00
Remove warning about orphan instance

- - - - -
380821f3 by Sylvain Henry at 2022-10-09T15:26:49-04:00
Compactor: disable dead code

- - - - -
ac04433f by Sylvain Henry at 2022-10-09T15:26:49-04:00
Exception: implement raiseUnderflow etc. as primops

- - - - -
916f63fc by Sylvain Henry at 2022-10-09T15:26:49-04:00
Primop: fix Int8/18 quot/rem

- - - - -
6f92413a by Sylvain Henry at 2022-10-09T15:26:49-04:00
Linker: refactor wired-in deps

- - - - -
15991886 by Sylvain Henry at 2022-10-09T15:26:49-04:00
Ppr: remove useless left padding for functions in JS dumps

- - - - -
1ca11bbe by Josh Meredith at 2022-10-09T15:26:49-04:00
Disable llvm ways and ghci for JS backend testsuite

- - - - -
33d806e9 by Sylvain Henry at 2022-10-09T15:26:49-04:00
StaticPtr: don't generate CStubs for the JS backend

- - - - -
547121db by Sylvain Henry at 2022-10-09T15:26:49-04:00
StaticPtr: fix hs_spt_lookup after upstream change

- - - - -
72c344d4 by Sylvain Henry at 2022-10-09T15:26:49-04:00
Testsuite: fix normalisation for unlit

T8430 shows:
  `js-unknown-ghcjs-unlit' failed in phase `Literate pre-processor'. (Exit code: 1)

Notice the quote around the program name. So I've made the regex match
more cases (i.e. not only lines starting with the program name).

- - - - -
1b6015d7 by Sylvain Henry at 2022-10-09T15:26:50-04:00
Codegen: fix codegen of string literals

Due to FastString change:
 Before: Text.pack . BSC.unpack
 After:  mkFastString . BSC.unpack

It seems that Text handles buggy multi-byte codepoints split into
several String Chars.

- - - - -
e744b1b0 by Sylvain Henry at 2022-10-09T15:26:50-04:00
CPP: fix LINE markers. Only disable them for JS

- - - - -
b6ed6f77 by Luite Stegeman at 2022-10-09T15:26:50-04:00
add JavaScript files listed in js-sources to package archives

- - - - -
108c416b by Luite Stegeman at 2022-10-09T15:26:50-04:00
update rts js files to include recent fixes

- - - - -
281309c2 by Luite Stegeman at 2022-10-09T15:26:50-04:00
fix definitions in js/rts.h

- - - - -
02510036 by Josh Meredith at 2022-10-09T15:26:50-04:00
stopgap fix for missing ghc-pkg in cross-compiler tests

- - - - -
c46fe293 by Sylvain Henry at 2022-10-09T15:26:50-04:00
Testsuite: better fix for finding prefixed tools

- - - - -
1398a729 by Sylvain Henry at 2022-10-09T15:26:50-04:00
Ppr: add hangBrace helper

- - - - -
8b59ced1 by Sylvain Henry at 2022-10-09T15:26:50-04:00
Only declare ccs var in profiling mode

- - - - -
42b8b529 by Sylvain Henry at 2022-10-09T15:26:51-04:00
Don't consider recursive bindings as inline nor as evaluated

Fix mdo001

- - - - -
3a88e374 by Sylvain Henry at 2022-10-09T15:26:51-04:00
Hadrian: disable shared libs for JS target

- - - - -
9421b358 by Sylvain Henry at 2022-10-09T15:26:51-04:00
Support -ddump-stg-final with the JS backend

- - - - -
6b9bff37 by Sylvain Henry at 2022-10-09T15:26:51-04:00
Add ticky_ghc0 flavour transformer to ticky stage1

- - - - -
378c20cf by Sylvain Henry at 2022-10-09T15:26:51-04:00
Don't read object file when -ddump-js isn't passed

- - - - -
3fdfd999 by Sylvain Henry at 2022-10-09T15:26:51-04:00
Object: remove dead code + renaming

- - - - -
c271194d by Sylvain Henry at 2022-10-09T15:26:51-04:00
Object: replace SymbolTableR with Dictionary

- - - - -
027f2921 by Sylvain Henry at 2022-10-09T15:26:51-04:00
Object: refactoring

- - - - -
34ba13cc by Sylvain Henry at 2022-10-09T15:26:52-04:00
RTS: link platform.js before the others!

- - - - -
787415d1 by Sylvain Henry at 2022-10-09T15:26:52-04:00
Hadrian: treat JS objects similarly to other objects

- - - - -
f8d4770b by Luite Stegeman at 2022-10-09T15:26:52-04:00
fix javascript FFI calls for read and write

- - - - -
7268481a by doyougnu at 2022-10-09T15:26:52-04:00
propagate ppr code changes to JS backend

- - - - -
37af1bb5 by Sylvain Henry at 2022-10-09T15:26:52-04:00
Switch from Data.Binary and ByteString to BinHandle

- - - - -
e9da018a by Sylvain Henry at 2022-10-09T15:26:52-04:00
Perf: use Ppr's LeftMode to output JS

- - - - -
15b68589 by doyougnu at 2022-10-09T15:26:52-04:00
Primops: Add {Index,Write,Read}ByteArrayAs ops

Still need to check for correctness based on T4442.

minor doc fixes

fixup: add some Index..As primops

fixup missed type signature

Primops: Add WriteByteArrayOp_Word8AsFoo ops

Primops: {Index,Read,Write}FooAsBar done except Addr's

Primops: add {Index,Read,Write}ByteArrayAsAddr ops

These will need to be tested for correctness with T4442.hs

- - - - -
5c933316 by Sylvain Henry at 2022-10-09T15:26:52-04:00
Move platform.js to base (it must be linked first)

- - - - -
1e739d42 by Sylvain Henry at 2022-10-09T15:26:52-04:00
Remove old shim directory

- - - - -
e39c2879 by doyougnu at 2022-10-09T15:26:53-04:00
JS.Prim: more PrimOps {IndexByteArrayAs, CAS}

Primop: WriteByteArrayOp_Word8AsChar use setInt8

Primops: remove dv_s_u8

This function is non-sensical. Due to the infelicities of JS as a
platform we must use Int8 and friends to write, then coerce to a word,
thus dv_s_iN are the only legal calls for a write, and dv_s_uN legal for
Index and Reads.

Primops: set dv_u8 to correct method call

should be getUint8, not getUInt8, of course the naming convention
changes ever so slightly for Words.

Primops: T4442 finishes ByteArrayAs still fails

JS.Prim: More IndexByteAAs primops

JS.Prim: Prefetch PrimOps are noOps

JS.Primops: Doc explaining lack of vector support

JS.Prim: add CAS and Fetch Ops

- - - - -
1481534a by doyougnu at 2022-10-09T15:26:53-04:00
GHC.Utils.Binary: BinDictionary -> FSTable

Rename to avoid naming conflict with haddock.

- - - - -
11357323 by Josh Meredith at 2022-10-09T15:26:53-04:00
Adjust derefnull test exit code for ghcjs

- - - - -
bdacc17f by doyougnu at 2022-10-09T15:26:53-04:00
Fix Driver missing type signature warnings

- - - - -
3e0aa394 by doyougnu at 2022-10-09T15:26:53-04:00
PipeLine.Execute: silence warnings on JS backend

- - - - -
f9cba182 by doyougnu at 2022-10-09T15:26:53-04:00
JS.Primops: Add Bit reverse ops

- - - - -
f6555b16 by doyougnu at 2022-10-09T15:26:53-04:00
SysTools.Tasks: quiet non-totality warnings

- - - - -
ae8e504a by doyougnu at 2022-10-09T15:26:53-04:00
JS.Primops: Add InterlockedExchange Addr Word

- - - - -
82881a73 by Sylvain Henry at 2022-10-09T15:26:53-04:00
base: conditional js-sources

- - - - -
be7233fe by Sylvain Henry at 2022-10-09T15:26:54-04:00
TH: add support for JS files

- - - - -
6b18d1d5 by Sylvain Henry at 2022-10-09T15:26:54-04:00
Linker: fix creation of directories in output paths

- - - - -
5f94513d by Sylvain Henry at 2022-10-09T15:26:54-04:00
Backpack: fix empty stubs

- - - - -
617fae3b by Sylvain Henry at 2022-10-09T15:26:54-04:00
Add encodeDouble/Float RTS functions

- - - - -
cb192c6e by Sylvain Henry at 2022-10-09T15:26:54-04:00
encodeDouble: correctly handle 0 base

- - - - -
93c10d72 by doyougnu at 2022-10-09T15:26:54-04:00
JS.Primops: Add listThreads op

- - - - -
d979d3a2 by doyougnu at 2022-10-09T15:26:54-04:00
JS.Primops: Add Read/WriteAddrOp ops

- - - - -
cb0e371e by doyougnu at 2022-10-09T15:26:54-04:00
JS: Linker and Compactor: cleanup and docs

Compactor: Cleanup: Remove dead comments

JS.Linker.Types: cleanup and document module

- - - - -
44ccba3d by doyougnu at 2022-10-09T15:26:54-04:00
StgToJS.Linker: Add docs to utility modules

StgToJS.Linker.Utils: more docs

StgToJS.Linker.Archive: more docs

- - - - -
634e6db5 by doyougnu at 2022-10-09T15:26:55-04:00
StgToJS.Object: Add documentation

- - - - -
ad2bdae1 by Sylvain Henry at 2022-10-09T15:26:55-04:00
Refactor Expr

- - - - -
7e9c05ed by Sylvain Henry at 2022-10-09T15:26:55-04:00
Object: reduce pinned allocation. And don't forget to hClose invalid objects

- - - - -
633431e8 by Sylvain Henry at 2022-10-09T15:26:55-04:00
Fix pdep (cgrun075)

- - - - -
198efab7 by Sylvain Henry at 2022-10-09T15:26:55-04:00
Fix error message (don't mention emscripten)

- - - - -
181614a4 by Sylvain Henry at 2022-10-09T15:26:55-04:00
Add Float/Word casts

- - - - -
fcf0377c by Sylvain Henry at 2022-10-09T15:26:55-04:00
Disable HPC tests with JS backend

- - - - -
a91724f2 by Sylvain Henry at 2022-10-09T15:26:55-04:00
Fix encodeDouble/Float

- - - - -
36dd6c97 by Sylvain Henry at 2022-10-09T15:26:55-04:00
Implement putchar (fix cgrun015)

- - - - -
77295a16 by Sylvain Henry at 2022-10-09T15:26:56-04:00
Fix decoding of denormalized floats

- - - - -
84255645 by Sylvain Henry at 2022-10-09T15:26:56-04:00
Fix isFloatDenormalized function

- - - - -
29515de8 by Sylvain Henry at 2022-10-09T15:26:56-04:00
Reuse convert buffer

- - - - -
597fa877 by Sylvain Henry at 2022-10-09T15:26:56-04:00
Reuse convert buffer bis

- - - - -
5f506bd6 by Sylvain Henry at 2022-10-09T15:26:56-04:00
Skip some tests that require the dynamic linker

- - - - -
de84ed2c by Josh Meredith at 2022-10-09T15:26:56-04:00
JavaScript ShrinkSmallMutableArrayOp_Char & GetSizeofSmallMutableArrayOp

- - - - -
0b67a804 by Sylvain Henry at 2022-10-09T15:26:56-04:00
Disable more linker tests

- - - - -
b60425ea by Sylvain Henry at 2022-10-09T15:26:56-04:00
Testsuite: better normalisation for ghc and ghc-pkg

Allow normalisation for ghc and ghc-pkg anywhere in the output, not just
at the beginning of the line.

Fix T1750 and ghcpkg05 for example

- - - - -
3b8cfc71 by Sylvain Henry at 2022-10-09T15:26:56-04:00
Skip T14373 because it requires Cmm

- - - - -
379c065c by Sylvain Henry at 2022-10-09T15:26:57-04:00
Disable cg010 with JS backend

- - - - -
e7cb1f4b by Sylvain Henry at 2022-10-09T15:26:57-04:00
Testsuite: better normalisation of .jsexe extension

- - - - -
6da79496 by doyougnu at 2022-10-09T15:26:57-04:00
JS: Linker,Rts docs and cleanup

JS.Linker: Cleanup: remove unused functions/types

JS.Rts.Types: remove dead code, docs

StgToJS.RTS: cleanup and more docs

- - - - -
d8bcd7b0 by Sylvain Henry at 2022-10-09T15:26:57-04:00
Disable recomp015

- - - - -
6a3a8779 by Sylvain Henry at 2022-10-09T15:26:57-04:00
Minor refactoring

- - - - -
97aa2448 by Sylvain Henry at 2022-10-09T15:26:57-04:00
Temporary fix the testsuite bug

- - - - -
95dd39c3 by doyougnu at 2022-10-09T15:26:57-04:00
JS.StgToJS.Types: Docs and cleanup

- - - - -
d20738d2 by Josh Meredith at 2022-10-09T15:26:57-04:00
change JS.Transform.Idents* to use UniqDSet from Set

- - - - -
2d807e03 by Sylvain Henry at 2022-10-09T15:26:57-04:00
Minor Linker cleanup

Minor cleanup

- - - - -
c6140a1c by Sylvain Henry at 2022-10-09T15:26:58-04:00
Linker: load all the dependent units transitively

- - - - -
f0883a76 by doyougnu at 2022-10-09T15:26:58-04:00
JS: Add Docs and cleanup StgToJS.{Arg,Ids}

JS.Arg: docs and cleanup

StgToJS.Arg: add minimal docs

StgToJS.Ids: Add header

- - - - -
a45df4f2 by Sylvain Henry at 2022-10-09T15:26:58-04:00
Implement h$sleep (T5611)

- - - - -
0e1cd5e0 by Sylvain Henry at 2022-10-09T15:26:58-04:00
Linker: don't link the same unit twice

- - - - -
b1885325 by doyougnu at 2022-10-09T15:26:58-04:00
JS:  docs, cleanup, StgToJS.{Expr,DataCon,Stack}

StgToJS.Deps/Expr: add docs

StgToJS.DataCon: add minor docs

StgToJS.Stack: Docs and cleanup

In particular:

-- Removing some single use functions
-- Some minor refactors related to these removals

StgToJS: comments on static args and optimizeFree

- - - - -
83ab2e02 by Sylvain Henry at 2022-10-09T15:26:58-04:00
Disable compact tests

- - - - -
86906bf6 by Sylvain Henry at 2022-10-09T15:26:58-04:00
Add support for JS files passed on the command line

- - - - -
98453fbe by Sylvain Henry at 2022-10-09T15:26:58-04:00
Minor cleanup in compactor

- - - - -
e0c3cf92 by Sylvain Henry at 2022-10-09T15:26:59-04:00
Fix encoding of unboxed strings (don't pass through FastString/h$str)

- - - - -
c889dcd1 by doyougnu at 2022-10-09T15:26:59-04:00
JS: Misc fixes post Del-Cont rebase

- - - - -
1a7681b1 by Sylvain Henry at 2022-10-09T15:26:59-04:00
Minor cleanup

- - - - -
716df754 by Sylvain Henry at 2022-10-09T15:26:59-04:00
Add log1p and expm1 (fix cgrun078)

- - - - -
9971f80e by Sylvain Henry at 2022-10-09T15:26:59-04:00
Assume existence of Math.fround and use it in Float's primops

- - - - -
435c720e by Sylvain Henry at 2022-10-09T15:26:59-04:00
Disable "debug" test

- - - - -
d7fa892c by Sylvain Henry at 2022-10-09T15:26:59-04:00
Implement copyMutableArray with overlap support

- - - - -
35fd207a by Sylvain Henry at 2022-10-09T15:26:59-04:00
Skip CmmSwitchTests

- - - - -
41b5425d by Sylvain Henry at 2022-10-09T15:26:59-04:00
Fix WordToDouble/WordToFloat (Word2Float32 test)

- - - - -
fecff007 by Sylvain Henry at 2022-10-09T15:27:00-04:00
Skip one more test

- - - - -
4b7e942f by Sylvain Henry at 2022-10-09T15:27:00-04:00
Fix after GHC.Tuple to GHC.Tuple.Prim

- - - - -
3323909b by Sylvain Henry at 2022-10-09T15:27:00-04:00
Fix InterlockedExchange primops (cgrun080)

- - - - -
549a0f51 by Sylvain Henry at 2022-10-09T15:27:00-04:00
Disable T12059

- - - - -
c6a66c4b by Sylvain Henry at 2022-10-09T15:27:00-04:00
Implement sqrt/sqrtf (fix T14619)

- - - - -
92b92c5c by Sylvain Henry at 2022-10-09T15:27:00-04:00
Skip more tests

- - - - -
77486ef1 by Sylvain Henry at 2022-10-09T15:27:00-04:00
Disable conc012

- - - - -
986f9fbd by Sylvain Henry at 2022-10-09T15:27:00-04:00
Disable more Cmm tests

- - - - -
5feb234c by Sylvain Henry at 2022-10-09T15:27:00-04:00
Fix AtomicPrimops test. Some refactoring in Prim too

- - - - -
98a6a4ba by Sylvain Henry at 2022-10-09T15:27:01-04:00
Use GHCJS's signExtend/narrow

- - - - -
cac23166 by Josh Meredith at 2022-10-09T15:27:01-04:00
Implement get/set thread label prims

- - - - -
5dbe2a34 by doyougnu at 2022-10-09T15:27:01-04:00
JS: remove Linker.Archive module

- - - - -
849477a8 by Sylvain Henry at 2022-10-09T15:27:01-04:00
Start disabling tests that use TH/interpreter

- - - - -
00457b86 by Josh Meredith at 2022-10-09T15:27:01-04:00
Add flagged bounds checking to JS primops

- - - - -
dd3255d6 by Sylvain Henry at 2022-10-09T15:27:01-04:00
Disable more tests

- - - - -
19e96c90 by Sylvain Henry at 2022-10-09T15:27:01-04:00
Disable T1791

- - - - -
68773b71 by Sylvain Henry at 2022-10-09T15:27:01-04:00
Raise NonTermination as an async exception

- - - - -
17b9d04d by Sylvain Henry at 2022-10-09T15:27:01-04:00
Expect IOPort test to be broken

- - - - -
cbe5475d by Sylvain Henry at 2022-10-09T15:27:02-04:00
Implement rts_isThreaded (fix jules_xref2)

- - - - -
22f5abb7 by Sylvain Henry at 2022-10-09T15:27:02-04:00
Disable outofmem2 test

- - - - -
498e1cd0 by Sylvain Henry at 2022-10-09T15:27:02-04:00
Disable tests using C files

- - - - -
7ce5061f by Sylvain Henry at 2022-10-09T15:27:02-04:00
Disable delimited continuation tests

- - - - -
b0ffa21a by Sylvain Henry at 2022-10-09T15:27:02-04:00
Disable native RTS flag tests

- - - - -
d7ed2895 by Sylvain Henry at 2022-10-09T15:27:02-04:00
Disable more tests

- - - - -
825a7858 by Sylvain Henry at 2022-10-09T15:27:02-04:00
Disable more tests

- - - - -
296a9e9d by Sylvain Henry at 2022-10-09T15:27:02-04:00
Annotation tests require an interpreter

- - - - -
33cdf83b by Sylvain Henry at 2022-10-09T15:27:03-04:00
Skip more tests

- - - - -
946a7399 by Sylvain Henry at 2022-10-09T15:27:03-04:00
Disable try_putmvar tests that use C files

- - - - -
32e4ee07 by Sylvain Henry at 2022-10-09T15:27:03-04:00
Disable even more tests

- - - - -
33c18f2a by Sylvain Henry at 2022-10-09T15:27:03-04:00
Disable test using Cmm

- - - - -
f2e5ba78 by Sylvain Henry at 2022-10-09T15:27:03-04:00
Linker: remove dead code (base, compactor)

- - - - -
63a3fd99 by Sylvain Henry at 2022-10-09T15:27:03-04:00
Better shims linking

- - - - -
916fb690 by Sylvain Henry at 2022-10-09T15:27:03-04:00
Make isJsFile a bit faster by only reading the header

- - - - -
5ef9358a by Sylvain Henry at 2022-10-09T15:27:03-04:00
Linker: write directly into output file

- - - - -
2a70b20a by Sylvain Henry at 2022-10-09T15:27:03-04:00
Linker: more refactoring

- - - - -
ef409720 by Sylvain Henry at 2022-10-09T15:27:04-04:00
Lazy loading of JStat in object code

- - - - -
e04ddd7c by Sylvain Henry at 2022-10-09T15:27:04-04:00
Use Ppr hack to render directly into a file

- - - - -
16696e4f by Sylvain Henry at 2022-10-09T15:27:04-04:00
Fix backpack dependencies

- - - - -
ca078ce8 by doyougnu at 2022-10-09T15:27:04-04:00
testsuite: add js_skip_csources function

Used to indicate a test that fails in the JS backend because the JS
Backend does not yet support c-sources in cabal files.

- - - - -
888271a3 by doyougnu at 2022-10-09T15:27:04-04:00
testsuite: JS: skip tests which use c-sources

Skip because these tests use c-sources and the JS backend does not yet
support including c-sources

testsuite: JS backend: skip backpack tests

testsuite: JS: skip c-sources ffi tests

testsuite: JS: skip multipleHomeUnits_odir

testsuite: JS: disable more backpack tests

testsuite: JS: disable c-sources rts tests

testsuite: JS: skip c-sources codeGen tests

testsuite: JS: skip c-sources generics test

- - - - -


26 changed files:

- .editorconfig
- README.md
- compiler/GHC/Builtin/PrimOps.hs
- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/Data/Graph/Directed.hs
- compiler/GHC/Driver/Backend.hs
- compiler/GHC/Driver/Backend/Internal.hs
- compiler/GHC/Driver/CodeOutput.hs
- compiler/GHC/Driver/Config/StgToCmm.hs
- + compiler/GHC/Driver/Config/StgToJS.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Phases.hs
- compiler/GHC/Driver/Pipeline.hs
- compiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/Driver/Pipeline/Phases.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/HsToCore/Foreign/C.hs
- compiler/GHC/HsToCore/Foreign/Decl.hs
- + compiler/GHC/HsToCore/Foreign/JavaScript.hs
- compiler/GHC/Iface/Binary.hs
- compiler/GHC/Iface/Ext/Binary.hs
- compiler/GHC/Iface/Tidy/StaticPtrTable.hs
- + compiler/GHC/JS/Make.hs
- + compiler/GHC/JS/Parser/Header.hs
- + compiler/GHC/JS/Ppr.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/7287a0521bf21cb800ff3455b744b5d3b3ab450f...888271a3818c849b981b1d099ee9067758f2de6f

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/7287a0521bf21cb800ff3455b744b5d3b3ab450f...888271a3818c849b981b1d099ee9067758f2de6f
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/20221009/4ba6c20e/attachment-0001.html>


More information about the ghc-commits mailing list