| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Use JS_BASE_PATH env var to set base's shim directory (js_base for now)
Also minor other changes
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Also fix the rendering of missing primops (they must be z-encoded to
avoid having a "#" in their JS name)
|
|
|
|
|
|
|
|
|
|
| |
Document and refactor renderLinker
Split collectDeps
Fix collectDeps
Fix linker stats rendering
|
|
|
|
| |
Some cleanup
|
|
|
|
| |
CPP: move option before input filename (to be squashed)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
- deduplicate code that was copied from old GHC
- explicitly add preloadUnits to the link
- avoid calling getShims
|
| |
|
|
|
|
|
|
|
|
|
|
| |
JS-backend: Add documentation headers
Docs: JS.Syntax done
Docs: JS.Make done
Docs: JS.Make JS.Syntax refined a bit
|
| |
|
|
|
|
| |
They will be replaced by ghc-prim, base, template-haskell, etc.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
To clearly separate the JS-Backend from any other backend
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Note that the fact that we need index 0 may hide another issue...
|
|
|
|
|
|
|
|
|
|
| |
JS.Linker.Types: Add newGhcjsEnv function
JS.UnitUtils: fix encodeModule api
JS.Linker: more removal of HscEnv
JS.Linker: hooked into GHC.Driver.Pipeline
|
| |
|
| |
|