Commit Graph

62 Commits

Author SHA1 Message Date
Matthew Flatt
03259ef539 MinGW-w64 support
For now, SGC must be used, but `configure' does not select it
automatically.

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

  ../configure --host=x86_64-w64-mingw32 --enable-sgc
2012-12-28 11:06:46 -06:00
Matthew Flatt
d645200f93 fix build problem for non-Windows platforms 2012-12-21 11:52:48 -07:00
Matthew Flatt
5b016b4c32 win32: support MinGW build
A MinGW build is the same shape as a MSVC build (but without
MzCOM), unlike a Cygwin build.
2012-12-09 11:26:02 -07:00
Matthew Flatt
7a8f5f20fc bytecode compiler: replace table of local types with flags on primitives
This change makes it easier to annotate more primitives, so functions like
`integer-length' are now annotated as producing a fixnum.
2012-11-18 10:31:20 -07:00
Matthew Flatt
c5d3178602 change representation of optimization flags on primitives
Makes room for a lot more.
2012-11-18 10:31:20 -07:00
Matthew Flatt
f832c961a8 change `Scheme_Symbol' declaration to avoid compiler warnings 2012-11-01 09:09:36 -06: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
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
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
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
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
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
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
Asumu Takikawa
d527426cac Prototype implementation of control proxies 2012-06-11 18:18:37 -04:00
Matthew Flatt
967cbaadf7 repair for static-fd_set mode 2012-05-06 19:18:54 -06:00
Kevin Tew
666c0fdb57 Fix sync/timeout hang due to place channels 2012-03-16 08:18:05 -06:00
Eli Barzilay
c007c345f9 A bunch of more typos like the ones in David's commit. 2012-02-21 14:21:43 -05:00
James Swaine
a5676e9a68 Added would-be-future 2012-02-10 20:05:43 -06: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
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
Eli Barzilay
3718600125 2011 -> 2012 2011-12-31 15:16:59 -05:00
Matthew Flatt
8483b8eea5 atomic timeout hook must be place-local 2011-11-16 20:38:58 -07: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
5139de9cec add `port-closed-evt' 2011-11-10 10:01:57 -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
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
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
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
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
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
Matthew Flatt
ec29a2d85c add `use-collection-link-paths' 2011-08-24 20:08:19 -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
Matthew Flatt
ec27cbfd90 fix problems related to futures and is-list flags on pairs
Although a future thread used an atomic compare-and-swap to
set "is a list" or "not a list" flag on pairs via the
JIT-implemented `list?', the hashing function in the runtime
thread did not; as a result, it might be possible to lose
a hash code due to cache inconsistency (although I'm not
sure it's actually possible, and I couldn't trigger a problem
with a test). Most of the changes are related to using
an atomic compare-and-swap when setting a hash code, as
well as clean-ups to related code. Processor-count tests
avoid using atomic compare-and-swap on uniprocessors, which
might not support the relevant machine instructions.

As significantly, the compare-and-swap operation for the
JIT-implemented `list?' did not actually set flags on
a pair that has a hash code. This could lead to `list?'
tests that were not constant time (but only if the relevant
pair's `eq?' hash code had been used previously).
2011-07-31 04:43:24 -06:00
Matthew Flatt
1160d3df62 remove syntax certificates; add syntax taints 2011-06-29 19:15:48 -06:00
Matthew Flatt
80c4396dc1 JIT-inline struct type property predicates and accessors 2011-06-11 08:35:34 -07:00
Kevin Tew
eaebcf5fd6 [Places] fall back to threads 2011-02-28 16:03:05 -07:00
Matthew Flatt
3e38071dae fix scheduler's support for `ffi/unsafe/try-atomic'
where problems with abort-without-dynamic-wind mode caused
  a spurious trigger of nack evts
 Merge to 5.1
2011-02-05 16:48:39 -07:00
David Van Horn
c9519fd113 Fixed various spelling errors. 2011-02-03 17:42:33 -05:00
Matthew Flatt
069a7c2b48 add current-get-interaction-input-port' and adjust racket/gui'
so that GUI events are dispatched while a REPL is blocked on input
2011-01-24 19:47:20 -07:00
Eli Barzilay
1f49e35b21 2010 -> 2011 2010-12-31 15:59:39 -05:00
Matthew Flatt
8b8dd77ad6 change nearly all long's to intptr_t'
and also changed vector, string, and byte string counts to
   `intptr_t' instead of `int'.

   Except for the vector count, etc. change, this is not really a
   change for any currently supported platform, where `intptr_t'
   is the same as `long'. It's a step to suporting Win64, though,
   where `long' is the same as `int' instead of `intptr_t'.
2010-12-03 08:48:33 -07:00
Matthew Flatt
ca8b32725e fix bloking operations during a try-atomic
and remove old delim-cont support used by gr1
2010-11-30 15:08:16 -07:00
Matthew Flatt
bd28f2ab54 make `equal?' equate C pointers that refer to the same address 2010-11-24 13:41:11 -07:00
Matthew Flatt
0a179481a5 fix continuation capture in continuation transferred to a thread
where the prompt is the implicit one at the thread's creation
 Closes PR 11382
2010-11-08 18:06:07 -07:00
Matthew Flatt
05cfffdf9e v5.4.99.1, executable-yield-handler', and make-bitmap' etc. 2010-11-05 15:54:50 -06:00
Matthew Flatt
d2275f4179 level-2 finalization from ffi/unsafe and late-weak references 2010-11-05 15:54:47 -06:00
Matthew Flatt
a574d9e7e4 C source and build changes to drop wx frm GRacket 2010-11-05 15:53:54 -06:00
Matthew Flatt
fe301b1ff4 print-boolean-long-form, #true, #false, read-accept-lang, flonum? 2010-10-08 15:13:04 -06:00
Matthew Flatt
65ad6aee20 fix `touch' to run a suspended future in the runtime thread
if no future thread is running the future; also adjust the
 policy for suspending a future so that even synchronized
 operations can suspend if there's other work to be done;
 also also fix `current-future' for nested `touch'es and when
 parallel futures are disabled
2010-10-07 14:58:53 -06:00