Skip to content
luite edited this page Apr 2, 2013 · 10 revisions

Gen2 is the new code generator that is nearing completion:

  1. JMacro improvements/fixes (unassigned)
    • x.length-1 is parsed/printed as x.length(-1)
    • operator -= doesn't work
    • add missing ToJExpr instances for Ident and JVal
    • empty case statements, like: case 1: case 2: somestat(); cause parser problems
    • no direct way to declare a variable with a specific name: x :: String, [jmacro| var \(x)`; y `(x)` |]`
  2. Linker improvements (luite)
    • implement lazy loading or bundles for new linker?
  3. Optimizer (unassigned)
    • add optimizer passes to remove unnecessary assignments var x = y; var z = x; -> var z = y;
    • dataflow analysis to update hp and sp only once per function call (closure doesn't do this)
    • optimize register/stack: remove push/store if we know that the same value is already there
    • optimize stack frame layout: try to avoid repushes by reordering variables
    • if function calls itself directly, avoid going through the trampoline but convert to local loop (a limited number of times, to keep thread scheduling working)
  4. Testing and test suite
  5. Standalone/integrated compiler usability
    • Try to get standalone working with GTK
    • See if Yesod devel server needs to be changed to support the standalone build
    • simple development thing that can recompile files automatically when hs file changed?
  6. Cool demonstrations and example projects
    • FRP is hot, realtime too, some simple action game?
    • some traditional web application, interact with jquery-ui, do some client-server requests?
    • example for major web frameworks (yesod, snap?) that includes both ghcjs and native (server-side) code