Commit Graph

4220 Commits

Author SHA1 Message Date
Matthew Flatt
717eacf90d fix bytecode validator bug
If a function is bound by a `letrec' (or internal definition)
that cannot be simplified to `let' or lifted to a constant or
top-/module-level function, and if the `letrec' binding is used in
a non-application position, and if the function has in its closure
a typed binding (i.e., boxed, fixnum, flonum, or extflonum),
then the validator was incorrectly rejecting the function's
bytecode --- because the validator didn't distinguish between typed
arguments and typed closure content.

File under "surprised that we didn't hit this one earlier".
2013-05-03 09:13:41 -06:00
Tobias Hammer
e278d43e22 use correct value for (processor-count) on QNX 2013-05-03 09:13:41 -06:00
Eli Barzilay
a4cb954e27 New Racket version 5.3.4.7. 2013-05-02 03:30:13 -04:00
Matthew Flatt
4e6e18119c add advice on cross-compiling for Android 2013-05-01 20:41:40 -06:00
Matthew Flatt
69c417e55b work around Android dlsym() bug 2013-05-01 20:41:40 -06:00
Matthew Flatt
5d653e52ba configure: fix ar' and as' inference for cross-compile 2013-05-01 20:41:40 -06:00
Matthew Flatt
61ca229a57 add GC-stress mode
Stress mode forces a GC on every N allocation attempts, and it makes
JIT-generated code always take a slow path.

This mode uncovered only a bad test case and some boring start-up
bugs (boring because start-up is deterministic enough that they
never happen), so far.
2013-05-01 20:41:40 -06:00
Matthew Flatt
93b1f3ef2c repairs for when set_locale() always return NULL
... as it does on Android
2013-05-01 20:41:39 -06:00
Matthew Flatt
176ff287a8 fix `read-syntax' on a vector with a size and no given elements
Closes PR 13720
2013-04-30 08:46:47 -06:00
Matthew Flatt
60610b737d add some comments to help explain the compiler's space-safety pass 2013-04-28 15:26:36 -06:00
Matthew Flatt
e468d1f6a5 minor code improvement 2013-04-28 15:26:35 -06:00
Robby Findler
ad323e5081 typos 2013-04-28 15:13:49 -05:00
Eli Barzilay
ec52a0e51d New Racket version 5.3.4.6. 2013-04-27 03:30:11 -04:00
Matthew Flatt
7ad1ddab64 fix bytecode compiler safefor-space, tigher bytecode validation
The safe-for-space pass could add clearing operations on "typed"
stack positions, which are known to contain a fixnum, flonum, or
extflonum. Non-clearing references, however, were not annotated to
indicate that clearing references were present, since clearing is
not expected on typed positions.

Along the lines of not expecting clearing, the bytecode validator's
encoding of the stack doesn't accomodate both "has a type" and "claims
never to be cleared", so it couldn't detect the bytecode compiler
bug. (Also, this problem didn't show up in the HOSC paper's model of
the validator, because the model pre-dates type tracking.)

Fix the bytecode compiler's space-safety pass so that it never inserts
clearing operations for typed stack positions. Then, the validator can
simply reject any attempt to clear a typed position.

Also, annotate applications generated by lifting as safe-for-space
tail calls.

Merge to v5.3.4
2013-04-26 22:47:42 -06:00
Matthew Flatt
06fe68b834 JIT: fixnum comparison on known-fixnum arguments needs no slow path 2013-04-26 22:47:42 -06:00
Matthew Flatt
400e461d75 fix a parameter check 2013-04-26 07:12:21 -06:00
Matthew Flatt
d977a2c65d update kernel parameter checks to new error-message format 2013-04-25 16:46:23 -06:00
Matthew Flatt
fa297566f1 libffi fix
Closes PR 13707
2013-04-25 08:27:03 -06:00
Matthew Flatt
749c0842a8 fixes for Windows related to missing-module exceptions 2013-04-24 12:53:38 -06:00
Matthew Flatt
fd883dbf32 fix a JIT bug related to inlined structure constructors
Merge to v5.3.4
2013-04-24 06:35:53 -06:00
Eli Barzilay
d123e09686 New Racket version 5.3.4.5. 2013-04-24 03:30:16 -04:00
Matthew Flatt
dc19b8f4e2 ffi/unsafe: fix memory-management problem in recent change
Fixes a problem with bba223a9fe.
2013-04-23 19:07:07 -06:00
Matthew Flatt
3779cf6192 fix `exn:fail:filesystem:missing-module-path' 2013-04-23 15:06:26 -06:00
Matthew Flatt
bba223a9fe ffi/unsafe: allow a constant result for asynch use of a callback
A constant result for foreign-thread use of a callback allows a
callback to return without synchronizing with the Racket thread.
A constant result is thus useful when a callback's work can simply
be skipped if the callback is applied in the "wrong" OS thread.
2013-04-23 13:48:15 -06:00
Matthew Flatt
5970bbb6bf fix NACK fix
Fixup for 74fb6feb45.
2013-04-23 07:15:02 -06:00
Matthew Flatt
f09d1d1ae8 fix iteration on large hash trees
Bug introduced by 7a8c2ff063: a tree can be deep enough that the
representation of the path to the current item can be too big to
fit into 32 bits. It will always fit in 64 bits, though.

Merge to 5.3.4
2013-04-23 07:15:01 -06:00
Eli Barzilay
a95ca8771d New Racket version 5.3.4.4. 2013-04-23 03:30:13 -04:00
Matthew Flatt
a39ee070aa fix internal call to the module name resolver
Also, check arguments in the default module name resolver.
2013-04-22 17:34:11 -06:00
Matthew Flatt
74fb6feb45 fix `nack-guard-evt'
The generated NACK shouldn't become ready when the thread where
the NACK is created terminates.
2013-04-22 16:24:25 -06:00
Matthew Flatt
426a8c0d39 add `exn:fail:{filesystem,syntax}:missing-module'
These exception types are intended as a hook for a programming
environment to recommend packages that can provide a module that isn't
found (through an uncaught-exception handler). The new exceptions are
generated by the default module name resolver and defaultload
handler. In addition to the exceptions, there's a new
`prop:exn:missing-module' property and `exn:missing-module?', which is
what an environment should use to detect relevant exceptions.

