summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Replace GHCJS Objectable with GHC Binarywip/js-binaryJosh Meredith2022-06-169-486/+404
|
* Add primopSylvain Henry2022-06-151-0/+1
|
* base: fix encoding for JS archSylvain Henry2022-06-151-1/+5
|
* Add primopsSylvain Henry2022-06-151-0/+7
|
* Temporarily wire-in base's shimSylvain Henry2022-06-153-23/+768
| | | | | | Use JS_BASE_PATH env var to set base's shim directory (js_base for now) Also minor other changes
* JS.Linker: remove dflags includePath workaround.doyougnu2022-06-141-8/+3
| | | | | | | | 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.
* FFI: desugar every foreign import/export in JS with JS backendSylvain Henry2022-06-142-8/+11
| | | | | | | 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.
* Add some missing primops (Word32,Int32)Sylvain Henry2022-06-131-13/+53
| | | | | Also fix the rendering of missing primops (they must be z-encoded to avoid having a "#" in their JS name)
* Remove unused seqListSpineSylvain Henry2022-06-131-5/+0
| | | | It isn't used in ghcjs either
* Enhance and fix LinkerStatsSylvain Henry2022-06-132-86/+115
| | | | | | | | | | Document and refactor renderLinker Split collectDeps Fix collectDeps Fix linker stats rendering
* Linker: add more typesSylvain Henry2022-06-133-63/+85
| | | | Some cleanup
* CPP: disable line markersSylvain Henry2022-06-131-0/+1
| | | | CPP: move option before input filename (to be squashed)
* JS.Linker: add shimsSylvain Henry2022-06-1331-18/+8637
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* JS Backend: remove misc. warningsdoyougnu2022-06-135-6/+4
|
* JS Backend: ghcjs_HOST_OS --> js_HOST_ARCHdoyougnu2022-06-133-10/+10
|
* JS: silence haddock warningsdoyougnu2022-06-136-11/+18
|
* JS-Backend: rebased to master 468f919bdoyougnu2022-06-1313-56/+69
| | | | | | | | | | | | | | | 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.
* Hadrian: QuickJS ways [] --> Setdoyougnu2022-06-131-3/+3
|
* Linker: remove JS Shims,tiny GHC.Linker refactorSylvain Henry2022-06-131-10/+32
|
* add GHCJS modules to base packageLuite Stegeman2022-06-134-0/+1871
|
* Linker: force less efficient (but working) static encodingSylvain Henry2022-06-131-3/+8
|
* ShortText: add singletonSylvain Henry2022-06-131-0/+5
|
* Linker: reenable packStrings (not yet implemented though)Sylvain Henry2022-06-131-6/+2
|
* Linker: deduplication + fixesSylvain Henry2022-06-137-579/+124
| | | | | | - deduplicate code that was copied from old GHC - explicitly add preloadUnits to the link - avoid calling getShims
* Rename u_env into unit_env (more common)Sylvain Henry2022-06-131-7/+8
|
* Docs: JS.Syntax, JS.Make docs donedoyougnu2022-06-136-218/+536
| | | | | | | | | | JS-backend: Add documentation headers Docs: JS.Syntax done Docs: JS.Make done Docs: JS.Make JS.Syntax refined a bit
* Add outputable instance for DepsSylvain Henry2022-06-131-0/+6
|
* Linker: remove wiring of ghcjs-prim and ghcjs-thSylvain Henry2022-06-132-95/+40
| | | | They will be replaced by ghc-prim, base, template-haskell, etc.
* ghci: Avoid unused-xyz warningsSylvain Henry2022-06-131-2/+4
|
* Remove unused ghcjs unit related codeSylvain Henry2022-06-131-30/+0
|
* Linker: enhance debugging messageSylvain Henry2022-06-132-1/+8
|
* Outputable: add ShortText instanceSylvain Henry2022-06-131-0/+7
|
* Codegen: fix symbol names pprSylvain Henry2022-06-131-1/+1
|
* Remove temporary -fjavascript flagSylvain Henry2022-06-132-36/+0
|
* RTS: fix build of native rtsSylvain Henry2022-06-133-27/+694
|
* GHCi.FFI: ignore ffi.h and friends for js-backenddoyougnu2022-06-131-4/+35
|
* fix duplicate module name in symbolsLuite Stegeman2022-06-131-6/+4
|
* fix package name in module name field of system dependenciesLuite Stegeman2022-06-131-3/+3
|
* Configure: fix previous commitSylvain Henry2022-06-131-4/+4
|
* Configure: fix echo on Mac, add ghcjs target OSSylvain Henry2022-06-131-0/+52
|
* Driver.Main: minor refactor do_code_gendoyougnu2022-06-131-35/+44
| | | | To clearly separate the JS-Backend from any other backend
* ghc-heap: Don't compile Cmm file for JS-Backenddoyougnu2022-06-131-1/+2
|
* CodeGen: handle proxy#Sylvain Henry2022-06-131-0/+6
|
* CodeGen: restore assignAll (instead of assignAllEqual)Sylvain Henry2022-06-131-1/+1
|
* Stg: expose pprStgAltSylvain Henry2022-06-131-1/+1
|
* CodeGen: remove useless importsSylvain Henry2022-06-131-2/+0
|
* Misc: enable HasDebugCallStack for zipWithEqual*Sylvain Henry2022-06-132-6/+7
|
* CodeGen: better debug message for assignCoerce1Sylvain Henry2022-06-131-1/+6
|
* CodeGen: support StackSnapshot# in primTypeVtSylvain Henry2022-06-131-0/+1
|
* base: disable forkOS and bound thread machinerySylvain Henry2022-06-131-2/+33
|