Commit Graph

4220 Commits

Author SHA1 Message Date
Matthew Flatt
3777a6d3f0 fix problem with --enable-shared and CGC install 2013-01-25 12:10:36 -07:00
Matthew Flatt
9210437b3f fix internal-definition expansion
The code added to handle expressions mixed with definitions was
not introduced in the right way; fix it to be like macro-introduced
code.

Closes PR 13452
2013-01-25 05:08:46 -07:00
Matthew Flatt
00362a273f fix `string-normalize-nf[k]c' when composed is much smaller then decomposed
For composed normalization, space is initially allocated based on the
decomposed length. The clean up step to avoid wasted space was wrong.
2013-01-24 06:43:10 -05:00
Eli Barzilay
08106e072c New Racket version 5.3.2.2. 2013-01-19 03:30:14 -05:00
Matthew Flatt
48e0509381 add `file-truncate' 2013-01-18 11:03:46 -06:00
Asumu Takikawa
2ac6615da9 Use correct parent for date* in makeexn
Please merge to 5.3.2
2013-01-11 21:22:20 -05:00
Vincent St-Amour
6480addbd1 Distinguish between different kinds of inlining failures. 2013-01-11 18:40:23 -05:00
Vincent St-Amour
8e9f21b181 Make inliner log parsing more robust.
Relies less on regular expressions and more on a custom reader.
2013-01-11 18:40:22 -05:00
Vincent St-Amour
768d88c53d Log functions too big to be inlined.
Patch from Matthew.
2013-01-11 18:40:18 -05:00
Matthew Flatt
f93c620814 futures: bug fix
The problem was in the handing of "lightweight continuations" used to
represent suspended computations, and in particular the handling
of continuation marks (such as the ones added by DrRacket's debugging
mode).

Unfortunately, I wasn't able to construct a simpler test case that
triggers the problem. I think the number of installed continuation marks
has to be just right, and there have to be some replacing marks, and
a lightweight continuaiton has to be captured at the right time
as a result of applying a previously captured continuation.

Closes PR 13427

Merge to v5.3.2
2013-01-11 12:40:51 -07:00
Juan Francisco Cantero Hurtado
99c60d725c It fixes a crash on OpenBSD
It fixes a crash in the installation on OpenBSD. Racket reaches the
limits of the shell when it is compiled with a non-root user account.

Tested on OpenBSD-current amd64.

Merge to v5.3.2
2013-01-09 19:12:22 -07:00
Eli Barzilay
79b9acd444 2012 -> 2013 2013-01-09 01:17:26 -05:00
Eli Barzilay
3f65f91f03 New Racket version 5.3.2.1. 2013-01-08 03:30:08 -05:00
Ryan Culpepper
69f8f2f153 Post-release version for the v5.3.2 release 2013-01-08 00:16:59 -05:00
Matthew Flatt
05837fac1b planet2: installation-wide config of default `raco pkg' scope
With either
  configure --enable-pkgscope=installation
or
  raco pkg config -i --set default-scope installation
the default scope of `raco pkg' actions can be changed from
user-specific to installation-wide.

We considered trying to guess when someone building Racket would prefer
installation-wide package scope by default. In particular, someone
building from source for in-place use seems likely to want
installation-wide scope by default. Then again, we don't want to
discourage in-place builds for Unix installations that are intended
for multiple users. So, no guessing for now.

Also, add a `--scope' argument to `raco pkg' commands, which is more in
line with other options, but keep `-i', etc., as shorthands.
2013-01-06 11:17:22 -07:00
Matthew Flatt
5a1f0f3863 minor README correction 2013-01-05 08:42:20 -07:00
Michael Filonenko
6702fd38d2 supporting http proxy (without authorization) during make install 2013-01-05 06:48:05 -07:00
Matthew Flatt
67f0af387b fix problems with single-flonum (versus flonum) results
The problems were with

 * `sqrt' and `expt' on single-flonum complex numbers
 * `asin' and `acos' on single-flonum arguments and complex results
 * `atan' on mixtures of single-flonum and exact arguments
 * `gcd' on mixtures of single-flonum and flonum arguments
2013-01-04 08:00:24 -07:00
Matthew Flatt
3c5135fc7a `expt' repair, again
Previous repair wasn't general enough; negative powers can also
go wrong.
2013-01-01 18:05:37 -07:00
Matthew Flatt
07d5a9e385 fix `expt' on small negative number and large positive odd
The pow() function apparently gets it wrong on some platforms.

Closes PR 13391
2013-01-01 12:33:59 -07:00
Matthew Flatt
0097d59635 avoid compiler warning 2013-01-01 12:11:36 -07:00
Eli Barzilay
0a0fe1a011 New Racket version 5.3.1.12. 2013-01-01 03:30:13 -05:00
Matthew Flatt
cdfc4912ad racket/base: add exn:fail:filesystem:errno and exn:fail:network:errno
Provide raw error codes when available, which is mostly from filesystem
and networking primitives.
2012-12-31 12:04:03 -07:00
Matthew Flatt
dc9643aef6 fix typo in error message 2012-12-31 12:04:03 -07:00
Matthew Flatt
ba973a317f add `configure' test for mmap() and mprotect()
Use the test to enable execute permission on memory that is allocated
for code, including FFI callbacks.
2012-12-31 12:04:03 -07:00
Matthew Flatt
7cb7beae27 fix non-JIT build
Fix a reference to a function that is only available when the JIT is
enabled.
2012-12-30 20:30:33 -06:00
Matthew Flatt
05ce8bce80 win32: fix MinGW vs. MSVC build problem 2012-12-30 05:41:24 -07:00
Matthew Flatt
93affa4d5d fix a build dependency in --enable-shared mode
Closes PR 13392
2012-12-28 12:22:32 -07:00
Matthew Flatt
03259ef539 MinGW-w64 support
For now, SGC must be used, but `configure' does not select it
automatically.

