Commit Graph

1758 Commits

Author SHA1 Message Date
Matthew Flatt
8e8c9842fa raco {pkg,planet} <subcommand>: improve error for ambiguous <subcommand>
Report a user error instead of an internal error.

Closes PR 14969
2015-02-08 06:07:09 -07:00
Matthew Flatt
be8f70fffb racket/unit: static checking of initialization dependencies
When using `compound-unit/infer` and similar, check the `link` clause
against each unit's static information for initialization dependencies.
Also, propagate dependency information in `define-compount-unit`.
2015-02-06 09:22:01 +01:00
Matthew Flatt
53fb33144e add unit-static-init-dependencies 2015-02-06 08:55:58 +01:00
Leif Andersen
5e04ec431f Update .travis.yml for raco pkg new. 2015-02-05 17:30:32 -05:00
Ryan Culpepper
991340e0b0 db/sqlite3: fix custodian shutdown wrt locking 2015-02-04 20:19:13 -05:00
Matthew Flatt
acdb0b0e90 fix prefab-key? for inferred field count
Instead of inferring a field count of 0, accept a key that
works with some number of fields.

Closes PR 14964
2015-02-03 10:48:18 +01:00
Robby Findler
ffd77693ee fix a bug in random contract generation that could cause
nested structure to have contract-random-generate-fail stuck
into it

and clean up some confusing structure in the random generator
2015-02-02 22:15:05 -06:00
vraid
68074f7fd7 fix typo 2015-02-02 17:27:42 -05:00
Matthew Flatt
8265c968fc openssl: recognize version "1.0.1j"
Closes PR 14954
2015-01-30 13:29:36 -07:00
Matthew Flatt
8d49a91dce pretty-print: fix for a current inspector that sees through internals
If the current inspector can inspect the internal `unquoted` structure
type, then `unquoted?` must come before `struct?`.
2015-01-29 19:33:36 -07:00
Ryan Culpepper
3029867e9f fix reified-syntax-class-curry (missing role argument) 2015-01-29 20:37:50 -05:00
Matthew Flatt
b7e86ef6c9 syntax/modcollapse: fix to new collapse-module-path-index variant 2015-01-28 16:21:43 -07:00
Matthew Flatt
83974a42ee native-libs script: build MPFR for Windows as thread-safe 2015-01-27 20:07:49 -07:00
Matthew Flatt
60704c9198 Windows: fix reparsing with UNC targets 2015-01-27 18:07:46 -07:00
Matthew Flatt
f30b3a50fd Windows: fix problems with junctions and symlinks
Racket wasn't reparsing correctly; the strategy worked ok
for links created by `mklink`, but not with other tools that
leave the "printed name" field blank.

A consequence of various fixes is that reparse points like
"My Documents" (in a typical configuration) correctly resolve
to actual paths like "Documents".

Finally, `directory-exists?` didn't handle root directories like
"C:/" correctly. The query would actually report properties of
the OS-level current working directory, and when junctions are
involved, the current directory can be a link instead of a directory.

Relevant to PR 14950 and PR 14912
2015-01-27 17:48:52 -07:00
Matthew Flatt
d3383e3e35 dynamic-require: fix re-export shortcut 2015-01-27 13:46:33 -07:00
Matthew Flatt
a72ef3ec05 syntax-local-lift-require: fix problems for meta-compile-time use
Various repairs correct problems with `local-require` in a
phase-1 context.
2015-01-27 09:49:28 -07:00
Matthew Flatt
7bee7bbadc collapse-module-path-index: support relative module path flattening
Unlike `collapse-module-path`, it makes sense for
`collapse-module-path-index` to convert a relative module path index
to a plain module path. In other words, `collapse-module-path-index`
can convert a module path index to a module path.
2015-01-27 08:40:10 -07:00
Robby Findler
d74b0a6bf4 between/c (unlike integer-in) can actually just disappear
when the arguments are = to each other
2015-01-25 19:23:38 -06:00
Robby Findler
6551cc00d6 make (integer-in x x) produce (and/c x exact?)
fix bug in 9f59d57ee
2015-01-25 15:31:04 -06:00
Robby Findler
87a231b792 fix a bug in the way that an old style projection
was created when a val-first-projection was needed
2015-01-25 15:08:12 -06:00
Robby Findler
ffbf01ad4e more trickyness for = and numbers in random generation 2015-01-25 15:08:12 -06:00
Gustavo Massaccesi
e36382d500 Add SCHEME_PRIM_WANTS_FLONUM_SECOND flag to flexpt 2015-01-25 07:51:45 -07:00
Gustavo Massaccesi
6ab68eb97d Add SCHEME_PRIM_PRODUCES_FIXNUM flag to unsafe-fxvector-ref 2015-01-25 07:51:45 -07:00
Matthew Flatt
68c5d3d1d6 fix error message for inexact->exact on +inf.f 2015-01-24 10:12:35 -07:00
Matthew Flatt
bac11bf8f5 db/sqlite3: fix recur for busy db 2015-01-24 10:12:35 -07:00
Robby Findler
eb7c6653f3 make the contract random generator sometimes
generate inexact/exact variants of numbers
when the exact/inexact one was originally
present in the contract
2015-01-23 22:40:54 -06:00
Robby Findler
cc642c3382 change +nan.0 and +nan.f, when viewed as contracts, to
be equal?-based contracts instead of = based contracts.

