Commit Graph

4586 Commits

Author SHA1 Message Date
Matthew Flatt
82d40d1509 use wrappers for trig functions in complex variants
Using wrappers applies various "sconfig.h"-configured fixups.
2019-06-29 05:46:10 -06:00
Matthew Flatt
2847d1d22a improve atan, asin, and acos on complex numbers
Replace naive calculations with ones based on Kahan's "Branch Cuts for
Complex Elementary Functions" as implemented in Chez Scheme.
2019-06-28 16:51:48 -06:00
Matthew Flatt
8e1b27592f cs: disable non-decimal string->number on inexacts 2019-06-28 10:57:59 -06:00
Matthew Flatt
75ff7870bd improve / precision on mixed exact--inexact complex numbers 2019-06-28 10:57:59 -06:00
Matthew Flatt
ff94c6d8d8 cs: fix variable-reference->module-... on reference to primitive 2019-06-28 10:57:59 -06:00
Matthew Flatt
032ab4e374 cs: add place logging 2019-06-28 10:57:59 -06:00
Ryan Culpepper
3c12957c7e template: mark pattern variables as disappeared
This fixes a bug introduced in 291565.
2019-06-27 22:22:08 +02:00
Matthew Flatt
cbaddd2164 cs & thread: repairs for memory accounting and places 2019-06-26 13:50:06 -06:00
Matthew Flatt
8985a409b8 openssl: fix bytes-terminator problem on Racket CS
Make sure the argument to SSL_ctrl has a nul terminator.
2019-06-26 13:50:06 -06:00
Matthew Flatt
5e59ae0586 rktio: use only async-signal safe after fork
In particular, `malloc` is not async-signal safe.
2019-06-26 13:50:06 -06:00
Paulo Matos
7422abb42a
Remove reference to NO_SCHEME_EXNS (#2712) 2019-06-26 17:03:12 +02:00
Matthew Flatt
a0023d5797 fix environment-variables-copy and case-normalization
Preserve the original case of an environment variable for
round-tripping on systems where environment variable names are
case-normalized.
2019-06-25 14:56:39 -06:00
Matthew Flatt
8c1dbae88b expander: improve extractor to recognize once-set variables
When `set!` is used to tie a recursove knot in a flattened linklet,
the expander can recognize that pattern and not complain that a
mutable variable might be shared across places. Improving that
inference means fewer `++global-ok` flags in Makefiles.

This commit also avoids single-quote as an escaping form in a
makefile, which doesn't work with nmake on Windows.
2019-06-25 08:43:38 -06:00
Matthew Flatt
3fb226ce2a cs: fix future-thread signaling
Fix confusion between signal and broadcast operation.
2019-06-24 20:14:52 -06:00
Matthew Flatt
b64e17388f cs: fix stdio/syslog GC logging as triggered by future thread
Always use the main `rktio` instance and don't try to explicitly start
atomic mode.
2019-06-24 20:00:51 -06:00
Matthew Flatt
309a0c2489 cs: fix future-logging race 2019-06-24 18:28:03 -06:00
Matthew Flatt
51ab4a5c6a thread: repairs for event logging
Fix RacketCS so that the future visualizer works.
2019-06-24 16:36:16 -06:00
Matthew Flatt
0106abaf6e bump version number
Since it removes an built-in place-local definition, commit 564dcf339a
can affect compilation for Racket CS.
2019-06-24 15:29:45 -06:00
Matthew Flatt
0d3d0d7d86 thread: add notes on the behavior of futures 2019-06-24 14:54:37 -06:00
Matthew Flatt
564dcf339a cs: fix memory accounting and futures
Also avoid problems with interrupting a rapidly allocating
computation and shutting down the main custodian.
2019-06-24 13:59:03 -06:00
Matthew Flatt
a5a84ea8c6 remove accidentally committed debugging printout 2019-06-24 08:14:58 -06:00
Matthew Flatt
1192225c97 avoid some compiler warnings 2019-06-23 06:46:28 -06:00
Matthew Flatt
1e84b11462 expander: repair extraction when using an existing Racket build
Recent improvements to module-name resolution caching exposed a
problem in the extraction setup.
2019-06-22 07:43:02 -06:00
Matthew Flatt
f00de510de cs configure: support installed libz and libzl4
Continue to build the bundled-with-Chez zlib and lz4 by default, but
support `--enable-libz` and `--enable-liblz4`, and turn those on when
the Chez Scheme directory doesn't have bundled versions. That should
make things build right for distributions where repackaging
dependencies is disallowed or discouraged.
2019-06-22 07:11:09 -06:00
Matthew Flatt
6647d832bb configure: further improvements for NetBSD and OpenBSD
Enable ELF support for `racketcs` embedding, and add `paxctl +m`
build steps for NetBSD.
2019-06-22 06:23:47 -06:00
Matthew Flatt
7706b447a5 configure: propagate ARFLAGS to libffi configure 2019-06-21 21:54:22 -06:00
Matthew Flatt
5fb38fc246 cs: sync include path for {Free,Open}BSD 2019-06-21 21:12:17 -06:00
Matthew Flatt
e68269b357 makefile: avoid automatic "Makefile" rebuild 2019-06-21 19:46:39 -06:00
Matthew Flatt
90b79524aa revise build to avoid ld and nicear
The Chez Scheme build process now create an archive instead of linking
"kernel.o". Adjust the Racket CS build to use archives instead of
"kernel.o".

Also, modernize the Racket build's use of `ar`. Using the flags `rc` by
default (instead of `ruv`) should avoid the need for `nicear`.
2019-06-21 16:53:58 -06:00
Matthew Flatt
5c51096a88 cs: repair filesystem-change-evt
Correct an incomplete adaptation in a2a67a9660.
2019-06-21 13:35:33 -06:00
Matthew Flatt
c7f7170a3e avoid compiler warning 2019-06-21 09:50:32 -06:00
Matthew Flatt
6e70d8ec1d nicer nicear: suppress "modifier ignored" warning
If GUN ar is configured for deterministic mode by default, then

  ar: `u' modifier ignored since `D' is the default (see `U')

