Commit Graph

4220 Commits

Author SHA1 Message Date
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
Matthew Flatt
393e8b90b2 fix sorting bug in bytecode submodule table 2012-04-26 21:45:00 -06:00
Matthew Flatt
f099eec2af save modidx submodule path in bytecode form
This change should have been part of 9ba663aa77.
2012-04-26 21:45:00 -06:00
Eli Barzilay
ef00f4dd39 New Racket version 5.3.0.3. 2012-04-25 03:30:09 -04:00
Matthew Flatt
9ba663aa77 preserve submoduleness in module path index for expanded submodules
The preserved path is exposed by a new `module-path-index-submodule'
function, and `module-path-index-join' now accepts an optional
submodule path.

Also, fixed a problem with `collapse-module-path-index' when
a module path indx is built on a resolved module path that
is a submodule path.

In addition to the main repair, `collapse-module-path[-index]' is
correctly documented to allow '(quote <sym>) rel-to paths.

Finally, `collapse-module-path-index' changed to use a symbolic
resolved module path that appears as the base of a module path
index, rather than falling back to the given rel-to path. It's
possble that the old beavior was intentional, but it wasn't tested,
and it seems more likely to have been a bug.

Closes PR 12724
2012-04-24 21:10:28 -06:00
Matthew Flatt
3c615e434b fix resolution of relative module path in a submodule
Closes PR 12729
2012-04-24 16:15:29 -06:00
Eli Barzilay
25d7d49648 New Racket version 5.3.0.2. 2012-04-20 03:40:48 -04:00
Matthew Flatt
8c976978ed sync xform with `racket' collection changes 2012-04-19 19:25:42 -06:00
Matthew Flatt
8600e7fe31 fix misplaced phase shift in submodule expansion
Merge to 5.3
2012-04-19 12:45:28 -06:00
Matthew Flatt
f27c023247 bump version
mainly due to Planet resolver change
2012-04-19 08:15:12 -06:00
Matthew Flatt
862e1628a6 fix Planet resolver for submodule tests
For example, `(module-declared? '(submod (planet dyoo/bf) reader) #t)'
shouldn't fail if there's no "main.rkt" to hold a `reader' submodule;
it should return #f.

Merge to 5.3, but updating cstartup.inc will require a manual merge.
2012-04-19 08:15:11 -06:00
Matthew Flatt
62408cc727 fix typo 2012-04-18 05:49:24 -06:00
Matthew Flatt
df0651c277 convert functional hash tables from red--black to AVL trees
AVL trees to tend to be shorter, which means a faster
search and insertion. The potential benefit of a red--black
tree's fewer rotations doesn't matter, I think, for a functional
variant, where you have to reconstruct a spine to the root,
anyway. The difference is small for typical tables, though it
can be as much as 50% for a large table with keys inserted in
order. And since the AVL code is also much simpler, why not?
2012-04-18 05:49:24 -06:00
Matthew Flatt
1bcf56f5e9 fix problem with continuations and `call-in-nested-thread'
Closes PR 12705

Merge to 5.3
2012-04-16 13:33:50 -06:00
Matthew Flatt
c321608856 fix a problem with continuation allocation
i.e., fix commit 2ad41bb669

Merge to 5.3
2012-04-15 08:23:10 -06:00
Matthew Flatt
ff378d12ce fix interaction of delimited continuations and stack overflow
Closes PR 12702, 12704

Merge to 5.3
2012-04-15 05:37:45 -06:00
Matthew Flatt
2ad41bb669 fix potential GC problem with continuation copies
Merge to 5.3
2012-04-15 05:37:45 -06:00
Matthew Flatt
4179cbfa63 enforce ranges on all integer types
DO NOT merge to 5.3
2012-04-15 05:37:44 -06:00
Matthew Flatt
6566bf5d15 fix most-negative number and _int64 on a 64-bit platform
Closes PR 12703

Merge to 5.3
2012-04-15 05:37:44 -06:00
Eli Barzilay
76bbc1a89f New Racket version 5.3.0.1. 2012-04-11 03:30:17 -04:00
Matthew Flatt
1914345af4 fix submodule re-`expand' problem
Closes PR 12691

Merge to 5.3
2012-04-10 15:57:50 -06:00
Ryan Culpepper
48c2a63d7f Post-release version for the v5.3 release 2012-04-10 11:27:59 -06:00
Matthew Flatt
104e70bf65 fix JIT bug related to list-ref' and list-tail'
Closes PR 12688
2012-04-08 17:16:36 -06:00
Matthew Flatt
5a04be6445 streamline chaperoned struct field reference
The usual techniques: shortcut around generic scheme_apply() for
chaperone-triggered slow path, shortcut around scheme_apply() for
application of a native-code interposition function,  and shortcut
`chaperone-of?' test by trying `eq?' first.
2012-04-07 09:28:49 -06:00
Matthew Flatt
e3bba26c4a win32: fix `find-executable-path' for an empty PATH
The current directory is always implicitly in PATH, but it
was added by `find-executable-path' only when PATH is
non-empty.
2012-04-04 07:29:13 -06:00
Kevin Tew
a37cfa4e08 Fix compiler warning 2012-03-30 12:18:55 -06:00
Arek Korbik
7bf475b7cc Fix sleeping on infinite timeouts.
Closes PR 12661
2012-03-29 14:55:14 -06:00
Matthew Flatt
738cac3d24 generalize `malloc' to allow a 0-sized request
Past experience suggests that this is generally better than adding
`zero?' tests at various places that might otherwise call `malloc'.
2012-03-29 14:55:14 -06:00
Matthew Flatt
f301838511 fix a syntax-object problem related to module bindings
The immediate symptom was that `(provide (all-defined-out))'
didn't work in a `module+'-based submodule, but there were
also non-submodule ways to expose the problem.
2012-03-29 14:55:13 -06:00
Matthew Flatt
ebb72d40e8 avoid bad interior pointer 2012-03-29 08:58:01 -06:00
Matthew Flatt
140a50d04e fix a problem with submodule expansion 2012-03-29 06:46:58 -06:00
Kevin Tew
8c22c6c4e5 Remove unused variable compiler warning 2012-03-28 20:05:06 -06:00
Eli Barzilay
acfe585c93 Some cleanups, mainly around badly indented CPP directives. 2012-03-25 20:57:52 -04:00
Eli Barzilay
4469b669fc New Racket version 5.2.900.2. 2012-03-24 03:35:16 -04:00
Matthew Flatt
6e3c3d8b71 MSVC project fixes for various Debug and SGC modes 2012-03-23 17:58:39 -06:00
Matthew Flatt
ae89e210fb allow (submod "..")' as a shorthand for (submod "." "..")'
Also, `(submod ".")' is allowed as a module path; it's not useful,
but it makes the grammar slightly more regular.
2012-03-22 18:43:11 -06:00
Kevin Tew
d4d5ca70fb Hold reference to original thread during BEGIN_ESCAPABLE in place-channel sync
Fixes several bugs related to killed threads that were in the middle of
syncing on place-channels.
2012-03-22 14:52:48 -06:00
Matthew Flatt
16ef341e98 fix JIT bug related to inlining `variable-reference-constant?' 2012-03-21 19:37:46 -06:00
Matthew Flatt
47ae2b387a fix shaodwing problem in `module*' 2012-03-20 07:28:35 -06:00
Kevin Tew
9be864b2f8 Fix sync/timeout hang due to place channels - forgot to git add 2012-03-16 08:39:58 -06:00
Kevin Tew
666c0fdb57 Fix sync/timeout hang due to place channels 2012-03-16 08:18:05 -06:00
Matthew Flatt
9838cb37e8 remove debugging code that was accidentally pushed 2012-03-13 18:46:28 -06:00
Matthew Flatt
415b1eabc4 more load[/use-compiled] handler fixes for submodules
Closes PR 12630
2012-03-13 14:31:40 -06:00
Matthew Flatt
366aa2c42d fixups for the `module-path?' change 2012-03-12 21:10:14 -06:00
Matthew Flatt
542f19c00e fix default `load/use-compiled' handler
A module shouldn't be loaded from source to find a submodule
if a module for the source is already declared.
2012-03-12 21:10:14 -06:00
Matthew Flatt
facc8db712 change module-path?' to subsume path?'
Although th eoriginal idea was to distinguish "text" paths
from derived filesystem paths, practically everythign that accepts
a module path also accepts a path. Building the generalization into
`module-path?' makes it easier to support `submod' wrappers on paths,
and it seems to fix things rather than break them.
2012-03-12 21:08:54 -06:00
Matthew Flatt
060515b9cd extend string-literal syntax to allow surrogate-style \u pairs
For example, "\uD834\uDD1E" is another way to write "\U01D11E",
while "\uD834", "\uDD1E" or "\uDD1E\uD834" are still errors.
2012-03-12 21:03:20 -06:00
Matthew Flatt
e1a5e032cb further fixes to vector abuse 2012-03-12 11:47:18 -06:00
Matthew Flatt
018292ec00 GC with backtraces: add structure-type listing 2012-03-12 11:36:04 -06:00
Matthew Flatt
3073c994f5 make GC backtrace show eq hash code 2012-03-12 10:59:47 -06:00
Matthew Flatt
420d3e7717 fix JIT bug exposed by OpenBSD 5.0
This is the second attempt to fix a problem with using a JIT-generated
address in JIT-generated code.

