Commits on Feb 18, 2016
  1. fix failure in cross-module inliner

    Recent compiler changes expose a bug in the cross-module
    inliner when it turns out to be unable to inline a candidate.
    mflatt committed Feb 18, 2016
  2. avoid a made-up OS error in `rename-file-or-directory`

    On Unix and OS X, the check to avoid replacing an existing
    file or directory is made by Racket, rather than the OS,
    so don't claim a system error if the operation fails for
    that reason.
    Also, update the docs to clarify that the check is not
    atomic with the move.
    Closes issue #1158
    mflatt committed Feb 18, 2016
  3. fix typo

    committed Feb 18, 2016
Commits on Feb 17, 2016
  1. add stack-overflow check in compiler's letrec-check pass

    Closes PR 15247
    mflatt committed Feb 17, 2016
  2. change intermediate representation for the bytecode optimizer

    Correct the second-biggest design flaw in the bytecode optimizer:
    instead of using a de Bruijn-like representation of variable
    references in the optimizer pass, use variable objects.
    This change is intended to address limitations on programs like the
    one in

    where the optimizer could not perform a straightforward-seeming
    transformation due to the constraints of its representation.
    Besides handling the bug-report example better, there are other minor
    optimization improvements as a side effect of refactoring the code. To
    simplify the optimizer's implementation (e.g., eliminate code that I
    didn't want to convert) and also preserve success for optimizer tests,
    the optimizer ended up getting a little better at flattening and
    eliminating `let` forms and `begin`--`let` combinations.
    Overall, the optimizer tests in "optimize.rktl" pass, which helps
    ensure that no optimizations were lost. I had to modify just a few
     * The test at line 2139 didn't actually check against reordering as
       intended, but was instead checking that the bug-report limitation
       was intact (and now it's not).
     * The tests around 3095 got extra `p` references, because the
       optimizer is now able to eliminate an unused `let` around the
       second case, but it still doesn't discover the unusedness of `p` in
       the first case soon enough to eliminate the `let`. The extra
       references prevent eliminating the `let` in both case, since that's
       not the point of the tests.
    Thanks to Gustavo for taking a close look at the changes.
     LocalWords:  pkgs rkt
    mflatt committed Feb 11, 2016
Commits on Feb 16, 2016
Commits on Feb 15, 2016
  1. explain shortcoming in define-opt/c

    related to #1238
    rfindler committed Feb 15, 2016
Commits on Feb 12, 2016
  1. Fix test failures for new double-wrapping tests.

    Everything passes.
    stamourv committed Feb 11, 2016
  2. Extend test suite to try double-wrapping everywhere.

    To provide additional testing for space-efficient wrappers.
    Currently has some failures.
    stamourv committed Feb 11, 2016
Commits on Feb 10, 2016
  1. clean up some confusion about the timing of errors

    specifically, always wait for the neg party to come in
    before signalling any errors
    rfindler committed Feb 10, 2016
  2. Add faster non-generic in-*-set sequences

    closes #1217
    stchang committed Jan 20, 2016
  3. xform: another signbit intrinsic

    mflatt committed Feb 10, 2016
Commits on Feb 9, 2016
  1. xform: more `signbit` variants

    mflatt committed Feb 9, 2016
  2. fix parallel `raco setup` failure on dependency cycles

    The failure should be an individual module failure, instead of
    terminating `raco setup`.
    mflatt committed Feb 9, 2016
  3. bump version

    mflatt committed Feb 9, 2016
  4. xform: recognize some floating-point intrinsics

    GCC v6.0 apparently adds `__builtin_isnan`. Guess at some other future
    additions, while we're at it.
    Closes #1222
    mflatt committed Feb 8, 2016
  5. avoid some C undefined behavior

    Found with `-fsanitize=undefined`. The only changes that are potentially
    bug repairs involve some abuses of pointers that can end up misaligned
    (which is not an x86 issue, but might be on other platforms). Most of
    the changes involve casting a signed integer to unsigned, which
    effectively requests the usual two's complement behavior.
    Some undefined behavior still present:
      * floating-point operations that can divide by zero or coercions
        from `double` to `float` that can fail;
      * offset calculations such as `&SCHEME_CDR((Scheme_Object *)0x0)`,
        which are supposed to be written with `offsetof`, but using
        a NULL address composes better with macros.
      * unaligned operations in the JIT for x86 (which are ok, because
        they're platform-specific).
    Hints for using `-fsanitize=undefined`:
     * Add `-fsanitize=undefined` to both CPPFLAGS and LDFLAGS
     * Add `-fno-sanitize=alignment -fno-sanitize=null` to CPPFLAGS to
       disable those checks.
     * Add `-DSTACK_SAFETY_MARGIN=200000` to CPPFLAGS to avoid stack
       overflow due to large frames.
     * Use `--enable-noopt` so that the JIT compiles.
    mflatt committed Feb 8, 2016
Commits on Feb 8, 2016
Commits on Feb 7, 2016
  1. make `alarm-evt` tests more likely to pass

    The `alarm-evt` tests are inherently racy, since they depend on
    the scheduler polling quickly enough. The old time values were
    close enough that a test failure is particularly likely on
    Windows, where the clock resolution is around 16ms. To reduce
    failures, make the time differents much bigger.
    Closes issue #1232
    mflatt committed Feb 5, 2016
  2. fix internal array size on module redeclaration

    If a module is redeclared with more phases than before,
    expand the `running` array.
    mflatt committed Feb 4, 2016
  3. Fix eq? reduction

    gus-massa committed Feb 7, 2016
Commits on Feb 5, 2016
  1. add unsafe-hash-iterate ops; add specific hash table sequences

    - refactor for.rkt: abstract in-hash- definitions
    - refactor hash_table_next in hash.c
    - move hash fn headers to schpriv.h
    closes #1229
    stchang committed Jan 29, 2016
Commits on Feb 4, 2016
  1. Don't add type information twice

    In some cases, for example while using no_types, the optimizer can try to
    add again the type information of a local variable. This creates unnecessary
    internal storage to save the repeated information.
    gus-massa committed Jan 26, 2016
  2. Try to collapse references in a branch using the type information of …

    …the other branch
    A reference to a local may be reduced in a branch to a constant, while it's unchanged in the
    other because the optimizer has different type information for each branch. Try to use the
    type information of the other branch to see if both branches are actually equivalent.
    For example, (if (null? x) x x) is first reduced to (if (null? x) null x) using the type
    information of the #t branch. But both branches are equivalent so they can be
    reduced to (begin (null? x) x) and then to just x.
    gus-massa committed Sep 24, 2015