Commit Graph

4220 Commits

Author SHA1 Message Date
Matthew Flatt
6ea9a2b3e3 add `make-environment-variables'
Swap order of argument for `environment-variables-get'
and `environment-variables-set!', so that the environment
variables come first --- which follows the usual order.
This change means that the parameter isn't used to get
the default environment variables, but that seems ok; the
convenient interface is `getenv' and `putenv'.

On Windows, case-normalized environment variable names.

Also, change the implementation to use an immutable hash
internally.
2013-04-10 12:06:29 -06:00
Matthew Flatt
842da32e48 racket/udp: fixed for udp-bind!' and udp-connect!'
Fix ephemeral-port support in `udp-bind!', and
change `udp-bind!' and `udp-connect!' to try address
resolutions in order to find one that works (which is
typically needed to auto-select an IPv4 or IPv6 variant
of an address).
2013-04-10 09:11:14 -06:00
Matthew Flatt
7a1ef9b0cc fix `dump-memory-stats' output
PTIdPTR use was wrong.
2013-04-10 07:12:35 -06:00
Matthew Flatt
3d1b0bd381 new environment-variable API
The `current-environment-variables' parameter determines the current
mutable "environment variable set". If that set is the initial one for
a Racket process, then using the set corresponds to working with OS
environment variables.  Otherwise, it's really just a hash table that
is packaged up as OS environment variables if a subprocess is created.

The new environment-variable interface works in terms of bytes, instead
of assuming that environment variable names and values fit in a string
encoding.

The string-based `getenv' and `putenv' are still available as
convenience wrappers. The checking on environment-variable names
for those wrappers is a little tighter, preventing any attempt to use a
name that contains "=".
2013-04-10 06:59:33 -06:00
Matthew Flatt
97fdd976f3 fix various compiler warnings
Resort to gcc annotations in some cases, but avoid disabling whole
classes of warnings.
2013-04-09 10:55:21 -06:00
Eli Barzilay
f57fbd94a6 Fix old pointers to COPYING.txt that should go to COPYING_LESSER.txt. 2013-04-09 05:41:07 -04:00
Eli Barzilay
127be39816 New Racket version 5.3.4.1. 2013-04-09 03:40:24 -04:00
Matthew Flatt
d5ede87ae8 JIT for ARM
Includes switch from LGPL 2.1 to LGPL 3, since the ARM port
of GNU lightining is licensed under LGPL 3.
2013-04-08 14:43:30 -06:00
Ryan Culpepper
6fdef0dcfc Post-release version for the v5.3.4 release 2013-04-08 09:01:57 -04:00
Eli Barzilay
0cb85a85a1 New Racket version 5.3.3.9. 2013-04-07 03:30:16 -04:00
Matthew Flatt
aa18b93e63 bump version number 2013-04-06 07:06:46 -06:00
Tony Garnock-Jones
c4f4c6ab5d Make xform build step work in Windows builds 2013-04-06 06:49:13 -06:00
Tony Garnock-Jones
314bc49714 UDP Multicast primitives and documentation. 2013-04-06 06:49:13 -06:00
Tony Garnock-Jones
d78456b88b Support SO_REUSEADDR on (udp-bind!), for multicast use. 2013-04-06 06:49:13 -06:00
Matthew Flatt
f24b91a1cc fix interference of unboxing inference for different arguments 2013-04-06 06:42:01 -06:00
Vincent St-Amour
8948388ec5 Fix another unsafe optimization of unsafe-fxmodulo.
Found using random testing.
2013-04-02 16:29:10 -04:00
Matthew Flatt
8c89451fbb configure: libffi after pthread
On OpenBSD, for example, the libffi link test doesn't work until
"-pthread" is in $LIBS.

