summaryrefslogtreecommitdiff
path: root/compiler/GHC/StgToJS/Linker
Commit message (Collapse)AuthorAgeFilesLines
* Replace GHCJS Objectable with GHC Binarywip/js-binaryJosh Meredith2022-06-161-8/+8
|
* Temporarily wire-in base's shimSylvain Henry2022-06-151-19/+31
| | | | | | 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.
* Enhance and fix LinkerStatsSylvain Henry2022-06-131-86/+112
| | | | | | | | | | Document and refactor renderLinker Split collectDeps Fix collectDeps Fix linker stats rendering
* Linker: add more typesSylvain Henry2022-06-133-63/+85
| | | | Some cleanup
* JS.Linker: add shimsSylvain Henry2022-06-133-9/+276
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: silence haddock warningsdoyougnu2022-06-132-4/+11
|
* Linker: remove JS Shims,tiny GHC.Linker refactorSylvain Henry2022-06-131-10/+32
|
* Linker: force less efficient (but working) static encodingSylvain Henry2022-06-131-3/+8
|
* Linker: reenable packStrings (not yet implemented though)Sylvain Henry2022-06-131-6/+2
|
* Linker: deduplication + fixesSylvain Henry2022-06-133-498/+35
| | | | | | - 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
|
* Linker: remove wiring of ghcjs-prim and ghcjs-thSylvain Henry2022-06-131-42/+39
| | | | They will be replaced by ghc-prim, base, template-haskell, etc.
* Linker: enhance debugging messageSylvain Henry2022-06-131-1/+1
|
* 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
|
* JS.Linker: Hook up to GHC.Driver.Pipelinedoyougnu2022-06-133-74/+141
| | | | | | | | | | JS.Linker.Types: Add newGhcjsEnv function JS.UnitUtils: fix encodeModule api JS.Linker: more removal of HscEnv JS.Linker: hooked into GHC.Driver.Pipeline
* Linker: fix stage2 buildSylvain Henry2022-06-131-22/+21
|
* JS.Backend: Add JS specific Linkerdoyougnu2022-06-136-0/+3764
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