Closes PR 12627
2012-03-12 08:23:17 -06:00
Matthew Flatt
8f0cf5ba9e work around problem with gcc-4.0 build on Lion 2012-03-12 07:45:25 -06:00
Matthew Flatt
2ba910ef23 avoid compiler warning 2012-03-12 07:45:25 -06:00
Matthew Flatt
64f21122be avoid compiler warning 2012-03-10 10:52:52 -07:00
Matthew Flatt
402fdaad9a fixes and improvements for 3m backtraces 2012-03-10 08:30:02 -07:00
Matthew Flatt
34314c1e7a fix JIT bug
The bug happens with n-ary uses of arithmetic operations that
have constant arguments but couldn't be constant-folded ---
maybe due to a divide-by-zero.
2012-03-10 08:30:01 -07:00
Eli Barzilay
5c051f3ec9 New Racket version 5.2.900.1. 2012-03-10 03:30:15 -05:00
Kevin Tew
024bb8a718 Eliminate compiler warnings 2012-03-09 12:40:22 -07:00
Matthew Flatt
e73be4a9ae fix internal abuse of vectors
Using NULL in a vector slot can crash bracktrace printing;
replace it with `#f'.
2012-03-09 12:05:36 -07:00
Matthew Flatt
f7eceb4554 dierct reference to scheme_null in Win32 executable 2012-03-09 10:37:56 -07:00
Matthew Flatt
3a1e8803ff fix errortrace for submodules 2012-03-09 10:34:56 -07:00
Matthew Flatt
566759a5fa progress on submodule docs; bug fixes 2012-03-09 10:34:56 -07:00
Matthew Flatt
3d69dfab86 first cut at submodules 2012-03-09 10:34:56 -07:00
Matthew Flatt
facb411a63 fix problems with place termination 2012-02-29 20:20:55 -07:00
Eli Barzilay
f7c67b49a4 Big newline at EOF scan. 2012-02-29 00:28:11 -05:00
Matthew Flatt
829820e458 fix problem with continuations
A tail call to a continuation could trigger a GC at a bad time
while checking whether an escape variant of the contination
is valid.
2012-02-28 15:35:38 -07:00
Matthew Flatt
70ab6d482a fix problem with continuations
The problem was a misplaced allocation that could cause a GC
when the thread is in an unstable state in the process of
applying a continuation.
2012-02-28 15:35:38 -07:00
Matthew Flatt
534886dbe4 limit time for getting a native (JIT) stack trace
It's possible for a deep recursion to be all in C instead of
JIT-generated code, in which case the caching code for
`current-continuation-mark' cannot kick in to make the operation
effectively constant time. Bail out (to keep things constant time) if
that happens.
2012-02-27 14:46:03 -07:00
Kevin Tew
3e0e4a3f6b Allow hashes across place channels. 2012-02-27 10:11:04 -07:00
Matthew Flatt
0dcc96c5eb fix JIT, `unsafe-struct-ref', chaperone, and procedure property 2012-02-27 06:57:44 -07:00
Eli Barzilay
3426b57fb9 New Racket version 5.2.1.7. 2012-02-27 03:45:15 -05:00
Matthew Flatt
188c6fdc66 add `log-max-level'
As suggested by Tobias Hammer
2012-02-26 22:13:02 -05:00
Matthew Flatt
21a07ae9d6 fix problems with `(_fun #:in-original-place? #t ....)'
The old implementation could cause deadlock by blocking on a semaphore
while waiting for the original place to run a callback, but a master
GC might be needed (and the blocked place wouldn't get the signal).

Beside fixing that problem, a potential memory leak is fixed in
calling an ffi funcition and having a Racket->C unmarshaling fail.
Also, the GC marking routine for a `place' value didn't reference the
place's underlying `place_obj' value.
2012-02-26 22:13:01 -05:00
Matthew Flatt
dc1d4e80dd fix incorrect GC decls hard-wired into xform
Closes PR 12602
2012-02-26 03:58:21 +00:00
Matthew Flatt
a025f7e9c8 fix bug in bytecode optimizer
The bug is triggered by unsafe flonum operations, a
conversion that tries to make the arguments more unboxable,
and a `lambda' form within an argument to the unsafe
operation.

Closes PR 12587
2012-02-22 06:54:26 -07:00
Eli Barzilay
c007c345f9 A bunch of more typos like the ones in David's commit. 2012-02-21 14:21:43 -05:00
Matthew Flatt
6371df556c yet anther attempt to work around the Mac 10.7 localtime() bug
I now think the problem is likely to be realted to values
that do not fit into a signed 32-bit integer. Check for
the OS version and reject such integers.
2012-02-20 08:09:06 -07:00
Stephen A. Goss
11f7dfbdcc make it clear how to select a language from command line 2012-02-20 08:09:05 -07:00
Matthew Flatt
0e40cfcdc8 declare `char' fields used as signed
With some compilers or platforms, `char' means an unsigned
value, so we have to be explicit with `signed char'.
2012-02-19 06:25:29 -07:00
Matthew Flatt
11de33d4ff remove MysterX DLL, replace with wrapper around `ffi/com'
The ActiveX part of MysterX is gone. The `ffi/com' re-imeplemtnation
provides only core COM support.

The "mysssink" DLL is still needed, and its source is still
in the tree, but it is downloaded in the same way as other
pre-built DLLs. The DLL no longer needs to be registered with
regsvr32.
2012-02-17 06:37:19 -07:00
Matthew Flatt
566e9bb8bf make MzCOM /v report errors 2012-02-17 06:36:23 -07:00
Matthew Flatt
a71ac65a27 fix CPP mistake 2012-02-17 06:36:23 -07:00
Matthew Flatt
084278fabc handle-evt' cannot wrap handle-evt'
The prohbition against `handle-evt' on `handle-evt' is as
document and as originally intended. I'm not sure why it
was allowed.

