Commit Graph

1077 Commits

Author SHA1 Message Date
Matthew Flatt
c01ced6e1d add syntax-transforming-with-lifts? 2015-12-22 08:02:44 -07:00
Matthew Flatt
0553f191d7 adjust PLT_INCREMENTAL_GC so it can disable generational GC
A value that starts "1", "y", or "Y" enabled incremental mode
permanently (any value was allowed formerly), while a value that
starts "0", "n", or "N" causes incremental-mode requests to be
ignored.
2015-12-20 08:58:21 -07:00
Matthew Flatt
3a99a19c56 reduce double major GCs
When a major GC triggers finalization, another major
GC is scheduled immediately on the grounds that the
finalizer may release other values. That was important
at once time, but the finalization and weak-reference
implementation has improved to the point where the
extra ful GC no longer seems necessary or useful.
2015-12-20 08:58:21 -07:00
Matthew Flatt
513849c1e3 incremental GC: make accounting incremental for the root custodian 2015-12-20 08:58:21 -07:00
Matthew Flatt
9711000b70 drop generation 1/2 except in incremental mode
Originally, generation 1/2 was intended to delay major
collections when the heap is especially large. It doesn't
seem to be effective in that case, and it can slow down
minor GCs, so continue to use it only in incremental
mode (where it helps significantly with fragmentation).
2015-12-20 08:58:21 -07:00
Matthew Flatt
6957780cd5 incremental GC: tune departure from incremental mode
At the completion of an incremental major GC, if incremental
mode wasn't requested recently, schedule an immediate major
GC to reduce the heap back to its normal footprint.
2015-12-20 08:58:21 -07:00
Matthew Flatt
7d2b538293 fix marshaling of a compiled top-level begin-for-syntax
Closes #1174
2015-12-19 09:37:32 -07:00
Matthew Flatt
2fad028fd5 fix incremental GC bug
Also, fix reporting of whether a minor GC was in incremental mode.
2015-12-19 09:37:32 -07:00
Matthew Flatt
d7184227e1 fix mutation of shared "self" module path index for submodules 2015-12-17 06:21:05 -07:00
Matthew Flatt
ca237910b3 fix make-syntax-delta-introducer with a #f argument
Closes PR 15202
2015-12-15 17:11:45 -07:00
Gustavo Massaccesi
6985150e0b Don't drop expressions with side effects in eq? reduction
The expression (eq? x y) is reduced to #f when the types of
x and y are known. Reduce this to (begin x y #f) when they
have side effects.
2015-12-15 00:25:00 -03:00
Matthew Flatt
f7c67f5c45 incremental GC: always use generation 1/2 in incremental mode
Also, make nursery 1/4 as big in incremental mode, and
correspondingly tune the amount of work to perform per
collection by 1/4 its old value. Using generation 1/2
reduces fragmentation that would otherwise be increase
by a smaller nursery.
2015-12-13 17:16:05 -07:00
Matthew Flatt
d01aec1b32 JIT: always use buffer padding of 200
The main intent of this change is to raise the buffer size
for ARM, but that would leave only 32-bit x86 at size 100, so
just make it size large for all machines.
2015-12-12 14:11:17 -07:00
Matthew Flatt
c6b8ba7c4a JIT: add missing checks for buffer space 2015-12-12 08:13:34 -07:00
Matthew Flatt
d66af86a58 JIT on ARM: add assertion to check long-jump mode
The same assertion is present already in Thumb mode, but
add it to non-Thumb mode.
2015-12-12 07:48:14 -07:00
Matthew Flatt
f5d5277ae7 fix binding table when shadowing imports 2015-12-10 04:56:14 -07:00
Matthew Flatt
b7dd829a6f bump version number 2015-12-09 21:06:55 -07:00
Matthew Flatt
2743ea06bb avoid paths in case-lambda names
Filter absolute path names for `case-lambda` in the same way as for
`lambda`.
2015-12-09 21:06:55 -07:00
Matthew Flatt
c0f4eb8287 inctemental GC: make finalization more incremental
Allow the process of discovering finalizers to be incremental,
including allow interruptions in later levels of ordered
finalization.
2015-12-08 07:53:03 -07:00
Matthew Flatt
6f106d9adc incremental GC: more precising counting of work done 2015-12-08 05:17:44 -07:00
Matthew Flatt
715bdbb49e incremental GC: avoid already-finished finalizaton work
Avoid extra work svaing finalization information and
re-chaining old-generation records for a major GC.
2015-12-06 12:36:52 -05:00
Matthew Flatt
e44926fcee increemntal GC: compact when a major GC is forced early
This change further defends against fragmentation when
incremental mode isn't working well.
2015-12-06 12:36:52 -05:00
Matthew Flatt
b5131321d7 force non-inremental GC if excessive fragmentation
Increemntal GC skips the old-generation compaction phase.
For most applications, that's ok, but it's possible for
fragmentation to get out of hand. Detect that situation
and fall back to non-incremental mode for one major GC.
2015-12-06 12:36:52 -05:00
Matthew Flatt
724dc2fdbf fix namespace-mapped-symbols forcing of lazy binding info 2015-12-02 13:14:28 -07:00
Sam Tobin-Hochstadt
a6eb00a41c Avoid warning for unused variable. 2015-12-02 10:01:01 -05:00
Matthew Flatt
d56e7309ad GC: fix yet another problem counting allocated bytes 2015-12-01 16:21:32 -07:00
Gustavo Massaccesi
b175241961 Flatten nested begin and begin0 forms
The nested begin/begin0 are flattened at read time, but some
optimizations may create new instances.
2015-12-01 13:50:16 -03:00
Matthew Flatt
7e949d5513 GC: skip memory accounting if demand goes away
Memory accounting is enabled on demand; if demand goes
away --- as approximated by no live custodians having
a limit or previously been queried for memory use ---
then stop accounting until demand resumes.
2015-12-01 08:14:38 -07:00
Matthew Flatt
bef34606cb incremental GC: fix handling of ephemerons
Fix the case that an old-generation finalizer ends up
on a modified page after all old-generation marking
is complete.

Also, make sure epehemerons are checked after previous
marking that may have left the stack empty.
2015-12-01 05:50:06 -07:00
Matthew Flatt
03302c3f30 repair an assertion in the GC 2015-12-01 05:50:06 -07:00
Matthew Flatt
8363144818 incremental GC: make finalization more incremental 2015-12-01 05:50:06 -07:00
Matthew Flatt
f30d8bd562 incremental GC: fix overcount of immobile objects 2015-12-01 05:50:06 -07:00
Matthew Flatt
d306ecdf3a incremental GC: fix accumulation of page-repair work
Too much work was being saved for the final step of a
major GC.
2015-12-01 05:50:06 -07:00
Matthew Flatt
e9c722cf22 re-tune incremental GC parameters
With immobile-object allocation repaired, smaller increments
work.
2015-12-01 05:50:06 -07:00
Matthew Flatt
7901962647 incremental GC: fix phantom-byte counting 2015-12-01 05:50:06 -07:00
Matthew Flatt
fa3cabd681 incremental GC: avoid allocating immobile on old-generation page
The allocation strategy for immobile objects avoids some fragmentation
in non-incremental mode, but it interferes with finishing up an
incremental major collection, so trade some fragmentation for
an earlier finish (which is far more likely to use less memory
instead of more, despite extra fragmentation).
2015-12-01 05:50:06 -07:00
Matthew Flatt
817fdad2d5 Windows with MinGW: Fix network address resolution
Use the same code as for MSVC compilation, which is as simple
as defining `HAVE_GETADDRINFO`.

Closes PR 15192
2015-11-29 17:31:47 -07:00
Vincent St-Amour
e7e75c2292 Fix exponentiation of negative single-floats and moderately large bignums. 2015-11-29 15:46:56 -06:00
Matthew Flatt
a389678556 improve interaction of incremental mode and finalization
Really, just improve when majors GCs are forced to trigger
further finalizations. This improvement makes `(collect-garbage)`
followed by `(collect-garbage 'incremental)` move more
reliably into incremental mode.
2015-11-28 15:54:45 -07:00
Matthew Flatt
9407afa0a2 faster GC traversal of shared closure prefixes 2015-11-28 11:21:19 -07:00
Matthew Flatt
89807d178e fix accounting of nursery for logging
The pre-GC count didn't include the obejcts allocated on
the most recent nursery page.
2015-11-28 10:36:12 -07:00
Matthew Flatt
c3ac1c6bf4 reduce incremental work on (collect-garbage 'minor)
When `(collect-garbage 'minor)` is combined with incremental
mode, do less incremental work. At the same time, don't
skip an incremental GC just because a major GC is ready.
2015-11-28 10:36:12 -07:00
Matthew Flatt
e968cfbde4 fix accounting of phantom bytes for incremental GC
Also fixes accounting when a phantom-bytes value is
treated as potentially having a backpointer.
2015-11-28 10:35:24 -07:00
Matthew Flatt
81e0636843 fix counting of interior-pointer-allowed objects
Words versus bytes.
2015-11-28 09:22:11 -07:00
Matthew Flatt
ca0e9b8b2f report timing of incremental step 2015-11-28 09:22:11 -07:00
Matthew Flatt
d37bfd45ae avoid unnecessary closure-fixup work in incremental mode 2015-11-28 09:22:11 -07:00
Matthew Flatt
46fe53fadb incremental GC: avoid extra traverals of weak-link lists
When incremental mode has already gone through weak boxes
and arrays, a major GC doesn't need to see them again.
2015-11-28 09:22:11 -07:00
Matthew Flatt
ad2dd24fb8 incremental GC: split "incremental" finalization to single step
Don't finalize after performing some marking work, since
finalization is in one chunk, so it's best to avoid combining
that delay with others.
2015-11-28 06:09:39 -07:00
Matthew Flatt
493eb1de7f tweak incremental-GC parameters
Based on experiments with a few programs.
2015-11-27 15:08:54 -07:00
Matthew Flatt
ba8103bbde add PLT_INCREMENTAL_GC
Although calling `(collect-garbage 'incremental)` in a program with
a periodic task is the best way to request incremental collection, it's
handy for some experiments to have an environment variable that turns
it on permanently.

This change also makes incremental-mode minor collections log as "mIn"
instead of "min", and it changes the first field of the logged
`gc-info` structure to be a mode symbol instead of a boolean.
2015-11-27 08:02:18 -07:00
Matthew Flatt
a0576e0378 make the clean-up phase of a major GC incremental
Incremental GC now works well enough to be useful for some programs
(e.g., games). Memory accounting is still not incremental, so DrRacket
(and running programs in DrRacket) does not really support incremental
collection, although pause times can be much shorter in incremental
mode than by default.
2015-11-27 08:02:17 -07:00
Matthew Flatt
2486c7f4bc incremental GC: add finalization step
This step is semi-incremental, in that it can happen during
incremental collection, but all finalization is performed at once.
This will work well enoguh if the number of finalizers, weak boxes,
etc., will be small enough relative to the heap size.
2015-11-27 08:02:17 -07:00
Matthew Flatt
e24b73fbfd minor GC simplification 2015-11-27 08:02:17 -07:00
Vincent St-Amour
e9282d4f6e Fix expt of floats by large positive bignums.
Brings behavior in line with Gambit.

Closes GH #1148.
2015-11-25 17:46:36 -06:00
Matthew Flatt
8839f7b848 bump version number
Should have incremented it for "xform.rkt" change in f5dbd99e43.
2015-11-25 07:18:12 -07:00
Matthew Flatt
b443f3fe68 fix broken resize of place array
Change default array size from 32 to 4, so that the
resize path is used (and tested) on more typical
machines.
2015-11-24 09:20:44 -07:00
Matthew Flatt
5cb02282f5 fix round-to-even for exact->inexact on rationals
Thanks again to Robby
2015-11-22 18:09:11 -07:00
Matthew Flatt
ce7487182a fix too-early exact->inexact conversion in number parsing
Robby found this bug, continuing his streak that included
find the bugs behind commits f5dbd99e43 and 901ffdcbac.
2015-11-22 09:11:23 -07:00
Matthew Flatt
2a88662d01 exact->inexact fixup for MSVC
Casting a `uintptr_t` to `double` seems not to round to
nearest, so keep all bits while moving to `double` and
use arithmetic to combine them (since the rounding mode
is used correctly for arithmetic).
2015-11-22 08:33:44 -07:00
Matthew Flatt
901ffdcbac fix inexact-number parsing problem
Bug introduced in c40229f756.
2015-11-22 06:50:49 -07:00
Matthew Flatt
f5dbd99e43 fix precision in exact->inexact on bignums
The strategy of converting a bignum to a flonum by converting on word
boundaries can lose one bit of precision. (If the use of a word
boundary causes a single bit to get rounded away, but the first bit of
the next word is non-zero, then the rounding might have been down when
it should have been up.)

Avoid the problem by aligning relative to the high bit, instead.
2015-11-22 06:50:49 -07:00
Asumu Takikawa
92fc1f41c8 Add more hash-like operations to id-table
The operations are ref!, set*, set*!, update, and
update!. Also bumps version number.
2015-11-21 15:46:22 -05:00
Matthew Flatt
c40229f756 fix reading of extflonums, including with large exponents
Fix even basic readind when extflonums are not supported, but
also fix reading extflonums with large exponents (related to
the other recent changes to number parsing).
2015-11-21 10:55:14 -07:00
Matthew Flatt
9d2dd01689 more repairs of parsing inexact with large exponents
Fix the slow-path parsing of numbers in essentially the same
way as aff167b13d.

Closes #1140
2015-11-21 09:18:32 -07:00
Chris Jester-Young
aff167b13d Fix parsing of 0e401 on USE_EXPLICT_FP_FORM_CHECK platforms. 2015-11-21 08:27:46 -07:00
Matthew Flatt
8e46e46d40 add more support for continuation marks in procedure impersonators
Allow a more dynamic (than `impersonator-prop:application-mark`)
determination of continuation marks and associated values to wrap the
call of an impersonated procedure.
2015-11-20 10:20:02 -07:00
Jay McCarthy
69b8b2be35 Fix up prim count from merge mistake 2015-11-20 10:34:19 -05:00
Jay McCarthy
8c08d22197 update cstartup 2015-11-20 10:22:36 -05:00
Jay McCarthy
fff7bcfb03 initialize new params in read_escape_from_string 2015-11-20 10:17:59 -05:00
Jay McCarthy
ec713a22c3 Ensurce new parameters have false defaults everywhere 2015-11-20 10:17:59 -05:00
Jay McCarthy
bbf03997bb correct dot cancelling under readtable 2015-11-20 10:17:36 -05:00
Jay McCarthy
ce0aed77ea use readtable for detecting dot 2015-11-20 10:17:36 -05:00
Jay McCarthy
4451f44dda use readtable if available to look up whitespace 2015-11-20 10:17:36 -05:00
Jay McCarthy
35aa2c2398 first version of read_cdot 2015-11-20 10:17:36 -05:00
Jay McCarthy
23beaa4793 comments re mflatt 2015-11-20 10:17:08 -05:00
Jay McCarthy
c257d6dc64 tagged brackets and braces 2015-11-20 10:16:41 -05:00
Ryan Culpepper
912f1fe603 add macro-debugger event on expand opaque expression 2015-11-16 09:09:36 -05:00
Matthew Flatt
d3f2bd6dac fix broken abort handling related to module-registry lock 2015-11-15 16:46:07 -07:00
Matthew Flatt
0e16ce4bea add internal-definition-context-{binding-identifier,track}
When an internal-definition context is used with `local-expand`, the
any binding added to the context affect expansion, but the binding do
not appear in the expansion. As a result, Check Syntax was unable to
draw an arrow from the `s` use to its binding in

 (class object%
   (define-struct s ())
   s)

The general solution is to add the internal-definition context's
bindings to the expansion as a 'disappeared-bindings property. The new
`internal-definitionc-context-track` function does that using a new
`internal-definition-context-binding-identifier` primitive.
2015-11-15 06:17:22 -07:00
Matthew Flatt
8ec17deed1 avoid Linux stack correction on non-main thread 2015-11-13 14:54:05 -07:00
Matthew Flatt
fb1432e70e declare and document scheme_set_dll_path() for Windows embedding 2015-11-13 06:49:07 -07:00
Matthew Flatt
a053c78c30 fix re-export of shadowing binding
Mishandling of the `require`-binding table could cause
`racket/private/pre-base` to export `andmap` as syntax, for example,
instead of as a variable. The syntax-versus-variable distinction
doesn't usually matter, but it affects the order of exports in
bytecode form.
2015-11-12 14:24:44 -07:00
Matthew Flatt
2ed6c01e56 fix space-safety annotation for nested ifs
Closes PR 15176
2015-11-08 07:36:48 -07:00
Matthew Flatt
0beee9cd6a remove visit of available module in dynamic-require
Even though `dynamic-require` might lead to loading source, the
path into the compiler for that source will force compile-time code
as needed.

One benefit of ths change is that `racket -l pict3d` takes about half
as long, because `racket/gui` includes a `dynamic-require` to load a
platform-specific back-end, while `pict3d` can pull in a lot of
compile-time code to cooperate with Typed Racket.
2015-11-07 14:08:13 -07:00
Matthew Flatt
6655352789 guard against some cyclic lists in bytecode decoding
Closes #1098
2015-11-07 09:17:41 -07:00
Matthew Flatt
e94b07b3aa patch Pango to handle font-info failure
Getting NULL from CTFontCollectionCreateMatchingFontDescriptors()
might indicate a font installation problem; I'm not sure. In any case,
checking for NULL avoids a crash on at least one installation.
2015-11-07 08:19:50 -07:00
Matthew Flatt
4d9c5d8dd2 patch Cairo to avoid writing to a global constant
This bug is already fixed in the Cairo source repo, so we
can discard the patch on the next Cairo upgrade.

It's not clear which platforms are affected. On OS X, at least,
writing to a global constant can cause a crash.

Thanks to Spencer for making a small example that triggers the bug
(added to the "draw-test" package).
2015-11-06 16:01:36 -07:00
Sam Tobin-Hochstadt
b6939b0b2e Namespace scheme_boxmap_size now that it isn't static. 2015-11-06 14:25:41 -05:00
Juan Francisco Cantero Hurtado
5e2421b1a0 Doc: github.com/plt -> github.com/racket 2015-11-06 10:26:07 -06:00
Matthew Flatt
58c919c04e fix getting port name for reader errors
Closes #1121
2015-11-05 06:40:05 -07:00
Matthew Flatt
b54c03bb04 refine Cairo patch for CTFontCreatePathForGlyph
The CTFontCreatePathForGlyph() function can return NULL when
the glyph exists but has an empty path. Instead of treating that
as failure, which causes Cairo to generate a bitmap version of
the glyph, check that the glyph is mapped for bounding boxes,
and treat a NULL path as an empty path in that case.
2015-11-04 16:45:44 -07:00
Matthew Flatt
c5f4740b31 fix reader error for bad surrogate-style encodings 2015-11-04 14:03:48 -07:00
Matthew Flatt
5a8d2e4204 fix bugs in the reader, especially related to readtables
Closes #1118, but improved testing exposed many other bugs.
2015-11-04 08:51:03 -07:00
Vincent St-Amour
86f19474ca Have magnitude preserve single-precision-ness.
Found using random testing.
2015-11-03 18:43:27 -06:00
Matthew Flatt
37dc3ffa01 report error when --enable-extflonums fails
The `--enable-extflonums` option doesn't really do anything, since
extflonum support is enabled automtatically when the compiler's
configuration allows it. To make this slightly less confusing, report
an error when extflonums cannot be supported, despite
`--enable-extflonums`. The error is reported via compiling, instead of
via `configure`, but hopefully that's enough to be helpful.
2015-11-02 09:09:44 -07:00
Asumu Takikawa
14d25abd76 Add *-keys, *-values, in-* functions for id-tables
Bump version to 6.3.0.3 too
2015-11-01 02:50:12 -05:00
Matthew Flatt
101fac5c1e repair scope-propagtion cache yet again
Commit 352a5dd2d5 effectively reverted the repair
of d719c06e00.

Merge to v6.3
2015-10-30 22:24:40 -04:00
Matthew Flatt
352a5dd2d5 avoid thread swap in checking scope-propagation cache
Continuing with 2f25a1e2bd...

On further reflection, a GC is possible because a
thread swap is possible, and that's asking for trouble.
Disallow thread swaps (and, incidentally, GCs) whle
comparing scope propagations from the cache.

Merge to v6.3
2015-10-30 21:44:13 -04:00
Matthew Flatt
2f25a1e2bd fix GC-related issue with recent cache repair
Repairs a problem with d719c06e00.

A GC can happen while checking whether a cache entry matches,
in which case the cache is cleared, so don't check the cache
slot again after comparing.

Merge to v6.3
2015-10-30 21:31:57 -04:00
Matthew Flatt
d719c06e00 fix cache comparison of scope-propagation tables
Repairs 3eb2c20ad0, which used a scope-set comparison for
a table that maps scopes to propagation actions (add, remove,
or flip).

Closes #1113

Merge to v6.3
2015-10-30 21:01:46 -04:00
Matthew Flatt
bfb245553c fix some syntax-object traversals
Fix uses of `SCHEME_STX_VAL` that should be `scheme_stx_content`
to ensure propagation of scope changes.
2015-10-30 20:48:56 -04:00
Matthew Flatt
342198625e syntax-debug-info: handle non-identifiers correctly
In particular, fix the handling of binding information
when the context includes prefixing on import.

Closes PR 15173
2015-10-30 11:39:20 -04:00
Matthew Flatt
31b035cc94 fix submodule name used in error reporting 2015-10-30 08:47:23 -04:00
Matthew Flatt
6e21376473 fix relative-path handling for source locations in bytecode
Closes PR 15174
2015-10-29 21:09:52 -04:00
Matthew Flatt
685e74a1c6 fix debugging mode for checking runstack overflow 2015-10-29 21:09:52 -04:00
Sam Tobin-Hochstadt
60fb3e06b2 Improve set! error messages. 2015-10-29 19:33:15 -04:00
Sam Tobin-Hochstadt
1d3fe10d3d Ensure that the closure_map is big enough when deserializing.
Also document more invariants about the closure representation,
and avoid some code duplication.

Fixes #1108 (caught by fuzz testing).
2015-10-29 19:33:15 -04:00
Sam Tobin-Hochstadt
9d909d6834 Another validation check.
Fixes bug caught by fuzz testing.
2015-10-29 19:33:15 -04:00
Vincent St-Amour
c3aa266bee Flush the same port we write to. 2015-10-29 15:37:14 -05:00
Matthew Flatt
d17cc6039b repair syntax-local-lift-require to top level
In `syntax-local-lift-require`, avoid scope adjustments intended
to deal with `require` forms that are compiled in one namespace
and evaluated in another.
2015-10-28 21:14:10 -04:00
Matthew Flatt
3eb2c20ad0 avoid excessive memory use in or expansion
When `or` has many subexpressions, the expansion generates a
sequence of deeply nested `let`s, where original and macro-introduced
forms are interleaved in a way that defeats a minimal
child-is-same-as-parent sharing of scope sets. Add a small
cache that's good enough to capture extra sharing and
dramatically lower memory use for an `or` that has 1000
subexpressions.
2015-10-23 16:32:22 -06:00
Ryan Culpepper
a41c63be09 call SCHEME_EXPAND_OBSERVE_* only when in expand mode, not compile
Merge to 6.3.
2015-10-23 18:26:23 -04:00
Matthew Flatt
b98731ed00 Windows cross-build: MzCOM as a GUI executable
Merge to v6.3
2015-10-22 09:39:48 -06:00
Matthew Flatt
876708c100 fix tracking of shadowed module imports
When an import is shadowed by another import or by a definition, don't
include it in the set of bindings in the resut of
`syntax-local-module-required-identifiers` or in the set that can be
exported by `all-from-out`.

Merge to v6.3
2015-10-21 16:56:54 -06:00
Matthew Flatt
7b7a315777 fix taint-check ordering in expander
Merge to v6.3
2015-10-20 20:22:37 -06:00
Matthew Flatt
a38ba440fa add ".def" generation for MSVC build 2015-10-20 20:22:28 -06:00
Matthew Flatt
ea6cef5246 Windows: make scheme_register_tls_space() always available
To make the API consistent for MSVC versus MinGW builds, make
a functional formerly required for embedding on 32-bit Windows
always available and required for all Windows variants.
2015-10-20 20:22:22 -06:00
Matthew Flatt
0e924525ee MinGW build: put ".lib", ".exp", and ".obj" in the right place
Those files are compiler-specific, so they should be in a "gcc"
subdirectory instead of "msvc".
2015-10-20 20:22:11 -06:00
Matthew Flatt
5056e5fd1b provide ".def" file for the Racket DLL
A ".def" file is compiler-independent.
2015-10-20 20:22:05 -06:00
Matthew Flatt
b8ba78d1d3 avoid slow TLS with MinGW
Recent versions of MinGW-W64 use emutls for `__thread` variables,
and that's much slower than Windows-native TLS. Go back to the
inline-assembly implementation of therad-local access.
2015-10-20 20:21:58 -06:00
Matthew Flatt
5d74897aa4 always install static "mzconfig.h" for Windows 2015-10-20 20:21:53 -06:00
Matthew Flatt
dfab18fe47 configure: infer static linking of libwinpthread for MinGW
Merge to v6.3
2015-10-20 08:49:09 -06:00
Matthew Flatt
dad2804412 make MinGW build use the LIBS environment variable
Merge to v6.3
2015-10-19 20:23:00 -06:00
Matthew Flatt
7cffdca067 work around an access() problem on Mac OS X
... again.

Merge to v6.3
2015-10-19 17:48:53 -06:00
Matthew Flatt
836316f5ed fix TEST_ALTERNATE_TARGET_REGISTER build
Merge to v6.3
2015-10-19 17:48:53 -06:00
Matthew Flatt
04e546716e fix typo
Thanks to Jack Firth.
2015-10-19 08:09:23 -06:00
Juan Francisco Cantero Hurtado
e957a7d655 Add config for linux/ppc64. 2015-10-19 07:55:30 -06:00
Matthew Flatt
e803a3c15e unbreak no-places, no-futures build 2015-10-17 07:00:37 -06:00
Matthew Flatt
c50c23c134 GC: toward incremental collection
Make the old-generation marking process incremental
on request, where `(collect-garbage 'incremental)`
makes a request.

Only the marking phase of an old-generation collection
is incremental, so far. In exchange for slower
minor collections and a larger heap, you get a major
collection pause time that is roughly halved. So, this
is a step forward, but not good enough for most purposes
that need incremental collection.

An incremental-mode request sticks until the next
major GC. The idea is that any program that could
benefit from incremental collection will have
some sort of periodic task where it can naturally
request incremental mode. (In particular, that
request belongs in the program, not in some external
flag to the runtime system.) Otherwise, the
system should revert to non-incremental mode, given
that incremental mode is slower overall and can
use much more memory --- usually within a factor of
two, but the factor can be much worse due to
fragmentation.
2015-10-16 21:08:23 -06:00
Matthew Flatt
7db0c3b1d4 avoid changing mark bits for old objects
For a minor GC and pages that contain backpointers,
leave mark bits as they are; instead make a pass to
shift mark bits for new objects to "dead" bits, and
use dead bits for fixup.

This change is intended as a small step toward incremental
collection.
2015-10-16 18:10:30 -06:00
Ryan Culpepper
d47b96970c make Windows build work on case-sensitive filesystems 2015-10-16 17:18:34 -04:00
Matthew Flatt
6199f9a596 GC: use generation 1/2 consistently within a collection
The rule for using generation 1/2is based on the current
memory use versus the maximum size of generation 0. Recent
changes to the GC have caused that size to vary during
a collection, which means that the choice to use generation
1/2 or not can change within a collection.

Partial use of generation 1/2 doesn't inherently cause problems, but
it can cause a generation-1 object to point to a generation-1/2 object
even though the former was allocated after the latter. That's a
problem on if getting generations out of order relative to allocation
order can create problems. As it happens, reset_finalizer_tree()
checks the generation of the finalization record and not the finalized
pointer, because the record is always allocated after the pointer.

Merge to v6.3
2015-10-15 16:02:36 -06:00
Sam Tobin-Hochstadt
a4d292b21a Use an unsigned type for sizes.
Fixes this crash http://drdr.racket-lang.org/32121/pkgs/racket-test/tests/racket/stress/fuzz.rkt
found by fuzz testing.
2015-10-14 15:27:13 -04:00
Sam Tobin-Hochstadt
f400dab912 Add a check in the compilation-top reader.
This bug was found by fuzz testing.
2015-10-13 17:50:04 -04:00
Matthew Flatt
20f31fb742 set a bit to prevent corruption of flags via hashing
Certain datatypes in the runtime system are not supposed
to be hashed, where bits normally reserved for hash codes
are used for other purposes. A bad bytecode file can cause
some of those to be hashed, anyway. Normally, the damage is
isolated to that content of the damaged bytecode, but
certain variable-reference bytecode forms are both shared
and non-hashable. Set a bit that ensures hashing will not
change flags in the shared object.

This problem was exposed by fuzz testing.
2015-10-12 19:27:13 -06:00
Ryan Culpepper
a6835422bf Post-release version for the v6.3 release 2015-10-09 15:23:31 -04:00
Matthew Flatt
aa7c3ac38b use libtool install -s to install libraries
Use `install -s` instead of `strip -S` when building shared libraries
via libtool.
2015-10-08 19:02:47 -06:00
Matthew Flatt
7555d022db for CPP, detect __linux__, etc., instead of linux, etc.
When a compiler is run in standards mode, predefined macros that
do not start with "_" are dropped, so use the "_" versions
consistently. Whether or not Racket itself would compile in
standards mode, the Racket headers should be able to work that
way --- at least on Unix platforms.
2015-10-08 10:53:23 -06:00
Matthew Flatt
85c1ba55f3 fix native-stacktrace interaction with thread start
Repairs 4d3852ae69.
2015-10-06 19:11:28 -06:00
Matthew Flatt
4d3852ae69 add indirection on thread start to avoid ObjC exception issues
In Mac OS X 10.11, something about the use of exceptions triggers
a libunwind stack traversal, and that traversal runs into trouble
with Racket's stack mangling for threads. Inserting generated code
in the stack frame sequence causes libunwind to give up and avoids
a crash (e.g., with `-j -l drracket` on startup).
2015-10-06 09:32:58 -06:00
Matthew Flatt
3bcd153fb6 adjust copyright dates: 2014 -> 2015
Better late than never?
2015-10-05 13:39:11 -06:00
Gustavo Massaccesi
09a2b630bc Generalize inferred names
After some expansions, a expression with the syntax property 'inferred-name of
'x is converted to one with ('x . 'x), so it's not useful to get the name of a
procedure. So we simplify the syntax property 'inferred-name to handle
these cases.
2015-10-05 10:25:57 -06:00
Matthew Flatt
b92eac82ab patch Pango to make the system control font accessible
The patch doesn't directly make the font accessible, but
it provides a hook so that the font can be made accessible.
2015-10-04 20:30:17 -06:00
Matthew Flatt
2c7663eb5e remove accidentally committed explicit GC
I even marked it "REMOVEME", but didn't look at the commit
closely enough before pushing.
2015-10-02 12:50:08 -06:00
Matthew Flatt
93d9826936 fix another problem with GC and place messages
When a place message is deserialized by simply adopting the page
containing the message, the adoption can trigger a garbage
collection, but there's still a pointer to a chain of objects
"in flight" in the thread, and a GC can discard the pairs that
form the chain.
2015-10-02 11:48:25 -06:00
Matthew Flatt
ed07a5e176 fixup 2015-10-02 05:50:06 -06:00
Matthew Flatt
7671c15b17 more GC callback shapes to support Mac OS X 10.11 2015-10-01 21:23:25 -06:00
Matthew Flatt
7abe38e763 adjust namespace-relative treatment of compiled require
Removing all original module context doesn't work, because it
doesn't distinguish between fragments of syntax that had the
"inside-edge" scope without the "outside-edge" scope.

Record the presence of the outside-edge scope by using the
root scope, and convert the root scope to the current namespace's
outside-edge scope on evaluation.
2015-09-30 11:32:16 -06:00
Matthew Flatt
6e80609998 macro expander: fix over-eager pruning of use-site scopes
The bug could cause

 #lang racket/base

 (define x 'outer)

 (define-syntax-rule (def-and-use-m given-x)
    (begin
      (define-syntax-rule (m)
        (let ()
          (define given-x 'inner)
          x))
      (m)))

 (def-and-use-m x)

to produce 'inner when it should produce 'outer.

Thanks to Brian Mastenbrook for pointing the problem and
providing examples.
2015-09-30 08:39:03 -06:00
Matthew Flatt
31549082e6 avoid crash when interrupting bytecode unmarshal
Interrupting bytecode unmarshal for syntax objects could leave
half-constructed values in a table that is intended to resolve graph
structure. Clear out work towards a graph construction when
interrupted.

The most common symptom of half-constructed syntax objects was a crash
after a Ctl-C during startup.
2015-09-28 14:38:12 -05:00