Commit Graph

34895 Commits

Author SHA1 Message Date
Matthew Flatt
8035ee354c document format of GC logged message text 2015-01-21 05:39:04 -07:00
Matthew Flatt
1893f73fac fix GC peak-memory logging 2015-01-21 05:10:51 -07:00
Matthew Flatt
3b866db378 raco setup: render each document with a separate namespace
Rending a document can deserialize values, which can load modules
that would otherwise not be loaded by Scribble, so render each
document with a fresh namespace that is discarded after rendering.
2015-01-21 04:53:14 -07:00
Matthew Flatt
5b20690876 places: no allocation while low-level locks are held 2015-01-20 19:26:42 -07:00
Matthew Flatt
48290d3360 raco setup: reduce Scribble sharing across doc builds 2015-01-20 13:52:30 -07:00
Matthew Flatt
5a8a0aff02 db: fix finalization problems
A `this%` expression used in a finalization callback implicitly
referred to `this`, since it's a dynamic reference to the object's
class. As a result, the finalizer for `this` refers to `this`, so
`this` never becomes collectable. The problem is fixed by
lifting the `this%` out of the `lambda`.

Less significantly, the finalizer thread in "prepared.rkt" captured
various parameters on creation, including the current namespace. If a
prepared statement is bound to a module-level variable, then the
finalizer thread refers through the namespace to the prepared
statement, so the prepared statement can never be finalized. Setting
the current namespace to a fresh empty one while creating the thread
avoids that specific problem. (Other parameters could cause similar
problems, but solving the namespace one works well enough for now.)
2015-01-20 13:04:23 -07:00
Matthew Flatt
857950a2b2 fix prefix-use flags on a closure that ignores its captured prefix
Optimization can cause a `lambda` that was going to refer to a
top-level variable or syntax object to not refer to it after all.
Ideally, the prefix should be dropped from the closure, but
the change here is more conservative: it fixes the `lambda`s
annotation that's used by the GC to indicate that nothing will
be used from the prefix.
2015-01-20 12:58:51 -07:00
Matthew Flatt
e42bf573e1 JIT: clear tail-call rator when handling directly
Clearing is needed for space safety.
2015-01-20 11:37:04 -07:00
Matthew Flatt
cca2ee5e68 fix --disable-jit build
Also, avoid a compiler warning.
2015-01-20 07:50:17 -07:00
Matthew Flatt
5ac22ef3b8 another GC backtrace repair
Special treatment of a "prefix" in a closure needs special
backtrace support.
2015-01-19 21:29:55 -07:00
Matthew Flatt
3eef017911 track whether a closure uses syntax objects
For GC purposes, if a "prefix" (a closure frame that caprues
top-level or module-level bindings) may refer to syntax objects
that are not used by any reachable closure, in which case the
syntax object can be dropped. This pruning of syntax objects
uses the infrastructure already in place to prune variables.