Also, support Cygwin (in addition to MSYS) as a build environment
when using MinGW compilers. Since I build in a Cygwin environment
(which seemed to be the easiest way to get MinGW-w64 gcc), I use

  ../configure --host=x86_64-w64-mingw32 --enable-sgc
2012-12-28 11:06:46 -06:00
Eli Barzilay
b9a7f0ef62 New Racket version 5.3.1.11. 2012-12-28 03:35:13 -05:00
Matthew Flatt
f2d870859a logging: allow name in `log-message', report it in a log-receiver evt
The synchronization result of a log receiver is now a vector of four
values, instead of three, where the last one reports the name.

Also, an optional argument to `make-logger' provides a notification
callback for each event sent to the logger.

These changes enable more control over loggers and events. Suppose
that you have processes A and B, and you want all log events of A
to be visible to B, but not vice-versa. Furthermore, you want the
log events to appear at B in the right order: if A logs an event
before B, then A's event should arrive at a log receiver's before
B's. Now that a log receiver gets the name associated with the
original event, and now that the name can be re-sent in a
`log-receiver', it's possible to give A and B separate loggers and
send all of the events from A's logger to B's logger. Furthermore,
you can use the notification callback so that when an event is logged
in B, you can make sure that all available events from from A's
logger have been transferred to B's logger.
2012-12-27 14:12:40 -06:00
Matthew Flatt
7bddce81ad fix GC bug
The bug was introduced by commit aa08a68424, which added
support for phantom bytes.
2012-12-26 12:15:04 -06:00
Matthew Flatt
4a57db4448 add (system-type 'word)
Returns 32 or 64 to indicate whether Racket is running as a
32-bit program or a 64-bit program.
2012-12-24 06:38:53 -07:00
Robby Findler
aa27011f34 fix namespace-variable-value error reporting
closes PR 13387
2012-12-23 16:42:40 -06:00
Matthew Flatt
7ff6fd93ef restore incorrectly removed code
But fix its interaction with places and GC, allocating the symbol
on startup instead of per-place.
2012-12-21 17:46:56 -07:00
Matthew Flatt
a665239689 places: fix subprocess-reaping thread creation
Before the repair, a new thread was created with each
subprocess.
2012-12-21 15:52:01 -07:00
Matthew Flatt
d645200f93 fix build problem for non-Windows platforms 2012-12-21 11:52:48 -07:00
Matthew Flatt
9692765e26 places: fix initial stack setup
This repair likely affects all uses of gcc 4.6.x and
later.
2012-12-21 11:44:33 -07:00
Matthew Flatt
3d9b103181 clear some pointers after they are free()ed
If the pointer value is kept, then its possible (though unlikely)
that the GC will get confused.
2012-12-21 11:43:46 -07:00
Matthew Flatt
4b16c7616e mingw32: fix MSC-style underscore consistency 2012-12-21 11:43:45 -07:00
Matthew Flatt
3fb02ecb2e mingw32: use same strategy for thread-locals as MSVC
The gcc implementation of `_thread' seems to be much
slower, so we use the inline-assembly technique from
the MSVC build plus a hack in "main.c".
2012-12-21 11:43:43 -07:00
Matthew Flatt
0c91930965 mingw32: make no-futures, no-places build work 2012-12-21 11:43:42 -07:00
Matthew Flatt
1fc222f135 fix declaration mismatch for GC function 2012-12-20 05:43:59 -07:00
Eli Barzilay
c445a602a1 New Racket version 5.3.1.10. 2012-12-20 03:30:12 -05:00
Matthew Flatt
aa08a68424 add phantom byte strings
A phantom byte string is a small object that the memory
manager treats as an arbitrary-sized object, where the
size is specified when the phantom byte string is created
or or when size is changed via `set-phantom-bytes!'.
2012-12-19 18:42:14 -07:00
Matthew Flatt
4fc71951ee change subprocess handling to avoid waitpid(0, ...)
Keep track of whether any Racket-managed subprocesses are pending,
and use waitpid(0, ...) only if there is one, to better cooperate
with an embedding environment.

Also, add a chapter to the "Inside" manual to explain the issues.
2012-12-19 08:54:32 -07:00
Matthew Flatt
22f9c8509f fix optimizer bug, again
Corrects ef824351a1.
2012-12-16 16:04:19 -07:00
Matthew Flatt
ef824351a1 fix optimizer bug
Moving an expression that is referenced through a level of copy
propagation did not fix up a nested static distance correctly.

Closes PR 13355
2012-12-16 13:11:57 -07:00
Matthew Flatt
d3e4fbe7a7 make scheme_check_threads() run at least on thread quantum
As long as some thread is ready to run, and in case the threads
synchronize after very little work, keep checking threads for
at least one thread quantum.
2012-12-16 13:11:56 -07:00
Matthew Flatt
5baf63f821 syntax-local-get-shadower: fix interaction with marked bindings
Getting a shadower should not drop module context if the context
determines a binding that has marks.
2012-12-13 19:34:32 -07:00
Matthew Flatt
8f3cdd3a03 fix miscapitalization
The capitalization was meant for Windows using MinGW, but it's
not separated from the Unix install.
2012-12-09 15:00:08 -07:00
Matthew Flatt
bca4f47188 fix `configure' typo for MinGW 2012-12-09 14:54:29 -07:00
Matthew Flatt
5b016b4c32 win32: support MinGW build
A MinGW build is the same shape as a MSVC build (but without
MzCOM), unlike a Cygwin build.
2012-12-09 11:26:02 -07:00
Jon Zeppieri
8489448e42 ffi: fix prop:cpointer so that it works with a procedure value 2012-12-07 06:43:30 -06:00
Matthew Flatt
64f0273829 fix printing problem with flvectors 2012-12-05 05:56:59 -06:00
Matthew Flatt
42a0342109 ffi: use newer prim-closure representation for foreign functions
Cuts 1/3 of the time off a call for a micro-benchmark, since the
path from JIT-generated code to C code is faster.
2012-12-03 10:42:35 -07:00
Matthew Flatt
9cf821b301 disallow #fx()' and #fl()' notation in `read-syntax' mode
Allowing them would require support for immutable fxvectors and
flvectors, interning, and more. Since the motivation for reader
support is to make marshaling and unmarshaling easier, allow
them only in `read' mode. Change printing to make then unquotable.
2012-12-03 10:42:35 -07:00
Kevin Tew
492167c23f read and write support for fxvectors and flvectors 2012-12-03 10:42:35 -07:00
Matthew Flatt
cbe0831956 fix problem with re-expansion and renamed imports 2012-11-30 07:26:52 -07:00
Matthew Flatt
f847b76ad1 win32: make "build.bat" work with VCExpress
Closes PR 13231
2012-11-28 05:42:05 -07:00
Matthew Flatt
46fb91cfe4 update pre-built binary path for a win32 patch
Also, describe the patch in the Windows build notes.

This change increases access to symbol fonts, though not in a
completely consistent and portable way. See the closed problem
report for more information, as well as a 24-NOV-2012 post
on the Racket mailing list:
 http://lists.racket-lang.org/users/archive/2012-November/055141.html

Closes PR 13300
2012-11-28 05:39:46 -07:00
Matthew Flatt
9062d27d31 make place-channel receives more fair 2012-11-25 12:29:56 -07:00
Matthew Flatt
4ca6e3c452 fix exception handling during collection-table read
Non-`exn:fail?' exceptions, such as breaks, should be propagated.
2012-11-24 08:13:51 -07:00
Eli Barzilay
777a6cd38b New Racket version 5.3.1.9. 2012-11-24 03:05:18 -05:00
Matthew Flatt
9888fac99e raco setup: move doc dependency and duplicate checking to database
This change makes document building --- and specially incremental
document building --- more scalable. The global duplicate-definition
check is handled by a database query, for example.
2012-11-23 20:07:49 -07:00
Matthew Flatt
9f5324b754 fix quoted submodule path in `all-from-out' 2012-11-23 08:30:01 -07:00
Matthew Flatt
4e0fac0477 JIT: fix allocation of came-lambda closures over flonums
Also, clean up code and assumptions related to fixnum-producing
functions and unboxing (not related to the bug).
2012-11-23 08:20:05 -07:00
Matthew Flatt
961f5e40bf fix untagged cpointer as place-channel message
(repair by Kevin)

Closes PR 13282
2012-11-23 08:20:05 -07:00
Matthew Flatt
fc68d02027 JIT: more buffer-limit adjustments
To cut down on PPC-specific problems, make the JIT buffer's padding
larger on that platform (since instructions tend to be larger).
2012-11-20 06:27:05 -07:00
Eli Barzilay
95541928f1 New Racket version 5.3.1.8. 2012-11-20 03:30:15 -05:00
Matthew Flatt
06db2f9a74 JIT: add missing buffer-limit check
The missing check affected PPC especially.
2012-11-19 19:24:45 -07:00
Matthew Flatt
deb3c87c32 avoid a compiler warning 2012-11-19 09:41:32 -07:00
Matthew Flatt
be20ecc8f3 minor bytecode-compiler fix
A bogus flag was propagated to closure information. This flag
was ignored by the validator, but not `zo-parse'. Make the validator
reject the bogus flag, too, while fixing the compiler.
2012-11-19 09:36:16 -07:00
Matthew Flatt
345fce71d5 another fix to bytecode compiler's propoagation of local-type info
This one is related to shifting type info when the closure is
made smaller due to lifting of something that used to be in
the closure. The `games/pousse/robot' module exposed the bug.
2012-11-18 10:31:20 -07:00
Matthew Flatt
afca33b78b fix to bytecode compiler's propoagation of local-type info
This is another old bug that could have caused validation failures
with flonums, but it showed up with fixnum tracking because fixnums
are more common (e.g., from `string-length').

