[GHC] #7933: JavaScript Cmm backend
GHC
cvs-ghc at haskell.org
Tue May 28 02:15:01 CEST 2013
#7933: JavaScript Cmm backend
---------------------------------+------------------------------------------
Reporter: bosu | Owner: bosu
Type: feature request | Status: patch
Priority: normal | Milestone:
Component: Compiler | Version: 7.6.3
Keywords: | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: None/Unknown
Difficulty: Unknown | Testcase:
Blockedby: | Blocking:
Related: |
---------------------------------+------------------------------------------
Comment(by luite):
(sorry for messing up the formatting in the previous message)
Our GHC patch so far does the following:
* Add a JavaScript platform
* Add a Custom Way, allowing you to generate multiple versions of the
code side by side (In GHCJS we use this to build one version for the
JavaScript platform, one for the native platform, for Template Haskell and
native executables.
* Add an override for GHC.Prim (so we can build for the 32 bit JavaScript
platform on 64 bit hosts)
* Add 'foreign import javascript' FFI calling convention, and a
JavaScriptFFI extension that enables it, this gives us the UHC/Fay-like
import patterns [https://github.com/ghcjs/ghcjs-
jquery/blob/master/JavaScript/JQuery/Internal.hs example]
* Add a special JSRef type (from the ghcjs-prim package) that can be
passed to FFI
For us, this is enough to make a working standalone compiler, and since we
can have an easily updatable/cabal installable package that works on both
32 and 64 bit systems this way, we prefer this approach for at least the
near future.
Would you be interested in helping extend the patch for Josh, so it can be
developed as a standalone compiler using the GHC API, and perhaps merge it
when it has proven itself (for example by passing the relevant part of the
GHC testsuite and demonstrating good performance/memory behaviour)?
Feel free to contact me, or hop into #ghcjs on irc.freenode.net to
discuss.
[https://github.com/ghcjs/ghcjs.github.com/blob/master/patches/ghc-
ghcjs.patch]
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7933#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list