Add basic support for GHCJS
authorAustin Seipp <aseipp@pobox.com>
Fri, 6 Sep 2013 18:18:11 +0000 (13:18 -0500)
committerAustin Seipp <aseipp@pobox.com>
Fri, 6 Sep 2013 18:18:11 +0000 (13:18 -0500)
commitb372e8eadcbb6abe00d7a7b1198b656a29dcb1ce
treefef67897d8e6ab0aa9370c96b871ba6b91ecadf1
parentdf614779c356ea6aef29367a8dd1ca819b03a1d1
Add basic support for GHCJS

This patch encompasses most of the basic infrastructure for GHCJS. It
includes:

  * A new extension, -XJavaScriptFFI
  * A new architecture, ArchJavaScript
  * Parser and lexer support for 'foreign import javascript', only
    available under -XJavaScriptFFI, using ArchJavaScript.
  * As a knock-on, there is also a new 'WayCustom' constructor in
    DynFlags, so clients of the GHC API can add custom 'tags' to their
    built files. This should be useful for other users as well.

The remaining changes are really just the resulting fallout, making sure
all the cases are handled appropriately for DynFlags and Platform.

Authored-by: Luite Stegeman <stegeman@gmail.com>
Signed-off-by: Austin Seipp <aseipp@pobox.com>
14 files changed:
compiler/cmm/PprC.hs
compiler/llvmGen/LlvmCodeGen/CodeGen.hs
compiler/main/DynFlags.hs
compiler/nativeGen/AsmCodeGen.lhs
compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs
compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs
compiler/nativeGen/RegAlloc/Linear/Main.hs
compiler/nativeGen/TargetReg.hs
compiler/parser/Lexer.x
compiler/parser/Parser.y.pp
compiler/parser/RdrHsSyn.lhs
compiler/prelude/ForeignCall.lhs
compiler/typecheck/TcForeign.lhs
compiler/utils/Platform.hs