There were really two bugs: information installed at the
wrong offet in one place, and a failure to detect that information
should be propagated in a different place. Fixing both avoids
a validation problem with `html/sgml-reader'.
2012-11-18 10:31:20 -07:00
Matthew Flatt
81fc033f93 JIT: refactor unboxing flostack to better support other datatypes
Instead of keeping offsets in terms of `double's, keep it in
terms of bytes. This change is a step toward putting other kinds
of values on the flostack, such as extended-precision floats.
2012-11-18 10:31:20 -07:00
Matthew Flatt
4e6f8af667 JIT: fix a bug related to self-tail calls
The last argument in a self-tail cal is treated specially and
not immediately stored on the "runstack". Space was formerly
allocated for it, though, and under certain circumstances
that space was not initialized. I think a combination of thread
timing, GC timing, and flonum boxing could potentially lead to a
crash (but constructing a test case is really difficult).
2012-11-18 10:31:20 -07:00
Matthew Flatt
7a8f5f20fc bytecode compiler: replace table of local types with flags on primitives
This change makes it easier to annotate more primitives, so functions like
`integer-length' are now annotated as producing a fixnum.
2012-11-18 10:31:20 -07:00
Matthew Flatt
c5d3178602 change representation of optimization flags on primitives
Makes room for a lot more.
2012-11-18 10:31:20 -07:00
Matthew Flatt
42f74b5982 JIT tweak: stack-clearing operations do not disturb registers 2012-11-18 10:31:20 -07:00
Matthew Flatt
be4ce3ed66 skip some unneeded fixnum tests in JIT-generated code 2012-11-18 10:31:20 -07:00
Matthew Flatt
4041e65a86 JIT simplification
The scheme_generate_arith() function effectively had its own
copy of of the general scheme_generate_two_args() function that
predates the general one. Using scheme_generate_two_args()
instead simplifies and clarifies the code.
2012-11-18 10:31:20 -07:00
Matthew Flatt
eaf68e6e85 GMP and MPFR as pre-build libraries for Mac OS X and Windows
Also, add versions for Unix references, and adjust the way that
missing bindings are handled.
2012-11-16 22:21:54 -07:00
Matthew Flatt
8d30f1738c fix a sorting problem in a bytecode's submodule table 2012-11-16 14:10:32 -07:00
Matthew Flatt
c3cd089758 fix error message for `map', etc. on arity mismatch
Closes PR 13244
2012-11-16 14:10:32 -07:00
Matthew Flatt
9ef485d802 fix configuration for QNX
Patch from Tobias Hammer.

