Commit Graph

3556 Commits

Author SHA1 Message Date
Matthew Flatt
4e4c40ae8c Mac OS X: work around a localtime() bug in 64-bit 10.6.8
For numbers around -67768122973228093, localtime() doesn't return in
10.6.8, while it returns NULL for 10.7.2. Work around the bug by
setting a lower bound that seems to be high enough to avoid the
problem (and that's lower than the lowest value that succeeds, so no
results are lost, at least for now).

Merge to 5.2.1
2012-01-17 16:09:46 -07:00
Matthew Flatt
d85f251eb2 fix stack unsafety for rest-arg functions
If a function with a rest arg is called with argv not at the
start of the runstack, then space is allocated for the rest-arg list
on the runstack without clearing the allocated slot. The value in
the slot could be a pointer that wasn't traversed by the most recent
GC, so it could crash a GC during allocation of the rest-arg list.

Also, tweak setup code for a function of no arguments, and improve
comments in the code.

Merge to 5.2.1
2012-01-17 08:58:14 -07:00
Matthew Flatt
ddd246232e fix JIT-generated code in case of arity mismatch
The generated code was checking arity after potentially copying
arguments to the start of the runstack (i.e., if the arguments
were not already there). If too few arguments are provided, then
the copy might access past the end of the given array.

