| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
JS-backend: Add documentation headers
Docs: JS.Syntax done
Docs: JS.Make done
Docs: JS.Make JS.Syntax refined a bit
|
|
|
|
| |
Note that the fact that we need index 0 may hide another issue...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
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
|