Before this change, the contract (or/c 1 2 +nan.0) was the same
contract as (or/c 1 2), because +nan.0 was the same contract as
the predicate (lambda (x) (= x +nan.0)), which is the same as
(lambda (x) #f). Now, +nan.0 and +nan.f are the only numbers
that are treated as equal?-based contracts, but this means that
(or/c 1 2 +nan.0) actually accepts +nan.0.
2015-01-23 21:57:51 -06:00
Matthew Flatt
778a95294c fix requested stack depth as needed by on-demand JITting
Found by stack-overflow checking added in 3408209f66.
2015-01-23 12:10:04 -07:00
Robby Findler
6bf6f4d392 add a generator for exact-integer 2015-01-22 20:04:36 -06:00
Matthew Flatt
2ffb546c95 fix vector-set-performance-stats! for CGC
Also, fix the build for a no-futures, no-places configuration.
2015-01-22 13:03:00 -07:00
Matthew Flatt
db40c2f4ce corrections to GC out-of-memory handling 2015-01-22 10:16:32 -07:00
Matthew Flatt
cffb63be56 correction to recent repair to places
Corrects 5b20690876
2015-01-22 10:16:32 -07:00
Matthew Flatt
7196dc0e74 add peak memory use to vector-set-performance-stats! 2015-01-22 10:16:32 -07:00
Robby Findler
9f59d57ee4 make (integer-in n n) produce just n 2015-01-21 21:53:31 -06:00
Markus Bertheau
f2bacdc6f3 Correct 'german time format
We separate hour and minute with a colon, not with a period.
2015-01-21 08:39:46 -06:00
Matthew Flatt
0c13a4a1f1 places: avoid redundant atexit() registrations
Register only in the original place.
2015-01-21 06:11:05 -07:00
Matthew Flatt
1893f73fac fix GC peak-memory logging 2015-01-21 05:10:51 -07:00
Matthew Flatt
5b20690876 places: no allocation while low-level locks are held 2015-01-20 19:26:42 -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
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
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
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
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
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
Matthew Flatt
7242d7ed38 raco pkg: fix for old-format catalog entries 2015-01-07 10:43:42 -07:00
Matthew Flatt
e82487429b fix bad case-lambda sharing that breaks let-depth tracking 2015-01-06 12:58:52 -07:00
Matthew Flatt
3408209f66 fix potential stack overflow with JIT-inlined apply
If the slow path has to be taken because the number of
list elements is greater than the stack size, then the
old implementation would copy all the arguments --- which
still might be too much for the available stack space.
Avoid that copy.

Also, add pad word to the end of the stack to help detect
overflow.
2015-01-06 12:58:52 -07:00
Robby Findler
2b07cc34f7 fix context for instanceof/c
also improve test suite to look for ellipses
(but not when using opt/c)
2015-01-04 15:10:58 -06:00
Robby Findler
2cd8e620d4 improve error message in certain tricky case when keywords are involved 2015-01-04 15:00:22 -06:00
Robby Findler
95dcee18c7 add a cons/dc generator
Not really sure about this one. The API kind of
forces my hand here and the way this works limits
the non-dep side of the dependent pair to always
be drawn from a fixed set. Not sure if that matters
in practice or not.
2015-01-03 19:25:25 -06:00
Robby Findler
e25575b16a improve contract random generation for null? and recursive-contract 2015-01-03 17:16:52 -06:00
Matthew Flatt
daf9415a98 ffi/unsafe: fix tauint handling in define-fun-syntax 2015-01-02 18:16:34 -07:00
Robby Findler
44073e31b4 add missing neg-party
closes PR 14915
2015-01-01 09:56:00 -06:00
Gustavo Massaccesi
25013320be Fix is_arity_list 2014-12-29 07:26:15 -07:00
Gustavo Massaccesi
17665d33a2 Remove dead code after errors
For example, reduce (begin x (error 'e) y) ==> (begin x (error 'e)) and
(f (error 'e) y ) ==> (begin f (error 'e)).

Also, reduce (if (error 'e) x y) ==> (error 'e) and propagate the type information
and clocks when only one branch produce an error.
2014-12-29 07:24:22 -07:00
Gustavo Massaccesi
92615049aa Fix make_discarding_first_sequence
Ensure that the first expression is single valued.
2014-12-29 07:24:09 -07:00
Robby Findler
94a450999a add stronger and random generation for integer-in 2014-12-25 22:07:05 -06:00
Robby Findler
fd99e57020 fix spacing bug in contract error messages 2014-12-23 16:37:55 -06:00
Robby Findler
1f7565fe47 fix bug and tweak length 2014-12-23 13:45:22 -06:00
Robby Findler
d5bb6030ec tweak the way ellipses are inserted into
contract names to avoid bottoming out with
an ellpisis when the ellipsis is replacing
a simple thing
2014-12-23 13:15:37 -06:00
Robby Findler
94d80f0171 add #:pre/desc and #:post/desc to ->i 2014-12-22 22:31:17 -06:00
Robby Findler
9d58a067e3 add #:pre/desc to ->* 2014-12-22 14:53:25 -06:00
Robby Findler
3d48ef78f6 attempt to more closely follow the Reference's
"Error Message Conventions" in the contract error messages
2014-12-22 13:26:20 -06:00
Robby Findler
aabe9d7bad added dynamic->* 2014-12-20 22:48:26 -06:00
Matthew Flatt
7b8707e576 raco pkg: adjust staging of Git clone installs and updates
If the clone directory's checkout includes a target commit, then
use the clone directory directly for staging (i.e., for checking
dependencies and collisions). That way, changes made locally are
used for metadata checks.
2014-12-20 12:25:58 -07:00
Matthew Flatt
805c5d1d13 raco setup: continue checking when a package is missing 2014-12-20 09:16:35 -07:00
Matthew Flatt
dc8f864a3c raco setup: use cache for pkg-directory in dep checking 2014-12-20 09:06:30 -07:00
Matthew Flatt
e21f75fa1b Win64: fix stack-trace imprecision
Propagates repairs of 71e0bdfcff to Win64 stack handling.
2014-12-19 20:31:07 -07:00
Matthew Flatt
31ebe213cc reject prefab specs with bad mutability indices
Closes PR 14887
2014-12-19 20:12:44 -07:00
Matthew Flatt
9419bf42a1 fix enforcement of size limit in prefab struct descriptions
Closes PR 14888
2014-12-19 20:12:44 -07:00
Robby Findler
a8ba4eca35 adjust hash/c so that it always copies immutable hashes
before this commit it would copy them only when the weren't
already impersonated/chaperoned, leading to different
contract checking that can be confusing in that case

it did this because the chaperone-of? check wasn't general
enough to cope with copying always, but since commit
b05d07ad10 it now is
2014-12-19 10:58:53 -06:00
Juan Francisco Cantero Hurtado
26c4607c3b Add various changes to sconfig and configure.
- Modify the features used by OpenBSD (not everything was
  tested). Mostly copied from Linux, FreeBSD and NetBSD.
- Add support for Bitrig, a fork of OpenBSD. Eventually
  they will differ more and more from OpenBSD.
- Typos and extra trailing spaces.
- Update config.guess and config.sub from GNU.
2014-12-19 05:22:58 -07:00
Robby Findler
9e9dcf2f50 added hash/dc 2014-12-18 22:31:20 -06:00
Matthew Flatt
95617a200b fix UDP receive on Windows
When the received message is larger than the space available, it's
still received.
2014-12-18 10:51:50 -07:00
Matthew Flatt
e7d29dee61 raco setup: repair clean-up of PLaneT info-domain cache
Unintentional shadowing caused the info-domain clean-up code to reject
all PLaneT path registrations. As a result, installing a PLaneT
package removes all info-domain mappings (used to find documentation,
`raco` commands, etc.) for other PLaneT packages. Running `raco setup`
repairs the problem, because it re-adds all entries after
(incorrectly) clearing them out.
2014-12-18 09:14:46 -07:00
Matthew Flatt
b05d07ad10 generalize {impersonator,chaperone}-of? on immutable hash tables 2014-12-18 06:49:10 -07:00
Matthew Flatt
edf562be5e raco pkg update: fix conflict checking vs. installed being updated 2014-12-17 07:51:04 -07:00
Matthew Flatt
9b9546c0bf raco pkg update: adjust --update-deps handling, again
Still trying to get the dependencies-have-changed-for-a-link case
right without breaking other cases.
2014-12-16 13:37:48 -07:00
Matthew Flatt
ebd817f278 raco pkg update: avoid duplicate updates of a single package
A table was incorrectly used to track both the checksum and
update status of packages; fix that, so that `raco pkg update --all`
doesn't generate a plan with multiple updates of a single package.
Meanwhile, also protect against multiple and inconsistent planned
updates of a package (by collapsing multiple consistent plans into
one).
2014-12-16 10:35:54 -07:00
Matthew Flatt
2b62ffe90b raco pkg show: mention auto-installed when no non-auto are installed
In the case that packages are only auto-installed in a particular
scope, `raco pkg show` should just say "[none]", instead of adding the
note about auto-installed packages that are not being shown.
2014-12-16 08:26:09 -07:00
Matthew Flatt
f8c6090d37 raco pkg: more information for an ill-formed path error 2014-12-16 06:40:54 -07:00
Matthew Flatt
71e0bdfcff more repairs to stack trace and caching
Fixes problems with d15fda9d6b, but also fixes a problem that
could show up in non-libunwind mode and cause lost frames.
2014-12-15 13:38:59 -07:00
Matthew Flatt
e22242df56 raco pkg: default --deps to search-ask in interactive mode
The implemented default for `raco pkg update` actually depended on the
way that a package is installed, and it's difficult to reason about or
to implement the default that is suggested by the documentation.
Meanwhile, `search-ask` seems the most sensible always in interactive
mode (now that we have a way to specify batch mode).
2014-12-15 09:13:24 -07:00
Matthew Flatt
0f6e0e83e0 raco pkg update: better handling of a missing dependency
When updating a linked package whose dependencies have changed,
and when a dependency is missing, then effectively reinstall
the link to get updates as requested by the user.
2014-12-15 09:13:24 -07:00
Matthew Flatt
ae3b59475a raco pkg clone: avoid fetching by commit id
A commit id apparently doesn't work in place of a <refexp> in some
versions of Git.
2014-12-15 08:57:02 -07:00
Matthew Flatt
6f5ab2851d avoid a compiler warning 2014-12-14 08:52:26 -07:00
Matthew Flatt
d15fda9d6b fix native-stack caching with libunwind
The implementation of caching stack-trace information in the
stack didn't work right in libunwind mode, with the result that
`(current-continuatiom-marks)` took O(N) time for a continuation
of size N, when it should be amortized constant time.
2014-12-14 08:46:14 -07:00
Gustavo Massaccesi
58ef3fdaa8 Mark immutable? as omitable 2014-12-14 08:46:14 -07:00
Gustavo Massaccesi
ababa86c44 Increase SCHEME_PRIM_OPT_TYPE_SHIFT
Otherwise, two optimization flags collide:

 SCHEME_PRIM_ALWAYS_ESCAPES = SCHEME_PRIM_PRODUCES_FLONUM = 8192
2014-12-14 08:46:14 -07:00
Matthew Flatt
58bee1419b raco pkg update: change printout to avoid alarming "Removing..."
Changed "Removing" to "Uninstalling to prepare re-install of".
2014-12-14 08:46:14 -07:00
Matthew Flatt
c2fcb10470 raco pkg update: fix reoprting for --all in a scope without packages 2014-12-14 05:59:12 -07:00
Robby Findler
c3e92093f6 improve the way '() is treated as a constant
so it fits in with stronger and whatnot and
the other list contracts
2014-12-13 14:55:13 -06:00
Matthew Flatt
63f7cf1568 raco setup: try harder to delete files such as DLLs
If "sqlite3.dll" is installed as a foreign library but shouldn't
be, then `raco setup` cannot simply deleet the file, because
starting `raco setup` opened the DLL. To avoid that problem,
rename the file to start with "raco-setup-delete-", then attempt to
delete the renamed file; the delete won't work, but the file
will be moved out of the way, and a future `raco setup` can
clean up.

The prefix "raco-setup-delete-" thus becomes special on Windows for
the directories that hold foreign libraries, shared files, and
man pages, because `raco setup` will try to delete any file
that starts with "raco-setup-delete-".

It's all very ugly, but I don't have a better idea for the
problems that I keep hitting.
2014-12-13 09:16:52 -07:00
Matthew Flatt
9beca2bdee make: fix bootstrap for native libraries
Restore (but in a hopefully better way) a step that installs native
libraries before trying a full `raco setup`, since the libraries
may be needed for the setup proces --- especially on Windows.
2014-12-13 09:16:51 -07:00
Robby Findler
6f09e7c619 add cons/dc 2014-12-12 23:41:09 -06:00
Sam Tobin-Hochstadt
f7a300199a Improve formatting in raco pkg show, and add single-package show.
* `raco pkg show typed-racket` now shows just the "typed-racket" pkg.

* `raco pkg show --rx typed-racket` shows all packages that match the
  regular expression "typed-racket".

* `raco pkg show` now only shows the first 8 characters of checksums
  unless you provide the `--full-checksum` argument.
2014-12-12 12:59:52 -05:00
Matthew Flatt
66733944d3 net/http-client: add a #:method argument to http-conn-recv!
Supplying a 'HEAD method is necessary to receive the response
to a 'HEAD request, since the response will not include data.
2014-12-12 09:28:49 -07:00
Matthew Flatt
d6c26f9742 fix PLT_DELAY_FROM_ZO
Fetching bytecode from a previously read file was broken in the case
of a bytecode file with submodules.

Closes PR 14878
2014-12-12 07:59:17 -07:00
Matthew Flatt
d780930056 fix syntax-disarm with a #f second argument 2014-12-12 07:59:16 -07:00
Ryan Culpepper
8f4575eeec db: make sqlite connections managed by custodians 2014-12-12 00:27:30 -05:00
Ryan Culpepper
6039d6cc0b added register-finalizer-and-custodian-shutdown 2014-12-12 00:25:31 -05:00
Robby Findler
cd2898675f add #:name argument to {transplant,relocate}-{input,output}-port 2014-12-11 14:43:34 -06:00
Matthew Flatt
b2add2994c raco pkg: less noisy about consulting local catalogs
The "Resolving..." status reports are meant mainly to indicate when
network access is happening. Don't print in advance when a local
catalog is being used, but do print when a local catalog provided the
answer.
2014-12-09 14:19:53 -07:00
Matthew Flatt
885d2125b9 pkg/path: fix problems with path->pkg and case or nonexistent
The `path->pkg` funciton shouldn't return the name of a package that
isn't installed, including a case-folded version of a package that is
installed. On Windows, where we match case-normalized paths, we have
to work a little harder to map a case-normalized path element to the
installed package name, given that package names are case-sensitive.

Closes PR 14861
2014-12-09 14:09:53 -07:00
Matthew Flatt
195a46a23e fix problem with truncated value printing and stack overflow
A value-printing truncation discovered after a stack-overflow handle
and return could go badly, because the truncation escape wasn't
reset correctly after overflow handling (in contrast to truncation
discovered during the overflow handling, which was handled correctly).

Closes PR 14870
2014-12-09 09:22:12 -07:00
Matthew Flatt
3eac913a78 fix thread-based place implementation
There are some limitations to the places implementation when
`(place-enabled?)` returns #f, but mostly it can work.
2014-12-08 16:45:54 -07:00
Matthew Flatt
06c82877db raco pkg: add trash directory for removed/updated package installations
Packages that are installed as other than a link are not meant to be
edited, but work can get lost if a package is edited and then removed
or updated. Avoid that work loss by moving removed or updated packages
to a trash folder.

By default, the trash folder holds up to 512 packages for up to 48
hours. To disable the trash folder (for a given scope), use

 raco pkg config --set max-trash-packages 0

(I expect that some variant of Greenspun's rule predicted the eventual
inclusion of "backup" management in the package system.)
2014-12-08 16:44:31 -07:00
Matthew Flatt
8e3ea24b48 get-pkg-context: add #:use-cache? and #:quiet? arguments 2014-12-08 08:57:54 -07:00
Matthew Flatt
99c6f529e5 add makefile step to adjust for movements within "pkgs"
The step doesn't currently adapt to additionals or removals
from "pkgs", so further support may be needed in the future.
2014-12-08 06:36:17 -07:00
Matthew Flatt
4b36a8e9b5 fix handling of "links.rktd" errors 2014-12-08 05:33:09 -07:00
Matthew Flatt
d6b4523336 pkg/dirs-catalog added
This utility that is needed by `make` turns out to be useful in other
scripts.
2014-12-07 11:19:29 -07:00
Matthew Flatt
25023835b9 adjust status reporting for raco pkg update
Reduce a little noise that was recently introduced.
2014-12-07 10:09:12 -07:00
Matthew Flatt
39a9526f35 raco pkg update: recognize a directory that coresponds to a clone link
For example,

 raco pkg update --clone my/clone/test-pkg
 raco pkg update my/clone/test-pkg

will check for updates in the second case, not change the installation
to a directory link.
2014-12-07 10:01:57 -07:00
Matthew Flatt
9c75238cf2 raco pkg: fix path problems with updating a clone-linked package 2014-12-07 09:08:11 -07:00
Matthew Flatt
1cf985031d raco pkg update: allow --update-deps with a linked package
The linked package cannot be updated, but maybe its dependencies
can, so just alert the user that the linked package is skipped
instead of rejecting the request.
2014-12-07 09:08:11 -07:00
Matthew Flatt
8d2e32855e raco pkg: change default answer on clone-sharing conversion to "Y" 2014-12-07 09:08:11 -07:00
Matthew Flatt
2c3f13fe26 raco pkg update: make update to non-clone suggest more non-clone conversions
In other words, suggestion conversions in the non-clone direction the
same as conversions in the clone direction. As a way of disambiguation
the right direction, the non-clone direction is only suggested for
sharing that is immediately discovered from the command-line arguments
(as opposed to sharing that becomes apparent as other packages are
updated or installed via dependencies).
2014-12-07 09:08:11 -07:00
Matthew Flatt
5af2611704 pkg-directory: add #:cache argument
The cache enables multiple calls to `pkg-directory` to load
installed-package information only once.
2014-12-05 16:57:36 -07:00
Matthew Flatt
2837c995a9 fix continuation reuse in non-JIT mode
The continuation mark to generate stack traces interfered with the
detection of equivalent continuations.
2014-12-05 10:16:56 -07:00
Matthew Flatt
38da2aa2e7 fix a problem mixing JIT and non-JIT code
Crashes the "optimize.rktl" test suite when the JIT supported but
disabled, because that test suite re-enables the JIT.
2014-12-05 10:16:40 -07:00
Matthew Flatt
b7039106e6 restore non-places parallel build
The build protocol had evolved to include paths in messages passed
between places/processes, and that doesn't work with processes.
2014-12-05 10:16:23 -07:00
Gustavo Massaccesi
2d95c39051 simplify treatmenet of begin0 and discarding expressions
Since `begin0` at the bytecode level always evaluates an initial
expression in non-tail position, we don't have to work so hard
to ensure that an extra expression sticks around.
2014-12-05 07:00:40 -07:00
Gustavo Massaccesi
60934f1415 optimizer: more optimizations for begin0
Move begin0 inside begin, for example
(begin0 (begin X Y) Z) ==> (begin X (begin0 Y Z))
Try to replace more begin0 with begin when the first expression is movable
Drop the begin0 when it has only one non omitable expression that preserves
the continuation marks.
2014-12-05 06:56:29 -07:00
Matthew Flatt
c140105068 raco pkg: fix removal before re-instal of extra clone-sharing packages 2014-12-04 19:30:01 -07:00
Matthew Flatt
c6d2548e22 make: fix Unix-style build 2014-12-04 19:30:01 -07:00
Matthew Flatt
d05c00de3e fix build for a fresh checkout 2014-12-04 13:05:53 -07:00
Matthew Flatt
d593f5420b make: link packages via local catalog
Change the way that packages in "pkgs" are handled by `make`:
create a catalog that causes them to be installed on demand
as directory links.
2014-12-04 12:46:03 -07:00
Matthew Flatt
344bffc959 package manager: "file://" URLs and "?type=..." queries
Allow a "file://" URL to specify a type that causes the path
to be installed as a link or static link. A type query like
that is mainly intended for use in a catalog, where a catalog
of local directories could create links as needed for other
packages (that might be pulled from other catalogs).
2014-12-04 10:03:52 -07:00
Matthew Flatt
e7264d2d98 package manager: adjust parsing of file:// URLs
For some reason, I previously made the package manager parse file URLs
by stripping away "file://" and treating the rest directly as a
path. Maybe it was to support relative paths, or maybe it was to
implicitly disallow query and fragment parts of the URL, but it seems
like a terrible idea; I've switched to `string->url` plus `url->path`.

As a result, parsing now implicitly allows and ignores query and
fragment parts of a "file://" URL. That's intended as a feature,
allowing extra information to be attached to a path in, for example,
a catalog.
2014-12-04 10:03:52 -07:00
Sam Tobin-Hochstadt
2987338218 Split almost everything else from the main repository.
The source to the split packages is in repositories under the
`racket` organization on GitHub. The repositories are all named
according to the pkg name, except for multiple-package
repositories such as `racket/compiler` which is named based on the
old directory name without the `-pkgs` suffix. Thus

   `pkgs/compiler-pkgs` -> https://github.com/racket/compiler

The Makefile has also been adjusted to pull packages from the
catalog when you type `make`. This currently relies on some tricks
that will break if you try to specify a particular set of `PKGS` on
the command line. We plan to improve this soon.

The packages in `pkgs/racket-pkgs` and `pkgs/base` are staying in
the repository, since they logically belong with the core code.

The `plt-services` package is still in the repository, but will
move out soon.
2014-12-04 10:33:19 -05:00
Matthew Flatt
f3dba3eb6b fix over-eager shortcut in the implementaiton of continuation jumps
Don't jump past a prompt when jumping to a continuation that is
a prefix of the current one.

Reported by Max New
2014-12-03 07:15:34 -07:00
Sam Tobin-Hochstadt
46a5ed0aad Provide additional identifiers needed for pkg-index. 2014-12-02 21:06:26 -05:00
Matthew Flatt
2e69ece74b raco setup: make --check-pkg-deps work on a collection subset
Lift the remaining caveat about using `--check-pkg-deps` when
supplying specific collections to `raco setup`.
2014-12-01 10:58:55 -07:00
Matthew Flatt
20fa0ce790 raco pkg update: make --lookup and --clone work right together
The combination of `--lookup`, `--clone`, and `--catalog` can provide
a one-step path from a snapshot's built implementation of a package to
a repository-linked clone, for example.  In that situation, however,
`raco pkg` will have limited ability to detect that packages
originally drawn from the same repository are consistenly installed as
clones (and we can revisit if it turns out to be an issue).
2014-11-30 15:23:19 -07:00
Gustavo Massaccesi
60433b15f7 optimizer: fix do_make_discarding_sequence
The optimizer converts (car (cons X Y)) to (begin0 X Y) and then reduces
it to (begin Y X) if X is movable.
Check that the movement is safe for space and for continuation captures.
2014-11-30 14:28:56 -07:00
Matthew Flatt
3638ee6129 raco pkg show: add -l'/--long', and adjust the default mode
Make `raco pkg show` more readable by default by constraining the
output to 80 characters and adjusting the way some columns print.
2014-11-30 14:28:56 -07:00
Matthew Flatt
3cc1514a7d raco pkg {install,update,remove}: add --batch
Adjust defaults for `--deps` and `--multi-clone` to depend on
interactive vs. batch mode.
2014-11-30 12:41:32 -07:00
Matthew Flatt
ebe1537450 raco pkg update --clone: offer advice on converting directory links 2014-11-30 11:37:48 -07:00
Matthew Flatt
936f4abd3d improve a package-dependency error report from raco setup 2014-11-30 11:19:10 -07:00
Sam Tobin-Hochstadt
49c1cb1718 Avoid error on relative paths in raco pkg install --clone. 2014-11-29 10:23:16 -05:00
Robby Findler
5354142825 give pair? the same treament as list? got in 9ee9f676 2014-11-28 12:36:00 -06:00
Robby Findler
0e22209a81 add obligation properties to ->*
for online check syntax to pick up
2014-11-27 16:41:33 -06:00
Robby Findler
9ee9f6767d adjust contract system to use (listof any) when it sees
the list? predicate

(so that random generation and contract stronger work better)
2014-11-27 14:53:14 -06:00
Matthew Flatt
dd02cf8952 pkg catalog-update: install updates as a single transaction
Relevant to PR 14848
2014-11-26 06:53:03 -07:00
Matthew Flatt
596a4f655c pkg/db: add support for grouping calls as a single transaction
Also avoids reundant table-preparation checks for calls that are
grouped together.
2014-11-26 06:53:03 -07:00
Matthew Flatt
7596668762 pkg/db: fix some missing table preparations 2014-11-26 06:47:28 -07:00
Matthew Flatt
5fca59e2ed fix problems with continuations & sharing
When continuation C2 extends continuation C1, C2 shares the copy
of the internal stack with C1. It needs to skip the bit of
C1's stack that corresponds to arguments to `call/cc`, though.
That skipping assumed that `call/cc` takes 1 argument, but it can
take 2. The bug broke `racklog`, which captures continuations using
its own prompt. (It seems like there should be a simple test that
is independent of Racklog, but I couldn't construct it.)

Meanwhile, the continuation shouldn't retain the arguments to
`call/cc`, so clear them. (That was easy to test.) Sharing still
has to compensate for the locations of the arguments, though.
2014-11-25 16:37:41 -07:00
Matthew Flatt
6e473958de raco setup: use proper namespace for info-domain setup
With the wrong namespace, then installing and updating a package
within the GUI package manager would not pick up an info-domain
change for the updated package.
2014-11-25 12:34:36 -07:00
Matthew Flatt
6096d567af make-path->relative-string: handle immediate directory path 2014-11-24 16:27:11 -07:00
Matthew Flatt
d0b94f48e0 {chaperone,impersonate}-procedure*: fix argument propagation
Fix the "self" argument propagation through an impersonator that has
no redirection function (but that probably has impersonator
properties).

Closes PR 14852
2014-11-24 16:27:11 -07:00
Matthew Flatt
89ca0c26ce add setup/materialize-user-docs and related raco setup flags
The new library provides a way to force a user-specific documentation
etry point into existence. Normally, that would happen when a package
with documentation is installed in user scope. After the entry point
exists, then it sticks around even if all user-scope packages are
removed. In some cases, it may be useful to force the entry point into
existence as if packages had been installed and removed.

(This might be useful for avoiding a quarantine on installed
documentation files on Mac OS X, or a trampoline might be better.)
2014-11-23 10:51:07 -07:00
Matthew Flatt
b2a919af40 raco pkg {install,update}: help users keep repo clones consistent
When packages A and B have the same Git repository source, and
when at least one of them is linked as a repository clone, then
the package system doesn't require A and B to both be linked or
both be linked to the same clone... but that can lead to confusion
for users. The package manager now detects this situation and in
many situations can update non-clones to make then clone links
at the same repository.
2014-11-23 07:32:35 -07:00
Matthew Flatt
37a209b60e net/git-checkout: finish support for "dumb" HTTP(S)
Full dumb-server support is even more useful for testing.
2014-11-23 06:31:01 -07:00
Matthew Flatt
8498eff8ef raco pkg {install,update}: track Git repo source from a catalog
When a package is installed via a catalog, and the source provided
by the catalog is a Git repostory, then allow `--clone` to use
that repository when just the package name is given.
2014-11-23 06:31:01 -07:00
Matthew Flatt
6379aaddef raco pkg {install,update}: add --clone <dir> mode
Using `--clone <dir>` with a Git-based package source causes the
package installation to be linked to a clone of the repository
as a subdirectory of <dir>. The package can be developed locally
in the usual way with Git tools, but `raco pkg update` can itself
pull updates to the package/repository.

See the new chapter 6 in "Package Management in Racket" for
more information.
2014-11-23 06:31:01 -07:00
Matthew Flatt
04f5fe3815 net/git-checkout: support "dumb" protocol for discovery
Supporting just reference discovery can be useful for certain
testing configurations.
2014-11-23 06:31:01 -07:00
Sam Tobin-Hochstadt
bb83f51a28 Avoid trying to check dependencies for planet packages. 2014-11-21 14:18:31 -05:00
Matthew Flatt
1b4236722d raco setup: fix --fix-pkg-deps to imply --check-pkg-deps 2014-11-20 07:50:11 -07:00
Matthew Flatt
aa5e7d1039 remove redundant declaration & GC registration 2014-11-20 07:50:11 -07:00
Matthew Flatt
67ec4fb982 fix use of embedded bytecode 2014-11-20 07:50:10 -07:00
Robby Findler
b6ebd4101a add a new section to the contract guide on building combinators, plus
export a few new functions to smooth some rough edges in the new combinators api
2014-11-19 22:40:46 -06:00
Robby Findler
bc6492a797 remove unused require 2014-11-19 22:40:46 -06:00
Ryan Culpepper
26fe66b141 syntax/parse: fix action patterns in splicing stxclass
closes PR 14837
2014-11-18 10:33:15 -05:00
Robby Findler
5495595535 generalize the random contract generation APIs to allow
a more dynamic notion of failure

use that to try harder with and/c contracts. In particular,
the contract system now tries to generate the arguments
on their own and then uses the other arguments to filter
(when they are all flat contracts, of course)

closes PR 14832
2014-11-16 20:48:41 -06:00
Robby Findler
43229abf05 rewrite (and/c pair? (listof ...)) into (non-empty-listof ...)
related to PR 14832
2014-11-16 20:44:58 -06:00
Leif Andersen
b38c81139a Fix a few edge cases for raco pkg new
Also fix typos/indentation
2014-11-13 17:29:40 -05:00
Leif Andersen
bfbce31382 Add raco pkg new utility for creating new packages 2014-11-13 14:57:18 -05:00
Matthew Flatt
80a7ff831f read: reject non-Latin-1 characters in byte-string literals
This is a backward-incompatible change, but the old behavior (truncate
the character value to 8 bits) was never intended and seems clearly bad.
2014-11-13 09:46:27 -07:00
Ryan Culpepper
7ed82a5f15 db: even more error information for sqlite3 errors 2014-11-13 11:19:48 -05:00
Matthew Flatt
1681126ed5 add {impersonate,chaperone}-procedure*
The new variants pass a "self" argument to the wrapper procedure in
the same way that `{impersonate,chaperone}-struct` provides a "self"
argument to redirection procedures.
2014-11-12 10:10:23 -07:00
Matthew Flatt
50a8863169 fix places-GC trigger when a large message is pending
A large message that hasn't been delivered can trigger a inter-place
GC. The intent is to force a GC to avoid messages piling up that can
never be delivered, but the GC didn't adjust to a state where messages
stay both undelivered and uncollected, and it would continuosly
trigger GCs. Trigger a GC only if the pending-message size has grown
relative to the previous GC.
2014-11-12 09:30:30 -07:00
Sam Tobin-Hochstadt
731a98de64 Avoid creating impersonators/chaperones when not required in struct/dc. 2014-11-11 09:26:54 -05:00
Matthew Flatt
de65bb5586 parallel-compile-files: fix docs and argument check for the handler callback 2014-11-09 08:39:41 -07:00
Eric Dobson
37232a90fe Fix error handling of parallel-compile-files.
Related to PR 14809.
2014-11-09 08:10:17 -07:00
Tony Garnock-Jones
9fb5346652 Keep track of (and return) a list of modules (re)loaded during dynamic-rerequire 2014-11-09 08:09:05 -07:00
Gustavo Massaccesi
06d76961e5 Fix prefix-out for identifiers with spaces 2014-11-09 07:34:35 -07:00
Eric Dobson
8f238fe9e2 Add event logging to caching-managed-compile and parallel compile.
This allows for understanding where time is spend during a compile.
2014-11-07 22:52:54 -08:00
Ryan Culpepper
18bad4ce6e net/win32-ssl: adjust protocol handling like openssl 2014-11-05 13:40:59 -05:00
Ryan Culpepper
2422218dd9 replace 'sslv2-or-v3 with 'auto in net libs 2014-11-05 13:40:59 -05:00
Ryan Culpepper
933a71ce71 openssl: disable old SSL protocols by default
Add 'auto alias for 'sslv2-or-v3, both of which now mean
"negotiate a reasonably secure protocol version", where
"secure" excludes SSL 2.0 and 3.0 (since POODLE).
2014-11-05 13:40:58 -05:00
Ryan Culpepper
2d38b089cd db: report SQL stmt in errors when available 2014-11-05 13:40:58 -05:00
Ryan Culpepper
b2434ab5b9 db: more information on sqlite3 errors 2014-11-05 13:40:58 -05:00
Matthew Flatt
a88c79fd5b expt: repair for non-integer power of negative inexact
If the inexact approximation of the power is an integer, then
the result was a real number when it should be a complex number.
2014-11-05 09:50:32 -07:00
Matthew Flatt
1e9d7c1d2a expt: repair for large power of inexact between 0 and -1
Closes PR 14824
2014-11-05 09:50:31 -07:00
Matthew Flatt
b9d8f65fc9 reduce CPP noise 2014-11-05 09:50:31 -07:00
Matthew Flatt
edd50a24a8 optimizer: preserve implied properties from a let RHS
In an expression such as

 (let ([x (car y)])
   ....)

the information that `y` must be a pair didn't reach the body of the
`let` in most cases.
2014-11-03 06:06:04 -07:00
Matthew Flatt
89106b6708 optimizer: refine tracking of when space safety is a constraint
Some expression movements are limited by the possibility of retaining
a value in a way that interacts with space safety, but primitives that
return immediately shouldn't get in the way of those movements.
2014-11-03 06:06:04 -07:00
Matthew Flatt
9a94366c2c optimizer: fix reordering problems
When a variable X is bound to an expression that implies properties of
other bindings, and if X is used only once and can be replaced by
its value expression, then further optimization of that expression must
not assume the properties that are established by evaluating the
expression.

Also, don't move expressions past unsafe operations, since the expression
might implicitly guard against unsafety.

Closes PR 14819
2014-11-03 06:06:04 -07:00
Matthew Flatt
0d6deb84de README tweak
Based on a suggestion from freshlikeesch.
2014-11-03 06:06:04 -07:00
Matthew Flatt
823e8cf8d3 repair for more recent MinGW
I think that `-static-libgcc` didn't solve any problems with gcc
3.7.x, but with 3.8.x, divdi3() shows up, and that leads to
a "libgcc_s.dll" dependency unless `-static-libgcc` is used.
2014-11-03 06:06:04 -07:00
Matthew Flatt
795d26a673 setup/dirs: don't include (find-dll-dir) in (get-lib-search-dirs)
I don't see a reason to include `(find-dll-dir)` in the result of
`(get-lib-search-dirs)`. It's practically always redundant, and
including it causes problems for sandboxes --- since `(find-dll-dir)`
must inspect the Racket executable on Windows and Mac OS X, and that
access is normally not allowed by a sandbox.
2014-11-02 08:40:29 -07:00
Leif Andersen
627c775b6f Add 'subprocesses mode to current-process-milliseconds 2014-11-02 06:41:59 -07:00
Matthew Flatt
0b200abe63 unbreak GC for Linux and some other Unix variants
Corrects another problem with cceda78374.
2014-11-01 14:08:11 -06:00
Matthew Flatt
fe557c0e93 Cygwin: one more repair
Also, add a missing dependency that caused me to miss this correction
before.
2014-11-01 10:42:28 -06:00
Matthew Flatt
cdf0dc8ed2 Windows: MinGW fixes 2014-11-01 08:17:52 -06:00
Matthew Flatt
cceda78374 restore Cygwin support
Fix various configuration problems, and make the build work with 3m
(probably for the first time).

The repairs include corrections for the manual link table, but also
switch Cygwin to relying on normal DLL exports, instead, to work
properly with the FFI.

The `--enable-shared` comfiguration option is no longer required for
Cygwin. When it is used, the `gracket` launcher does not work right,
because the Cygwin DLL is in the "bin" directory and "gracket.exe" is
in the "lib" directory. Along similar lines, stand-alone executables
won't work with `--enable-shared`.

The change to `ffi/winapi` makes it match the documentation.
2014-11-01 06:50:24 -06:00
Matthew Flatt
58eb802468 add log-all-levels and log-level-evt
These two functions allow the creation of relays that receive events
on logger B where there are interested receivers for logger A.

Based on comments from Tony Garnock-Jones.
2014-10-31 16:48:41 -06:00
Matthew Flatt
38ac6e052c compiler/cm: filtered logging propagation instead of manual
With the new propagation-filtering support, CM's accomplice channel
doesn't need a receiver that accepts all events, and so less logging
logging work will be triggered during compilation.
2014-10-31 16:48:29 -06:00
Matthew Flatt
159c82fc4a make-logger: support specification of events to propagate
Events to propagate to a parent are described in the same way
as events to receive for a log receiver. The default is still
to propagate all events to the parent, which corresponds to
a propagation specification of 'debug.

Making a propagation-filtering specification built-in, instead of
allowing arbitrary filter functions, keeps `log-level?` efficient and
avoid hooks that might be implemented by untrusted code.
2014-10-31 16:48:29 -06:00
Matthew Flatt
83b4595741 log-level?, log-max-level: accept optional name argument
Change `log-error`, etc., to check the name that will be used for
the message, in addition to the log level.
2014-10-31 16:48:29 -06:00
Matthew Flatt
65e323d266 make-logger: rescind optional callback argument
The optional callback argument was added (by me) in f2d87085. This is
a backward-incompatible change, but allowing an arbitrary callback
on a logger now seems like an especially bad idea; forms like
`log-error` otherwise work in constrained contexts, while an arbitrary
callback function allows potentially untrusted code in those contexts.
Meanwhile, the addition doesn't satisfactorily solve the original
problem, since it intereferes with `log-level?` and similar filters.
2014-10-31 16:48:29 -06:00
Robby Findler
73f4fa86a3 Replace the racket/list shuffle function with
the fisher-yates shuffling algorithm.

Thanks to Daniel Prager for the push to fix this and doing
most of the work.

The timing tests below seem to indicate that it takes a constant
amount of time per element (about 1/7th of a microsecond per element
on my laptop) and even for 10 element lists it runs faster than
the sort-based version that this code replaces.

Below is some code that I used to explore the shuffles. I used Mike
Bostock diagrams (http://bost.ocks.org/mike/shuffle/compare.html)
to double check that the FY algorithm was implemented properly.

 #lang racket/gui
(require pict)

;; some shuffling algorithms:

(define (st-shuffle l)
  (sort l < #:key (λ(_) (random)) #:cache-keys? #t))

(define (fy-shuffle l)
  (define a (make-vector (length l)))
  (for ([x (in-list l)] [i (in-naturals)])
    (define j (random (add1 i)))
    (unless (= j i) (vector-set! a i (vector-ref a j)))
    (vector-set! a j x))
  (vector->list a))

(define (naive-swap-random->random l)
  (define v (apply vector l))
  (define len (vector-length v))
  (for ([x (in-range len)])
    (define n (random len))
    (define m (random len))
    (define t (vector-ref v n))
    (vector-set! v n (vector-ref v m))
    (vector-set! v m t))
  (vector->list v))

;; replication of the ``Will it Shuffle?'' diagram

(define green '(0 100 0))
(define red '(165 42 42))

(define (shuffle-pict shuffle size)
  (define pict-size 300)
  (define sq-size (/ pict-size size))
  (define v (build-vector size (λ (i) (make-vector size 0))))
  (define ht (make-hash))
  (define l (build-list size values))
  (define shuffles 10000)
  (for ([x (in-range shuffles)])
    (for ([x (in-list (shuffle l))] [i (in-naturals)])
      (define r (vector-ref v x))
      (vector-set! r i (+ (vector-ref r i) 1))))
  (apply
   hc-append
   (for/list ([r (in-vector v)])
     (apply
      vc-append
      (for/list ([e (in-vector r)])
        (colorize (filled-rectangle sq-size sq-size #:draw-border? #f)
                  (triple->color
                   (sq-color shuffles size e))))))))

(define (sq-color shuffles size n)
  (define mid-point (/ shuffles size))
  (cond
    [(<= n mid-point)
     (interp-color red
                   (- 1 (map-between (/ mid-point 3) mid-point n)))]
    [else
     (interp-color green (map-between mid-point (* mid-point 3) n))]))

(define (map-between lower-bound upper-bound n)
  (cond
    [(<= lower-bound n upper-bound)
     (/ (- n lower-bound) (- upper-bound lower-bound))]
    [(<= n lower-bound) 0]
    [else 1]))

(define (interp-color color %)
  (define (i n) (- 255 (* (- 255 n) %)))
  (list (i (list-ref color 0))
        (i (list-ref color 1))
        (i (list-ref color 2))))

(define (triple->color triple)
  (define (get n) (inexact->exact (floor (list-ref triple n))))
  (make-object color% (get 0) (get 1) (get 2)))

(module+ test
  (require rackunit)
  (check-equal? (map-between 10 110 0) 0)
  (check-equal? (map-between 10 110 10) 0)
  (check-equal? (map-between 10 110 20) 1/10)
  (check-equal? (map-between 10 110 100) 9/10)
  (check-equal? (map-between 10 110 150) 1)
  (check-equal? (sq-color 1000 10 0) red)
  (check-equal? (sq-color 1000 10 100) (list 255 255 255))
  (check-equal? (sq-color 1000 10 1000) green))

(define (pictures)
  (values
   (shuffle-pict st-shuffle 60)
   (shuffle-pict fy-shuffle 60)
   (shuffle-pict naive-swap-random->random 60)))

;; timing tests

(define (time-it a-shuffler size iters)
  (printf "~a ~a ~a " (object-name a-shuffler) size iters)
  (flush-output)
  (define l (build-list size values))
  (collect-garbage) (collect-garbage) (collect-garbage)
  (time (for ([x (in-range iters)])
          (a-shuffler l))))

(define (timings)
  (time-it fy-shuffle 10 100000)
  (time-it fy-shuffle 100 10000)
  (time-it fy-shuffle 1000 1000)
  (time-it fy-shuffle 10000 100)

  (time-it st-shuffle 10 100000)
  (time-it st-shuffle 100 10000)
  (time-it st-shuffle 1000 1000)
  (time-it st-shuffle 10000 100))

(module+ main (timings))
2014-10-31 13:26:50 -05:00
Stephen Chang
ef34c5db01 restore set/c default #:kind to 'immutable; update tests and docs to match 2014-10-29 16:47:58 -04:00
Stephen Chang
40422d35d3 change set/c default #:kind to dont-care, to match docs
- add set/c tests
2014-10-29 16:31:25 -04:00
Robby Findler
0fa5f866ae make path->relative-string/library use "<doc>/...." prefixes files in the docs 2014-10-28 17:09:53 -05:00
Matthew Flatt
8e34ef3a9d libffi: fix problems with gcc-4.0 on 32-bit Mac OS X
Based in part on https://trac.macports.org/changeset/122079
2014-10-28 08:06:13 -06:00
Matthew Flatt
35a762b556 remove internal sorted-dirlist function
The result of `directory-list` is now sorted by default, so the
extra function is not needed.
2014-10-27 16:01:49 -06:00
Matthew Flatt
9291726482 racket/file: add make-parent-directory*
Also, clarify behavior of `make-directory*` in the case of a relative
path when the current directory does not exist.
2014-10-27 16:01:49 -06:00
Matthew Flatt
2d85fdc02f libffi: restore some small patches
Also, revert file-permission changes.
2014-10-27 11:18:16 -06:00
Gustavo Frederico Temple Pedrosa
9832ad7750 Update libffi to 3.1
Update libffi to 3.1 to add support for new architectures.
2014-10-27 11:18:16 -06:00
Matthew Flatt
f31c6563e4 make read-line interruptable on a primitive port
Closes PR 14800

Merge to v6.1.1
2014-10-27 07:00:30 -06:00
Matthew Flatt
a352470914 work around a kqueue bug(?) on Mac OS X
There seems to be a problem in kqueue() on Mac OS X for watching for
FIFO write availability, where adding a read event for the same FIFO
(at a different file descritor) can disable the write event.

Merge to v6.1.1
2014-10-26 09:51:17 -06:00
Matthew Flatt
2679638e74 fd read and write: avoid redundant O_NONBLOCK flag setting 2014-10-26 09:21:28 -06:00
Matthew Flatt
b2509614e2 fd write: accomodate non-partial writes to a non-full descriptor
If a write to a non-blocking descriptor fails, then try again
with fewer bytes, since nothing in the spec write() seems to
promise writing partial amounts. In particular, writing to
a FIFO no Mac OS X might fail even if there are a few bytes of
space; as it happens, the select() function seems to compensate
and claim that such a FIFO is full, but kqeueue() doesn't.
2014-10-26 09:21:28 -06:00
Greg Hendershott
9de70551dc Fix bug with equal? on small bit-vectors. 2014-10-24 15:28:25 -04:00
Matthew Flatt
1f764a3dba fix internal meta-continuation comparison for continuation sharing
The check that the current meta-continuation matches the captured one
would always fail (I think), since the current meta-continuation is
pruned on capture. Keep a weak link to the original meta-continuation
to enable detection of capturing a continuation that matches or
extends one that was previously captured.

Enabling sharing exposed a problem with the code that saves
continuation marks for partial sharing, since that implementation
became out of sync with the main implementation (so merge the
implementations).
2014-10-22 13:14:58 -06:00
Matthew Flatt
d9f2a84951 repairs for {impersonator,chaperone}-struct
Commit 0b71b8481d didn't have the tests that I thought I had
written, and so the changes were unsurprisingly buggy.
2014-10-21 21:09:36 -06:00
Robby Findler
e589f591fb take advantage of the new impersonator support to hack in something that
avoids piling up redundant instanceof/c contracts

This is not a general purpose solution, but instead a hack that covers
certain hopefully likely patterns of redundant contracts for objects.

This commit looks for redundant contracts according in a slightly more
general pattern than just "is the most recently attached contract
stronger than the one I'm about to put on here and does it have the
same blame labels?", because that predicate isn't good enough to cover
the example below. In the example below, we repeatedly get the same
contract put on an object, but with different blame labels. So we need
to drop "inner" contracts. That is, when we have two contracts on
there and we go to add the third, we can tell that the second one
would no longer ever signal blame, so we can keep just the first in
the third.

More concretely, if we had these two contracts on 'v' with the given
blame labels (higher lines means the contract is "outside" or applied
later and the blame labels are in positive/negative order):

  (-> x y)  <c,d>
  (-> x y)  <a,b>

then the two possible blames we get here are blaming d for a non-x
argument and blaming a for a non-y result. And now lets say we add a
third contract to the stack that's a copy of the first, but possibly
with different blame labels:

  (-> x y)  <e,f>
  (-> x y)  <c,d>
  (-> x y)  <a,b>

Now we can blame f for non-x argument and a for a non-y result, both
of which are things covered by the first and third contract, so we can
safely drop the middle one and use this stack:

  (-> x y)  <e,f>
  (-> x y)  <a,b>

The example above is couched in terms of arrow contracts, but this
commit doesn't do this for arrow contracts, it does it for
instanceof/c contracts.

And also the way that we tell that the inner contract is redundant
isn't that it is equal; instead we use contract-stronger?. In
particular, the above reasoning works, I believe, when we have that
the inner contract is stronger than the one we're removing and when
the outer contract is also stronger than the one we're
removing. That's the check that actually happens in the code.

-------

The code below is the example below is an example Asumu sent me (but
with the TR parts stripped out). Before this commit, the contract
wrapping grows without bound, but with this commit it stays constant.

In the example below we get only two different sets of blame labels
(and equal contracts) and thus are actually more contracts that could
be eliminated, but this commit does limit it to just two contracts. (I
think it could be alternating between one and two contracts instead of
always two if the code that dropped the contracts were more clever.)

 #lang racket/base
(module State racket/base
  (require racket/contract racket/class)

  (define state/c
    (recursive-contract
     (class/c
      [m (-> any/c (instanceof/c state/c))]
      [n (-> any/c (instanceof/c state/c))])))

  (define state%
    (class object%
      (super-new)
      (define/public (m) (send this n))
      (define/public (n) (new state%))))

  (define (tree-next o) (send o m))
  (define (make-tree) (new state%))
  make-tree
  (provide
   (contract-out
    [tree-next (-> (instanceof/c state/c) (instanceof/c state/c))]
    [make-tree (-> (instanceof/c state/c))])))

(require (submod "." State))
(require racket/sandbox)
(with-limits #f
             100
             (let loop ([o1 (make-tree)] [n 0])
               (printf "~a\n" n)
               (define o2 (tree-next o1))
               (loop o2 (add1 n))))
2014-10-21 20:12:26 -05:00
Matthew Flatt
8a45f9d341 impersonated mutator: fix internal stack overflow
This is not a new bug, but it was exposed by the interaction
of the changed to the impersonated-mutator protocol and
the `unstable/option` test suite.
2014-10-21 13:53:09 -06:00
Eli Barzilay
e52f273491 Prevent irregular real numbers from being treated as valid JSON values.
Fixes PR 14628.
2014-10-21 10:15:36 -06:00
Matthew Flatt
0b71b8481d {impersonator,chaperone}-struct: change protocol to receive self
When calling a wrapper procedure for a field accessor or mutator,
provide the structure that was originally passed to the accessor or
mutator, instead of the value that was wrapped to create an
impersonator.

This is a backward-incompatible change, but I can't find any uses of
that initial argument to the wrapper procedure. Also, a wrapper can
capture the original value in its closure, while passing "self" allows
wrappers that are sensitive to overridden impersonator properties.
2014-10-21 10:05:02 -06:00
Matthew Flatt
99832efb45 openssl: fix ssl-load-default-verify-sources! for Win64
Closes PR 14784

Merge to v6.1.1
2014-10-21 07:33:11 -05:00
Matthew Flatt
3323605fa9 racket/udp: adjust receive into a zero-sized buffer
The OS doesn't necessarily react to a zero-sized buffer the way
that `udp-receive!` is supposed to work, so provide only a
non-zero-sized buffer to the OS.
2014-10-21 07:31:07 -05:00
Matthew Flatt
fbdfa36594 raco pkg: support "git://..." and "http[s]://[...].git" sources
Use the `net/git-checkout` library to support git repository servers
in general, instead of supporting only GitHub. A HTTP(S) source is
treated as a repository source when it ends with the ".git" suffix.
2014-10-18 09:16:01 -05:00
Matthew Flatt
ce464810d5 file/tar: add #:exists-ok? argument
The new argument is needed to reliably write to a tmp file, for
example, where the existence of the tmp file prevents other processes
from using the same name.
2014-10-18 07:14:50 -05:00
Matthew Flatt
ecc1d5dff2 net/git-checkout: repairs for HTTP(S)
Declare a "git" user agent, and use a secure client context for HTTPS
unless the `GIT_SSL_NO_VERIFY` environment variable is defined.
2014-10-18 07:14:50 -05:00
Matthew Flatt
06803e4da7 net/git-checkout: support ref -> ID mapping without download 2014-10-18 07:14:50 -05:00
Matthew Flatt
bbf154ba36 net/git-checkout: support the smart HTTP(S) transport
Git-based hosting services most commonly support the smart HTTPS
protocol, which carries "git://"-format payload in a fairly straightforward
way. (Supporting the dumb protocol looks much more difficult.)
2014-10-18 07:14:50 -05:00
Matthew Flatt
babd420293 net/git-checkout: checkout a tree via the "git://" protocol
The `net/git-checkout` library implements enough of `git clone` to
extract a tree from a repository that is accessed via the "git://"
protocol. It doesn't preserve a local clone, and it attempts to
download only the slice of the repository that is needed for the
requested tree (depending on how the tree is referenced).
2014-10-18 07:14:50 -05:00
Matthew Flatt
3a3ffe1efa note v6.1.1 in Racket "HISTORY.txt"
Merge to v6.1.1
2014-10-17 07:19:11 -06:00
Matthew Flatt
5650e8fc03 reorganize pkg/lib implementation
Split the module into several (smaller) modules.
2014-10-14 17:37:05 -06:00
Matthew Flatt
1cc86d3cea ffi/unsafe: fix make-sized-byte-string on a #f argument
In particular, a #f argument can make sense if the length is 0.
Technically, a byte string's byte array is supposed to be nul-terminated,
but many uses of byte strings get away without that terminator. I've
adjust the documentation to note that `bytes-copy` will work with a
non-terminated byte string.

Merge to v6.1.1
2014-10-14 16:43:20 -06:00
Robby Findler
ec4542383c add list*of 2014-10-11 23:23:38 -05:00
Matthew Flatt
608ac636eb repair ELF fixup on native-library installation
The fixup is not allowed to changed the virtual
address of a SHT_PROGBITS section, so a expanded
".dynstr" section might have to be moved to a
virtual address after everything else.
2014-10-11 14:11:21 -06:00
Matthew Flatt
71c93c2615 raco setup: unbreak for native libraries on Windows and Mac OS X
Repairs commit bd29411579.
2014-10-11 08:25:32 -06:00
Matthew Flatt
d4ad0a20e4 macro expander: fix an internal hash-table traversal bug
This bug could result in weird "cannot re-define a constant: lifted.0.2"
errors, or probably even worse collsisions of definitions, but I think
only in a namespace created from `module->namespace`.

So far, I haven't been able to create a reasonably small test,
because so many things have to line up in just the right way.

Merge to v6.1.1
2014-10-10 17:51:07 -06:00
Matthew Flatt
3692abf61e Windows: add "CP" before code page number as locale encoding
If you set the locale to something like "us_EN.1252", then
"1252" was returned as the encoding, but "CP1252" is more likely
to be recognized by `bytes-open-converter`.
2014-10-10 17:51:07 -06:00
Matthew Flatt
d8793e5b8b Always convert string<->paths with UTF-8 on Windows
Also, document representation information on paths. In particular,
explain that Unix and Mac OS X paths are natively byte strings, while
Windows paths are natively UTF-16 code-unit sequences. The byte-string
representation of a Windows path is a UTF-8-like encoding of the UTF-16
code-unit sequence, which is why it makes no sense to convert it using
the current locale's encoding.
2014-10-10 17:51:07 -06:00
Matthew Flatt
7e984c6009 fix allocation bug in equal? on deeply nested values
Based on the core file, this bug seems likely responsible for the
`raco setup` crash on DrDr for push 29346.

Merge to v6.1.1
2014-10-10 08:20:33 -06:00
Matthew Flatt
bd29411579 setup and pkg create: adjust ELF RPATH on install and uninstall
Allow a library installed as user-specific to refer to libraries
installed installation-wide.
2014-10-10 05:54:42 -06:00
Ryan Culpepper
653939ffa7 Post-release version for the v6.1.1 release 2014-10-08 14:39:56 -04:00
Matthew Flatt
40f5ec070a configure: add --enable-natipkg and 64-bit Linux native libraries
The `--enable-natipkg` configuration option adds "-natipkg" to the
platform library subpath. The suffix is intended to trigger the
installation of packages that supply native libraries for supported
platforms (where 64-bit Linux is the supported platform, for now, for
main-distribution packages), instead of relying on libraries installed
via the OS's package manager.

The intended client for "-natipkg" is the package-build service, where
installing packages via the OS package manager would require network
access and either trust or constrained installations. The build
machine is intentionally disconnected from the network and can only
access Racket packages, so repackaging native libraries as Racket
packages makes those libraries accessible.

A disadvantage of this approach to installing native libraries is that
it creates work for implementers of packages that access native
libraries. Those implementers will have to supply packages for 64-bit
Linux versions of native libraries to the degree needed to build and
(eventually) test the package. An advantage of the approach is that it
requires no changes to the package system; it will be cheap to replace
this approach if we find a better way to deal with native libraries
and/or OS packages in the package-build service.
2014-10-08 05:19:33 -06:00
Matthew Flatt
9d864b1182 fix UDP improvement for Windows 2014-10-03 06:44:47 -06:00
Matthew Flatt
2a387aceea racket/network: improve UDP support
Generalize `udp-send-to`, etc., to try each possibility of
a resolved address (instead of just the first one) like
`udp-connect!` does. This matters, for example, when using
"localhost" as an address, when the machine resolves "locahost"
to both "127.0.0.1" and "::1", and when the socket is created
for the second one that would be tried.

Also, detect and discard asynchronous ICMP errors.
2014-10-02 11:33:38 -06:00
Robby Findler
7aa4c94b9b fix some random generators broken when refactoring things to improve contract-stronger? 2014-10-01 21:44:02 -05:00
Matthew Flatt
b946d4639e JIT: fix allocation of letrec-bound closure over unboxed flonums
The closure could be allocated as uninitialized memory with the
expectation that it would be filled right away, but boxing values
to put in the closure could expose the uninitialized memory to
the GC. Fix the problem by boxing before allocating closures.
2014-10-01 13:13:37 -06:00
Ryan Culpepper
b2c6022989 syntax/parse: support pvar:literal patterns 2014-10-01 10:39:56 -04:00
Ryan Culpepper
e1e2e7e5da syntax/parse: conventions have lowest priority 2014-10-01 10:39:56 -04:00
Ryan Culpepper
ee65681a90 syntax/parse: literals shadow pattern forms etc
closes PR 14750
2014-10-01 10:39:56 -04:00
Jay Kominek
320079eeab add server-side support for TLS SNI 2014-10-01 10:39:56 -04:00
Robby Findler
221519f47f change the recursive contract stronger implementation
to use hash tables instead of association lists
2014-09-30 21:02:13 -05:00
Ryan Culpepper
3d5fcaa355 move pattern-expander contracts to outer modules, trim exports
This avoids mysterious errors later in the build process related to
TR and static-contracts. I don't see how the pattern-expander code
could possibly cause the errors that occur, but this commit fixes them.
2014-09-30 11:05:04 -04:00
AlexKnauth
81cc6bf4d0 add pattern-expanders to syntax/parse 2014-09-30 11:05:04 -04:00
Vincent St-Amour
e5fd7e504d Revert "Revert "fix a bug in f669c47c1""
This reverts commit 2e29a18039.

Reverted the wrong commit.
2014-09-29 15:41:51 -04:00
Matthias Felleisen
2e29a18039 Revert "fix a bug in f669c47c1"
This reverts commit 379ed6b46e.

Stupid robby experiment
2014-09-29 12:06:47 -04:00
Matthew Flatt
cf7c013477 Windows: fix handling of junctions as links
On Windows, a "soft link" or "junction" is different from a
"symbolic link". The current Windows documentation is
incomplete in that it describes the behavior of GetFileAttributesEx
for a symbolic link, but not for a junction, and I guessed wrong.
For consistency, junctions need to be treated like symbolic links.
2014-09-27 20:45:13 -06:00
Matthew Flatt
2eb943e0de racket/place: fix nested-place termination 2014-09-26 06:41:41 -06:00
Robby Findler
a9c0c8bccd add hash/c stronger
also, bring down below 102 columns
2014-09-25 17:42:43 -05:00
Matthew Flatt
116e06407b racket/draw Windows: patch Cairo for clipped DC surface creation 2014-09-25 16:17:29 -06:00
Robby Findler
a41ba9d37f add stronger for parametric->/c
(and test cases for stronger with new-∀/c)
2014-09-24 16:53:35 -05:00
Robby Findler
1f1479c7be add stronger to implementation?/c and subclass?/c
also, bring down below 102 cols
2014-09-24 16:53:25 -05:00
Robby Findler
9e3a9d17d5 add stronger to is-a?/c 2014-09-24 16:53:25 -05:00
Robby Findler
748e3ef7cc add stronger to syntax/c 2014-09-24 16:53:25 -05:00
Matthew Flatt
a64a1cb177 racket/gui: DPI-aware on Windows
The `racket/draw` library is now independent of the screen resolution
on Windows. Font sizes in "points" are the only place where the
resolution mattered before, and now `racket/draw` assumes a
traditional 96dpi on Windows and Linux (and a traditional 72dpi
on Mac OS X).

Setting the scale for "text and other items" in Windows now adjusts
the backing scale of screen and canvas-compatible bitmaps, as well as
setting a scale on canvas drawing. Window and screen positions and
sizes are similarly scaled; for example, if the screen is 2048x1436
with text scaled by 200%, then `racket/gui` reports the display size
as 1024x768 (and the display backing scale as 2.0).

Backing scales of 1.25 and 1.5 are common for Windows. Rounding
associated with those scales could cause trouble for virtual -> actual
-> virtual conversions.
2014-09-24 08:40:52 -06:00
Robby Findler
bbb4897ce2 add a stronger to class/c 2014-09-24 06:49:46 -05:00
Robby Findler
ac9b1cd05b add box/c stronger 2014-09-23 12:52:51 -05:00
Robby Findler
5da7104829 improve contract-stronger for vectors 2014-09-23 12:41:28 -05:00
Robby Findler
5099b380e6 improve contract stronger for promise/c 2014-09-22 21:39:43 -05:00
Robby Findler
932f041597 improve contract stronger for </c and >/c
and modernize those combinators, too
2014-09-22 20:45:18 -05:00
Robby Findler
379ed6b46e fix a bug in f669c47c1 2014-09-22 15:20:26 -05:00
Robby Findler
f669c47c1d improve contract-stronger for list-related contracts
also bring listof in line with the present
best practices of the contract library
2014-09-22 12:55:38 -05:00
Robby Findler
05185dcdde improve stronger for flat-named-contract
by making the equal, eq, and regexp contracts all have
an extra field to hold the name. This mostly has the advantage
that flat-named-contract has to turn a flat contract into it's
predicate a bit less often
2014-09-21 21:02:50 -05:00
Robby Findler
404c067286 improve chaperone-procedure error messages a little 2014-09-21 16:53:16 -05:00
Matthew Flatt
a8d0534e65 chaperones: allow procedure chaperones that supplies no redirection
The same as the change for structure chaperones, but for procedures.
2014-09-21 12:13:55 -05:00
Matthew Flatt
1f1a10db87 chaperones: allow struct chaperones that supply no redirections
(as requested by Asumu)

A witness accessor or mutator is still required to create a structure
chaperone, but `#f` can be provided in place of a redirection, and
then impersonator properties can be attached to the chaperone.

At the same time, adjust `(chaperone-of? v1 v2)` so that `v1` as a
chaperone is not required to preserve non-redirecting chaperones of
`v2`.

The overall consequence is that a redirection procedure can cooperate
with a (suitably protected) impersonator property to override
redirection behavior without running afoul of the chaperone invariant
and without requiring O(N) space for O(N) overrides. For example, the
contract system can implement the re-application of a contract with
different blame information by overriding blame information as
represented by properties, instead of adding a new chaperone layer
every time that blame changes.

... and all the same for non-chaperone impersonators, of course.
2014-09-21 11:51:36 -05:00
Robby Findler
9681032783 improve contract-stronger for instanceof/c 2014-09-21 06:13:58 -05:00
Robby Findler
eaf48bbbf1 add a proper stronger implementation based for recursive-contract
Following _Subtyping Recursive Types_ by Roberto M. Amadio and Luca Cardelli
2014-09-19 23:29:11 -05:00
Robby Findler
929ed92f40 fix bug in ->i expansion when the name ctc is used in certain ways 2014-09-19 23:29:11 -05:00
Robby Findler
ad7e2a71b7 Those commits can change the blame assignment in
incorrect ways

This reverts commit 0aee13bf22.
This reverts commit a0880f7403.
2014-09-19 23:29:10 -05:00
Robby Findler
a0880f7403 improve contract-stronger and related things
Specifically, add a mechanism so that contract combinators
can accumulate contracts on a value (instead just storing
only one) and then use that in instanceof/c to avoid
putting contracts on values more often.

Also, fill in better contract-stronger implementations in
some of the combinators
2014-09-19 12:57:08 -05:00
Sam Tobin-Hochstadt
837abdd51a Add raco pkg archive.
This creates a catalog from the specified currently-installed
packages. The catalog can then be used to replicate some or
all of the currently-installed packages in another installation
or other context.

Also extend `pkg/command` so that `#:multi` is useful.
2014-09-19 11:03:26 -04:00
Matthew Flatt
43d6684ab9 avoid stack-overflow in scheduler-triggered foreign calls
While a foreigh call is normally guarded by a check on the amount
of available stack space, a callbacks triggered by the
scheduler will first put Racket in no-stack-overflow mode, and
then it's too late to check stack space before making further
foreign calls. With Cocoa, there's some chance that the process
will run out of space. Avoid the mismatch by checking the stack
availability at the start of a scheduler iteration.
2014-09-18 06:06:21 -05:00
Mike Sperber
9dbc4842f7 Unbreak the build on FreeBSD 10.
isnan expands into a use of a function called _Generic.

Tell xform not to worry about it.
2014-09-14 09:09:45 +02:00
Matthew Flatt
ad2243ee01 restore accidentally removed GC check
Fixes a mistake in commit 768b93be82, which dropped a check that is
needed to trigger GCs during a sequence of large-block allocations.

Closes PR 14738
2014-09-12 12:22:55 -06:00
Robby Findler
dcfe7ede67 make some arity error messages for ->i contracted functions
slightly less terrible

... but ->i still doesn't do as good a job as -> and ->* do for arity
errors (specifically, ->i is still letting the blame-less errors that
application constructs thru when it could be assigning blame)
2014-09-10 16:57:52 -05:00
William J. Bowman
c6b3f337e9 Added trace-define, trace-let, trace-lambda
In racket/collects/racket/trace.rkt
2014-09-08 16:36:16 -04:00
Robby Findler
863f7d6669 improve parametric->/c's cooperation with a few bells and whistles in contract error reporting 2014-09-08 09:29:11 -05:00
Gustavo Massaccesi
1542398822 optimizer: move more things inside let and begin
Refactor the code to move inside 'let' or 'begin'.

Also, in the test position of a 'if', recognize the 'not' inside a 'let' or 'begin'.
For example, transform (if (begin ... (not p)) x y) => (if (begin ... p) y x)
Previously, this conversion was made only when
the 'not' was the outermost expression.

And use the refactored code to move application inside 'let' or 'begin' in a single step
For example, transform ((let (...) ... (let (...) ... f) x) => (let (...) ... (let (...) ... (f x))
In the conversion, it's necessary to shift x to the new coordinates inside the 'let's.
In the new version x is shifted only once.
2014-09-07 19:33:46 -06:00
Matthew Flatt
cddfdca835 JIT: fix problem with arity checking with >= 25 arguments 2014-09-07 18:41:16 -06:00
Marc Burns
467786fc1c Handle data descriptor signatures in file/unzip
http://www.pkware.com/documents/casestudies/APPNOTE.TXT specifies that a data
descriptor signature may be placed after the compressed data and before the
data descriptor. file/unzip now handles this case.
2014-09-07 07:47:20 -06:00
Marc Burns
478b01b0e3 unzip: Handle non-seekable input ports.
Before this commit:
  - unzip would attempt to seek the input port via file-position in some cases

After this commit:
  - unzip reads and discards bytes as needed to skip forward
2014-09-07 07:47:20 -06:00
Matthew Flatt
f9f43a4be7 avoid compiler warnings 2014-09-07 07:47:19 -06:00
Matthew Flatt
289e908ab2 string-normalize-...: fix memcpy that should be memmove 2014-09-05 22:02:13 -06:00
Matthew Flatt
230ce10b11 bump version 2014-09-05 21:13:16 -06:00
Matthew Flatt
51d91032f5 optimizer: fix bug
Repair a typo in b0f4a32049; thanks to Blake Johnson.
2014-09-05 21:10:16 -06:00
Matthew Flatt
79f7a642e1 avoid compiler warnings 2014-09-05 19:06:02 -06:00
Matthew Flatt
33e97745e9 treat OS page manager (especially Linux) more gently
Batch up mprotect() calls when cleaning up a place. Hopefully,
this will avoid ENOMEM errors from mprotect() on DrDr's build.
2014-09-05 17:49:41 -06:00
Matthew Flatt
af9e891215 module caching: ensure consistency of directory paths
Use `path->directory-path` to normalize directory paths and
increase use of the cache.
2014-09-05 15:54:18 -06:00
Matthew Flatt
bc48e9b935 win32: reduce allocation in the scheduler
It's not clear that the changes affect anything in practice,
but they avoid unnecessary allocation and quadratic behavior
in principle.
2014-09-05 15:54:17 -06:00
Matthew Flatt
cd17e08f12 check result of mprotect() 2014-09-05 13:49:27 -06:00
Matthew Flatt
59d3663106 ffi/unsafe win32: fix inefficiency in call-in-orig-thread mode
The problem made simultaneous rendering of "plot" and "math"
documentation about 10 times slower than it should be.
2014-09-05 10:34:27 -06:00
Matthew Flatt
f32d4b0187 minor cleanup on thread termination 2014-09-04 23:49:50 +02:00
Matthew Flatt
52514a4af4 fix interaction of alarm-evt and replace-evt
With `replace-evt` the time that the system needs to wake up
to check the event can drift later, but scheduling state was
carried in a way that works only if the wake-up time drifts
earlier.

Unfortunately, I don't know how to write a test for this bug.
The usual stategy of using `system-idle-evt` to detect busy
waiting doesn't work here, because the business happens despite
the scheduler's conclusion that the system is idle.

As reported by Jan Dvořák on the mailing list.
2014-09-04 23:49:28 +02:00
Matthew Flatt
59fac3d38a racket/port: fix busy-wait bug in make-limited-input-port
As reported by Marc Burns on the mailing list
2014-09-04 23:46:18 +02:00
Jay McCarthy
34dc76bd05 Revert "Fix PR14692"
This reverts commit 92d5408aa8, because
it breaks the build due to recursive deps. (It also breaks if the core
is in the "racket" package.)
2014-09-03 10:53:28 -04:00
Jay McCarthy
92d5408aa8 Fix PR14692 2014-09-03 10:44:29 -04:00
Matthew Flatt
b942a21846 fix module-code caching
Fixes a problem with c4508ad0d9, which disabled module-code
caching too often. A symptom of the disabled cache was that
running "math/scribblings/math.scrbl" would use twice
as much memory.
2014-09-03 12:16:29 +02:00
Matthew Flatt
fa75aec408 make installers: avoid dot-files (like ".gitignore") in installers
Closes PR 14716
2014-09-01 12:08:45 +02:00
Matthew Flatt
b0f4a32049 fix cross-module function inlining and argument use-count tracking
Order mismatch between tracking an use could cause a multiply-used
argument to be treated after inlining as a single-use argument.

Closes PR 14717
2014-09-01 12:08:44 +02:00
Sam Tobin-Hochstadt
2d701f046c Add get-all-pkg-scopes. 2014-08-29 21:40:38 -04:00
Matthew Flatt
1cb16f6c36 ffi/unsafe/objc: fix objc-is-a? to recognize subclass instances
This repair turns out to matter for Mac OS X 10.10, where creating
a list box in a frame somehow makes the frame an instance of a
subclass (that implements notifications of some sort, I think).
That subclassing broke an `(objc-is-a? ... RacketWindow)` test to
recognize windows that belong to a particular eventspace.
2014-08-29 14:12:26 -06:00
Matthew Flatt
76f1ebded9 Mac OS X: incorporate Pango repair for Yosemite
Pango 1.36.6 fixes the problem, so update native libraries
and the Coretext patch.
2014-08-29 10:12:27 -06:00
Matthew Flatt
768b93be82 improve GC handling of out-of-memory
There's a point in attempting to allocate a new large page
where it makes sense to GC and try again.
2014-08-29 10:12:27 -06:00
Matthew Flatt
edf140a440 make server: snapshot source catalog, set local cache 2014-08-26 14:41:13 -06:00
Matthew Flatt
b00638c52d ffi/unsafe: changed the way ffi-lib uses a version number with ".dll"
Add the version with a "-" before ".dll", instead of with a "."
after ".dll".
2014-08-26 09:18:43 -06:00
Gustavo Massaccesi
35eb65628e optimizer: use the equal? => eq? transformation to the optimizer phase
For some types, (equal? x y) is transformed into (eq? x y) in the resolve phase.
This commit adds this transformation to the optimizer phase. This improves
constant folding and enable some optimizations that are prevented
because equal? can run arbitrary code.

Also, transform   (eq? #f x) => (not x)   and   (eq? '() x) => (null? x)   to use
the type information of x when it's known.
2014-08-26 09:18:43 -06:00
Matthew Flatt
3943826b70 raco setup: fix ".dylib" references on install
If a Mach-O file installed with `{copy,move}-foreign-libs` has a
"@loader_path/" reference to a library that is installed in a
different target directory (normally because it's from a package that
is installed in a different scope), then change "@loader_path/" to an
absolute-path reference to that target.
2014-08-25 17:16:01 -06:00
Gustavo Massaccesi
fdf1a1f7ae optimizer: Remove unused flag added in d14b4a8 2014-08-24 07:29:55 -06:00
Matthew Flatt
769c5b6edd optimizer: another ((begin ... proc) x) to (begin ... (proc x))
The tranformation this time applies before optimization of the rator
and complements Gustavo's variant, which applies after optimization of
the rator.
2014-08-23 09:13:49 -06:00
Gustavo Massaccesi
d14b4a8095 optimizer: transform ((begin ... proc) x) to (begin ... (proc x))
Currently the optimizer can convert ((let (...) ... proc) x) to
(let (...) ... (proc x)). This is useful especially if proc can be
inlined. Extend this to begin's forms.
2014-08-23 08:59:39 -06:00
Gustavo Massaccesi
1f2f7a1df4 optimizer: more optimizations for unary operations
Previously, the optimizer simplified the application of some unary functions inside let,
for example (car (let () ... (cons 1 2)) => (let () ... 1). This commit extends this to begin forms,
like (car (begin ... (cons 1 2)) => (begin ... 1).

Also, constant folding and some reductions were only availed in the direct case, for example
(procedure? car) => #t. With this commit these reductions are extended to the expressions
inside let and begin, for example (procedure? (let () (begin ... car))) => (let () (begin ... #t).
2014-08-21 09:37:10 -06:00
Tobias Hammer
e637d78a09 fix cross compile on QNX
got broken in 2e284cc783
The racket version of libunwind is not compatible with QNX but old-style stacktraces are still working with the default gcc version
2014-08-20 16:47:20 -06:00
AlexKnauth
0b045ba77b Add syntax-local-match-introduce 2014-08-15 11:19:48 -04:00
Matthew Flatt
b2b00010e3 annotate and check packages for build and binary modes
If "p" is available as a source package, which is typical, then `raco
pkg install --binary p` would strip away the build dependencies of "p",
so that "p" would not install properly.

This commit changes `raco pkg install` to look for an annotation on
the package and complain if the annotation is inconsistent with the
requested conversion: a binary package cannot be used as a source
package or vice versa. (A built package, as provided by a snapshot
site, can be used as any kind of package.)
2014-08-15 15:41:27 +01:00
Matthew Flatt
05523a0b42 raco pkg: add --binary-lib package stripping to remove docs
The `--binary-lib` mode is like `--binary`, but it also omits
documentation to form a "binary library package".

The `--binary-lib` flag and "X-lib" vs. "X-doc" approaches solve the
same problem with different trade-offs:

 * When a package is split into "-lib" and "-doc" packages, then it's
   easier install non-documentation parts, and it's possible to
   install them from source. A programmer has to work more to split
   the packages, however, and the library and its implementation must
   have separate sources (i.e., no or restricted in-source
   documentation).

 * When a package is just "X", then users can install a no-source,
   no-documentation version by specifying `--binary-lib`, but only
   when the package is available from some catalog and provider in
   built form (such as from a distribution site or a package-build
   service).

In the long run, I think that relying on `--binary-lib will be best
and typical for most packages. The "X-lib" plus "X-doc" approach
that's common in the current distribution's packages, meanwhile, will
likely stick around for basic packages that are commonly useful in
constrained settings (including the setting of a package-build
service).
2014-08-15 10:33:20 +01:00
Matthew Flatt
ed66ff4ecc pkg metadata: add update-implies
The `update-implies` declaration is half of `implies` (even though the
name is bigger): update of the package implies an update of another,
but a dependency on the package is no license to access the content
of the other.

This declaration is intended as an alternative to keeping version and
dependency declarations in sync for a pair of packages that are always
updated together, normally because the packages are in the same
repository. For example, a "-test" or "-doc" package might have an
`update-implies` declartion on the corresponding "-lib" package.
2014-08-14 16:49:52 +01:00
Matthew Flatt
c61a4714e8 doc clarifications and typo in command-line help 2014-08-14 14:00:01 +01:00
Matthew Flatt
906ba45c6c reegxp-match: fix problem with lazy string decoding and output port
Closes PR 14684
2014-08-13 13:28:51 +01:00
Matthew Flatt
c359f7ac29 build less when a pre-built racket is supplied
Adjust dependency tracking and makefile rules to that when
`--enable-racket=...` is provided to `configure`, intermediate
CGC objects are not compiled.

The new approach uses dependency tracking that was already supported
by xform, previously used only for Windows.
2014-08-13 07:33:09 +01:00
Matthew Flatt
7e141a89f7 suppress ar output for SGC library
The `nicear` script avoids stderr output on DrDr.
2014-08-13 07:33:09 +01:00
Matthew Flatt
a266d623aa windows: better approach to manifest
Works for VS 2008 and 2012, at least.
2014-08-12 18:07:28 +01:00
Matthew Flatt
3b962a235d Revert "windows: remove custom manifest"
This reverts commit 67007451b3.

Seems to be needed after all.
2014-08-12 16:43:26 +01:00
Matthew Flatt
fa66067359 fix no-places, no-futures build 2014-08-12 15:58:43 +01:00
Matthew Flatt
fc8b2f02f9 Windows: more changes to auto-adapt to Visual Studio version
Although newer versions of Visual Studio can open 2010 projects, the
meaning of the project turns out to be: use 2010 tools. So, I've added
a step in the build script to automatically upgrade the solutions and
projects based on the version of Visual Studio that is being run.

Meanwhile, since my previous tests for VS 2012 and VS 2013 were using
VS 2010 projects, I wasn't actually testing with the 2012 and 2013
compilers. Additional changes are needed to make those work, notably a
fresh implementation of setjmp() and longjmp() for Win64.

This was all very painful, but the projects are now in much better
shape, so maybe it won't be so bad from here.
2014-08-12 15:55:37 +01:00
Matthew Flatt
67007451b3 windows: remove custom manifest
The manifest was intended to enable XP-style controls, but at this
point it doesn't seem to do anything except interefere with some
variants of the build tools.
2014-08-12 15:42:13 +01:00
Matthew Flatt
df375daef4 avoid NULL argument to memcpy()
gcc 4.9 takes advantage of the specification of undefined behavior if
you pass a NULL to memcpy(), even if the last argument is 0
2014-08-12 08:47:14 +01:00
Matthew Flatt
3c8b5b672e windows: fix sgc allocation of executable pages 2014-08-12 07:33:43 +01:00
Matthew Flatt
881990eddf windows: switch projects to SGC by default 2014-08-12 06:44:55 +01:00
Matthew Flatt
a312f499cb racketcgc: use SenoraGC instead of Boehm GC by default
This new default for Unix and Mac OS X trades performance for
portability (hopefully), but for most users the switch affects only
for the build process, where `racketcgc` is used to build `racket`.

To continue using Boehm GC, configure with `--disable-sgc`.

For now, Boehm GC continues to be the default for Windows.
2014-08-12 05:14:44 +01:00
Matthew Flatt
2916fc34cc SenoraGC: support allocation of executable memory; tune for performance
Allocation of executable memory is intended to make SELinux
happier by mmapping with PROT_EXEC instead of using mprotect()
to allow execution after the fact.

Performance improvements bring SGC within 30% of the Boehm GC on
`racketcgc -cl racket`, which makes SGC an even more plausible
substitute.
2014-08-12 05:14:14 +01:00
Matthew Flatt
2220452b72 racket/place: protect place-creation bindings
Closes PR 14677
2014-08-11 10:48:58 +01:00
Matthew Flatt
c4508ad0d9 avoid cross-namespace submodule pollution via module-code cache
When a module is loaded with submodules intact, it should not be
cached and used for a later load that is intended to obtain the
module without submodules. Avoid mismatches by constraining the
cache to modules without submodules.
2014-08-11 10:26:32 +01:00
Matthew Flatt
2bdb8c1de5 fix rename-transformer-target for chaperoned structs 2014-08-11 07:41:47 +01:00
Matthew Flatt
5ef75682d7 fix run-time error reporting for variables in a submodule
Error reports used the "source" field of a module, which
doesn't have submodule information, or the "name" field of
a module, which might not match an actual filename (".ss"
vs. ".rkt"). Create the right combination.
2014-08-11 07:41:43 +01:00
Matthew Flatt
f4c1d7ec03 racket/class: add missing check for #<unsafe-undefined>
When a superclass method is called before the superclass
is initialized, then all field accesses need to be guarded.

Robby found this one.
2014-08-06 08:46:51 +01:00
Matthew Flatt
fe12e93192 bump version 2014-08-05 16:23:10 +01:00
Matthew Flatt
926e64f5f1 fix "fixing letrec" pass
Adjust the compiler pass to insert checks for #<unsafe-undefined>.
The chanegs amount to throwing out the old attempt to follow the
implementation sketched in "Fixing Letrec", and instead use a
simpler abstract interpretation.
2014-08-05 16:22:31 +01:00
Matthew Flatt
ac428f89fa use-before-definition analysis: fix checking of with-cont-mark form
Similar to the `set!` problem.
2014-08-05 16:00:19 +01:00
Matthew Flatt
6efac46b3f letrec-check analysis: remove no-op part of implementation
The `deferred_uvars` list is constucted so that it always
has the same length as `uvars`.
2014-08-05 16:00:19 +01:00
Matthew Flatt
837a55f484 use-before-definition analysis: fix handling of let[*]
Bindings in `let` and `let*` need to be tracked much the same
way as for `letrec`, so that

 (letrec ([b (let ([d (lambda () c)])
               (d))]
          [c 1])
   b)

raises an exception.
2014-08-05 16:00:19 +01:00
Matthew Flatt
7d85bccaa2 use-before-definition analysis: fix checking of set! form
Treat the RHS of `set!` as escaping to an unknown context, so
that any variables it references are treated as unprotected.
2014-08-05 16:00:19 +01:00
Matthew Flatt
30d30ce74c win32: fix 32-bit get-seconds 2014-07-31 09:53:07 +01:00
Matthew Flatt
dc271e8347 racket/port: enable buffering for peeking-input-port 2014-07-30 11:49:04 +01:00
Matthew Flatt
9d17a35539 fix expand on a module containing lifts from expression
Another attempt at the bug that b95baa1d25 was intended to fix.
2014-07-30 10:33:52 +01:00
Matthew Flatt
b95baa1d25 fix expand on a module containing a #%declare form 2014-07-30 08:49:28 +01:00
Matthew Flatt
21f78ecd14 fix problem with (continuation-marks <thread>)
A thread can be swapped out while it's in transition between a
mandling of the mark-stack position and recovering from C-stack
overflow. Fix up that case.
2014-07-30 07:20:45 +01:00
Matthew Flatt
807b909e73 allow expand on cross-phase-persistent modules
Previoulsy, `expand` mode explicitly disallowed cross-phase declaration
in commit 2e652fc2b3. I'm not sure why, and that commit has no test
case that fails when the restriction is removed, so my best guess is
that it was a debugging strategy that I forgot to undo.
2014-07-30 06:30:44 +01:00
Robby Findler
7472058fd9 fix contract random generation for -> when the range is 'any' 2014-07-29 09:38:09 -05:00
Leif Andersen
027fb52c66 mz-gdbinit script gives type when using pso
The mz-gdbinit script (generated by mk-gdbinit.rkt) gives the type when using
pso, even when the default template did not include the type.

It defaults to printing out only the name of the type without additional
information.
2014-07-29 14:22:07 +01:00
Jan Dvořák
8bd5aa38b1 allow mixing exceptions with ffi/unsafe/alloc
Use call-as-atomic that can handle exceptions instead of dynamic-winding
start-atomic and end-atomic. Exceptions can be found in the functions's
result wrapper such as:

    (define-lib find-some-object
                (_fun (name : _string/utf-8)
                      (object : (_ptr o _some-object-pointer))
                      --> (result : _int)
                      --> (begin
                            (when (negative? result)
                              (error 'find-some-object "unknown name"))
                            object))
                #:wrap (allocator free-some-object))

Signed-off-by: Jan Dvořák <mordae@anilinux.org>
2014-07-29 14:16:26 +01:00
Matthew Flatt
41e7d346d1 adjust link-all to avoid conflicts 2014-07-29 10:48:33 +01:00
Matthew Flatt
04c36e2c09 adjust pack-all script to flush status messages 2014-07-29 10:48:32 +01:00
Matthew Flatt
d2a8bfcfe6 raco pkg update: don't claim conflict with package being updated
Merge to v6.1
2014-07-28 16:29:43 +01:00
Robby Findler
e082f9b183 adjust real-in implementation so that it prints as (real-in ...) instead
of (between/c ...)
2014-07-28 08:37:19 -05:00
Matthew Flatt
135ccf094e Windows: use native Win32 API for dates
Allows conversion of negative "seconds" to reach dates before
1970, and fixes year-varying DST tracking for versions of
Windows that know about those details.

As far as I can tell, we have to compute ourselves whether a
date is in daylight-saving time based on specifications of
when daylight and standard times start. That part seems tricky
and could use extra review.
2014-07-25 15:37:35 +01:00
Matthew Flatt
816d09bb24 macro expander: fix #%top via local-expand
Fix bug in b25a2b83ba that breaks the teaching languages.
2014-07-25 11:21:20 +01:00
Matthew Flatt
8f8e3b7c65 close hole in chaperone implementation
Problem, example, and solution from Sam; see the dev mailing-list post
on 24-JUL-2014.

When a chaperoned accessor, mutator, or property accessor is used to
chaperone a struct, the chaproning procedure must not be able to
see things that the chaproned accessor, mutator, or property accessor
would not allow.
2014-07-25 11:02:08 +01:00
Matthew Flatt
b25a2b83ba The implementation of #%top within a module has, for a while,
required that the identifier wrapped by `#%top` not have a local
binding. Change the documentation to match the implementation in that
way. (Since local binding in an identifier's lexical information
contributes to its identity as a top-level binding, that specification
of `#%top` would make sense everywhere, but I've left the top level
alone for backward compatibility.)

Also, change `local-expand` to never introduct `#%top`
wrappers. That's a little more consistent with what `#%top` has
evolved to mean, and it specifically works better with
`local-expand/capture-lifts`.

Closes PR 14635 and PR 14654
2014-07-25 09:07:46 +01:00