The redundant arity check removed in commit f7c506471b
had previously masked this problem. (Or the check wasn't redundant
in that sense, but it's better this way.)

Merge to 5.2.1
2012-01-17 07:33:58 -07:00
Matthew Flatt
108c32e11f fix macro expander performance problem
The problem is related to marks that should cancel eagerly when
a form passes through many layers of macro expansion, such as in
the sieve stress test for `syntax-rules'.
2012-01-13 06:18:38 -07:00
Matthew Flatt
84d66ca8fe MysterX repairs
Merge to 5.2.1
2012-01-12 10:55:18 -07:00
Matthew Flatt
45d72785de skip `libtool --finish' if DESTDIR is set
Merge to 5.2.1
2012-01-12 06:55:38 -07:00
Eli Barzilay
7e86136545 New Racket version 5.2.1.3. 2012-01-12 03:50:23 -05:00
Matthew Flatt
a1fd742ed0 change Scribble xref formats, so that HTML info works for Latex
There's no particular reason that any one format will have all
the information that other formats need, but it conveniently works
for now that HTML info can subsume Latex info.
2012-01-11 16:39:52 -07:00
Matthew Flatt
af9d0e6976 add missing OS X thread-data synchronization
Merge to 5.2.1
2012-01-11 14:48:21 -07:00
Matthew Flatt
8976a4c99a avoid some unnecessary work in string port creation
These changes speed up string-port creation by 10% or so in my
tests --- nearly all of that by avoiding the repeated interning
of the symbol 'string.
2012-01-11 09:42:06 -07:00
Matthew Flatt
8c092f093b clean up and generalize optimizer support for omittable primitives
For example, the optimizer knew to drop `(cons x y)' if the result
is unused, but not `(pair? x)'.
2012-01-11 06:58:39 -07:00
Matthew Flatt
7850a26dfe fix bytecode optimizer bugs
Certain unsafe operations were allowed to propagate across a
`lambda' boundary (where space safety is known not to be an issue),
which could lead to duplicate uses of a "once used" variable if
the relevant `lambda' is inlined.

Furthermore, `lambda' boundary crossing wasn't detected in the case
that the operation to propagate was propagated through an intermediate
variable without a `lambda' crossing.

Merge to 5.2.1
2012-01-11 05:30:11 -07:00
Eli Barzilay
dc2aa3ea5c New Racket version 5.2.1.2. 2012-01-10 03:50:17 -05:00
Matthew Flatt
8b54dc43c8 fix problem printing symbols with unicode chars
Specifically, special-casing letters (such as sigma) were not
handled correctly.

Merge to 5.2.1
2012-01-09 16:55:39 -07:00
Matthew Flatt
23010fc495 add #:fail' option to collection-file-path' and `collection-path'
Merge a variant to 5.2.1
2012-01-09 15:59:05 -07:00
Ryan Culpepper
c310292f60 Post-release version for the v5.2.1 release 2012-01-08 23:41:47 -07:00
Matthew Flatt
8d9614c41c better JIT repair
I'm fairly certain that the change in commit 25e9bd2a190acf861 isn't
right, but I'm having trouble generating tests to demonstrate the
original bug or this correction.
2012-01-08 15:37:05 -07:00
Matthew Flatt
824e540cb0 fix JIT bug 2012-01-08 12:14:51 -07:00
Matthew Flatt
2b2c44774f fix scheme_basic_env() reset behavior
Also, fix test to that it DrDr will run it.
2012-01-02 15:03:49 +01:00
Eli Barzilay
3718600125 2011 -> 2012 2011-12-31 15:16:59 -05:00
Matthew Flatt
12baa07e7e fix missing initialization 2011-12-31 06:32:13 -07:00
Matthew Flatt
4fe30cf433 fix cross-module inlining for multi-arity functions
First use of the function was determining a single arity for
the enclosing module, and that arity could trigger warnings
in addition to failures to inline. For example, using `map'
on 3 arguments would trigger incorrect warnings for later
uses of `map' on 2 arguments.
2011-12-28 20:35:53 -06:00
Matthew Flatt
580c952e46 fix locale sensitivity of inexact-number parsing
Closes PR 12070
2011-12-28 19:06:07 -06:00
Matthew Flatt
5cd324af15 src/README corrections (of out-of-date information) 2011-12-21 16:43:01 -07:00
Matthew Flatt
d020c75202 remove libfit 2011-12-21 16:17:56 -07:00
Matthew Flatt
24991f0c1a win64: fix JIT SSE-based FP
XMM6-15 are preserved in the Win64 ABI
2011-12-21 11:27:24 -07:00
Matthew Flatt
58b111485f int -> intptr_t fixes 2011-12-21 11:27:22 -07:00
Matthew Flatt
7fbe3c7224 avoid accidental XFORM-LOCK file in the future 2011-12-19 07:05:27 -07:00
Matthew Flatt
35d800f109 remove accidentally added file 2011-12-19 07:03:25 -07:00
Matthew Flatt
67f83bfd6d win64: fix JIT
Repairs commit 558b03034a.
2011-12-18 16:35:33 -07:00
Matthew Flatt
c9d214138e make `choice-evt' take O(N) time for N arguments
Delay flattening nested `choice-evt's to `sync'.
2011-12-15 16:04:08 -07:00
Eli Barzilay
6960767508 New Racket version 5.2.0.7. 2011-12-15 03:50:18 -05:00
Matthew Flatt
ee775c3cc3 intern strings, etc. only when making syntax objects, not in `read'
Rename `read-intern-literal' to `datum-intern-literal'.

Interning is needed only in `read-syntax' or `datum->syntax' to
set up the invariants that the bytecode compiler needs for cross-module
optimization. When `read'ing numbers from a data file, meanwhile,
interning slows things down a lot and doesn't seem worthwhile.
2011-12-14 16:03:44 -07:00
Matthew Flatt
7ac1232c46 restore and fix chaperone-apply path
with another little performance improvement
2011-12-14 09:56:48 -07:00
Matthew Flatt
a7ddbedc7d disable a part of the new chaperone eval path that isn't right 2011-12-14 09:17:47 -07:00
Matthew Flatt
558b03034a streamline thread-local setup in JIT-generated code
Pass a pointer to the thread-local table on entry to JIT-generated
code, instead of having the JIT-generated code call a C function
to get the table. This doesn't seem to improve performance on my
machine, but it generates less code and is probably faster in
some cases.
2011-12-14 06:21:06 -07:00
Matthew Flatt
761a40d483 faster paths for chaperone application 2011-12-14 06:21:06 -07:00
Matthew Flatt
f7c506471b remove redundant arity checking calling JIT-generated code
JIT-generated code has arity checking built in, but the
interpreter-to-JIT path unnecessarily checked arity before
jumping to JITted code.
2011-12-14 06:20:08 -07:00
Matthew Flatt
be2afcdcc9 add missing bytecode-unmarshal check 2011-12-10 11:43:59 -07:00
Matthew Flatt
bf90cf9028 fix problems printing symbols with unicode chars 2011-12-10 11:43:59 -07:00
Eli Barzilay
ccbd5d51fd New Racket version 5.2.0.6. 2011-12-10 03:50:13 -05:00
Matthew Flatt
287d5cedf5 add `pseudo-random-generator-vector?'
Also, adjust docs to clarify that `vector->pseudo-random-generator!'
can be used as a more complete seeding function.
2011-12-09 09:12:17 -07:00
Vincent St-Amour
c980abf35b Add comments to the inliner. 2011-12-08 17:13:28 -05:00
Matthew Flatt
4a387c5b6a add some missing checks on bytecode parsing
The `tests/racket/stress/fuzz' test fails much less frequently,
though problems certainly remain.
2011-12-08 13:42:09 -07:00
Matthew Flatt
657be87c66 generalize gcd' and lcm' to work on rationals 2011-12-08 09:25:39 -07:00
Matthew Flatt
958352eefc fix futures bug related to GC
When a future is blocked on JIT generation, a lightweight closure
is captured, and then the future moves on, the runtime thread would
correctly shift the on-demand JIT argument to the captured copy
of the runstack. However, it would also add 2 to that pointer
to use as the argv array, and the captured runstack is not allocated
to allow interior pointers, so a GC during on-demand JIT could
crash. The solution is to keep an offset alongside the argv pointer
during JITting.
2011-12-06 09:31:52 -07:00
Matthew Flatt
4f669f0d7e fix futures handling of tail-call results 2011-12-05 19:11:32 -07:00
Matthew Flatt
55b6670084 mysterx patch from Antonio Menezes Leitao 2011-12-05 19:11:32 -07:00
Kevin Tew
9f7e730a77 another round of unused variable clean-ups 2011-12-05 19:11:32 -07:00
Matthew Flatt
b25d1b42d6 minor clean up 2011-12-05 19:10:22 -07:00