[GHC] #7933: JavaScript Cmm backend
GHC
cvs-ghc at haskell.org
Mon May 27 11:48:04 CEST 2013
#7933: JavaScript Cmm backend
---------------------------------+------------------------------------------
Reporter: bosu | Owner:
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 simonpj):
Interesting, thank you. Some thoughts:
* I'd be happy to have a JS back end for GHC. As you say, it's pretty
non-invasive, which is good.
* You aren't the first to attack this problem; see
[http://www.haskell.org/haskellwiki/The_JavaScript_Problem the Haskell
wiki JS page]. How does your solution differ? I'd love to see comments
from Fay's author, GHCJS's author etc. Maybe you can make common cause
with some of them to get JS into GHC?
* More generally, before adopting it for GHC, I'd ideally like to see a
group of enthusiasts saying "yes, this is the way to go". I'm not well
equipped to make a critical assessment from a JS point of view.
* You could start a GHC Trac Wiki page describing the implementation in
overview, so someone could figure out how it works (eg including some of
the description above).
* Also the code needs comments! At the moment the code has various
places saying `if hscTarget dflags == HscJavaScript`, but no comment
explaining why that special case is important at that point. I comment the
the `Note [blah]` format; see
[http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle coding
style]. I can see why you have not invested in comments so far; fair
enough, but in the end they'll be necessary.
Similarly, at a larger scale, I have no clue how `PointerMarker` works or
what it is doing.
Finally, who are you in real life, bosu? As you going to do this and move
on, or would you plan to actively support/develop this JS back end? (We
had a Java back end whose author moved on, and it was a pain. Eventually
we deleted it again.)
Thanks
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7933#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list