Commit Graph

36176 Commits

Author SHA1 Message Date
Vincent St-Amour
6ee45a156d Extend test suite to try double-wrapping everywhere.
To provide additional testing for space-efficient wrappers.

Currently has some failures.
2016-02-12 13:23:21 -06:00
ben
0e1f17b520 option to limit prefix in ~a,~s,~v,~e,~.a,~.s,~.v 2016-02-11 19:51:47 -05:00
Robby Findler
71f338430b clean up some confusion about the timing of errors
specifically, always wait for the neg party to come in
before signalling any errors
2016-02-10 17:36:37 -06:00
Vincent St-Amour
640895645f Fix contract-stronger? to work with late-neg projections. 2016-02-10 15:40:59 -06:00
Stephen Chang
e6a0caa147 Use better regexp for string->url input contract.
Closes #929
2016-02-10 12:54:03 -05:00
Stephen Chang
5ffe007f5c Add faster non-generic in-*-set sequences
closes #1217
2016-02-10 11:24:38 -05:00
Matthew Flatt
5b37bac183 xform: another signbit intrinsic 2016-02-10 06:07:20 -07:00
Matthew Flatt
f21aa8661b xform: more signbit variants 2016-02-09 08:21:41 -07:00
Matthew Flatt
1cffde1df8 fix parallel raco setup failure on dependency cycles
The failure should be an individual module failure, instead of
terminating `raco setup`.
2016-02-09 08:01:42 -07:00
Matthew Flatt
50db01bf2c bump version 2016-02-09 07:38:28 -07:00
Matthew Flatt
c1b9cd6828 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
2016-02-09 07:38:28 -07:00
Matthew Flatt
18990701a6 xform: better reporting for disallowed call 2016-02-09 07:38:28 -07:00
Matthew Flatt
9a8fd2912f 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.
2016-02-09 07:38:28 -07:00
Stephen Chang
06c15dbf89 add tests for non-generic in-hash- sequences 2016-02-08 15:01:08 -05:00
Matthew Flatt
91d85a1fb5 doc clarification on pkg catalog protocol 2016-02-07 13:34:47 -07:00
Matthew Flatt
463c32c61d 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
2016-02-07 13:34:47 -07:00
Matthew Flatt
35acfab903 fix internal array size on module redeclaration
If a module is redeclared with more phases than before,
expand the `running` array.
2016-02-07 13:34:47 -07:00
Gustavo Massaccesi
7982a59a1d Fix eq? reduction 2016-02-07 16:49:06 -03:00
Stephen Chang
048c4b4a73 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
2016-02-05 14:30:34 -05:00
Gustavo Massaccesi
89e00da75e Swap arguments of optimize_get_predicate 2016-02-04 15:42:09 -03:00
Gustavo Massaccesi
9cb0637f95 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.
2016-02-04 15:41:51 -03:00
Gustavo Massaccesi
65838bd3c8 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.
2016-02-04 15:41:32 -03:00
Gustavo Massaccesi
3f246dd857 Use a sub_info to optimize branches
Create a new sub_info for each branch to hold the type information of the local variables, instead of handling the types manually.
2016-02-04 15:41:15 -03:00
Matthew Flatt
5031897c51 try again to clarify atomic mode's unsafety
Closes issue #1228
2016-02-03 10:51:17 -07:00
Gustavo Massaccesi
1b54b1c040 optimizer: reductions for expressions with fixnum
For example, reduce:

(= <fx> <fx>) ==> (unsafe-fx= <fx> <fx>)
(fxmax <fx> <fx>) ==> (unsafe-fxmax <fx> <fx>)
(zero? <fx>) ==> (unsafe-fx= <fx> 0)
(bitwise-not <fx>) ==> (unsafe-fxnot <fx>)
2016-02-03 13:11:59 -03:00
Gustavo Massaccesi
bbbe99db43 optimizer: use type predicates to calculate local types
The functions expr_implies_predicate was very similar to
expr_produces_local_type, and slighty more general.
Merging them, is possible to use the type information
is expressions where the optimizer used only the
local types that were visible at the definition.