prints. Suppress that to avoid stderr output.
2019-06-21 09:49:11 -06:00
Matthew Flatt
db3b75eaf1 expander: add shadow filesystem for Windows in collection lookup
Checking for directories when searching for a collection can be
especially slow with the Windows filesystem, but Windows also supports
filesystem-change events. So, cache information about the existence of
paths, relying on filesystem-change events to detect with the cache is
out of date.

Related to racket/drracket#281
2019-06-21 09:27:12 -06:00
Matthew Flatt
a2a67a9660 filesystem-change-evt: fix use of failure thunk
Also, allow the failure thunk to be #f to get the default behavior.
2019-06-21 09:27:12 -06:00
Matthew Flatt
ec5b45e4f8 cs: inline arithmetic-shift and other bitwise operations 2019-06-20 18:31:19 -06:00
Matthew Flatt
9083c6abb4 schemify: use unsafe box operation for lifted mutable variables 2019-06-20 18:30:55 -06:00
Matthew Flatt
bf692f572d cs: avoid indirection through Chez Scheme for raise 2019-06-20 14:37:03 -06:00
Matthew Flatt
3f35504355 thread: refactor scheduler poll-and-select loop
Further reduce redundant checks, and also avoid an excessive delay
after making the process sleep.
2019-06-20 14:36:43 -06:00
Matthew Flatt
6d3eff55a4 cs: repair for external signals
Like 2a1404f9a3, but for Ctl-C.
2019-06-20 12:14:48 -06:00
Matthew Flatt
35ff9137e7 cs: tweak return for call/ec and call-with-continuation-barrier
The prompt installed for an escape continuation or continuation
barrier is never used to delimit a captured continuation, so the
return from the continuatiton can be streamlined slightly.

The benefit is very small (but detectable in the macro expander's use
of barriers). There's an opportunity to use `call/1cc` instead of
`call/cc`, but that change does seem to help --- neither Chez Scheme's
current `call/1cc` nor the opportunistic variant of `call/cc` use to
implement continuation attachments.
2019-06-20 08:48:56 -06:00
Matthew Flatt
30393ae0fa cs: linear-time prompt check
Add cache for `continuation-prompt-available?` so it's amortized
constant time.
2019-06-20 08:48:56 -06:00
Ryan Culpepper
685d067361 syntax/parse: fix handling of ~seq with action patterns 2019-06-20 16:36:14 +02:00
Matthew Flatt
2a1404f9a3 cs & io: fix fd semaphore polling
Reducing external-event polling exposed a problem with fd semaphore
checking, where the check before sleeping didn't abandon the sleep if
an fd semaphore was posted.

Also, fix a bug with interrupted network address lookup.
2019-06-19 18:13:37 -06:00
Matthew Flatt
1ba4d76fe0 cs & thread: avoid excessive polling for external events
Reduce polling in the case that threads that block and swap rapidly,
in which case polling on every thread swap can be useless and
expensive.
2019-06-19 17:27:24 -06:00
Matthew Flatt
ba8d442e75 cs & thread: refactor and finish futures implementation
Complete the implementation of futures, fsemaphores, future logging,
and their cooperation with threads, places, and custodians.
2019-06-19 12:50:19 -06:00
Ryan Culpepper
eb4ec000b0 syntax/parse: use generic tree functions in analyses 2019-06-19 16:21:43 +02:00
Ryan Culpepper
4b64cdef54 syntax/parse: add multiple pattern-processing passes
- pair specialization
- and/ord normalization, and cleanup
- add pat:seq-end to list-pattern
2019-06-19 16:21:43 +02:00
Ryan Culpepper
29e46bea78 syntax/parse: add generic (dynamic) tree traversal library 2019-06-19 16:21:43 +02:00
Ryan Culpepper
e845d0861d syntax/parse: add explicit pattern checks 2019-06-19 16:21:43 +02:00
Ryan Culpepper
fa78f5ebd3 syntax/parse: add well-formed pattern predicates 2019-06-19 16:21:43 +02:00