Existing programs that use `handle-evt' incorrectly
can break. I found and fixed one incorrect use and one
questionable use in the Racket tree (which is a small
minority of the uses of `handle-evt' in the tree).
2012-02-15 18:59:24 -07:00
Eli Barzilay
63b8d3dd91 New Racket version 5.2.1.6. 2012-02-15 03:30:15 -05:00
Matthew Flatt
6cd2e3c71b add `prop:cpointer'
Extend `define-cstruct' to support #:property specs, which causes
the constructor and C->Racket coercsions to wrap the pointer in
a structure instance with the specified properties. Of course,
the wrapper structure has a `prop:cpointer' property so that the
wrapper can be used transparently as a C pointer.

Add missing tests and documentation for the id`->list', `list->'id,
id`->list*', and `list*->'id bindings created by `define-cstruct'.
2012-02-14 14:25:55 -07:00
Matthew Flatt
108ae59157 fix lib sizes
(I changed the wrong platform previously.)
2012-02-13 16:27:52 -07:00
Matthew Flatt
2c479683d1 add --launcher'/-l' flag to `raco exe' to create launchers
This addition triggered several other changes:

 * -k for a Mac OS X embedding is now relative to the __PLTSCHEME
   segment (which means that executables won't break if you strip
   them, for example)

 * the command-line no longer has a limited size for Mac OS X
   launchers and embedding executables

 * Mac OS X GUI and Windows launchers record the creation-time
   collection path, unless they are created as "relative" launchers
2012-02-13 16:27:51 -07:00
Matthew Flatt
af92773407 cocoa 64-bit: Core Text patch for Pango
With this patch, the font fallback mechanisms in `racket/draw'
can locate suitable replacement glyphs, the same as for the
Pango ATSUI back end.
2012-02-13 10:26:56 -07:00
James Swaine
7114f08c0b Added tests for would-be-future
Minor fixes to would-be-future
Added futures-enabled? primitive
Added primitive name to future-event struct
2012-02-12 01:32:30 -06:00
Sam Tobin-Hochstadt
5cf5175aeb Improve `get-libs' error message. 2012-02-11 16:00:50 -05:00
Matthew Flatt
11389e7a8c remove unused local 2012-02-11 08:26:27 -07:00
Ryan Culpepper
7882dadc3a fixed scheme_wrong_type call (wrong index) 2012-02-10 22:12:54 -07:00
James Swaine
a5676e9a68 Added would-be-future 2012-02-10 20:05:43 -06:00
Matthew Flatt
7e7c45f100 fix race condition in subprocess handling (when places enabled) 2012-02-10 14:02:12 -07:00
Matthew Flatt
6abb87069c fix error-message formatting
Closes PR 12565
2012-02-10 06:17:19 -07:00
Matthew Flatt
937cdf51d7 change `current-write-relative-directory' to support more path conversions
In particular, allow a pair of a relative-to directory and a base
directory. Paths that syntactically extend the base directory are
recorded as relative to the relative-to directory (which must
syntactically extend the base directory).

The compilation manager now sets the parameter to a pair with
the base directory as the main collection directory, if the source
file's path extends that directory's path.

This generalization solves problems created by cross-module inlining,
where the source location of a procedure in bytecode can now be in a
different file than the enclosing module's file.

Also add a test that checks whether the build directory shows up
in any ".zo", ".dep", or documentation ".html" files.

Closes PR 12549
2012-02-10 06:17:18 -07:00
Matthew Flatt
77bd401a2d fix problems with marks and module for-syntax
Closes PR 12538
2012-02-09 17:34:15 -07:00
Matthew Flatt
a08a22bedb win32: accept Unicode error-message strings from the system
Closes PR 12559
2012-02-09 16:49:34 -07:00
Kevin Tew
4f3bec1792 pr# 12542 fixed - All symbol types are now allowed across place channels. 2012-02-08 10:21:59 -07:00
Kevin Tew
2de9de9b26 place-channel-put: value not allowed in a message
prints out just the invalid object, not the whole message
2012-02-07 13:07:02 -07:00
Matthew Flatt
8cf49dfdb1 fix format of some error messages
Closes 12536
2012-02-04 05:32:00 -07:00
Eli Barzilay
456fcd8aeb There is no "gc2/xform-collects" in the gracket build tree. 2012-02-04 03:03:18 -05:00
Eli Barzilay
dc7d14580f New Racket version 5.2.1.5. 2012-02-03 03:30:20 -05:00
Matthew Flatt
2f5430e227 update pre-built libraries 2012-02-02 08:04:12 -07:00
Sam Tobin-Hochstadt
4ea306ed61 Rewrite install code in '#%kernel to avoid startup time. 2012-02-02 06:32:55 -07:00
Robby Findler
f5a8c62823 Fix for NetBSD from Aleksej Saushev 2012-02-01 20:09:29 -06:00
Robby Findler
e4b1ef1b6e a second attempt to fix the icns files 2012-02-01 06:41:11 -06:00
Robby Findler
5db88e3ea7 added in smaller size icons in an attempt to see if that was the problem on
10.5 and 10.4
2012-01-31 21:11:16 -06:00
Matthew Flatt
ef846caaa1 tighten bound for Mac OS X 10.6 localtime() hack
It looks like my bound for last time was too conservative,
in that I looked for the lowest number that didn't seem
to fail in 10.6. The range of failing values is apparently
not continuous.

I've tightened the bound to match the lowest
number that produces a useful result on my 10.7 machine,
assuming that it works for a continuous range there.
(The new bound is higher than the number previously used as
a lower bound.)