Also, make `configure' complain if `--enable-libffi' is specified
and linking to libffi fails.
2013-04-02 06:06:56 -06:00
Matthew Flatt
9efb14e434 system-type: fix 'so-mode 2013-03-30 14:13:02 -06:00
Matthew Flatt
a1dccb4aa8 repairs for MinGW builds
The changes make extflonums work when compiling with SSE arithmetic
for `double's.
2013-03-30 10:55:59 -06:00
Matthew Flatt
ba270cde48 fix over-eager "optimization" of some unsafe-fx operations
As reported by Vincent.
2013-03-29 14:46:19 -06:00
Matthew Flatt
72b5b984b3 places: fix problem in clean-up
The problem was created by recent changes to allow GC
of threads that are blocked on certain place channels.
2013-03-27 17:17:33 -06:00
Eli Barzilay
9b99d3e314 New Racket version 5.3.3.8. 2013-03-27 03:30:16 -04:00
Matthew Flatt
4d76aa2040 place channels & threads: improve GC
Allow a thread to be GCed when it is blocked on a place
channel for reading and the place channel's write end
is inaccessible.

GC is limited to threads that do not participate in cycles
of such threads, where the otherwise unerachable threads
are blocked on place channels that are reachable among the
set of threads. In other words, the GC finds the greatest
fix point (as measured by the threads to retain) instead of
least fix point --- which isn't what you want, but finding
the least fix point seems to require significant extra GC
machinery across places.

This improvement was intended to solve the same problem as
commit 7b0608c, but that case seems to run into the limitation
on cycles.
2013-03-25 05:15:24 -06:00
Matthew Flatt
b34fac32c0 fix space-safety problem
A tail call with certain kinds of primitives would fail to
clear local bindings in a detectable way. For example, a
tail call to `sync' that blocks could retain references
to unreachable data in the context of the `sync' call.

Primitives that can cause problems in the run-time system
are already identified as "imemdiate" primitives. The
safe-for-space pass now inserts clearing actions before a tail
call, unless the call it to a known immediate primitive or a
Racket-implemented function.

Clearing operations are now omitted before non-tail calls
to immediate operations like structure predicates.

The newly added clearing operations could affect performance,
but they probably won't, since the clear operations are still
avoided in tail-call cases that are otherwise fast. The newly
omitted clearing operations may improve performance.
2013-03-25 05:15:24 -06:00
Matthew Flatt
c3266ef685 fix `sync/[timeout/]enable-break' semaphore shortcut
The shortcut could be triggered in a bad case (first
argument as `#f' in non-timeout mode) and returned the
wrong result (void instead of the semaphore).
2013-03-25 05:15:24 -06:00
Matthew Flatt
3886b7702e fix for `syntax-local-value/immediate'
The source locaiton on the second result was mangled.

Closes PR 12477
2013-03-21 14:29:40 -06:00
Matthew Flatt
30a4b481dd fix submodule declarations nested in phases > 1 2013-03-21 11:51:46 -06:00
Matthew Flatt
111799ec94 Mac OS X: use IPV6_V6ONLY
As of 10.8, Mac OS X seems to behave more like Linux in the way
that IPv6 and IPv4 binding interact.

Closes PR 13193
2013-03-21 11:51:46 -06:00
Matthew Flatt
b40c91e6f4 more fixes to avoid warnings 2013-03-18 13:47:11 -07:00
Matthew Flatt
1e31d99ca3 fix non-extflonum build 2013-03-18 11:30:10 -07:00
Matthew Flatt
8122249602 avoid compiler warnings 2013-03-18 11:30:10 -07:00
Matthew Flatt
3bf9dd93dc fix header-file issues 2013-03-18 11:30:10 -07:00
Michael Filonenko
35a093469c windows: extflonum support
Enable extflonums in a MSVC build by relying on a MinGW-built DLL,
"longdouble.dll". The DLL is loaded on startup. If the DLL isn't
available, then `extflonum-available?' reports #f.

Instead of setting the floating-point mode globally to extended
precision, the mode is changed only just before (and restored right
after) extflonum arithmetic operations.
2013-03-18 07:42:32 -07:00
Tobias Hammer
2bae950273 Work around bug in QNX readlink
QNX readlink null-terminates its result and adds the termination
to the len-result. Fix by decrementing len if needed.
2013-03-10 07:18:04 -06:00
Matthew Flatt
5e20f51415 fix mark handling for impersonatored procedures to match docs
Using an impersonator property to represent an application mark was
a bad choice. The property gets propagated, so it is also on any later
chaperone layer, and then things go bad: the docs say that special
treatment is triggered by supplying an argument to `impersonate-property',
but it was actually triggered by the chaperone having the property.

Change the implementation to match the documentation. Using an
impersonator property to supply the mark should be regarded as a hack,
but now the implementaiton is at least consistent with the documentaiton.
2013-03-03 10:16:51 -07:00
Matthew Flatt
cdf0f6b9ab add 'so-mode to `system-type'
To work better with OpenBSD (which has been a problem since we
changed `ffi-lib' to open libraries in "local" mode by default).
2013-03-01 15:20:17 -07:00
Juan Francisco Cantero Hurtado
292c81a826 Fix `configure' for OpenBSD
"-rdynamic" doesn't work with GCC 4.7 on OpenBSD: "cc: error:
unrecognized command line option '-rdynamic'". The switch isn't
necessary because it is only a wrapper to "-Wl,--export-dynamic".
Look GCC bug 37454.
2013-03-01 15:20:17 -07:00
Matthew Flatt
ca4320467c fix missing initialization of cached inspector reference
The 3m transformation fills it in, but it's obviously
better to be explicit and avoid the bug for CGC.
2013-02-28 12:19:25 -07:00
Matthew Flatt
542c38ebc5 equality: struct transparency and inspector shortcuts and caching
Same as for hashing.
2013-02-28 12:19:25 -07:00
Matthew Flatt
2236363696 fix bug in hashing shortcut for transparency 2013-02-28 10:06:36 -07:00
Matthew Flatt
39aafe3a1e change `eq?' hashing to avoid dropping the low bit for fixnums 2013-02-28 06:51:26 -07:00
Matthew Flatt
7a8c2ff063 improve complexity of `hash-iterate-{key,value}'
For immutable hashes, `hash-iterate-{key,value}' used to take O(N) time on
the first call for a particular table and O(1) thereafter. Now it takes
O(1) time for all calls, the constant is only slightly larger for
the non-first calls, and there's no extra allocation.
2013-02-28 06:51:26 -07:00
Matthew Flatt
773496642b `equal?' hashing: shortcut and some caching for structure transparency 2013-02-28 06:51:26 -07:00
Eli Barzilay
ca304aafaf New Racket version 5.3.3.7. 2013-02-28 03:50:23 -05:00
Matthew Flatt
abf44f8b49 add `module-compiled-cross-phase-persistent?' 2013-02-27 08:53:43 -07:00
Matthew Flatt
88a36a077c terminology change again: "cross-phases persistent" modules 2013-02-27 08:53:43 -07:00
Eli Barzilay
5ca93be56c New Racket version 5.3.3.6. 2013-02-27 03:30:19 -05:00
Matthew Flatt
a04bfa5ba2 fix phase-collapsing-module inference
This bug was causing a crash in some DrRacket tests.
2013-02-26 19:19:57 -07:00
Matthew Flatt
2646ff6895 try "phase-collapsing" instead of "phaseless" 2013-02-26 19:01:36 -07:00
Matthew Flatt
2e652fc2b3 fix some "phaseless" module holes 2013-02-26 19:01:35 -07:00
Matthew Flatt
899a3279c2 add experimental support for "phaseless" modules
The intent is to support phase-crossing data such as the `exn:fail:syntax'
structure type that is instantiaed by macros and recognized by contexts
that use `eval' or `expand'. Phaseless modules are highly constrained,
however, to avoid new cross-phase channels, and a module is inferred to
be phaseless when it fits syntactic constraints.

I've adjusted `racket/kernel' and improved its documentation a little
so that it can be used to implement a phaseless module (which can
import only from other phaseless modules).

This change also adds a `flags' field to the `mod' structure type
from `compiler/zo-structs'.
2013-02-26 14:55:28 -07:00
Matthew Flatt
bb9068641b racket/draw win32: Pango patch
Closes PR 13513
2013-02-23 08:42:36 -07:00
Eli Barzilay
de2aa509ac New Racket version 5.3.3.5. 2013-02-21 03:30:15 -05:00
Matthew Flatt
33c6635550 version 5.3.3.5
Bumped to force a rebuild of ".zo"s that were generated with the flonum
bug.
2013-02-20 06:46:32 -07:00
Matthew Flatt
c56b73a00a JIT: fix slow-path boxing for non-self-tail calls with unboxed arguments
The bug was introduced when changing the order of unboxed argument
staging along with extflonum unboxing support. The main symptom of
the bug was that icons were sometimes blacked out in DrRacket.
2013-02-20 06:42:01 -07:00
Matthew Flatt
535072086b fix non-extflonum build 2013-02-19 18:15:48 -07:00
Matthew Flatt
97c34905c1 racket/extflonum: fix JIT-inlined `extflvector-ref' in 32-bit mode 2013-02-19 16:47:39 -07:00
Matthew Flatt
0afcda2a5a fix error checking for flreal-part' and flimag-part' 2013-02-19 16:47:39 -07:00
Matthew Flatt
8ef5e88f41 another JIT repair 2013-02-19 14:03:00 -07:00
Matthew Flatt
e0650c43df JIT: fix for 32-bit mode
Fix a bug in ca951294d4.
2013-02-19 10:41:08 -07:00
Matthew Flatt
ca951294d4 JIT: inline char->integer' and integer->char' 2013-02-19 08:43:50 -07:00
Eli Barzilay
bbd06930ae New Racket version 5.3.3.4. 2013-02-19 03:30:16 -05:00
Matthew Flatt
79c4af4e45 racket/base: add `impersonator-ephemeron' 2013-02-18 17:01:11 -07:00
Matthew Flatt
fdd8dc9376 JIT: fix bug in checking certain values before unboxing
The check was incomplete in the case that both arguments to a binary
[ext]flonum function need to be checked and the second one was not an
[ext]flonum and also not a fixnum.
2013-02-18 11:07:45 -07:00
Matthew Flatt
4271d987cd ffi/unsafe: fix a bug in conversion to UTF-16
Characters outside of the BMP were translated incorrectly.
2013-02-18 10:28:58 -07:00
Matthew Flatt
f8a0d6d432 configure: add more guidance/reporting on non-recommended options 2013-02-18 10:28:58 -07:00
Eli Barzilay
9e9adeae0c Consistent capitalization for "GRacket". 2013-02-16 13:41:38 -05:00
Matthew Flatt
9b04aef0f8 fix a problem with `syntax-local-lift-require' at top level
The problem was exposed by improved error checking
in the expander to detect references to exports of a module that
is not yet visited, and as triggered by the documentation for
`2htdp/planetcute'.
2013-02-16 09:29:16 -07:00
Eli Barzilay
1ddacff399 New Racket version 5.3.3.3. 2013-02-16 03:40:18 -05:00
Matthew Flatt
6281ac0aac less noisy win32 builds 2013-02-15 12:15:53 -07:00
Michael Filonenko
840fc9c657 full unboxing for extflonums, plus `ffi/unsafe' support
Includes a repair for floating-point `min' and `max' that affects all
x86 builds that use SSE arithmetic, leaving the (otherwise unused)
floating-point stack in a bad state, which might have affected
x87-using C/foreign libraries running alongside Racket.
2013-02-15 12:15:34 -07:00
Matthew Flatt
a348e5421d fix a `configure' test
Thanks again to Tobias.
2013-02-15 11:55:26 -07:00
Eli Barzilay
576a573216 New Racket version 5.3.3.2. 2013-02-15 03:30:18 -05:00
Matthew Flatt
74a3e14f9c improve `configure' tests for cross-compilation
Use compile and link tests instead of run tests, where
possible.

Based on a patch from Tobias
2013-02-14 19:47:40 -07:00
Matthew Flatt
ccabbaa36e fix `current-subprocess-custodian-mode' for a #f argument 2013-02-14 17:30:10 -07:00
Matthew Flatt
421cb24138 add `port-counts-lines?' 2013-02-14 15:45:26 -07:00
Tobias Hammer
7e2b443fa9 Support for multiple value return from wrap-evt and handle-evt
wrap/handle-evt that receives multiple values must have a handler function with adequate arity.

struct.c:
  change contract for wrap/handle-evt from (any/c -> any) to procedure?
thread.c:
  adjust sync processing
sync.rktl:
  add test for handle-evt, wrap-evt and prop:evt
2013-02-14 15:45:26 -07:00
Matthew Flatt
294bed209e macro expander fix
Repair 73e07f576b added an item to a list without incrementing a
counter for the list length, which cause a different element of
the list to be dropped, which could mess up binding resolution in
arbitrarily bad ways.

(Ths bug falls into the "how did this not get exposed earlier?"  bin,
although part of the answer is that it requires a combination of
module re-expansion and simplification of syntax objects in the
residual program.)

Closes PR 13428
2013-02-14 07:11:16 -07:00
Ryan Culpepper
f08133733a fix error message 2013-02-13 13:43:40 -05:00
Matthew Flatt
d408ba43a8 fix submodule `expand' handling
Trying again for 4a0adb6a74.
2013-02-13 10:26:31 -07:00
Matthew Flatt
9ff47ec1d0 Windows: propagate system error text even with format commands
For example, error 193 now says "%1 is not a valid Win32 application.",
which is ugly but better than "Unknown error".
2013-02-13 08:54:53 -07:00
Matthew Flatt
c6eb82524b fix `syntax-local-module-exports' for submodules in expand mode 2013-02-13 08:28:23 -07:00
Matthew Flatt
8c2c84f74f fix context for `#%module-begin' form in a submodule 2013-02-13 08:28:22 -07:00
Matthew Flatt
4a0adb6a74 fix syntax-local-submodules' in expand' mode 2013-02-13 08:28:22 -07:00
Matthew Flatt
7f5b295308 fix problem with the initial continuation prompt
(Got it wrong in 2f7d4b5e.)

Closes PR 13494
2013-02-12 14:17:57 -07:00
Eli Barzilay
49ab87eadc "PLT Scheme Inc" -> "PLT Design Inc" 2013-02-12 08:06:30 -05:00
Matthew Flatt
dd50ac8652 catch module-not-available mimatches earlier 2013-02-08 22:57:37 -06:00
Matthew Flatt
689b62a7a3 configure: adjust mmap()/mprotect() test
Avoid aggravating SELinux.
2013-02-08 22:57:37 -06:00
Eli Barzilay
0e8b5f87b3 New Racket version 5.3.3.1. 2013-02-08 03:30:17 -05:00
Eli Barzilay
f548555095 Post-release version for the v5.3.3 release 2013-02-06 22:43:19 -05:00
Matthew Flatt
38fb10eaec new-style contract errors for `exn' field guards 2013-02-05 11:44:38 +01:00
Matthew Flatt
442f6eaaae fix `regexp-match' variants given a long string and an output port
... again; commit d194fa6245 turned out to be incomplete.
2013-02-05 11:44:38 +01:00
Matthew Flatt
50a82872f0 x86_64-mac: Pango CoreText repair
Closes PR 13473
2013-02-02 19:41:59 -08:00
Matthew Flatt
5dda7c4b14 work around C library bug in powl() 2013-02-01 15:00:23 -08:00
Matthew Flatt
c1bd671b08 fix prototype when the C compiler has no "no inline" annotation 2013-02-01 10:35:38 -08:00
Matthew Flatt
ffb4b34494 another repair for extflonum support 2013-01-29 16:55:20 -07:00
Matthew Flatt
28493dcc88 repairs to extflonum changes 2013-01-29 05:53:30 -07:00
Matthew Flatt
74986a42e3 fix to use compiled startup code 2013-01-29 05:53:30 -07:00
Eli Barzilay
113077dc70 New Racket version 5.3.2.3. 2013-01-29 03:30:18 -05:00
Michael Filonenko
17b8092641 extflonums
An extflonum is like a flonum, but with 80-bit precision and
not a number in the sense of `number?': only operations such as
`extfl+' work on extflonums, and only on platforms where extflonums
can be implemented by hardware without interefering with flonums
(i.e., on platforms where SSE instructions are used for
double-precision floats).

[Patch provided by Michael Filonenko and revised by Matthew.]

The compiler tracks information about bindings that are known to
hold extflonums, but the JIT does not yet exploit this information
to unbox them (except as intermediate results).
2013-01-28 18:17:06 -07:00