Skip to content
  1. Jun 16, 2015
  2. Jun 15, 2015
  3. Jun 13, 2015
  4. Jun 12, 2015
  5. Jun 09, 2015
  6. Jun 08, 2015
  7. Jun 07, 2015
  8. Jun 06, 2015
  9. Jun 05, 2015
  10. May 20, 2015
    • Andy Wingo's avatar
      Port dead code elimination (DCE) pass to CPS2 · 48b2f190
      Andy Wingo authored
      * module/language/cps2/dce.scm: New file.
      * module/language/cps2/optimize.scm: Enable CPS2 DCE pass.
      * module/Makefile.am: Add language/cps2/dce.scm.
      48b2f190
    • Andy Wingo's avatar
      Port effects analysis to CPS2 · 80c162b6
      Andy Wingo authored
      * module/Makefile.am (CPS2_LANG_SOURCES): Add effects-analysis.scm.
      * module/language/cps2/effects-analysis.scm: New file, based on
        cps/effects-analysis.scm.
      * module/language/cps2/utils.scm (intmap-map):
        (compute-defining-expressions, compute-constant-values): New helpers.
      80c162b6
    • Andy Wingo's avatar
      Fix bug in CPS2 simplify's "transform-conts" · 7d4ede04
      Andy Wingo authored
      * module/language/cps2/simplify.scm (transform-conts): Return a persistent intmap.
      7d4ede04
    • Andy Wingo's avatar
      intmaps and intsets print with abbreviated key ranges · 102e677b
      Andy Wingo authored
      * module/language/cps/intset.scm (intset-key-ranges, range-string):
        (print-helper, print-intset, print-transient-intset): New helpers.
        Install as intset printers.
      * module/language/cps/intmap.scm (intmap-key-ranges, range-string):
        (print-helper): New helpers.
        (print-intmap, print-transient-intmap): Call the new helpers.
      102e677b
    • Andy Wingo's avatar
      Add arity to worklist-fold · 1403df41
      Andy Wingo authored
      * module/language/cps2/utils.scm (worklist-fold): Add two-seeded arity.
        (worklist-fold2): Remove.
      
      * module/language/cps2/renumber.scm (compute-tail-path-lengths): Adapt.
      1403df41
    • Andy Wingo's avatar
      Variadic intset-fold, intmap-fold · 5f7c8e5c
      Andy Wingo authored
      * module/language/cps/intmap.scm (intmap-fold): Add two-seeded arity.
      * module/language/cps/intset.scm (intset-fold): Merge intset-fold2
        into this function, as a two-seeded arity.
      
      * module/language/cps2/simplify.scm (compute-eta-reductions):
        (compute-singly-referenced-labels, compute-beta-reductions): Adapt
        intset-fold2 callers.
      5f7c8e5c
    • Andy Wingo's avatar
      Intmaps do not treat #f specially as a value · 2b06e90c
      Andy Wingo authored
      * module/language/cps/intmap.scm: Intmaps can now contain any value;
        #f does not indicate the absence of a value.  Instead we use a unique
        private sentinel to mark absent values or branches.
        (*absent*, absent?, present?): New helpers.
        (new-branch): Initialize empty elements to *absent*.
        (clone-branch-with-edit): New helper.
        (clone-branch-and-set): Use clone-branch-with-edit.
        (writable-branch): Use clone-branch-with-edit
        (empty-intmap): Initialize value to *absent*.
        (add-level): clone-branch-and-set doesn't take #f as a branch any
        more; use new-branch.
        (branch-empty?, make-intmap/prune, intmap-add!):
        (intmap-add, intmap-remove, intmap-next, intmap-prev):
        (intmap-fold, intmap-union, intmap-intersect): Use absent? to detect
        absent branches / values.
        (intmap-ref): Likewise.  Instead of returning #f if the value is not
        found, call the optional not-found procedure.  By default this will
        signal an error.
      
      * module/language/cps/types.scm:
      * module/language/cps2/renumber.scm:
      * module/language/cps2/simplify.scm: Adapt to intmap-ref signalling an
        error by default if the value is not found.
      
      * module/language/tree-il/compile-cps2.scm: Adapt to intmap-add
        signalling an error if #f was in the intmap as a value.
      2b06e90c
    • Andy Wingo's avatar
      Add two-argument fixpoint arity · cb7aa0b3
      Andy Wingo authored
      * module/language/cps2/utils.scm (fixpoint): Add two-argument arity.
      cb7aa0b3
    • Andy Wingo's avatar
      Fix bug compiling fixpoint combinator · 4632f3d9
      Andy Wingo authored
      * module/language/tree-il/peval.scm (<operand>): Rename "alias-value"
        field to "alias", which is now an operand and not an expression.
        This allows the operand to capture its environment; before, the
        alias was being visited in its use environment instead of its
        definition environment.
        (peval): Adapt to operand change.  Fix construction of rest bindings
        as well.
      * test-suite/tests/peval.test ("partial evaluation"): New test.
      4632f3d9
    • Andy Wingo's avatar
      Fix fixpoint · e0e47cb5
      Andy Wingo authored
      * module/language/cps2/utils.scm (fixpoint): Fix embarrassing bug
        where it wouldn't actually fixpoint!  Didn't show up in practice
        because CPS2 hasn't run after contification yet.
      e0e47cb5
    • Andy Wingo's avatar
      Fix sub/- primcall bug · fa7df5ed
      Andy Wingo authored
      * module/language/tree-il/compile-cps2.scm (convert): Fix bug
        in (apply - ...), because the instruction for "-" is "sub", and
        "sub" lookup was failing.  Caught by numbers.test.  Really I would
        like to get rid of $prim, somehow.
      fa7df5ed
  11. May 12, 2015
    • Andy Wingo's avatar
      Add optimization pass over CPS2 · ef5f2fca
      Andy Wingo authored
      * module/language/cps2/optimize.scm: New file.
      * module/language/cps2/simplify.scm: New file, factored out of
        simplify2.scm.
      
      * module/language/cps/simplify2.scm: Remove, as it's obsolete.
      
      * module/language/cps2/compile-cps.scm: Optimize the CPS.
      
      * module/Makefile.am: Adapt for added and deleted files.
      ef5f2fca