Closes PR 13265
2012-11-16 06:37:23 -07:00
Matthew Flatt
ed89b32de4 fix argument checking of semi-inlined `continuation-mark-set-first'
Closes PR 13256
2012-11-15 07:03:24 -07:00
Matthew Flatt
6ee62ec5ad check fixnum-literal range before claiming it's always a fixnum 2012-11-15 06:18:05 -07:00
Matthew Flatt
367f47f92d fix bad aliasing 2012-11-15 06:18:05 -07:00
Eli Barzilay
8c021b60ce New Racket version 5.3.1.7. 2012-11-15 03:30:14 -05:00
Matthew Flatt
bdf1c3e165 bytecode compiler: generalize local-type tracking for unboxing
Track fixnum results in the same way as flonum results to enable
unboxing, if that turns out to be useful. The intent of the change,
though, is to support other types in the future, such as "extnums".

The output `raco decompile' no longer includes `#%in', `#%flonum',
etc., annotations, which are mostly obvious and difficult to
keep in sync with the implementation. A local-binding name now
reflects a known type, however.

The change includes a bug repair for he bytecode compiler that
is independent of the generalization (i.e., the new test case
triggered the old problem using flonums).
2012-11-14 19:37:01 -07:00
Matthew Flatt
5400b41bce add `unsafe-cons-pair'
Also, make `list?' more optimistic about checking is  the "is list?"
flag on a pair.
2012-11-14 19:17:42 -07:00
Matthew Flatt
9e3f9fbe3e JIT x86: streamline store of a 32-bit constant 2012-11-14 19:17:42 -07:00
Matthew Flatt
91a5347d5b JIT: push alternate target-register handling into inlined code
This change streamlines generated code slightly.

New release checklist item: double-check by building with
TEST_ALTERNATE_TARGET_REGISTER.
2012-11-14 19:17:42 -07:00
Matthew Flatt
335711bc3f tweak JIT-inlined `cons'
Handle better the case where the first argument is more
complex than the second.
2012-11-14 19:17:41 -07:00
Matthew Flatt
f1807d2ecc JIT: skip an unused load 2012-11-14 19:17:41 -07:00
Matthew Flatt
d99888d700 x86_64: more direct thread-local access in JIT
Use one instruction instead of two.
2012-11-14 19:17:41 -07:00
Matthew Flatt
483148e528 repair to `custodian-shutdown-all'
This appears to be an old bug where a check and use are misordered, so
I'm not sure why it hasn't caused more trouble before, but it depends
on a GC happening at the right time.

Closes PR 13245
2012-11-12 07:01:12 -07:00
Matthew Flatt
4c3ee9c3c9 fix for Win64 build
Repairs a problem introduced by recent JIT changes.
2012-11-12 06:08:11 -07:00
Matthew Flatt
9c4cfdecc4 fix problem with require' inside begin-for-syntax'
The dependency wasn't recorded under the right phase.
2012-11-11 09:38:15 -07:00
Matthew Flatt
54c4a1f21a x86 JIT: use LEA for fixnum tagging
This has no effect on performance that I can detect, but it
looks better.
2012-11-11 09:38:15 -07:00
Matthew Flatt
b223ad2d90 x86_64 JIT: use 32-bit jumps until forced to allocate far away
The JIT was pessimistically using 64-bit jumps for long branches
or any jump between code that is allocated at different times.
Normally, though, code allocation stays within the same 32-bit
range of the heap, so stick to 32-bit jumps until forced by
allocation addresses to use 64-bit jump targets.
2012-11-11 09:38:15 -07:00
Matthew Flatt
e217aaa507 remove accidental declaration 2012-11-11 09:38:15 -07:00
Eli Barzilay
5589bcb278 New Racket version 5.3.1.5. 2012-11-08 03:30:18 -05:00
Matthew Flatt
ab5bbb5b37 flatten simple `define-values' within a module
This flattening is useful for the definition of `assq', for example.
2012-11-07 07:46:25 -07:00
Matthew Flatt
8033900674 add ad hoc optimization of car' to unsafe-car', etc.
In `(if (pair? x) E1 E2)', convert `(car x)' in E1 to
`(unsafe-car x)', and similarly for `(cdr x)'. Also,
`(begin (car x) (cdr x))' converts to `(begin (car x)
(unsafe-cdr x))' since `(car x)' implies a `pair?' test
on `x'.
2012-11-07 07:46:25 -07:00
Eli Barzilay
1c8001d174 Some "obvious" switching from racket' to racket/base'. 2012-11-06 13:29:09 -05:00
Matthew Flatt
25f142299b fix propagation of "multiple result" flag when optimizing `begin0' 2012-11-05 16:15:48 -07:00
Matthew Flatt
bd0e6ae941 fix problems with chaperones, printing, and cycles 2012-11-05 10:48:46 -07:00
Matthew Flatt
1126f02ddd change JIT inlining of `/' to be fast on a fixnum result 2012-11-04 17:20:11 -07:00
Matthew Flatt
eaf1fd1fe5 more consistently clear the tail-call and multiple-values buffers
More consistent clearing avoids a kind of space unsafety. There's just
one buffer per thread, so it's difficult to turn non-clearing into
a detectable leak (I wasn't abel to construct an example), but it
might be possible. More practically, failing to clear the buffer
can make it difficult to debug memory use.
2012-11-04 06:09:21 -07:00
Matthew Flatt
8079ff6c4f fix problem with prompts, call/cc, and tail-buffer allocation
Merge to v5.3.1
2012-11-04 06:09:21 -07:00
Matthew Flatt
7a256fbb72 yet another repair for backtraces
Compacting of the old generation breaks backtrace info. We
could try to fixup backtrace info, but it's simpler to just
disable compaction.
2012-11-04 06:09:21 -07:00
Matthew Flatt
55170581c4 fix locking for futures on uniprocessors
The scheme_is_multiprocessor() function wasn't the right guard
for whether to use a locking compare-and-swap instruction; any
use of pthread-based futures needs the compare-and-swap.

Merge to v5.3.1
2012-11-02 13:10:49 -06:00
Matthew Flatt
1f0508d77e fix initialization of local 2012-11-02 13:01:37 -06:00
Matthew Flatt
3fd5b5eb6e backtrace fix 2012-11-02 13:01:32 -06:00
Matthew Flatt
a635fe817b remove unused local variable 2012-11-02 11:44:43 -06:00
Matthew Flatt
3d68fc2505 fix allocation of bytecode-validation stack overflow 2012-11-02 10:34:17 -06:00
Matthew Flatt
466d6e7394 fixes for PPC JIT
Related to recent structure-operation changes.
2012-11-02 09:56:07 -06:00
Asumu Takikawa
948e898406 Fix continuation mark chaperones
Failed to redirect correctly on `continuation-mark-set-first`
when the mark set argument was #f.
2012-11-02 11:26:40 -04:00
Matthew Flatt
3ca7300a0d improvements to GC backtrace info 2012-11-02 07:45:57 -06:00
Matthew Flatt
b520523950 change GC to specialize pairs a little more
This change doesn't speed up anything, so far. GC performance
of pairs (or anything) is determined almost completely by
its size in bytes, and this change doesn't affect the size of
pairs. At the same time, the change mostly replaces the obsolete
"xtagged" support, and I might have a better idea that builds on
this change, so I'm keeping it for now.
2012-11-02 07:45:57 -06:00
Matthew Flatt
f832c961a8 change `Scheme_Symbol' declaration to avoid compiler warnings 2012-11-01 09:09:36 -06:00
Matthew Flatt
0e4305fc45 fix problem with places and `struct-type-info'
Merge to v5.3.1
2012-11-01 07:19:53 -06:00
Matthew Flatt
8f73ebbc36 fix error-message code
Closes PR 13222
2012-10-31 12:17:49 -06:00
Matthew Flatt
08c659c5d5 fix a bug in `free-identifier=?'
The bug is related to macro-introduced `require' and rename on
export.
2012-10-31 08:03:47 -06:00
Eli Barzilay
f852b9eb92 New Racket version 5.3.1.4. 2012-10-31 03:30:17 -04:00
Matthew Flatt
195cbe832c fix problem with compiler's cross-module shape tracking 2012-10-30 17:47:15 -06:00
Matthew Flatt
8fab527ce3 fix problems with `would-be-future' 2012-10-30 17:28:37 -06:00
Matthew Flatt
8aee78a4bb fix thread-swap callbacks 2012-10-30 17:24:04 -06:00
Matthew Flatt
d7bf677645 track import "shapes" as procedure or structure type
Shape information allows the linker to check the importing
module's compile-time expectation against the run-time
value of its imports. The JIT, in turn, can rely on that
checking to better inline structure-type predicates, etc.,
and to more directy call JIT-generated code across
module boundaries.

In addition to checking the "shape" of an import, the import's
JITted vs. non-JITted state must be consistent. To prevent shifts
in JIT state, the `eval-jit-enabled' parameter is now restricted
in its effect to top-level bindings.
2012-10-30 13:29:28 -06:00
Matthew Flatt
cfb256fe16 cocoa: update PSMTabBarControl for x86_64
The update avoids a now-deprecated method.
2012-10-28 12:04:37 -06:00
Eli Barzilay
cdf7cad8ac New Racket version 5.3.1.3. 2012-10-28 03:35:15 -04:00
Matthew Flatt
fadf8a8860 avoid compiler warnings 2012-10-27 21:34:08 -06:00
Matthew Flatt
847360aa60 avoid compiler warning 2012-10-27 09:24:02 -06:00
Matthew Flatt
5f30cc87ea track information about `struct' bindings during compilation
This tracking allows the compiler to treat structure sub-type
declarations as generating constant results, and it also allows
the compiler to recognize an applications of a constructor or
predicate as functional.
2012-10-27 07:58:56 -06:00
Matthew Flatt
e698be778b remove a level of indirection in struct selectors/mutators 2012-10-27 06:53:21 -06:00
Matthew Flatt
736e6efc2d recognize `struct' bindings as constant
The JIT takes advantage of known-constant bindings to avoid the
check that a variable is still bound to a structure predicate,
selector, or mutator; that makes the code short enough to really
inline. The inlined version takes about half the time of the
indirect version.

The compiler does not yet track bindings precisely enough to
recognize constants for sub-type declarations.
2012-10-27 06:53:21 -06:00
Matthew Flatt
1bf5fda869 fix `chaperone-prompt-tag' 2012-10-24 13:18:53 -07:00
Matthew Flatt
a2c4f6064d fix GC alignment bug
Merge to v5.3.1
2012-10-24 05:47:46 -07:00
Matthew Flatt
1b589c1529 fix a JIT problem with inline stuct allocation 2012-10-23 11:39:23 -07:00
Matthew Flatt
9708a01a0a ffi/unsafe: defend against some finalization bugs
Turn use of a finalized ffi callout into a reported error,
instead of a crash. Clarify the existence of the finalizer
in the docs. Fix error logging of the finalizer thread.

Merge to v5.3.1
2012-10-21 08:11:45 -06:00
Matthew Flatt
70fee17ef9 fix mismanagement of temporary print buffer
Closes PR 13199

Merge to v5.3.1
2012-10-20 09:37:16 -06:00
Matthew Flatt
3407b2e73f more clean-up for even?'/odd?' change
Along the same lines as 44078a1f01.
2012-10-20 09:36:23 -06:00
Eli Barzilay
ad4af39146 New Racket version 5.3.1.2. 2012-10-20 03:30:16 -04:00
James Swaine
44078a1f01 Eliminate code duplication for futures/non-futures mode 2012-10-20 01:36:14 -05:00
James Swaine
9a0f19da59 Fix futures-disabled build errors introduced by changes to even? and odd? 2012-10-19 13:49:05 -05:00
Matthew Flatt
e59066debe bytecode validator: check "constant" annotations on variable references
Bytecode changes in two small ways to help the validator:
 * a cross-module variable reference preserves the compiler's
   annotation on whether the reference is constant, fixed, or other
 * lifted procedures now appear in the module body just before the
   definitions that use them, instead of at the beginning of the
   module body
2012-10-19 11:27:52 -06:00
James Swaine
05e0836b88 Make odd? and even? future-safe 2012-10-18 21:22:11 -05:00
Matthew Flatt
b912d0f059 fix check for constructor of struct setter of immutable field
Merge to v5.3.1
2012-10-18 11:02:06 -06:00
Matthew Flatt
1052852fd4 avoid compiler warning 2012-10-17 20:54:21 -06:00
Matthew Flatt
04e8689a9b add another argument to `{chaperone,impersonate}-prompt-tag'
The new argument gets to chaperone/impersonate a guard at
the prompt, and it is applied when the continuation is applied ---
based on a wrapper on th prompt tag of the continuation (as opposed to
the prompt tag of the prompt).
2012-10-17 10:24:09 -06:00
Samuel Bronson
a86f1751bc Add "install-html" and "install-pdf" targets to Makefile. 2012-10-17 08:47:01 -04:00
Matthew Flatt
843c722146 add an argument to `{chaperone,impersonate}-prompt-tag'
The new argument gets to filter results that come from a
non-composable continuation that replaces one delimited
by a prompt using the chaperoned/impersonated prompt tag.
2012-10-16 15:11:50 -04:00
Matthew Flatt
755cd47cc5 make chaperone-of?' accept prop:equal+hash'
There appears to be no reason to block equality based on
`prop:equal+hash' when using `chaperone-of?'.
2012-10-16 12:17:42 -04:00
Matthew Flatt
9dd83008a6 minor GCs: reduce constant factor on total memory use
I think we're not far from getting the constant down to 0, but
there are still some traversals of the complete page list.
2012-10-15 20:36:19 -04:00
Matthew Flatt
bdff5e8379 avoid compiler warning 2012-10-15 08:24:21 -04:00
Matthew Flatt
2c56ace436 JIT-inline structure allocation
For simple structure types (no guards, no auto fields, no
procedure property). Inlined allocation makes structure
allocation a little faster; more significantly, it
make structure allocation future-safe.
2012-10-15 06:05:33 -04:00
Matthew Flatt
79ada3b16e fix JIT bug in struct pred/get/set corner case
When thie JIT guesses that an identifier is bound to a
structure predicate, getter, setter, etc., but that guess
turns out to be wrong, and the call is in a tail position,
then preserve tail-call behavior.

(Changes include some setup to inline structure constructors.)
2012-10-15 06:05:33 -04:00
Matthew Flatt
15812a94d8 make `make-fsemaphore' atomic (i.e., not blocking) 2012-10-14 11:10:23 -04:00
Matthew Flatt
33db9589a4 make `list-ref' future-safe even for large fixnum indices 2012-10-14 11:10:23 -04:00
Ryan Culpepper
f2e87ed72f fix expander bug introduced by my last commit 2012-10-11 19:16:41 -04:00
Ryan Culpepper
678fc4d6f8 make macro stepper recover from jumps within expansion 2012-10-11 17:44:51 -04:00
Eli Barzilay
e713ccd885 New Racket version 5.3.1.1. 2012-10-08 03:40:14 -04:00
Ryan Culpepper
42d2e60a2f Post-release version for the v5.3.1 release 2012-10-08 02:33:53 -04:00
Matthew Flatt
6edcc4b20f fix error message
Closes PR 13166
2012-10-05 19:43:23 -06:00
Matthew Flatt
909a6fb5c7 Mac OS X: make --disable-libffi the default
Avoids a common problem with libffi installed by MacPorts
causing problems with a mismatch between an iconv installed
by MacPorts and the system iconv. (When libffi is installed,
then -I/opt/include for the libffi heads also picks up the
iconv headers, but the ordering of the lib flags doesn't
pick up libiconv from /opt/lib. We could try to hack around
this by ordering the flags just right, but it seems better
to avoid the issue.)
2012-09-23 09:42:25 -05:00
Matthew Flatt
82bec92418 error message fix 2012-09-20 16:46:07 -06:00
Matthew Flatt
f82a19c963 fix protected/unexported access check 2012-09-19 07:43:56 -06:00
Matthew Flatt
58b054c6a2 patches for Dragonfly
Closes PR 13115
2012-09-15 09:20:27 -06:00
Matthew Flatt
ab251eaca6 win64: defensive check for stack-trace collection 2012-09-13 11:05:52 -06:00
Matthew Flatt
7a772ce09d fix Win64 build for newer SDK 2012-09-13 11:05:52 -06:00
Matthew Flatt
7ce7da8f53 fix for `reroot-path' on Windows 2012-09-12 11:31:58 -06:00
Matthew Flatt
cf120bc4a6 win64: stack-trace repair: add cached tail to trace 2012-09-12 11:30:48 -06:00
Matthew Flatt
90dad98220 fix error message 2012-09-12 11:17:25 -06:00
Matthew Flatt
98cf0429f8 win64: make JIT stack traces work
JIT-generated doesn't actually conform to the constraints
of the Win64 stack-unwind protocol. In pariticular,
JITted code might move the stack pointer after a "preamble"
that saves non-volatiles, and the frame pointer isn't in
the right place. So, we can't implement the generic unwind
hook --- but the JIT's stack traversal can interleave its own
unwinding with the OS-supplied unwinding interface.
2012-09-12 11:13:38 -06:00
Eli Barzilay
a5fd17b16f New Racket version 5.3.0.24. 2012-09-12 03:30:11 -04:00
Matthew Flatt
f1671f2044 fix default logging levels for stderr and syslog 2012-09-11 13:18:18 -06:00
Matthew Flatt
4f351dd6b1 add `current-compiled-file-roots', PLTCOMPILEDROOTS, and -R/--compiled
The new parameter (and supporting environment variables and
command-line flags) can bytecode lookup to a tree other than
where a source file resides, so that sources and generated
compiled files can be kept separate. It also supports storing
bytecode files in a version-specific location (either with
the source or elsewhere).
2012-09-11 13:18:18 -06:00
Eli Barzilay
e208fe645f New Racket version 5.3.0.23. 2012-09-08 15:50:30 -04:00
Matthew Flatt
4d8ee32fd7 fix Windows build
Thanks to Ben Goetter
2012-09-07 16:11:34 -06:00
Matthew Flatt
834f4a5bf3 adjust initial abort handler
Clients of scheme_apply(), scheme_eval(), etc. (i.e., the variants
without a leading "_") except aborts to continue jumping out, while
a recent change to make them behavior more like a default prompt
handler caused them to return on errors. Changethe handler to behave
like the default, except that after running a result thunk, the
handler effectively aborts again.
2012-09-07 13:49:17 -06:00
Matthew Flatt
ff5ce02744 fix bug in places `subprocess' support 2012-09-07 10:41:29 -06:00
Matthew Flatt
9f8e1d792e QNX: use vfork() instead of fork()
Patch by Tobias Hammer

Closes PR 13101
2012-09-07 09:12:45 -06:00
Matthew Flatt
d92b9cb404 add `define-logger' and filtering based on logger name
The `make-log-receiver' function now includes a logger-name
filter. This filter is implemented as a low enough level that
it affects `log-level?' tests to check whether a log message
needs to be constructed at all.

The -W and -L flags and PLTSTDERR and PLTSYSLOG environment variables
support filters of the form "<level> <level>@<name> ...", where
<level>@<name> specializes filtering of events for a logger whose
name matches <name> to show <level> and higher.
2012-09-07 08:16:38 -06:00
Matthew Flatt
2f7d4b5eaf change a thread's initial prompt to use the default handler
The thread's initial prompt previously ignored its arguments.
2012-09-05 12:21:43 -06:00
Matthew Flatt
8bd5dbf7cc ffi/unsafe: change `cast' to avoid pitfalls for you
The old `cast' didn't work right for a mismatch between
a pointer GCableness and the source or target types, and
it didn't work right for an GCable pointer with a non-zero
offset. While those pitfalls were documented, the first
of them definitely has been a source of bugs in code that
I wrote.

Also added `cpointer-gcable?'
2012-09-04 15:28:18 -06:00
Matthew Flatt
99de1b3efa fix problems with `raise-range-error'
Problems include bad index reporting for vectors, bad treatment of
empty strings and byte strings, and misformatting of given name.
2012-09-02 15:57:01 -06:00
Asumu Takikawa
cd23fd48cf Comment and clarify top-level evaluation & barriers 2012-08-31 16:27:35 -04:00
Matthew Flatt
d11e58b639 ffi/unsafe/atomic: add `in-atomic-mode?'
The new function can be useful for debugging, at least.
2012-08-31 07:33:08 -06:00
Eli Barzilay
8a605626ac New Racket version 5.3.0.21. 2012-08-29 03:30:12 -04:00
Matthew Flatt
d953bc27ba fix `ffi/unsafe/nsalloc'
Using `call-as-atomic' isn't right, because that allows an escape
via `call-as-nonatomic'. Assuming that `call-as-nonatomic' isn't
used, it seems like `call-as-atomic' should be ok, anyway, but
somehow its leads to unbalanced `end-atomic' calls.
2012-08-28 18:45:55 -06:00
Matthew Flatt
003613395d fix `font%' amnipulation to work in atomic mode 2012-08-28 17:27:14 -06:00
Matthew Flatt
b61f3f751c port position-tracking clean-ups
Add `file-position*', which can return #f instead of raising
an exception when a port's position is unknown. Change
`make-input-port' and `make-output-port' to accept more
kinds of values as the initial position.

These changes make it possible to synchronize a port's
position with a `port-commit-peeked' action. It's ugly,
which I think reflect something broken about position
tracking in the port protocol (which seems difficult to fix
without breaking compaibility).
2012-08-28 16:04:41 -06:00
Matthew Flatt
763882f651 add port shortcut for `make-{input,output}-port'
Providing a port instead of a reading or writing procedure
redirects the read/write to the specified port. This shortcut
is kind of a hack, but the run-time system can easily streamline
the redirection when it's exposed this way.

Using the new redirection feature reduces overhead in
`with-output-to-bytes' and `pretty-print'.
2012-08-28 08:54:26 -06:00
Matthew Flatt
7e2bcfd994 change -e to flush aftering printing a result
Previously, the use of `pretty-print' for `print' by `racket/main'
and the use of `transplant-output-port' by `pretty-print' caused
a flush to happen.

This problem highlights a potential general issue, which is that
`pretty-print' happened to always flush its output before, and
some programs may accidentally depend on that behavior.
2012-08-27 20:15:43 -06:00
Matthew Flatt
704cb4bd01 make-output-port': fix enable-break?' argument to callbacks 2012-08-27 19:44:06 -06:00
Matthew Flatt
bd8e1e8b1f fix JIT bug related to bad struct-field mutators
We can't disallow the creation of bad mutators without breaking
old code, but we can prevent the JIT from treating them like
good ones.

Closes PR 13062
2012-08-24 15:48:58 -06:00
Matthew Flatt
23722e64c2 change `exn:break:hang-up' handling to skip display
Since SIGHUP normally means that the output has gone away,
don't try to write to it.

Closes PR 13058 (although it doesn't solve the more general
problem that is noted in the PR)
2012-08-24 15:48:58 -06:00
Matthew Flatt
c9a7d310ca remove a useless compiler transformation
The bytecode compiler used to convert an expresison like

  (<flonum-op> <simple-expr> <complex-expr>)

to

 (let ([id <complex-expr>])
   (<flonum-op> <simple-expr> id))

to help an older version of the JIT avoid boxing the result of
<simple-expr>, but that transformation isn't needed, since the JIT can
keep unboxed values on the stack.

The transformation was complex and apparently buggy.

The changes also include a repair to the JIT for code that the
bytecode compiler formerly wouldn't generate, but which is allowed
bytecode.

Closes PR 13052
2012-08-22 15:52:46 -06:00