For example, this is useful in this expression to
transform bitwise-xor to it's unsafe version.

(lambda (x)
  (when (fixnum? x)
    (bitwise-xor x #xff)))
2016-02-03 13:11:45 -03:00
Jay McCarthy
ced25315ac Merge pull request #1231 from simmone/xml
not sort xml attributes
2016-02-03 11:07:02 -05:00
Matthew Flatt
2ee721f351 clean up GC implementation
Try to make the GC implementation more readable by reordering
and reorganizing the code.
2016-02-03 06:59:05 -07:00
Chen Xiao
19c00dc91c xml attributes not sort 2016-02-03 16:52:15 +08:00
Leif Andersen
4c4874c26d Documentation for scheme_register_process_global is fixed.
It was previously both incomplete, and incorrect.
2016-02-02 17:55:06 -07:00
Gustavo Massaccesi
65eaff3a03 Avoid compiler warnings 2016-02-02 19:06:31 -03:00
Gustavo Massaccesi
2fb1d4f45d Fix typo 2016-02-02 19:06:23 -03:00
ben
7ea277e420 typo: numerator -> denominator 2016-01-30 20:40:55 -05:00
Matthew Flatt
4e7bb3071a OS X: support Unix-style install
Support "Unix-style" (as opposed to "in-place") installation for
OS X, which is mostly a matter of putting ".app" files in the
right place and correcting relative references.

Intended to fix #1180
2016-01-29 22:01:57 -07:00
Robby Findler
7a11d09134 fix tests 2016-01-29 06:14:39 -06:00
Robby Findler
ec4bd288bf add support for ... to -> contracts to indicate repeated arguments
also fix order of evaluation for ->
2016-01-28 15:34:57 -06:00
Robby Findler
856e60fe51 add *list/c 2016-01-28 10:12:24 -06:00
Robby Findler
5214b06a86 use chaperone-of? instead of eq? to find list?, null?, and pair? 2016-01-28 10:12:23 -06:00
Benjamin Greenman
70cefc60bc Merge pull request #1214 from bennn/date-docs
margin-note for gregor & srfi-19
2016-01-28 01:09:40 -05:00
ben
30f045c677 margin-note for gregor & srfi-19 2016-01-27 23:02:35 -05:00
Vincent St-Amour
fe900e0d7a More cons lifting. 2016-01-27 14:41:00 -06:00
Vincent St-Amour
870b8d4137 More cons lifting.
Could not lift all of those completely.
2016-01-27 14:40:59 -06:00
Vincent St-Amour
5dc368585f Lift some blame and neg-party consing.
To avoid doing it every time the contract is checked.
2016-01-27 14:40:59 -06:00
Stephen Chang
9419778b1e add some tests for impersonated hash tables 2016-01-27 14:51:18 -05:00
Robby Findler
c34d37d265 break list contracts out into their own file
which required moving and/c (and integer-in) out of
misc.rkt files to avoid cyclic dependencies
2016-01-27 08:16:39 -06:00
Stephen Chang
86a9c2e493 fix return type of hash_table_index 2016-01-26 10:26:51 -05:00
Stephen Chang
e8d34dd156 add hash-iterate-pair and hash-iterate-key+value
- cuts in-hash and in-hash-pairs iteration time in half
- refactor hash_table_index
- add tests
- bump version

closes #1224
2016-01-26 10:14:40 -05:00
Robby Findler
7563f5a812 refresh the popular keys 2016-01-25 23:55:41 -06:00
Robby Findler
6723c64487 dont use unsafe-{chaperone,impersonator}-procedure when {chaperone,impersonator}-procedure* might be involved 2016-01-25 23:54:12 -06:00
Vincent St-Amour
39a1b81b6a Tests for option contract instrumentation. 2016-01-25 16:36:04 -06:00