Syntax objects were not included in the original pruning
implementation, because they are unlikely to create
finalization cycles in the way that global-variable
references can. A syntax object can retain a namespace's
table of module imports, however, which can be substantial
and worth releasing of a closure is only held, say, for
a low-level finalization action.
2015-01-19 21:29:55 -07:00
Matthew Flatt
df88e0dd8a fix clearing of JIT's code-name table
Although names were cleared correctly, the trie used for
the mapping was not pruned correctly, so lots of empty
branches could accumulate (especially in 64-bit mode).
2015-01-19 21:29:54 -07:00
Matthew Flatt
7f5a834fdb allow weak hash tables to shrink 2015-01-19 21:29:54 -07:00
Matthew Flatt
e3591d30b9 fix bugs in GC backtrace support
Lots of problems have made GC backtrace support unreliable (as
enabled for debugging via `configure --enable-backtrace`).
2015-01-19 21:29:54 -07:00
Matthew Flatt
57832309ef bump version number 2015-01-19 21:29:54 -07:00
Matthew Flatt
676109f638 compiler: never retain namespace for constantness-test argument
Even when `(variable-reference-constant? (#%variable-reference ....))`
cannot be optimized to a boolean, the expression should not retain a
reference to the enclosing namespace. That space guarantee is
important for the compilation of calls to keyword-accepting functions.
2015-01-19 21:29:54 -07:00
Matthew Flatt
ab5baca97c optimizer: fix variable-reference-constant? on module-level identifier
Allow optimization when the reference variable is known to have
a fixed value, not only when it's a constant value.
2015-01-19 21:29:54 -07:00
Alexis King
6aad952b20 Improve blame context message 2015-01-19 19:58:51 -06:00
Alexis King
6e79a582f1 Add documentation for async-channel contracts and impersonators 2015-01-19 19:58:51 -06:00
Alexis King
3ab1ad8c93 Implement chaperones, impersonators, and contracts for async-channels 2015-01-19 19:58:51 -06:00
Robby Findler
9971858fc2 small clean up to list contract error messages (grammar and abstraction) 2015-01-19 16:37:15 -06:00
Robby Findler
b6000de2f7 fix ->i dependency check 2015-01-19 10:23:59 -06:00
Matthew Flatt
2d4b4527c0 defer require and provide expansion to module body
Closes PR 14936
2015-01-18 11:35:19 -07:00
Matthew Flatt
c6802ed107 namespace-attach-module: fix handling of for-template
The handling of `for-template` imports by `namespace-attach-module`
didn't match the docs. The actual handling was to refrain from
attaching instances of a phase-0 module if the instance was reachable
only through a `for-template`. The rationale had to do with such
modules instances being created only through instantiation of
phase-1 modules, and phase-1 module instances aren't attached;
it doesn't work well that way, though, when different modules
are attached with intervening `namespace-require`s on the target
namespace.

The change includes a documentation correction. Previously and still,
only modules at the same phase as the attached module (as opposed to
the same phase or less) are instantiated in the target namespace.

Closes PR 14938
2015-01-18 11:19:49 -07:00
Matthew Flatt
825af972db log GC's peak memory use on exit 2015-01-18 10:03:26 -07:00
Matthew Flatt
d044fa0beb fix test
Previously merged to `set-file` utilities, but incorrectly.
2015-01-18 06:46:09 -07:00
Matthew Flatt
02b745d19a fix a test
Using `racket` now creates a will executor via `ffi/unsafe`, which
interferes with the test's expected count, while using `racket/base`
doesn't.
2015-01-18 06:24:58 -07:00
Matthew Flatt
2b8acb368a raco pkg: another attempt to fix git commands for an update
Document and and exploit that any fragment in the Git or GitHub URL
for a package source must name a branch or tag (as opposed to a
commit) to work with clone linking.
2015-01-16 09:28:31 -07:00
Matthew Flatt
5e6debf854 make: DESTDIR must be an absolute path
Clarify in the installation notes, and add a check in the makefile.

Closes PR 14935
2015-01-15 06:09:21 -07:00
Matthew Flatt
dbba480ad3 raco pkg: adjust the way a local clone is made for updates
When a clone-linked package is updated, a temporary extra clone
is created to checkout the target commit for dependency and conflict
checking.

The current strategy for cloning a repository doesn't work for some
Git versions. The problem is that the target commit is unlikely to
be reachable from any current branch or tag, and so it might not
get carried along in the clone (depending on the Git version).
Originally, a `git fetch <commit>` compensated for that problem,
but fetching a particular commit doesn't work for all Git versions,
either.

The new strategy is to clone with `--shared`, which ensures that
just-fetched commits are all available in the temporary clone (and
it also avoids a little unnecessary copying work).
2015-01-15 05:30:41 -07:00
Matthew Flatt
900e788a3a delete-{file,directory} docs: clarify permission change + delete is 2 steps 2015-01-14 08:55:42 -07:00
Matthew Flatt
9f3c82c30a Windows: change delete-{file,directory} to attempt permission correction
If a file or directory delete fails, try adjusting the file or directory
permissions to allow writes, then try deleting again. This process should
provide a more Unix-like experience and make programs behave more
consistently.