Merge to 5.2.1
2012-01-30 14:03:35 -07:00
Matthew Flatt
6b6beb601e add PLT_VALIDATE_COMPILE to enable extra checking of the compiler
Setting the environment variable causes the bytecode compiler to run
the bytecode validator (which is normally applied to input from a
bytecode file) immediately on all of the compiler's own results.
2012-01-30 10:31:37 -07:00
Matthew Flatt
706d5026ac fix bytecode compiler bug
Certain `lambda'-lifting operations can cause information
about the flonumness of a variable to get lost, leading
to a mismatch between the closure's flags and flags on
a variable reference. (The bytecode validator could detect the
bug when loading the broken bytecode. The broken information,
meanwhile, was only used by the JIT.)
2012-01-30 10:30:51 -07:00
Eli Barzilay
4f52392dfc New Racket version 5.2.1.4. 2012-01-27 03:35:17 -05:00
Matthew Flatt
13a5b0c623 change `ffi-lib' to not make library symbols global by default 2012-01-26 09:30:25 -05:00
Matthew Flatt
481e061440 adjust `raco ctool --c-mods' and related to work with places
That is, the generated declare_modules() function registers the
module-declaration code so that it is run in any new place, too.

Merge to 5.2.1
2012-01-19 13:14:02 -07:00
Matthew Flatt
c723aeeb6a fix position counting in `read-byte'
Merge to 5.2.1
2012-01-19 13:14:02 -07:00
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
Matthew Flatt
8dd4f1de21 fix futures bug
When `(continuation-mark-set-first #f ...)' should produce #f and
the continuation is lightweight-captured, the result was NULL
instead of #f.
2011-12-05 19:10:22 -07:00
Matthew Flatt
8b3fae79c2 fix no-futures, no-places build 2011-12-04 08:07:13 -07:00
Matthew Flatt
59e41ce05f simpler stack-space check for Racket thread creation 2011-12-04 06:52:33 -07:00
Matthew Flatt
885bf6555f fix future resume in runtime thread with extra stack space
Also, fix the possibility that a future can shift from RUNNING
to PENDING while the runtime thread is checking PENDING then
RUNNING.
2011-12-04 06:52:33 -07:00
Matthew Flatt
333ffd7ede JIT tweak 2011-12-04 06:52:33 -07:00
Matthew Flatt
be80e7d864 fix an over-eager reordering by the bytecode compiler
The over-eager transformation could be space-unsafe, and it
could duplicate an unsafe operation whose result is used only
once in a function that eds up being inlined multiple times.
2011-12-04 06:52:33 -07:00
Matthew Flatt
db3878e309 another futures bug fix 2011-12-03 07:35:39 -07:00
Matthew Flatt
09d4d6c507 avoid uninitialized-variable warning from C compilers 2011-12-03 05:45:41 -07:00
Matthew Flatt
829e894af2 flatten (begin ... (begin ...)) in last pass of compiler
Flattening just makes bytecode slightly smaller.
2011-12-02 20:46:00 -07:00
Matthew Flatt
dd5d1c9046 another futures bug fix 2011-12-02 16:47:59 -07:00
Matthew Flatt
745c4b6470 fix another way that `racket/gui' instances can leak 2011-12-02 15:48:29 -07:00
Matthew Flatt
7397f710e2 fix reconstruction of `provide' forms in module expansion 2011-12-02 13:58:39 -07:00
Matthew Flatt
96330556e7 fix secondary hash-code for weak hashes 2011-12-02 12:11:52 -07:00
Matthew Flatt
67c3aa4b2d improve comments on `future_t' fields; remove a redundant field 2011-12-02 09:58:22 -07:00
Matthew Flatt
c2fac607f0 another futures bug fix 2011-12-02 09:41:59 -07:00
Matthew Flatt
efe165aeac futures bug fix 2011-12-02 08:04:52 -07:00
Matthew Flatt
48524906d8 fix bug in cross-module inliner 2011-12-01 14:05:42 -07:00
Kevin Tew
78c2d7b9ab fix variables assigned but not referenced 2011-12-01 14:05:42 -07:00
Matthew Flatt
1bc2441b5a switch to syntax property for 'compiler-hint:cross-module-inline 2011-12-01 10:26:48 -07:00
Kevin Tew
903eb9ec32 Added place_obj->dead to detect places that terminate normally 2011-12-01 09:54:39 -07:00
Kevin Tew
288e84ff8d Dead code removal 2011-12-01 09:54:39 -07:00
Kevin Tew
d1ee222d19 Fix place.c typos 2011-12-01 09:54:39 -07:00
Kevin Tew
3b0568b39c Allow instanciation of places with resolved module paths 2011-12-01 09:54:39 -07:00
Matthew Flatt
99032a75d0 inline map', for-each', andmap', and ormap'
More generally, support a
 (define _id (begin 'compiler-hint:cross-module-inline _proc-expr))
hint, which is how the compiler determines that `map', etc., are
candidates for inlining.
2011-12-01 06:59:27 -07:00
Eli Barzilay
9f1de12e82 New Racket version 5.2.0.5. 2011-12-01 04:02:03 -05:00
Eli Barzilay
fac07b964d Make get-libs retry downloads if they look stuck.
This resolves a problem with the osx64 machine, where downloads seem to
just get stuck after a while, without timeout errors.  Re-enable that
build.
2011-12-01 03:40:27 -05:00
Matthew Flatt
779b419c03 first cut at cross-module function inlining
Inline only trivial functions, such as `(empty? x)' -> `(null? x)',
to avoid generating too much code.

Bytecode includes a new `inline-variant' form, which records a
version of a function that is suitable for cross-module inlining.
Mostly, the variant let the run-time system to retain a copy
of the bytecode while JITting (and dropping the bytecode of)
the main variant, but it may be different from the main variant
in other ways that make it better for inlining (such a less loop
unrolling).
2011-11-30 07:39:36 -07:00
Matthew Flatt
1ebde53db7 fix `compiler-sizeof' docs and error message 2011-11-30 07:39:36 -07:00
Matthew Flatt
fa685207a3 add explicit `void's in some prototypes
Closes PR 12384
2011-11-30 07:39:36 -07:00
Robby Findler
2cacbfe8e2 update the mac os x icons to use the newer, higher-resolution images 2011-11-28 00:13:59 -06:00
Matthew Flatt
d607189035 fix error message that is misleading on some platforms
Closes PR 10049
2011-11-27 17:35:06 -07:00
Matthew Flatt
8b7370a4f9 fix printing of hash tables with chaperones
Closes PR 12276
2011-11-27 09:56:44 -07:00
Matthew Flatt
10246d7ade fix `current-memory-use'
Closes PR 9896
2011-11-27 09:18:52 -07:00
Matthew Flatt
291a18b045 windows: avoid SetFilePointer() on unsupported file-stream types
Closes PR 12339
2011-11-26 18:10:55 -07:00
Matthew Flatt
3883594af3 fix future bugs mostly related to `touch' within a future 2011-11-26 10:32:24 -07:00
Matthew Flatt
828848811d fix GC bug in futures when a blocking result is a tail call 2011-11-25 08:13:35 -07:00
Matthew Flatt
d9eb803e9c add hook to force a minor GC 2011-11-25 08:13:23 -07:00
Matthew Flatt
a7ae78f3cc fix mac- and gui-specific GC bug
This bug was introduced indirectly in the switch to
poll()/epoll()/kevent().
2011-11-24 15:59:12 -07:00
Matthew Flatt
e438793d43 implement JITted x86 floating-point operations with SSE
Currently, the choice of SSE vs. x87 is when Racket is compiled.
SSE is always used for x86_64 and on Mac OS X, and x87 is used
for other platforms.
2011-11-24 05:58:30 -07:00
Eli Barzilay
48f64ad3ae New Racket version 5.2.0.4. 2011-11-22 14:16:07 -05:00
Matthew Flatt
e44bd3f79d intern literal strings, byte strings, regexps, characters, and numbers 2011-11-22 08:54:37 -07:00
Matthew Flatt
cc1b7bb8b4 fix xform-related bug triggered by making atomic timeout place-local 2011-11-22 05:50:18 -07:00
Matthew Flatt
6784007206 fix, generalize, and speed up GC ownership check 2011-11-22 05:50:18 -07:00
Matthew Flatt
d416dfaa8c fix copy-file' reporting of exn:fail:filesystem:exists?'
Fixes re-report for PR 12074
2011-11-19 19:40:49 -07:00
Matthew Flatt
76c9996ac7 fix phase-related export bug
which was previously masked by another bug
2011-11-18 22:59:21 -07:00
Matthew Flatt
c1477e945d fix `namespace-require' on marked syntax
Closes PR 12381
2011-11-18 20:06:15 -07:00
Matthew Flatt
2ad78a33fb fix `provide' for macro-introduced bindings in phase != 0,#f 2011-11-18 20:06:15 -07:00
Matthew Flatt
764f0774a4 tweaks to reduce the stack-frame size of the interpreter loop 2011-11-18 20:06:15 -07:00
Matthew Flatt
004afd88a3 fix xform problems related to epoll() change 2011-11-17 16:13:15 -07:00
Matthew Flatt
8483b8eea5 atomic timeout hook must be place-local 2011-11-16 20:38:58 -07:00
Matthew Flatt
eae7c5d5d7 fix place-GC problem with empty_self_modidx's shift cache 2011-11-16 20:38:58 -07:00
Matthew Flatt
851cbf4fcc avoid weak links in the master GC space 2011-11-16 20:38:58 -07:00
Matthew Flatt
63f3a51ae6 win32: get default frame icon from application
Also, clean up icon- and cursor-loading code
2011-11-16 14:45:32 -07:00
Eli Barzilay
1b69b79f6e New Racket version 5.2.0.3. 2011-11-16 03:50:12 -05:00
Matthew Flatt
3bffcae3c2 fix places & executable interaction
Added `module-predefined?' and changed `racket -k ...'
2011-11-15 18:42:21 -07:00
Matthew Flatt
45b8e103e5 places: fix GC of unreceived place-channel messages
An unreceived message can have a reference to a master-allocated
value, in which case that value must be marked. This marking
is implemented by embedding a linked link within the message
memory.
2011-11-14 18:04:45 -07:00
Matthew Flatt
aefb574f81 remove unused symbol 2011-11-14 17:57:11 -07:00
Matthew Flatt
a0378a2b02 fix bug in prefab syntax marshaling
Closes PR 12352
2011-11-12 06:08:42 -07:00
Matthew Flatt
3cd071beb2 fix fd polling in atomic mode 2011-11-11 07:05:16 -07:00
Eli Barzilay
41345deff6 New Racket version 5.2.0.2. 2011-11-11 03:50:09 -05:00
Matthew Flatt
43e421faf4 fix bytecode compiler bug 2011-11-10 13:25:06 -07:00
Matthew Flatt
5139de9cec add `port-closed-evt' 2011-11-10 10:01:57 -07:00
Matthew Flatt
eb25a2db47 add epoll() support for Linux, kqueue() support for BSDs
This change builds on the blocking-I/O change to provide substantially
better performance when waiting on lots of sockets.
2011-11-10 10:01:56 -07:00
Matthew Flatt
67df1f7bce change handling of blocking I/O to collapse sources to a single poll
This improvement applies to both poll() and select() modes, and it
can reduce scheduling overhead when blocking on many I/O sources
at once.

This mode is not enabled for Windows, however, since Racket doesn't
exactly use select() on Windows.
2011-11-10 05:46:53 -07:00
Matthew Flatt
dfe5e599e4 fix problem with background thread for address lookup 2011-11-10 05:46:52 -07:00
Matthew Flatt
646f7e70e7 prefer poll() to select() on Linux
On Mac OS X, poll() doesn't work right in versions earlier than 10.5.5,
select() is always faster, and large number of sockets will be
better handled via kqueue(). On Linux, poll() is defintely better.
Otherwise, we stick with select() to be conservative.
2011-11-10 05:46:04 -07:00
Matthew Flatt
6e7ad71ae5 ffi/unsafe: handle out-of-memory on malloc
Also fix some int vs. intpt_t problems.
2011-11-04 15:29:28 -06:00
Tony Garnock-Jones
4f007cc9ce uClibc doesn't support getcontext(). 2011-11-04 11:16:35 -04:00
Matthew Flatt
9896cb6851 streamline get-byte' (especially as used by read-[bytes-]line')
Applies in the case of simple ports without line counting, etc.
Also, `read-line' keeps track of whether all bytes are ASCII
(which is easy) to shortcut general UTF-8 decoding.
2011-11-03 09:12:13 -06:00
Matthew Flatt
a495c9f349 fix channel/semaphore sync bug 2011-11-03 09:12:13 -06:00
Matthew Flatt
98cde53fa0 fix rename trans `free-identifier=?' propagation in int-def context
Closes PR 12333
2011-11-02 10:02:19 -06:00
Matthew Flatt
b42daeacf0 remove unused field 2011-11-02 08:12:58 -06:00
Matthew Flatt
d9b9cbe16a fix space-safety bug in composable continuations 2011-10-29 09:37:12 -06:00
Matthew Flatt
2b7fedb79b better comment to explain a subtle corner of the expander
Also added a minor shortcut for cases where the corner isn't
relevant.
2011-10-28 06:43:20 -06:00
Matthew Flatt
35526a7bd7 fix JIT early reference to JIT generated address
On x86_64, if the scratch-space address fits into 32
bits and the final place for shared code doesn't
fit into a 32-bit address, then the size of the generated
code could change, leading to a JIT buffer overflow.

Merge to 5.2
2011-10-20 14:30:02 -06:00
Matthew Flatt
a4011890e1 CGC fix for OpenBSD x86_64
Merge to 5.2
2011-10-20 14:30:02 -06:00
Matthew Flatt
245f45d183 switch Mac OS X build default (32-bit vs 64-bit) to compiler default
That means the default is 64-bit for a typical Mac OS X 10.6 or 10.7
installation.
2011-10-20 14:30:02 -06:00
Matthew Flatt
a81054fef4 fix a marshaling bug for syntax objects
Closes PR 12300

Merge to 5.2
2011-10-18 20:53:43 -06:00
Matthew Flatt
099e4d7dad fix a type name
Closes PR 12297

Merge to 5.2
2011-10-17 12:35:54 -06:00
Eli Barzilay
7f8540949d Use racket/*' instead of scheme/*' in gracket etc. 2011-10-16 18:53:30 -04:00
Eli Barzilay
29643f8120 Removed two references to /home/scheme that were not used elsewhere. 2011-10-16 18:53:30 -04:00
Eli Barzilay
9ade64cc84 Some "Scheme" -> "Racket" changes and similar. 2011-10-16 18:53:30 -04:00
Matthew Flatt
c514fd3470 fix an identifier binding bug
Merge to 5.2
2011-10-16 07:11:34 -07:00
Matthew Flatt
84b615a005 fix timing of `place-break' checks in scheduler
Otherwise, a place in a `sleep' call could fail to
see the break until waking up.
2011-10-11 17:17:58 -06:00
Matthew Flatt
0993408c19 fix `place-break' on terminated place
Merge to 5.2
2011-10-11 17:17:58 -06:00
Matthew Flatt
fe9e34f938 skip future mutex if no futures started
Skipping the check makes a measurable difference when
several places are running.
2011-10-11 15:09:23 -06:00
Matthew Flatt
a9b1a38f34 reduce place-channel allocation 2011-10-11 15:09:22 -06:00
Matthew Flatt
04e75dd82a revert GC block cache to reasonable size 2011-10-11 14:36:53 -06:00
Matthew Flatt
5c0956d7b1 more memory accounting fixes for places
Fix memory accounting to detect when messages pile up in a
place channel and when shared values (such as the result of
`make-shared-bytes') pile up. Also fix problems where a GC
or free-page purge needs to be triggered.

The implementation causes a minor API change, which is that
a place channel sent multiple times as a message generates
values that are `equal?' but no longer eq?'.

Closes PR 12273

[Do not merge to 5.2]
2011-10-11 11:26:11 -06:00
Matthew Flatt
32b5390ad2 add missing GC registration for places
Merge to 5.2
2011-10-11 06:45:14 -06:00
Kevin Tew
1a2d425ece Fix QNX merge to 5.2 2011-10-10 11:07:29 -06:00
Kevin Tew
58b1f86326 pr 12268 fix merge to 5.2 2011-10-10 11:07:29 -06:00
Vincent St-Amour
90aa9c9d75 Typoes. 2011-10-10 11:40:51 -04:00
Matthew Flatt
c805728d3e fix compiler confusion: non-mutating vs reorderable unsafe ops
Reordering `unsafe-vector-ref' past an `unsafe-vector-set!' was
particularly bad. Meanwhile, some non-mutating operations like
`unsafe-mcar' were treated too conservatively.

Merge to 5.2
2011-10-09 19:46:24 -06:00
Matthew Flatt
b377cafdac mark OS jmpbuf as GC-ignored
This change is intended to make the QNX port work, but it
should also future-proof Racket a little for other platforms.
2011-10-09 10:45:24 -06:00
Matthew Flatt
e2bcbb0dfb fix QNX sconfig entry
Merge to 5.2
2011-10-09 10:34:40 -06:00
Eli Barzilay
ceacfe5ef5 New Racket version 5.2.0.1. 2011-10-09 03:50:16 -04:00
Matthew Flatt
1bc80310e3 fix compiler bug that could cause infinite inlining loop
The bug was that a procedure could be incorrectly marked as
a "leaf" procedure, which could in turn cause the compiler
to keep inlining a very small procedure that calls itself.

Closes PR 12270

Merge to 5.2
2011-10-08 16:40:34 -06:00
Matthew Flatt
41b18e3608 windows: add sqlite3.dll
Merge to 5.2
2011-10-08 07:18:49 -06:00
Ryan Culpepper
ecd7519f56 Post-release version for the v5.2 release 2011-10-07 22:10:32 -06:00
Matthew Flatt
f02ea92250 fix compiler bug related to `#%variable-reference' on local
The first compiler pass didn't properly shift the stack offset
when adjusting the context of a varref of a local.

Closes PR 12258
2011-10-07 09:42:33 -06:00
Matthew Flatt
add50ab436 cocoa: undo hack of "-64" suffix on app names
Commit 60101618db seems to address the real problem.
2011-10-07 08:05:25 -06:00
Kevin Tew
d3037adbc0 QNX porting 2011-10-06 10:50:37 -06:00
Eli Barzilay
5ba73a6ab2 New Racket version 5.1.3.12. 2011-10-06 03:50:18 -04:00
Matthew Flatt
7680adf486 fix compiler bug related to lifting and unbox flonums
As variables are dropped for lifted functions, the bitmap
for flonum closure variables was not shifted down by the
number of dropped variables.

Closes PR 12259
2011-10-05 19:25:59 -06:00
Matthew Flatt
97d0df94bb fix "configure" and "configure.ac" for libfit 2011-10-05 11:41:05 -06:00
Neil Toronto
d3b5e21cae Added new plot library and old libfit (which plot still depends on) 2011-10-05 10:26:49 -06:00
Matthew Flatt
ec380e34ed remove built-in reader and printing support for Honu
This is a backward-incompatible change, but I think it's
unlikely that any code depends on the removed bindings
or reader syntax.
2011-10-05 09:40:27 -06:00
Matthew Flatt
6a8d3c34f1 win64: avoid msvcr90.dll
The libjpeg, libeay, and ssleay libraries for Win64 linked to
msvcr90.dll, because of the way that they were compiled with
MSVC 2008, but msvcr90.dll is not included with Win7, and
redistributing it is problematic. The new variants of the libraries
link instead of msvcrt.dll --- which you're not supposed to do
according to MS, but that's the way libraries like Gtk are
built, and it seems to be the right approach. See also

 http://kobyk.wordpress.com/2007/07/20/dynamically-linking-with-msvcrtdll-using-visual-c-2005/

I built libjpeg-8, while the other two are courtesey of
http://www.indyproject.org.

Closes PR 12246
2011-10-05 06:28:31 -06:00
Matthew Flatt
2262cd4424 windows: assume 1MB stack, but try to read actual from executable 2011-10-05 06:28:29 -06:00
Eli Barzilay
7ad7857ce2 Fixed "src/configure".
(Turns out that editing configure by hand is not a good idea...)

Also a random racket comment.
2011-10-05 04:55:25 -04:00
Eli Barzilay
e01e46b772 Removed the `plot' collection, in preparation for adding the new one instead. 2011-10-05 04:09:10 -04:00
Matthew Flatt
80ca2b34ff fix reference to statics meant to be adjusted by `raco exe' 2011-10-03 09:05:02 -06:00
Matthew Flatt
a0378d956a fix place refcount
Originally, the refcount was either 0, 1, or 2, so a `char' was
enough. It's not enough now that place channels increment the
refcount.
2011-10-03 06:39:18 -06:00
Matthew Flatt
664b95465d fix potential refcount bug
In the unlikely case that a receiving place ends while a
message is being sent.
2011-10-03 06:39:18 -06:00
Matthew Flatt
430474f4fa fix GC log value 2011-10-01 07:41:58 -06:00
Kevin Tew
e650764a4c place-channel? returns #t for place descriptors, doc clarification 2011-09-30 17:15:11 -06:00
Kevin Tew
a7b0c33896 QNX porting 2011-09-30 17:03:50 -06:00
Matthew Flatt
035ab04b67 PPC JIT fix 2011-09-30 07:55:33 -06:00
Eli Barzilay
3441d0f7d0 New Racket version 5.1.3.11. 2011-09-30 03:50:17 -04:00
Matthew Flatt
99fe14b080 fix problems with phase-1 syntax definitions
Closes PR 12234
2011-09-29 16:54:08 -06:00
Matthew Flatt
a857e9e041 fix JIT bug in `fl->fx'
For the case that the argument is unboxed.

Closes PR 12240
2011-09-29 16:54:08 -06:00
Matthew Flatt
73071ad186 improve GC logging (3m)
Show process time of start of GC and otherwise adjust to make
the output more compact, and attach a prefab struct to the
logged message to report all available data in Racket form
(including real start and end times, which are not shown in
the output).
2011-09-29 16:54:08 -06:00
Kevin Tew
f2b7d1eca3 Start of port to QNX 2011-09-29 14:42:04 -06:00
Kevin Tew
dc481d2d20 Fix place crash due to race condition 2011-09-29 13:45:25 -06:00
Matthew Flatt
ac8990d519 add date*' and exn:fail:syntax:unbound'
The `date*' structure type is an extension of `date' with
`nanosecond' and `time-zone-name' fields.

The `seconds->date' function now accepts a real and returns a
`date*'. The fractional part of its argument goes into the
`nanosecond' field.
2011-09-29 09:22:10 -06:00
Matthew Flatt
58097a12fe inside: export scheme_alloc_flvector() and scheme_alloc_fxvector() 2011-09-29 09:14:00 -06:00
Kevin Tew
95037828f7 Place channels correctly use refcount on place_objects 2011-09-28 13:15:46 -06:00
Matthew Flatt
2ae6d0c55f fix expand of `#%variable-reference' on local variable
Closes PR 12231
2011-09-27 18:53:28 -06:00
Kevin Tew
3e830712aa fix uninitialized variable messages 2011-09-27 10:26:30 -06:00
Matthew Flatt
f9dabb8994 add -J/--wm-class argument to set the WM_CLASS class on Unix 2011-09-26 18:07:18 -06:00
Matthew Flatt
1ae6cc0505 change `syntax-local-lift-module-end-declaration' for phase N
Lift to the end of the module, instead of the end of the
enclosing `begin-for-syntax'.

Also, fix a bug in phase 2+ visits.
2011-09-24 22:30:56 +09:00
Matthew Flatt
051f164f3f fix parsing of protect-out' on for-syntax' bindings 2011-09-24 22:30:56 +09:00
Eli Barzilay
5024b690ca New Racket version 5.1.3.10. 2011-09-21 03:50:16 -04:00
Matthew Flatt
6e6e30a73a don't check for future or foreign work in atomic mode 2011-09-20 16:12:59 -06:00
Matthew Flatt
27be90e7b7 adjust cycle-detection valeu to avoid fixnum encoding
Just in case.
2011-09-20 16:12:59 -06:00
Matthew Flatt
37823107d1 convert C++-style comments to C-style comments
As far as I know, "//" isn't a C comment form, although
MSVC and gcc both accept it.
2011-09-20 16:12:59 -06:00
Ryan Culpepper
30d5381e98 updated macro debugger to work with begin-for-syntax changes
Also cleaned up support for lazy instantiation of phase>0
environments.
2011-09-20 14:49:49 -06:00
Matthew Flatt
0197902309 add var-ref->mod-decl-insp' and switch cur-code-insp' uses
Macros and other tools that need syntax privilege used
`(current-code-inspector)' at the module top-level to try to
capture the right code inspector at load time. It's more
consistent to instead use the enclosing module's declaration-time
inspector, and `var-ref->mod-decl-insp' provides that. The
new function works only on references to anonymous variables,
which limits access to the inspector.

The real function name is longer, of course.
2011-09-20 13:50:36 -06:00
Kevin Tew
36e53c56cb Fix cleanup of place_obj mutex and semaphore 2011-09-20 12:04:33 -06:00
Matthew Flatt
a7c607a708 fix module expand bug 2011-09-20 09:48:48 -06:00
Matthew Flatt
5351d4c7b9 fix gc and stack-overflow problems in JIT, module expansion & run
The GC problem was related to generational GC and the way constant
values are associated to JIT-generated code. See `retaining_data'.

The stack-overflow problems affects the JIT, module expansion,
and module invocation.
2011-09-20 08:34:29 -06:00
Matthew Flatt
df43d90513 windows: fix `copy-file' changes 2011-09-19 14:26:07 -06:00
Matthew Flatt
7f887fdf60 fix problems in copy-file'; add exists-ok?' argument
The non-Windows `copy-file' had a race condition, and it could
behave in bad ways if the source of a copy is not a regular
file.
2011-09-19 08:20:22 -06:00
Matthew Flatt
6401b30399 fix winsock init and shutdown for places 2011-09-16 18:03:32 -06:00
Matthew Flatt
dcda2b60d3 fix write() and read() calls for in-thread gethostbyname() 2011-09-16 16:42:14 -06:00
Matthew Flatt
b79c410e5b fix in-thread gethostbyname() for places
Uncovered by "place-parallel.rkt" test; not found in previous runs
because in-thread gethostbyname() wasn't enabled for Linux, but it
is now.
2011-09-16 16:19:04 -06:00
Matthew Flatt
1bfd9987c4 fix pointer-ownership check so that it works
A working check uncovered one of the badly registered statics.
2011-09-16 16:19:04 -06:00
Matthew Flatt
aa1eb065c5 fix initialization of place-shared statics 2011-09-16 16:19:04 -06:00
Matthew Flatt
24e587a64e lock is needed for writing after all 2011-09-16 16:19:04 -06:00
Kevin Tew
fa50c780a4 close fds on error 2011-09-16 14:11:34 -06:00
Kevin Tew
a605a97132 place* throw error on closed port 2011-09-16 13:24:39 -06:00
Matthew Flatt
7a00fbddc7 remove incorrect port shutdown; windows: fix console ports for places
Ports must be forced closed in the case of kill a place,
and the existing code takes care of that.

The Windows fix is especially needed for the new places port
handling, but it turns out that the console handlign was broken for
places anyway.
2011-09-16 08:12:51 -06:00
Matthew Flatt
5f21abbaf3 place ports are not regular files and should not be in text mode 2011-09-16 07:05:58 -06:00
Matthew Flatt
50bd8c6153 fix bad return for a void function 2011-09-16 07:04:15 -06:00
Matthew Flatt
d173879f39 fix places pipe for Windows
And also fix int-vs-ptr mismatches for the pipe layer
that is also used by `subprocess'
2011-09-16 07:03:29 -06:00
Kevin Tew
b6972a3b7f dynamic-place now pipes standard io to standard out and error much like system. 2011-09-15 14:53:58 -06:00
Matthew Flatt
039f9c10f3 fix calculation for hash code of a hash table 2011-09-15 14:23:44 -06:00
Matthew Flatt
cc9514f8ca another place-channel finalization repair 2011-09-15 06:38:41 -06:00
Matthew Flatt
051d677f0f place-channel fixes
Finalization for a place channel used a recursive, non-atomic
function, which meant that a thread switch could happen during
place-channel finalization, leaving the new thread with the
master GC and generally confused. (The random-message test
found the bug right away on my machine.)

We already have a non-recursive, non-atomic function to traverse
place messages, so collapse all modes into that one implementation.

Along the way, problems with empty structs (found by random tester)
and checking of file descriptors (test added) also fixed.
2011-09-14 20:43:36 -06:00
Matthew Flatt
3b077078de adjust module name resolve to use cc-marks less
Use `continuation-mark-set-first', instead.
Also, re-enable bytecode for Racket code that is built into
the binary, which had been left disabled accidentally.
2011-09-14 15:01:18 -06:00
Matthew Flatt
7315bfa554 drop an unnecesary lock
The recent addition of a shared table of names for shared code
caused bad performance on some machines (such as Robby's)
due to the lock on the table. The lock dosn't seem to be necessary
for platforms where places are supported, though.
2011-09-14 15:00:45 -06:00
Eli Barzilay
50ead29fb9 New Racket version 5.1.3.9. 2011-09-14 03:50:15 -04:00
Matthew Flatt
a233697f08 fix errortrace (required API changes), add `syntax-shift-phase-level'
Also fix a bug in the `module' expander and streamline lazy
visits.
2011-09-13 21:04:10 -06:00
Eli Barzilay
9a034c44ad New Racket version 5.1.3.8. 2011-09-13 03:50:16 -04:00
Matthew Flatt
b7bef3b3aa add syntax-transforming-module-expression?', variable-reference->module-base-phase' 2011-09-12 17:08:50 -06:00
Matthew Flatt
c352ef8fce allow different phases for `free-identifier=?' arguments 2011-09-12 17:08:50 -06:00
Matthew Flatt
3565c7e820 share table of shared code pointers
Allows stack traces to report information in places other than
the main place
2011-09-12 09:35:47 -06:00
Matthew Flatt
f3a79350e2 avoid custodian shutdown during atomic FFI callback 2011-09-10 14:36:49 -06:00
Matthew Flatt
28afc4490e cocoa: distinguish CFBundleIdentifier for 64-bit vs. 32-bit apps
This is another attempt at fixing PR 12135
2011-09-10 10:53:43 -06:00
Matthew Flatt
9d4fcd8e84 better fix for TransformProcessType issue
GRacket registers witht a global table to indicate that
no transform is needed. (This change was intended to address
a 64-bit problem on Lion. It didn't help, but this seems
better than ignoring an error.)
2011-09-10 10:53:42 -06:00
Matthew Flatt
ed36c5d21c fix another warning (gcc) 2011-09-09 21:11:33 -06:00
Matthew Flatt
8d766480da fix for build with link-time optimization enabled 2011-09-09 21:06:17 -06:00
Matthew Flatt
b1417cd9f9 fix plot bug
No idea whether it matters; hopefully this code goes away soon.
The bug was pointed out by clang.
2011-09-09 20:49:08 -06:00
Matthew Flatt
446fb89af1 avoid clang warnings
The main change is to use C99 flexible array declarations
in structs, instead of declaring single-element arrays.
There are still a few -Wtautological-compare warnings
in 3m due to marco expansion.
2011-09-09 20:45:43 -06:00
Eli Barzilay
29d4bba008 New Racket version 5.1.3.7. 2011-09-09 03:50:19 -04:00
Matthew Flatt
0229e762bc fix place-unfriendly static in ffi
Lazy initialization of statics shared across places doesn't work.
Also, each static must be registered with the GC exactly once;
I'm not sure why regstering on every callback didn't cause more
problems.
2011-09-08 18:29:37 -06:00
Matthew Flatt
d3c56c9f13 generalized `begin-for-syntax' 2011-09-08 14:06:00 -06:00
Matthew Flatt
83e7f92250 fix non-places build 2011-09-06 05:48:17 -06:00
Matthew Flatt
6d944453a7 make memory accounting and places work together
The `current-memory-use' function's result now includes the memory
use of places created from the calling place, and custodian memory
limits apply to memory use by places (owned by the custodian).

This change is relevant to PR 12004 in that DrRacket will no longer
crash on the example if a memory limit is in effect, but plain
Racket starts with no such limit and will exhaust all memory.
2011-09-05 13:24:22 -06:00
Matthew Flatt
ee6104b4fc fix `subprocess-status' when places are enabled
Closes PR 12158
2011-09-04 15:55:26 -06:00
Kevin Tew
dbcf70db30 Fix check for interactively defined module paths. 2011-09-01 15:17:22 -06:00
Matthew Flatt
29205fa91a fix changes to command-line handle that broke the Windows build 2011-09-01 12:48:20 -06:00
Kevin Tew
81f9bf4e1d Fix dup errors, bignum deserialization, and port names across place channels
Fix bignum deserialization
Error reporting for failed dups during place channel communications
communicate socket port names across place channels
2011-09-01 12:02:21 -06:00
Kevin Tew
261f002ce2 Error messages for using places with symbol module paths 2011-09-01 12:02:20 -06:00
Matthew Flatt
db0db9463e adjust -X handling to make `raco exe' work on Unix
Closes PR 12151
2011-09-01 08:49:26 -06:00
Matthew Flatt
d75aaa3c0e fix printed form of place channels 2011-08-31 09:48:56 -06:00
Matthew Flatt
5978717fa3 use closesocket() etc. for scheme_close_socket_fd() 2011-08-31 09:48:56 -06:00
Matthew Flatt
468bfc5437 fix "GRacketCGC.app" install 2011-08-31 09:48:56 -06:00
Kevin Tew
4d8833eab2 abandon unused scheme_socket_to_ports during place copy 2011-08-30 16:21:32 -06:00
Kevin Tew
50745a8219 Accumulate fds for cleanup on exception 2011-08-30 10:02:50 -06:00
Matthew Flatt
638dc2ed62 implement MZ_DO_NOT_INLINE() for MSVC
For 64-bit builds, MSVC has become smart enough to inline functions
in a way that interferes with the implementation of continuations,
so that (planet "williams/simulation/examples/model-2b") crashes,
for example. Explicitly disabling inlining avoids the problem by
making the C stack layout match the implementation's expectation.
2011-08-29 23:22:09 -06:00
Eli Barzilay
f3f3af124f Removed SrPersist.
Blessed-by: Ryan
2011-08-29 16:55:42 -04:00
Kevin Tew
18e14aed80 Reduce duplicate code in place.c, fixes 2011-08-29 07:30:46 -06:00
Matthew Flatt
b02e37b0b9 restore module cache
The module cache was added in 97ce26b1 (April 16, 2011),
but it was accidentally disabled in e9721058 (May 5, 2011).

This time, I figured out a way to test whether the cache is
working (other than to benchmark examples, which is how I
discovered that it wasn't working).
2011-08-28 18:15:44 -06:00
Matthew Flatt
98bc4067c3 make bytecode compiler less picky about exports
Closes PR 12134
2011-08-28 11:21:15 -06:00
Matthew Flatt
4f83f7f279 allow phase 1+ references to not-yet-defined bindings
For example,

 (define-for-syntax (f x) (g x))
 (define-for-syntax (g y) y)

is now allowed. The unbound-variable check for phase 1
and up is delayed until after the module body is partially expanded.
2011-08-28 10:27:31 -06:00
Kevin Tew
5d27959c57 Place sockets and file port fixes 2011-08-26 14:25:18 -06:00
Kevin Tew
801e5dbe0e Fix serious clang warnings 2011-08-26 14:04:28 -06:00
Kevin Tew
6ee0c0298a Fix warnings in place.c 2011-08-26 11:46:57 -06:00
Matthew Flatt
290fe066b6 add optional argument to weak-box-value' and ephemeron-value' 2011-08-26 06:24:34 -06:00
Matthew Flatt
ecc058de4a change `raco exe' to disable collection lookup by default 2011-08-25 09:15:30 -06:00
Eli Barzilay
7bb8c6c4b3 New Racket version 5.1.3.6. 2011-08-25 03:50:21 -04:00
Matthew Flatt
ec29a2d85c add `use-collection-link-paths' 2011-08-24 20:08:19 -06:00
Matthew Flatt
84e3ab2a20 add support for collection roots to the collection links file 2011-08-24 20:08:19 -06:00
Kevin Tew
5a30aa89eb Allow TCP sockets and file ports to be communicated across places 2011-08-24 14:33:54 -06:00
Matthew Flatt
a7855e20a8 add `raco link'
includes a rewrite the "Module Basics" section of the Guide
2011-08-24 09:07:14 -06:00
Kevin Tew
8782f4c445 send ffi pointers across places 2011-08-23 13:33:06 -06:00
Eli Barzilay
41ae2b57b6 New Racket version 5.1.3.3. 2011-08-21 03:50:12 -04:00
Matthew Flatt
345b06838d FFI: add C arrays and unions 2011-08-20 10:24:32 -06:00
Eli Barzilay
2fbfe341b9 New Racket version 5.1.3.2. 2011-08-20 03:50:14 -04:00
Matthew Flatt
dc1a97cec7 another subprocess fix like d7a996ee0b 2011-08-19 16:56:10 -06:00
Matthew Flatt
d7a996ee0b fix for subprocess management (when places are enabled) 2011-08-19 13:57:28 -06:00
Matthew Flatt
6073ef5ff5 fix `place-break' on a terminated place 2011-08-19 12:52:19 -06:00
Matthew Flatt
0c7b1925a5 change bad code to an assertion that's never needed 2011-08-19 12:52:08 -06:00
Matthew Flatt
d185c2a0df fix optimizer bug
Also fix missing copy-propagation opportunity
2011-08-19 07:35:39 -06:00
Matthew Flatt
7eb2042bd9 fix compiler handling of top-/module-level constants
The JIT and bytecode compiler disagreed on the definition of
"constant". Now there are two levels: "constant" means constant across
all instantiations, and "fixed" means constant for a given instantation.
The JIT uses this distinction to generate direct-primitive calls
or not. (Without the distinction, a direct jump to `reverse' could
be wrong, because `racket/base' might get instantiated with the
JIT disabled or not.)

Also, fixed a bug in the JIT's `vector-set!' code in the case that
the target vector is a top-/module-level reference that is ready,
fixed, or constant.
2011-08-19 06:32:44 -06:00
Matthew Flatt
1d6c3aa4ea avoid pointless digits when printing single-precision floats
Closes PR 12118
2011-08-18 13:21:38 -06:00
Matthew Flatt
69929b7499 configure: make --disable-jit imply --disable-futures 2011-08-18 12:41:36 -06:00
Matthew Flatt
8291fef9de fix optimizer problems with mutability checking, inlining
The inlining adjustment can sometimes trigger different
inlining than before. (One common benchmark wins; one loses.)
2011-08-18 12:32:01 -06:00
Matthew Flatt
8eefaba187 fix `regexp-match' performance for short matches on long strings
More specifically, for a string of length N and a match that
only looks at the first M characters, the complexity of
`regexp-match' is now O(M) instead of O(N). This allows
`regexp-split' to be O(N) for a string instead of O(N^2).

Also, fixed a bug in non-greedy matching that could affect
both long strings and input ports.
2011-08-18 09:26:09 -06:00
Matthew Flatt
591e08fb10 fix bug in identifier resolution
Commit 311d55b5cf fixed a shallow bug that masked a deeper
bug in the interaction of local bindings and module-level
bindings. This one fixes the deeper problem, which is that
the recursive resolution that ignores module bindings should
start from the beginning of the wraps, not the wrap after
a module renaming.

Closes PR 12116
2011-08-16 20:24:08 -06:00
Matthew Flatt
8f27112c83 slightly safer CPP macros 2011-08-16 20:24:00 -06:00
Matthew Flatt
311d55b5cf fix bug that affects `free-identifier=?'
This bug is in the "amazing that it lurked for years" category,
as well as the "stupid use of C preprocessor" category.
2011-08-16 10:42:56 -06:00
Vincent St-Amour
02ba6e5d32 Remove trailing whitespace. 2011-08-15 12:19:53 -04:00
Matthew Flatt
8989e810fb fix over-eager bytecode transformation 2011-08-15 09:36:38 -06:00
Matthew Flatt
40197835c9 repair `dynamic-require-for-syntax'
That primitive is probably a bad idea, but maybe it's useful
until we have separaely loadable parts of a module.
2011-08-15 07:06:40 -06:00
Eli Barzilay
db1aa1479a New Racket version 5.1.3.1. 2011-08-15 03:50:14 -04:00
Eli Barzilay
05dc8a596d Post-release version for the v5.1.3 release 2011-08-14 08:43:02 -04:00
Matthew Flatt
ca92376381 detect __sync_bool_compare_and_swap() via `configure' 2011-08-12 17:03:28 -06:00
Matthew Flatt
1c04cf1b02 make `port-try-file-lock?' work for Solaris
Shared locking now allowed only on input port, and exclusive
locking is allowed only on output ports, which allows an implementation
via fcntl(...,F_SETLK,...).
2011-08-11 13:11:26 -06:00
Eli Barzilay
b27eacd4d0 New Racket version 5.1.2.4. 2011-08-10 03:50:14 -04:00
Matthew Flatt
f646511ca7 first small step toward cross-module optimization
Mainly propagates constantness for the benefit of keyword
applications, but also propagates simple constants
2011-08-09 16:33:17 -06:00
Matthew Flatt
5352d670c4 generalize #%variable-reference' and add variable-reference-constant?'
Use the new functions to make the expansion of keyword applications
to known procedure work  with mutation.
2011-08-09 16:33:17 -06:00
Matthew Flatt
39a96dd699 add `prop:liberal-define-context' 2011-08-09 16:33:16 -06:00
Matthew Flatt
ff024068d9 fix syntax-taint problem in expander 2011-08-09 16:33:16 -06:00