There's also a new `current-module-path-for-load' parameter, which
just provides a commuincation path from the module name resolver to
the the load handler. The parameter is a relatively ugly piece of the
puzzle, but it's the best I could find to squash the new functionality
into the existing stack of handlers.
2013-04-22 10:27:02 -06:00
Matthew Flatt
5887d7808c win64: JIT stack-trace repair
Relevant to PR 13702

Merge to 5.3.4
2013-04-19 10:17:30 -06:00
Matthew Flatt
b9ff55b7e1 upgrade libffi to 3.0.13
This upgrade is particularly for repairs to ARM and the VFP ABI.
2013-04-19 07:54:31 -06:00
Juan Francisco Cantero Hurtado
ac42864f3b Add MZ_TRY_EXTFLONUMS to OpenBSD.
Also add an error to unsupported platforms (copied from FreeBSD).

Merge to 5.3.4
2013-04-18 17:33:43 -06:00
Matthew Flatt
55a66dc4cb JIT ARM: improve stack trace
Fix a problem at the boundary of DWARF-driven backtrace
and frame-driver backtrace, as well as handling of the
JIT's different internal calling conventions.

Also, allow crossing back from frame-driven to DWARF-driven.
2013-04-18 17:22:11 -06:00
Matthew Flatt
d9f7353d63 android: disable libunwind for now
There's an issue with dl_iterate_phdr().
2013-04-18 11:14:46 -06:00
Matthew Flatt
99b1571708 src/README: improve notes on cross-compilation 2013-04-18 10:55:32 -06:00
Matthew Flatt
d44ed9ab53 configure: strip debug symbols on install by default 2013-04-18 10:55:32 -06:00
Matthew Flatt
0c4e155b88 JIT: fix inlined char->integer' and integer->char'
Put the result in the destination register, instead of always R0.

Merge to v5.3.4
2013-04-18 08:21:55 -06:00
Matthew Flatt
4cc29194d1 Unix: initialize `current-directory' from the PWD environment variables
... when PWD is defined and when it refers to the same directory
as the result of getcwd().

A shell sets PWD before starting Racket to communicate a preferred
way of referring to the current directory, which may involve soft
links that are not reflected in getpwd().
2013-04-18 06:37:53 -06:00
Juan Francisco Cantero Hurtado
5a566771e0 Change the default stack size to safe values on OpenBSD.
With this patch racket will never grow beyond of the defaults limits of
the OS and also it doesn't limit the stack size to a fixed value.

Merge to v5.3.4
2013-04-17 17:16:02 -06:00
Matthew Flatt
75d97185c9 ARM JIT: use static configuration
The output of "/proc/cpuinfo" seems wrong for a Raspberry Pi running
the latest Raspian, because it claims ARMv6-compatible but also claims
"thumb" as a feature and 7 as the CPU architecture. Use the C compiler's
configuraton, instead, which is relatively straightforward and drops
code that will turn out to be dead.
2013-04-17 16:58:08 -06:00
Matthew Flatt
bd1ac6d77e Fix JIT for ARMv6 (i.e., no thumb support) 2013-04-17 16:58:08 -06:00
Matthew Flatt
fd614991e6 code tweaks 2013-04-11 06:50:13 -06:00
Matthew Flatt
a9a20e9aa7 fix the name of `environment-variables-ref'
Also, fix use of unsetenv() to work with platforms where it returns
void.
2013-04-11 06:42:54 -06:00
Matthew Flatt
661a1dd5e2 GC tweaks
In a minor collection, old-generation pages can be ignored for
the fixup pass. Also, the "moved" bit implies the "marked" bit.

Also, move the mark bits to low and the hash bits to high,
which leads to slightly better generated code for the GC.
2013-04-11 06:42:54 -06:00
Eli Barzilay
f7ca24d1b3 New Racket version 5.3.4.3. 2013-04-11 03:30:16 -04:00
Eli Barzilay
91aa7f3527 Make configure install the docs in the standard place.
Closes #315 (on github)
2013-04-10 23:46:05 -04:00
Matthew Flatt
d4fa2766c2 performance tweaks for `for/{fx,fl,extfl}vector'
Also, provide a better error message when the body produces a
non-{fix,flo,extflo}num.
2013-04-10 17:26:38 -06:00
Matthew Flatt
37c55967b0 sconfig adjustment to accomodate PPA build
The build process expects the definition of
SCHEME_PLATFORM_LIBRARY_SUBPATH to make sense as a shell
expression, or something like that.
2013-04-10 17:26:38 -06:00
Matthew Flatt
e49956e3ea fix hole in validator
The validator was not as smart as the compiler in determining
that a `let' expression could be relied on to produce a
constant-shaped function (without side effect or error) in the case
that a right-hand side expression is a call to a known structure
constructor or predicate.

Closes PR 13679

Merge to v5.3.4
2013-04-10 15:06:13 -06:00