A new `current-force-delete-permissions` parameter provides access to
the raw native behavior.
2015-01-13 11:58:36 -07:00
Matthew Flatt
33da6564a1 fix handling of empty paths in PATH on Windows
Check for an empty path after dropping `"`s, instead of before.
Otherwise, a bad PATH setting interferes with functions like
`find-executable-path`, which in turn can prevent DrRacket from
starting up.

Closes PR 14930
2015-01-13 06:48:40 -07:00
Matthew Flatt
719917f812 compiler: fix inlining of #%variable-reference 2015-01-13 06:45:59 -07:00
Matthew Flatt
486debd704 repair to recent JIT repair
Fix a jump-mode bug introduced with 3408209f66. The bug is most
visible on PPC.
2015-01-10 19:15:49 -07:00
Matthew Flatt
ece9126656 compiler/cm-accomplice: adjust protocol for extra options
Instead of introducing a subtype of `file-dependency` to imply one new
option, add a subtype that has an options table for easier
extensibility. (Thanks to Sam for pointing out that I shouldn't make
this mistake again.)
2015-01-09 11:31:35 -07:00
Matthew Flatt
805cd95049 repair for indrect dependencies
Fixes a problem with 95e85ec5bd that broke `raco setup -c`
2015-01-09 11:31:35 -07:00
Gustavo Massaccesi
d03e635ee4 Fix typo in doc of find-executable-path 2015-01-09 11:31:30 -07:00
Gustavo Massaccesi
fc57ba7996 Fix typo in doc of call-with-atomic-output-file 2015-01-09 08:55:58 -07:00
bdeket
1f46ea1846 convert find-user-pkgs-dir to a simple-form-path
find-relative-path expects a simple-form-path, but according to the documentation PLTUSERHOME as propagated by find-user-pkgs-dir must only be a complete-path?
Without this building of the documentation fails if PLTUSERHOME contains ".."
2015-01-09 08:55:52 -07:00
Matthew Flatt
f2a8c31d9f avoid ambigious else
even though another `else` currently resolves the ambiguity
2015-01-09 08:54:44 -07:00
Gustavo Massaccesi
7f61a68552 Ignore fuel in optimize_for_inline when it's used just to get a known procedure 2015-01-09 08:54:13 -07:00
Gustavo Massaccesi
1b3949c233 Add flags to application in finish_optimize_application3
(finish_optimize_application and finish_optimize_application2 already do this.)
2015-01-09 08:54:13 -07:00
Gustavo Massaccesi
feb8f10165 Mark error in expression when an arity mismatch is detected during optimization
This enables further reductions, for example (begin (car x x) z) => (car x x)
2015-01-09 08:54:13 -07:00
Gustavo Massaccesi
6d8ba1fd67 Mark errors in expression when a wrong type is detected during optimization
This enables further reductions,
for example (begin (car x) (unbox x) z)  => (begin (car x) (unbox x))
2015-01-09 08:54:13 -07:00
Matthew Flatt
34c2c2ebdd raco pkg: doc improvements for command-line tool 2015-01-09 07:51:43 -07:00
Matthew Flatt
95e85ec5bd add support for indirect CM dependencies; use in lazy-require
If module M in package P imports module N from package Q,
and if N has a `lazy-require` for a module in R that is
triggered during the compilation of M, then P doesn't really
depend on R; P depends on Q, and Q depends on R, and P
shoudn't necessarily know anything about Q. At the same time,
a change to the file in R means that M must be recompiled.
So, continue to track the compilation dependency, but mark
it as "indirect" so that the package-dependency checker can
ignore the dependency.
2015-01-08 09:59:37 -07:00
Matthew Flatt
fe9a04d1db doc tweaks for raco {setup,make} 2015-01-08 09:11:38 -07:00
Matthew Flatt
c56c9250f1 fix JIT-inlined make-rectangular combining single and double
The single must be coernced to a double in that case.
2015-01-07 14:44:02 -07:00
Matthew Flatt
f27d9e9df5 raco pkg: report inferences to user
Make `raco pkg` more verbose when it infers a package name from
`--clone`, which updating a package based on the current directory,
etc.
2015-01-07 14:44:01 -07:00