Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Apr 14, 2012
  1. Add command line options for JIT.

    authored
    Example:
    
      -O-dce  -Omaxmcode=1024 -Ocbn
    
    This disables dead code (dce) elimination and enables
    call-by-name (cbn).  It also doubles the maximum size of the compiled
    machine code by setting it to 1024 KBytes.
Commits on Apr 9, 2012
Commits on Mar 23, 2012
  1. Add self-verification mode and a few smaller changes.

    authored
    The self-verification mode can only be used with the IR
    interpreter.  It executes the IR until the next snapshot and then
    runs the interpreter to the same program point.  Any side effects
    of the IR code are redirected to the shadow heap and the shadow
    stack.  Once the interpreter reaches the same program point we
    compare the shadow stack & heap with the actual stack & heap.  This
    will hopefully make it easier to find bugs in the future.
    
    Other changes:
    
      * J->slots now keeps track of whether the value was written or simply
        named.  The heuristic of checking whether the value was constructed
        using SLOAD was a hack.
    
      * Add single-stepping mode for the interpreter (used by
        self-verification).
    
      * Add flags to enable/disable trace optimisations on a finer level.
    
      * Add different guards for return address and info table checks.
        Currently they are operationally equivalent to EQ, but that may
        change in the future.
Commits on Feb 13, 2012
Commits on Dec 29, 2011
Commits on Sep 18, 2011
  1. Add option to not compile the code generator.

    authored
    This is useful when developing on machines where there is no working
    backend.  (E.g., currently my old Mac and my netbook.)  To use this
    put the following line into your mk/build.mk:
    
        DisableAsm = Yes
Commits on Aug 27, 2011
Commits on Jul 26, 2011
  1. Start work on garbage collector.

    authored
    We use a simple Cheney-style copying GC.  That part is mostly
    straightforward.  The difficult bit is to correctly communicate to the
    GC which items are pointers and which ones aren't.  The tricky bits
    are the implementation of CALL[T] and ALLOCAP.
    
      - CALL[T] may cause the creation of application continuations
        (ApCont) and partial applications.  An ApCont always lives on the
        stack and must contain the right bitmask to describe the pointers
        on the stack.  ApConts are truly generated at runtime so they must
        be quick to create.  The number of possible shapes (pointer masks)
        grows quadratically with the maximum number of arguments that we
        can pass to a function.  E.g., the current maximum arity 8 allows
        500+ possible pointer masks.  A single program will probably only
        use a tiny subset of all these, so we create ApConts on demand.
    
        What if we want to call a function with more arguments?
        Fortunately PAP (partial application) can have an unlimited number
        of arguments because the pointerhood can be derived from the
        function argument (which must always be a FUN).
    
        A CALL[T] instruction must now contain the pointer bitmask for
        each of its arguments.
    
      - ALLOCAP has the same problem as ApConts regarding the number of
        possible bitmasks.  This could in principle be resolved at load
        time, but for now we generate Ap info tables on demand just like
        for ApConts.
Commits on Jun 7, 2011
Commits on Apr 11, 2011
  1. Makefile tweaks.

    authored
Commits on Mar 25, 2011
Commits on Mar 22, 2011
Commits on Mar 7, 2011
Commits on Mar 6, 2011
  1. Add Bench.SumSquare1.

    authored
  2. Add Bench.SumFromTo3.

    authored
Commits on Mar 5, 2011
  1. Add Bench.Primes.

    authored
Commits on Mar 4, 2011
  1. Turn lets for primitive applications into cases.

    authored
    For some strange reason CorePrep leaves some local bindings such as
    this in its output:
    
        let sat_xyz = GHC.Prim.># a b in
        ...
    
    We cannot create closures for such expressions, but the bytecode
    generator assumes that "let" always means allocation.  So, this patch
    adds a pass that turns all such bindings into case expressions:
    
        case GHC.Prim.># a b of sat_xyz { __DEFAULT ->
        ...
    
    This also requires that we support primitive conditional expressions
    with only one case alternative.  The above thus ultimately translates
    to this:
    
        case (case GHC.Prim.># a b of _
              { True -> True; False -> False }) of sat_xyz { __DEFAULT ->
        ...
  2. Add benchmark variation.

    authored
Commits on Feb 27, 2011
Commits on Feb 26, 2011
  1. Implement a simple interpreter for IR.

    authored
    This allows us to gather some data without having to implement a
    full code generator.
Commits on Feb 25, 2011
Commits on Feb 16, 2011
  1. Create HeapInfo to analyse structure of allocated data.

    authored
    In order to do NEW-elimination we need to find out whether the allocation
    is only needed when leaving the trace and can be omitted if otherwise.  That is,
    similar to Snapshots, we only perform the allocation when we exit the trace.
    
    However, we cannot do this if the purpose of the loop is to allocate data, so we
    need to keep track of the contents of each allocated object.   The HeapInfo
    structure is a first step to efficiently access the needed information.
Commits on Feb 9, 2011
  1. Implement basic trace recording.

    authored
    Currently stops interpreter when trace is complete because we cannot
    replace code with a trace, yet.  Comming soon, though!
Commits on Feb 4, 2011
  1. Add two more test cases.

    authored
  2. Extend standard libraries.

    authored
Commits on Feb 3, 2011
Commits on Feb 1, 2011
  1. Add "Tak" benchmark.

    authored
Commits on Jan 31, 2011
  1. Fix 'make cleanup-bytecode'

    authored
Something went wrong with that request. Please try again.