Commit Graph

4220 Commits

Author SHA1 Message Date
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
Matthew Flatt
2d1cf47636 add `flexpt' to compiler's table of flonum functions
Relevant to PR 13052 - works around the problem while improving
the optimizer, but doesn't fix the real problem, I think.
2012-08-22 10:30:12 -06:00
Matthew Flatt
50980e2831 fix use of compiled startup code 2012-08-21 18:21:56 -06:00
Jon Rafkind
6dae03f283 correctly apply map to its argument due to an early ). Fixes PR 13047 2012-08-21 16:23:44 -06:00
Matthew Flatt
1e375bab48 Linux: struct siginfo' -> siginfo_t' 2012-08-16 16:39:40 -06:00
Matthew Flatt
3150b31eb7 bytecode optimizer improvement
Generalize splitting of `(let-values ([(x ...) (values e ...)]) ....)'
to `(let ([x e] ...) ....)' for any `e', since it's always equivalent.
Right?

(The old requirements on the `e's seem to be needed only for
`letrec-values' splitting and maybe mutable variables.)
2012-08-16 16:39:21 -06:00
Matthew Flatt
0452bd791d bytecode optimizer improvement
Treat unsafe functional operations (which never raise an
exception) as omitable, which means that simple `let-values'
combinations can be split into `let' bindings, etc.
2012-08-16 13:11:41 -06:00
Matthew Flatt
65588b156b fix `sqrt' on numbers with negative real and inexact-zero imag
Closes PR 13028
2012-08-16 04:46:01 -06:00
Matthew Flatt
315834f097 fix no-places, no-futures build 2012-08-16 04:36:44 -06:00
Matthew Flatt
0c9865cee7 fix broken export-table sources
The Cygwin build, especially, depends on the repaired
files.
2012-08-15 07:41:50 -06:00
Matthew Flatt
16cb6f3691 fix race on resolved-module-path table 2012-08-14 09:48:56 -06:00
Eli Barzilay
700846a8b9 New Racket version 5.3.0.20. 2012-08-14 03:30:52 -04:00
Matthew Flatt
23bca99ba1 adjust `local-expand' to add 'submodule property 2012-08-13 17:11:20 -06:00
Matthew Flatt
b043da6ea6 SIGHUP and SIGTERM -> exn:break:hang-up' and exn:break:terminate'
The default uncaught-exception handler calls `exit' when it receives
one of the new exceptions.
2012-08-13 17:11:20 -06:00
Kevin Tew
ebf738e501 Eliminate unused variable compiler warnings 2012-08-13 11:20:05 -06:00
Eli Barzilay
35afcc89ba New Racket version 5.3.0.19. 2012-08-13 04:25:15 -04:00
Matthew Flatt
a6da8f04e8 potential repair for recent thread improvement 2012-08-12 20:17:29 -06:00
Matthew Flatt
42ef79c2ad add `ffi/unsafe/custodian' 2012-08-12 20:17:29 -06:00
Robby Findler
0c6734f782 Add the contents of the "blue boxes" in the docs to the upper-right
corner of the definitions window, based on the information that check
syntax computes

This commit contains two separate changes to make this work:

  - adding a new renderer, based on the text renderer, that
    pulls out the contents of the blue boxes and saves them
    in the doc/ directories (specifically in the files named
    contract-blueboxes.rktd)

  - extend check syntax to use and display the information
    build by the new renderer
2012-08-12 08:41:46 -05:00
Matthew Flatt
3577b9d0eb remove some unneeded specialization for places 2012-08-11 06:42:24 -06:00
Matthew Flatt
50d90e8703 bug fix for thread improvement
Fixes a bug introduced with c89fa0cda7.
2012-08-10 13:28:17 -06:00
Matthew Flatt
c89fa0cda7 fix some O(N) problems for N threads
Repairs include GC setup, thread finalization, and place
synchronization.
2012-08-10 13:00:03 -06:00
Matthew Flatt
b5f0c97762 fix arity error message for keyword-accepting methods
Internally, there's a `prop:method-arity-error' property that is
used for keyword-accepting methods. The same thing could be
accomplished with `procedure->method', but the new property avoids
a wrapper. It might be nice to expose the property from `racket/base',
but that creates trouble for generating arity errors for keyword-
requiring procedures (i.e., when such a procedure is wrapped), so
keep it provate for now.

Closes PR 12982
2012-08-10 12:59:36 -06:00
Matthew Flatt
6852140dd8 fix problem with Racket callbacks as scheduler hooks
Closes PR 12991
2012-08-10 07:49:17 -06:00
Matthew Flatt
4345045b52 fix parsing of complex numbers with special single flonums
Closes PR 12839
2012-08-10 07:49:17 -06:00
Matthew Flatt
5f120373f1 atan: fix result for two inexact-zero arguments
Closes PR 12936
2012-08-10 07:49:16 -06:00
James Swaine
dc6411c48c Fix futures-enabled? to use the correct #ifdef check 2012-08-07 20:48:04 -05:00
Matthew Flatt
d194fa6245 fix `regexp-match' variants given a long string and an output port 2012-08-07 05:21:33 -06:00
Matthew Flatt
699659840a turn off debugging info 2012-08-06 15:03:37 -06:00
Matthew Flatt
13d7a37eb6 re-align expt' and flexpt' to match C99 pow() spec
Also, improve precision of some complex results to avoid
excessive `+nan.0's.

Closes PR 12935
2012-08-06 13:00:36 -06:00
Eli Barzilay
0963d44707 New Racket version 5.3.0.17. 2012-08-05 03:30:15 -04:00
Matthew Flatt
932de7536e use MZ_IS_NAN() instead of non-portable isnan() 2012-08-04 20:49:09 -06:00
Matthew Flatt
579e5d3c87 bump version to reflect accumulated repairs 2012-08-04 10:20:18 -06:00
Matthew Flatt
7c9e6d7193 improve port progress-evt guarantees; fix for `read-bytes-evt' et al.
A progress evt from a close input port must be initially ready,
and the primitive `peek-bytes-avail!' checks a progress evt
before checking whether the port is closed.

These changes resolve a race in `read-bytes-evt' and related evt
constructors.
2012-08-04 10:19:55 -06:00
Vincent St-Amour
79c265ef89 Fix NaN handling of flexpt to be consistent with expt. 2012-08-03 14:21:44 -04:00
Matthew Flatt
5388fac5eb typo in error message 2012-07-31 07:50:46 -06:00
Matthew Flatt
eeb8739417 ffi/unsafe: allow callbacks during wait for foreign call in main place
That is, make a combination of `#:in-original-place? #t' on a call
and `#:async-apply ....' on a callback work.
2012-07-30 07:58:40 -06:00
Matthew Flatt
8fc008c569 fix interaction of place-channel receive and GC
Avoid holding onto a pointer into a place-message page beyond
receipt of the message.

Merge to v5.3
2012-07-28 11:23:22 -06:00
Matthew Flatt
9d6f0e96ba fix for bytecode validator
Fix tchecking for a rest argument to a function that
is lifted by closure conversion so that one of its
arguments is a mutable local variable's location.

Also reject bytecode that would pass too many arguments
to a lifted function, since that would trigger an arity
error that might try to use a location as a value.

Merge to v5.3
2012-07-26 16:32:59 -06:00
Matthew Flatt
87d24ece78 more on `port-commit-peeked' and EOFs
Continues/fixes commit 4c3dd00d49.
2012-07-26 10:39:24 -06:00
Matthew Flatt
1efc894ada toward fixed interaction between positions and peek-commits
When a `port-commit-peeked' succeeds, position information should
(appear to) be updated. This patch synchronizes commits and
position information for primitive ports, but synchronizing
them for user ports remains a problem.
2012-07-26 10:39:17 -06:00
Matthew Flatt
880f84b24f fix bug in `sync'
When `guard-evt' or `nack-guard-evt' is used, `sync' didn't
account for the possibility that a channel or semaphore
action might complete during the call to the guard, in which
case it might fail to select the event that has already
completed.

Merge to v5.3
2012-07-26 08:40:43 -06:00
Matthew Flatt
4c3dd00d49 fix `port-commit-peeked' and mid-stream EOFs 2012-07-26 06:14:35 -06:00
Matthew Flatt
d8461837f9 fix `current-subprocess-custodian-mode'
An 'interrupt setting was treated as a 'kill setting.

Merge to v5.3
2012-07-25 20:45:52 -06:00
Matthew Flatt
df4fed7011 windows: fix `subprocess' for an empty argument
An empty argument must be quoted at the CreateProcess() level.

Merge to v5.3
2012-07-25 20:37:20 -06:00
Matthew Flatt
abc437ac29 remove bad `return's 2012-07-25 20:07:23 -06:00
Matthew Flatt
7d894bfb63 Note require' of a main' submodule for -t', -l', and `-p'
In the output of `racket -h' and in the command-line docs.

Merge to v5.3
2012-07-25 20:07:23 -06:00
Matthew Flatt
5a1bc5ad40 normalize module rename info to vector in ".zo" format
This is related to the receent repairs for submodules and
`variable-reference->namespace'.

Merge to v5.3
2012-07-24 07:22:57 -05:00
Matthew Flatt
f7382b17c7 ad hoc optimization of `hash-ref'
Convert
 (hash-ref <hash> <key-expr> (lambda () <literal>))
to
 (hash-ref <hash> <key-expr> <literal>)
which is useful for making the `case' expansion fit
Typed Racket.
2012-07-23 21:41:49 -05:00
Matthew Flatt
a0ba30d8e7 fix `syntax-local-get-shadower' for submodules
Closes PR 12926, 12928

Merge to v5.3
2012-07-22 21:43:20 -05:00
James Swaine
f0aaca0dde Change future visualizer trace collection slightly to be more composable 2012-07-22 20:03:22 -05:00
James Swaine
df54f8460b Fix future visualizer trace collection when running inside DrRacket 2012-07-22 20:03:21 -05:00
Eli Barzilay
a6b20f01da Use string-no-nuls?' and bytes-no-nuls?' in more docs & error messages.
Also use `byte?' instead of (integer-in 0 255).

(This commit will most likely require some proof-reading.)
2012-07-22 13:00:05 -04:00
Matthew Flatt
d95ec4d454 fixes for submodules and `variable-reference->namespace'
Closes PR 12925

Merge to 5.3
2012-07-22 11:54:46 -05:00
Asumu Takikawa
e14c5d61e9 Allow guards for impersonatable struct type properties 2012-07-19 22:46:14 -04:00
Matthew Flatt
d3677524b8 macro expander fix
Relevant to PR 12863

Merge to v5.3
2012-07-19 20:42:36 -05:00
Matthew Flatt
a45d13b52a another `namespace-attach-module' repair for submodules
Merge to v5.3
2012-07-19 16:50:25 -05:00
Matthew Flatt
73e07f576b macro-expander fix
The "simpliciation" of a syntax object's lexical context was dropping
module contexts that have no bindings, but those contexts now
contribute to the identifty of some bindings. Fix simplification
to replace the full rename rename with a simplified one, instead
of just dropping it.

Merge to v5.3
2012-07-19 16:50:25 -05:00
Matthew Flatt
9413b30599 fix related to module name resolver change 2012-07-19 07:46:50 -05:00
Matthew Flatt
5c626c5872 3m GC hints 2012-07-19 07:46:50 -05:00
Eli Barzilay
36ee9f9bbd Fix typo from commit 12a4ee8. 2012-07-18 22:52:41 -04:00
Eli Barzilay
bee08899eb New Racket version 5.3.0.16. 2012-07-18 03:30:10 -04:00
Ryan Culpepper
97fabae42f Post-release version for the v5.3 release 2012-07-17 19:21:23 -04:00
Matthew Flatt
5e4866e54c fill in one more corner of submodules and `namespace-attach-module'
When submodules are not independently loaded, then pull submodule
declarations along when attaching a module to a namespace.
2012-07-17 10:16:32 -06:00
Matthew Flatt
c8f4ac6ae4 submodules: make .zo path stick for consistent independent loading
When a module is loaded from bytecode and then the value of
`use-compiled-file-paths' changes, an attempt to load a submodule
would fail, because source isn't used if the main module is
already declared, and the bytecode code is not used according to
`use-compiled-file-paths'. Make the bytecode path stick when it
is used once, so that submodule loads succeed, and make it work
even with `namespace-module-attach'.

The module-attach part of this protocol requires a change to the
API of a module name resolver: the notification mode gets two
arguments, instead of one, where the second argument is an
environment.
2012-07-17 09:47:05 -06:00
Matthew Flatt
12a4ee8d98 FFI repairs for 64-bit big-endian
Again; missed pieces for b3c721a346.
2012-07-17 06:07:40 -06:00
Sam Tobin-Hochstadt
0c9bd915bc Fix error message for find-system-path.
Closes PR 12916.
2012-07-17 07:40:46 -04:00
Matthew Flatt
b3c7210a34 FFI repairs for 64-bit big-endian
Based on a patch supplied by Stephen Lewis
2012-07-16 19:22:31 -06:00
Matthew Flatt
8718a5dd62 doc and error-message fixes for module name resolver 2012-07-16 19:22:30 -06:00
Matthew Flatt
73e901a262 fix optimizer bug
The lambda-lifting transformation needs to iterate to a fixpoint
where each lambda's added arguments and order are known. The
check for whether something changed was formerly just the number
of added arguments, but that's not good enough, because a binding
might get lifted away while another one acquires an extra argument.
The right test is to check the count and original bindings for the
added arguments.

Closes PR 12910
2012-07-15 10:32:45 -06:00
Matthew Flatt
9b51973b79 fix bytecode validation bug
Since the optimizer can lambda-lift a function and adds box arguments
(i.e., locations of mutable variables instead of values), then
the validator must check that calls and declarations are consistent.
But declaration-side information wasn't registered properly.
2012-07-15 10:32:33 -06:00
Matthew Flatt
e430463ea4 another submodule expansion repair
Relevant to PR 12902
2012-07-13 09:38:44 -06:00
Matthew Flatt
a94a2f6d55 avoid compiler warning 2012-07-13 07:48:17 -06:00
Matthew Flatt
1d8f5279bd futures: fix a problem related to lightweight continuations
The mark-stack counter needs to be updated even if there
are no entries to add to the mark stack.
2012-07-12 15:43:22 -06:00
Matthew Flatt
f747c086d8 fix checking for `syntax-local-lift-require'
Closes PR 12894
2012-07-11 14:03:31 -06:00
Matthew Flatt
a022e78ab1 fix Windows (and maybe other compilers) compile problem 2012-07-11 10:29:28 -06:00
Vincent St-Amour
0ae21d8036 Have inlining logs be produced at the debug level, like the TR opt logs. 2012-07-11 10:59:33 -04:00
Vincent St-Amour
78355b6398 Give up on reporting close calls directly from the inliner. 2012-07-11 10:59:33 -04:00
Vincent St-Amour
570c5ef0f4 Log fuel and closure size.
That way, we can detect close calls post facto.
2012-07-11 10:59:32 -04:00
Vincent St-Amour
4538072df6 Add anchor to inliner messages. 2012-07-11 10:59:32 -04:00
Vincent St-Amour
9424c843ef Log inlinings that were close to happening. 2012-07-11 10:59:31 -04:00
Vincent St-Amour
c2018e3710 Log inlining successes, and some failure paths. 2012-07-11 10:59:31 -04:00
Eli Barzilay
6752bec4a3 New Racket version 5.3.0.14. 2012-07-11 03:30:15 -04:00
Matthew Flatt
506b70f71f fix `variable-reference->module-source' for submodules
Unlike the `variable-reference->resolved-module-path', the module
source one doesn't include a submodule path.
2012-07-10 18:35:03 -06:00
Matthew Flatt
428711bf93 another submodule-expansion repair 2012-07-10 15:05:40 -06:00
Matthew Flatt
85bc23377b increment version 2012-07-10 11:42:42 -06:00
James Swaine
2b2070f7b2 Clean up code in futures visualizer
Remove mouseover display for creation graph nodes (for now)
2012-07-10 10:54:43 -05:00
James Swaine
39f42b753d Futures visualizer - show name of jitted function for on_demand events 2012-07-10 10:54:43 -05:00
James Swaine
919d359e9a Make sure future log buffers are cleared when starting to
trace for the futures visualizer
2012-07-10 10:54:42 -05:00
James Swaine
b6f71ec4be Add futures visualizer, improvements to futures logging 2012-07-10 10:54:42 -05:00
Matthew Flatt
8c66bd786b error-message repair
Closes PR 12886
2012-07-06 16:48:37 -06:00
Matthew Flatt
29c83cd254 fix a problem with unboxed arguments in self tail calls
This is an old bug, but it was exposed by recent improvements
in unboxing.

Also, fix JIT implementation of explicitly decremented fuel on
a 64-bit platform, plus some other code clean-up.
2012-07-06 08:25:05 -06:00
Matthew Flatt
f71037c775 also improve JIT support for unboxed flonums in non-tail-call
Applies to non-tail calls to immediate functions, which can be
generated by a `for' or `let loop' pattern in a non-tail
position.
2012-07-06 08:07:10 -06:00
Matthew Flatt
8e6a6738bb futures: improve x87 consistency
Each future thread has its own x87 flags, apparently reset to the
default (at least on Mac OS X) rather than inherited from the
creating thread, so reset the x87 configuration in each new future
thread.
2012-07-06 08:07:10 -06:00
Matthew Flatt
ea2909fdb8 fix no-future build to be bytecode-consistent with future build 2012-07-06 08:07:10 -06:00
Matthew Flatt
b08c202a12 improve JIT support for unboxed flonums in a tail-call case
Applies to tail calls to immediate functions, which can be
generated by a `for' or `let loop' pattern in a tail
position.
2012-07-06 08:07:10 -06:00
Matthew Flatt
c428d4ed4c futures: makestack overflow trigger a request for future-thread memory 2012-07-06 08:07:09 -06:00
Matthew Flatt
aa68692b37 allow `begin' wrapper on a submodule to re-expand
Closes PR 12835
2012-07-02 10:02:41 -06:00
Matthew Flatt
aa0d21b7dd improve module-path-index sharing for a module declaration
To support module caching, module path indexes must be cloned
for each use of the cached module, so that path resolutions
don't collide. Cloning was previously implemented at the point
of shifting the modidx based on the module instantiation name,
but now its cloned at declaration time. This result in better
sharing of module-path resolutions, which in turn speeds up
compile-time instantiation of modules, which in turn speeds up
interactions & examples in documentation (as much as 10% for the
Guide, for example).

Furthermore, the reverse cache within a modidx may have been
used improperly during cloning, and that's not a problem in
the new implementation.
2012-06-28 11:42:20 -06:00
Eli Barzilay
29006f95f4 New Racket version 5.3.0.13. 2012-06-28 03:30:15 -04:00
Matthew Flatt
0d1056dbed fix potential bad interaction of module caching and JIT assumption
The JIT wants to detect calls to functions bound to module-level
variables that are always instantiated to a procedure of a particular
arity, in which case it can avoid some checks.  The problem is that
bytecode and JITted code can be shared via the module cache across
namespaces that use different modules to implement a particular module
path or that enable the JIT differently.  In particular, starting with
one that has a procedure binding and then using one (in a different
namespace) that has a non-procedure binding could lead to a crash.

Defend against this possibility by never treating imported variables
as constant in that sense. The JIT detects imported variables through
a new import map in the prefix.

This change may slow code. My guess is that it will have no
performance impact in practice, due to cross-module inlining,
although I can construct a microbenchmark that slows by 20%.
2012-06-27 09:57:50 -06:00
Matthew Flatt
73a4b1758e avoid a compiler warning 2012-06-27 09:57:50 -06:00
Matthew Flatt
577cf4592e fix problems with references to bindings at higher phases 2012-06-27 09:57:50 -06:00
Matthew Flatt
307ebebcbe misc clean-up 2012-06-27 09:57:50 -06:00
Matthew Flatt
edce1b0406 fix optimizer for impersonated continuation mark keys
The optimizer can no longer reduce
  (with-continuation-mark _id _v-expr _expr)
to just
  _expr
when _v-expr and _expr are simple enough, because _id
might be bound to a continuation mark key with an
impersonator that checks the result of _v-expr.

The loss of an optimization can have a significant affect on
errortrace of microbenchmarks, such as

 (for ([i (in-range 10000000)])
   i)
2012-06-27 09:57:50 -06:00
Eli Barzilay
cf5bafc50f New Racket version 5.3.0.12. 2012-06-27 03:30:16 -04:00
Asumu Takikawa
db6c37df92 Add proxy-able continuation mark keys and proxies
(with much help from Matthew on the JIT side)
2012-06-26 13:39:36 -04:00
Matthew Flatt
cb88590dfb fix interaction of `procedure-arity-includes?' and other things
A arity-reduced procedure-valued `prop:procedure' was not handled
correctly, for example.

A good candidate for random testing? I had the right kind of test in
place, but only for an arity of 1. It turns out that testing any other
arity would have exposed the problem, so now there are tests with
arity 0. If I had randomly generated procedures instead of manually
constructing `f0' through `f1:+' in "procs.rktl", then maybe I would
have more naturally generalized the arity testing, too. Then again,
I did already have relevant inputs, and it was the testing of inputs
that was too specific.

Closes PR 12870
2012-06-25 17:30:03 -06:00
Matthew Flatt
4cd1560b2b error-message repair 2012-06-24 22:29:43 -06:00
Matthew Flatt
28a47f245e fix too-strict bytecode check 2012-06-23 05:21:53 -07:00
Matthew Flatt
d5713cf18b error-message repair 2012-06-23 05:21:52 -07:00
Matthew Flatt
91791983aa fix indentation of some error messages
`raise-syntax-error' and `raise-arguments-error' do not
try to adjust indentation, anymore, because it's too confusing
2012-06-23 02:20:59 -07:00
Matthew Flatt
4323096a46 change contract on second' of date' to allow only 1 leap second 2012-06-23 02:04:55 -07:00
Matthew Flatt
503b3858f5 error-message update 2012-06-23 02:04:55 -07:00
Matthew Flatt
ff8a062bfe guarantee `current-seconds', etc. from 1/1/1970 UTC
For all currently supported platforms, the result was already
portable, despite the documentation's hedging.

Also fixed up the documentation in other ways, such as the fact
that `seconds->date' returns a `date*'.
2012-06-23 02:04:55 -07:00
Matthew Flatt
ed2b2b56eb avoid a hard-coded limit 2012-06-23 02:04:55 -07:00
Matthew Flatt
1dc0072d03 further error message convention refinements
Add extra intitial-message lines, use "..." on a field name
to indicate that it could reasonably be hidden by default,
and refine some existing messages.
2012-06-22 09:47:59 +08:00
Matthew Flatt
40c892ff80 futures: future-local handling of stack overflow
Includes the addition of 'overflow and 'start-overflow-work
events, whcih are effectively specializations of 'sync and
'start-work to expose overflow handling.

Also, fix a bug related to a potential GC during mark-stack
restore from a lightweight continuation.
2012-06-21 07:14:50 +08:00
Matthew Flatt
f91dc81bf5 futures: fix some CGC problems
.. even though futures don't work well with CGC, due to
the lack of future-local allocation.
2012-06-21 07:14:49 +08:00
Matthew Flatt
61be7a9a40 futures: implementation clean-up
Remove some unnecessary and redundant parameterization.
2012-06-21 07:14:49 +08:00
Matthew Flatt
db46b2ef92 futures: make tail-call allocation local or synchronizable
By itself, this change won't help anything, because tail-call
allocation is triggered for something that can't be called directly.
This change sets up part of an improvement for future-local recovery
from stack overflow, though.

(I had trouble constructing a test that would trigger the new code.
Fortunately, the existing tests trigger it.)
2012-06-21 07:14:49 +08:00
Matthew Flatt
b27ae70d0a error message repair 2012-06-21 07:14:49 +08:00
Sam Tobin-Hochstadt
ac0bb2b98f Error checking in bytecode reader.
Found by:
    fuzz.rkt -s 912673274  -f collects/setup/compiled/xref_rkt.zo
    fuzz.rkt -s 568444835  -f collects/syntax/scribblings/compiled/strip-context_scrbl.zo
    fuzz.rkt -s 1009851773 -f collects/mred/private/wx/cocoa/compiled/platform_rkt.zo
2012-06-19 19:17:12 -04:00
Matthew Flatt
1e4186098e yet more fixes to avoid compiler warnings 2012-06-16 04:54:45 +08:00
Matthew Flatt
d0d83577c7 avoid some compiler warnings 2012-06-14 15:25:42 +08:00
Matthew Flatt
089cb6669c improve implicit-begin syntax-error reporting 2012-06-14 15:11:19 +08:00
Matthew Flatt
567d16ea2b fix embedded-code reader
When the code is source insteda of bytecode, `#reader' and `#lang'
need to be enabled.
2012-06-13 17:20:17 +08:00
Matthew Flatt
a871574318 make #%plain-module-begin' transformer detect module*' in stop list 2012-06-13 17:07:06 +08:00
Matthew Flatt
95d77d63e0 fix some casts 2012-06-13 16:33:03 +08:00
Asumu Takikawa
4ce4d7531b Improve docs & errors for control proxies
In particular, use consistent terminology for errors
and provide usage examples
2012-06-12 12:16:56 -04:00
Eli Barzilay
b93a3c7495 New Racket version 5.3.0.11. 2012-06-12 03:30:23 -04:00
Asumu Takikawa
a181011b55 Check for proxied prompt tags when needed
Fixes a bug where some control operators would
not recognize proxied prompt tags (non-proxied were fine)
2012-06-11 21:04:45 -04:00
Asumu Takikawa
5aa76c27a9 Support multiple values for control proxy functions 2012-06-11 18:18:37 -04:00
Asumu Takikawa
d527426cac Prototype implementation of control proxies 2012-06-11 18:18:37 -04:00
Vincent St-Amour
a89bd99e2a Fix printing of single-precision floats.
If there's already an exponent separator, replace it with f.

Closes PR12836.
2012-06-09 19:35:37 -04:00
Matthew Flatt
5caa114564 fix `print-syntax-width' for +inf.0
Closes PR 12837
2012-06-10 06:58:06 +08:00
Matthew Flatt
fbb6a294f3 local-expand' allows a stop list to have only module*'
That is, when the sto plist contains only `module*', core
forms are not implicitly added to the stop list.
2012-06-08 16:08:55 +08:00
Matthew Flatt
941f215aa0 improve cycle-in-loading error message 2012-06-08 16:08:55 +08:00
Vincent St-Amour
c0b978f71f Fix handling of NaN in flmin and flmax. 2012-06-06 18:26:51 -04:00
Matthew Flatt
fdb722dcb1 shortcut for numbers in `write', etc. 2012-06-06 15:17:35 +08:00
Matthew Flatt
4b07fc42f0 racket/future: fix heuristic for creating future-running threads
James noticed that the previous implementation was too slow to make
threads.
2012-06-06 13:25:14 +08:00
Matthew Flatt
269a3392dc racket/future: fix debug logging for sync vs. block
When a "synchronized" operation is handled for a future thread
during a `touch' on the future, then still report the handling
as "synchronized" insteda of "blocked".
2012-06-06 13:25:14 +08:00
Matthew Flatt
53f7a77e8f racket/place: avoid place-termination cycle 2012-06-05 17:53:27 +08:00
Matthew Flatt
d1c2430bf1 remove extra space in some error messages 2012-06-03 11:09:32 +08:00
Tim Brown
ff185cf743 Solaris 5.10 has poll(), so set try_poll_syscall="yes" in configure
in order to enable it. Otherwise Solaris 5.10 has issues building.
2012-06-03 04:50:06 +08:00
Matthew Flatt
d8a26e6c3c more corrections to the error message conversion
Foudn these by writing a simple source checker.
2012-06-01 19:03:43 -07:00
Matthew Flatt
85a2267e6c ffi/unsafe: new error message convention at primitives
Also, fix FFI procedures to preserve names: change `ptr-ref' with
`_fpointer' on an `ffi-obj' value to return the `ffi-obj'
value, so that the name in the `ffi-obj' value can be used
by `_cprocedure'.

Closes PR 12645
2012-06-01 19:03:43 -07:00
Matthew Flatt
f10a258dcb ffi/unsafe: fix arithmetic overflow and representation
Thanks to Tobias Hammer for the report and initial repairs.
2012-05-31 09:21:25 -06:00
Matthew Flatt
e9cec00da6 configure: use installed `libtool' by default
But libtool is used only for `--enabled-shared' builds.
2012-05-31 09:21:25 -06:00
Matthew Flatt
e8645598d7 futures: fix bug related to tail calls 2012-05-30 16:20:36 -06:00
Matthew Flatt
5461783076 futures: fix a problem in cgc mode 2012-05-30 16:20:36 -06:00
Eli Barzilay
f42db7366e New Racket version 5.3.0.10. 2012-05-30 03:30:17 -04:00
Matthew Flatt
74844152bc fix load handlers to match docs on parameters
Problems exposed by setting `read-accept-lang' to #f.
2012-05-29 13:57:32 -06:00
Matthew Flatt
da191e5058 error-message repair 2012-05-29 13:57:32 -06:00
Matthew Flatt
248301c9ed disable nested `#lang'
A `syntax/module-reader' reader disables `#lang' when looping to
read a module body. The HtDP languages require a little additional
treatment.
2012-05-29 11:01:52 -06:00
Matthew Flatt
26269c329e racket/base: add some missing predicates
The new predicates are `progress-evt?' `thread-cell-values?',
`prefab-key?', `semaphore-peek-evt?', and `channel-put-evt?'.
These were used internally, and now they appear in contract
error messages.
2012-05-29 11:01:52 -06:00
Matthew Flatt
a57447cde5 fix error-message typo 2012-05-29 11:00:43 -06:00
Matthew Flatt
99635ab091 change `impersonate-struct' to require evidence that a field is mutable
When supplying an accessor to redirect, either the corresponding field
must be accessible through the current inspector, or a mutator for
the same field must be redirected, too.

Stevie realized that we need this constraint; otherwise, impersonators
can implement mutator-like behavior even when the mutator is otherwise
secret.
2012-05-27 15:37:45 -06:00
Matthew Flatt
a137459b65 more error-message conversions and repairs 2012-05-27 11:29:21 -06:00
Matthew Flatt
cb8975b8b3 another error-conversion repair 2012-05-26 19:46:19 -06:00
Matthew Flatt
20179cf0a7 avoid compiler warning 2012-05-26 19:44:41 -06:00
Matthew Flatt
7614e7044b fix bug introduced by error-message conversion 2012-05-26 19:09:03 -06:00
Eli Barzilay
b8adf78a30 New Racket version 5.3.0.9. 2012-05-26 03:30:14 -04:00
Matthew Flatt
9e7548de61 new error message convention
Add `raise-argument-error', `raise-result-error', `raise-arguments-error',
and `raise-range-error'.

The old convention was designed for reporting on a single (sometimes very
long line). The new convention is

 <name>: <short message>
   <field>: <detail>
   ...

If <detail> is long or itself spans multiple lines, then it may
also use the form

   <field>:
    <detail>

where each line of <detail> is indented by 3 spaces.

Backtrace information is shown as a multi-line "context" field.
2012-05-25 15:08:05 -06:00
Matthew Flatt
e0256bc9c7 Pango kerning for Mac OS X 2012-05-17 15:48:45 -06:00
Matthew Flatt
ca33321aa7 fix phase-shifted compile-time use of `variable-reference->namespace' 2012-05-16 10:41:09 -06:00
Matthew Flatt
9270936a28 instantiate require'd modules in the order that they are require'd
This order is now specified, whereas the order was previously unspecified,
and the previous reverse order was an artifact of the implementation.
2012-05-16 07:12:27 -06:00
Matthew Flatt
281d208e84 fix problem with module contexts and marks
Related to the new behavior of d836cba7c9
2012-05-15 20:03:41 -06:00
Eli Barzilay
cb7d402e22 New Racket version 5.3.0.8. 2012-05-15 03:30:12 -04:00
Matthew Flatt
a4bd18ff01 fix `syntax-local-module-exports' to work with submodules 2012-05-14 21:57:10 -06:00
Matthew Flatt
0653d1c966 add `syntax-local-submodules' 2012-05-14 21:57:09 -06:00
Matthew Flatt
cee18bd887 fix expansion state on `provide' transformer exception 2012-05-14 21:57:09 -06:00
Matthew Flatt
1bf1564f90 add `variable-reference->module-path-index' 2012-05-14 21:57:09 -06:00
Matthew Flatt
b374d0d015 ffi: fix big-endian s->c conversion of bytes and shorts 2012-05-14 21:57:09 -06:00
Matthew Flatt
ea8a6a1076 fix for-syntax `set!' of unbound identifier to be a syntax error 2012-05-14 09:14:01 -06:00
Matthew Flatt
562df19714 avoid compiler warning 2012-05-13 06:57:44 -06:00
Eli Barzilay
1a824c2b50 New Racket version 5.3.0.7. 2012-05-12 10:45:27 -04:00
Matthew Flatt
d836cba7c9 refine lexical scope for syntax objects from different modules
For example, if definitions have two unmarked `x's that originate
from different modules, make them correspond to different bindings.

This improvement will be used by `scribble/srcdoc', which will
rely on module context to connect `for-doc' requires to documentation
code that appears in the same module --- which is needed, for example,
if a macro expands to documentation code and the macro is used in
a different module.
2012-05-12 00:59:14 -06:00
Matthew Flatt
dbd940611e allow #f as shift for `syntax-shift-phase-level' 2012-05-12 00:55:12 -06:00
Matthew Flatt
f07878dadb fix non-futures, non-places build
Problem introduced with the addition of `flexpt'.
2012-05-08 06:54:34 -06:00
Eli Barzilay
0ffabcc771 New Racket version 5.3.0.6. 2012-05-08 03:30:12 -04:00
Matthew Flatt
9a41129c69 racket/flonum: add `flexpt' 2012-05-07 20:41:14 -06:00
Ryan Culpepper
36b1a63783 propagate observer to expansion of provides (tests ok, needs ms verif.) 2012-05-07 14:46:13 -06:00
Ryan Culpepper
f0c03ad921 macro-debugger: updates for submodules 2012-05-07 13:26:07 -06:00
Matthew Flatt
a0f4d7e44a fix allocation bug 2012-05-06 19:18:54 -06:00
Matthew Flatt
967cbaadf7 repair for static-fd_set mode 2012-05-06 19:18:54 -06:00
Matthew Flatt
dce87cceb4 minor code tweak
avoid a type-tag test in `list-tail'
2012-05-06 19:18:54 -06:00
Eli Barzilay
17090fca4f A bunch of fprintf' -> eprintf' conversions (and a few related things). 2012-05-06 12:06:00 -04:00
Matthew Flatt
0a7ac91427 fix `box-cas!' name in error message 2012-05-04 10:20:24 -06:00
Eli Barzilay
3c49e78eb7 New Racket version 5.3.0.5. 2012-05-04 03:30:11 -04:00
Matthew Flatt
4292c6e037 fix docs for `box-cas!', fix JITted version to check mutability 2012-05-03 21:38:36 -06:00
Matthew Flatt
0d88a08c48 implement branch mode JIT generation for `box-cas!'
Also, move slow path into common code
2012-05-03 19:22:46 -06:00
Matthew Flatt
209d384204 remove obsolete comment 2012-05-03 19:19:24 -06:00
Matthew Flatt
7d18d38751 avoid // comments in C
To possibly stay compatible with older (pre-C99) compilers just a
little longer.
2012-05-03 19:19:24 -06:00
Aaron Turon
868dcb6d57 Add box-cas!' and unsafe-box*-cas!'.
These primitives atomically update a box to a new value, as long
as the current value is the same as a provided value.  They also
are future-safe.

When futures are enabled, they use low-level hardware instructions
to perform the change atomically.
2012-05-03 19:19:24 -06:00
Eli Barzilay
ed2b579e3c Fail early on a non-pair input to `list-ref'.
There's no index that works with non-pairs, and the generic error
message in such cases is confusing.

Closes PR12740.
2012-05-03 10:24:05 -04:00
Matthew Flatt
50898845ba fix build in static-sized fd_set mode
This mode may be relevant to Sparc Solaris, for example.
2012-05-02 16:54:05 -06:00
Matthew Flatt
4581a7addf avoid intermediate syntax objects for binding comparison
The expander no longer needs to generate certain phase-N
identifiers, since we now have a comparison operation that
uses different phases for each of two identifiers.
2012-05-02 16:54:05 -06:00
Matthew Flatt
584f0f221a fix USE_COMPILED_STARTUP setting 2012-05-01 19:40:09 -06:00
Matthew Flatt
4ac4e2e8d6 fix a problem with the "self" module path index
This bug was introduced recently by changes to support submodules.

Closes PR 12744 (and Robby had reported it earlier)
2012-04-30 23:37:20 -06:00
Eli Barzilay
2d0cde38f1 New Racket version 5.3.0.4. 2012-04-27 03:30:10 -04:00