Commit Graph

621 Commits

Author SHA1 Message Date
Matthew Flatt
6d4ff30909 fix JIT bug related to unboxed arguments in self tail calls 2013-09-28 17:57:06 -04:00
Matthew Flatt
af7dcf0dd0 JIT: improve configuration dependency 2013-09-28 17:57:05 -04:00
Sam Tobin-Hochstadt
9f2755116d Remove units in parts of compiler, dynext, setup and create the cext-lib package.
`cext-lib` contains much of the contents of `dynext`, which
is no longer very widely used.

Also moved the implementation of the `mzc` executable
to a more appropriate package.

Also, used `lazy-require` consistently for dynamically
loading implementations.
2013-09-26 14:53:51 -04:00
Matthew Flatt
162edd099d box-cas!: less JIT-generated work if the boolean result is ignored 2013-09-26 14:21:39 -04:00
Robby Findler
a53c69e725 add #:omit-constructor option to struct form of contract-out 2013-09-20 14:38:35 -05:00
Matthew Flatt
6f1588fcac fix custodian-limit checking for phantom byte strings
Closes PR 14036
2013-09-19 16:56:01 -05:00
Matthew Flatt
5ccc6fb289 raco setup: allow an installer only in bytecode form 2013-09-19 10:51:55 -05:00
Matthew Flatt
68c4b0590d fix local-expand on module body with phase-2 binding 2013-09-19 07:27:57 -05:00
Matthew Flatt
10a931d688 fixup for showing dependencies during update 2013-09-17 13:30:21 -06:00
Matthew Flatt
b2f76bd8cc fixes for binary-package stripping
Avoid duplicate `assume-virtual-sources` definitions, add
`assume-virtual-sources` as needed in top-level collections
within a package.
2013-09-17 13:30:21 -06:00
Matthew Flatt
007f7d5992 raco setup: fix several triggers for building a doc index
In particular, fix various triggers that affect installing and
uninstalling packages.
2013-09-17 13:30:21 -06:00
Matthew Flatt
7016d3ab58 raco pkg {install,update}: guard against ill-formed arguments
Parsing a package source/name for scope inference should
report errors in the source/name syntax.

Closes PR 14026
2013-09-17 13:30:21 -06:00
Juan Francisco Cantero Hurtado
bb5323e448 Fix a crash of racket on OpenBSD systems, when pixman is compiled with SSE support and racket tries to load cairo using libffi.
Bug found initially by Juan Francisco Cantero Hurtado. Reported by many.

Mark Kettenis (from the OpenBSD Project) found the real reason of the
crash and created this patch for libffi. Patch taken from OpenBSD Ports.
2013-09-16 10:04:12 -06:00
Ryan Culpepper
ff06f0c8a7 delete unused code 2013-09-15 13:49:35 -04:00
Ryan Culpepper
954d6c764c move more db modules to db-lib 2013-09-15 13:49:35 -04:00
Ryan Culpepper
adc2ccbbd9 prepare to move more db modules to db-lib pkg 2013-09-15 13:49:35 -04:00
Ryan Culpepper
d2841d1113 add db/private/pre for pre-pkg clients 2013-09-15 13:49:35 -04:00
Matthew Flatt
e7090b8365 work around problem with ".ico" file handling 2013-09-13 21:17:43 -06:00
Ryan Culpepper
c596ec604f sync thread dynamic-place contract with builtin 2013-09-13 18:48:36 -04:00
David Vanderson
fb66c419de fix up error message 2013-09-13 18:21:11 -04:00
David Vanderson
fd68db2c7b make 'hex-string->bytes' public 2013-09-13 18:21:10 -04:00
Ryan Culpepper
23f77a6054 fix sqlite lib runtime-path 2013-09-13 13:54:07 -04:00
Ryan Culpepper
5258ffd8ca raco distribute should include sqlite dll on Windows 2013-09-13 13:07:58 -04:00
Robby Findler
e74b26fdbc adjust the planet resolver to explicitly ask for no
compression so that it gets a Content-Length field that
it can use back from the server

this may or may not be the right long-term fix but
for now it at least gets things working again
2013-09-13 10:38:47 -05:00
Matthew Flatt
160e5d3579 remove unused field 2013-09-11 08:34:27 -06:00
Kalimehtar
88d8a2a9f8 Added to _bitmask auto increment bit numbers
Now (_bitmask '(a b)) == (_bitmask '((a 1) b)) == (_bitmask '((a 1) (b 2))

Or (_bitmask '((a 8) b)) == (_bitmask '((a 8) (b 16)))
2013-09-10 08:25:22 -06:00
Matthew Flatt
24fc16674b repair for uri-decode
Certain inputs could cause `uri-decode` to go into a loop.

Patch and supplied by Doug Williams.

Closes PR 14010
2013-09-10 07:51:31 -06:00
Matthew Flatt
df2e2d76c7 JIT: fix slow path branch patch for structure-field assignment
The broken branch patch caused the slow path to be taken on
PPC.
2013-09-09 20:45:29 -06:00
Matthew Flatt
fc9b23e550 JIT: fix slow path for inlined structure-field assignment 2013-09-09 20:45:29 -06:00
Matthew Flatt
cb612245c7 raco pkg install: report useful error when GitHub checksum is "" 2013-09-09 20:45:29 -06:00
Matthew Flatt
41477ab7eb ARM JIT: make calls & returns visible for branch prediction
This improvement makes `inflate` about 5% faster on
one test platform (with no change on a much older one).
2013-09-06 20:02:06 -06:00
Matthew Flatt
fb80ac7385 minor JIT instruction improvement 2013-09-06 20:02:06 -06:00
Matthew Flatt
300e81cb65 fix some variable-initialization problems/warnings 2013-09-06 20:02:05 -06:00
Matthew Flatt
7969eea3a2 raco pkg install: drop redundant "COPYING.txt" and "COPYING_LESSER.txt"
When adding a package installation-wide, drop redundant "COPYING.txt"
and "COPYING_LESSER.txt" files (i.e., ones that are the same as the
ones the "share" directory of a Racket installation).

This rule is ad hoc, but it avoids almost 150 copies of the file in
the main distribution.
2013-09-06 20:02:05 -06:00
Matthew Flatt
e2ee051adc raco setup: avoid duplicate "scribble.css" files, improve style customization
Arrange for documentation added through an installation-wide package to
use the installation's "scribble.css", etc., files. Also, add "doc-site.css"
and "doc-site.js" files (both empty) to allow installation-specific customization
that will not get overwritten by document installs or builds.
2013-09-06 20:02:05 -06:00
Stephen Chang
6ba7834169 syntax/for-transform -> syntax/unsafe/for-transform 2013-09-06 19:01:19 -04:00
Sam Tobin-Hochstadt
23814ec5b3 Reimplement in-directory to not use call/cc.
`in-directory` definition by mflatt.
See mailing list thread at http://lists.racket-lang.org/dev/archive/2013-September/013277.html
for more details. Also includes sequence syntax version.
2013-09-06 18:14:42 -04:00
Stephen Chang
a84cf6b61d add syntax/for-transform
- provides expand-clause (as expand-for-clause) from racket/private/for.rkt
2013-09-06 16:46:41 -04:00
Jay McCarthy
54a75a4031 Print a summary of auto installs/updates rather than as we go 2013-09-05 08:51:05 -06:00
Jay McCarthy
5a7ce6d60a Support gzip encoded HTTP responses 2013-09-04 09:05:09 -06:00
Matthew Flatt
b5fe0203e2 remove bad return 2013-09-04 08:44:49 -06:00
Matthew Flatt
c38d1fabf9 raco pkg {install,update,migrate}: add --all-platforms
The `--all-platforms` flag causes the package manager to follow all
package dependencies, even for dependencies that are specific to
platforms other than the current one.
2013-09-04 08:44:49 -06:00
Matthew Flatt
16c0b385de raco setup: add install-platform to "info.rkt"
The `install-platform` value determines whether files are
copied to "lib" and "share" directories.
2013-09-04 08:44:49 -06:00
Matthew Flatt
6391fe4ed0 raco pkg create: extend --from-install mode so it can unmove files
This adjustment to packing allows a native-library package to
be converted back from installed to installable.
2013-09-04 08:44:49 -06:00
Robby Findler
85770c3cf2 add immutable hash constructors and selectors to #lang info 2013-09-03 15:59:14 -05:00
Sam Tobin-Hochstadt
b69e909f13 Use case instead of cond 2013-09-03 13:53:16 -04:00
Sam Tobin-Hochstadt
101d441fe2 This file is only needed for file/gif. 2013-09-03 13:53:16 -04:00
Vincent St-Amour
01c846ee5e Error message typo. 2013-09-03 11:31:35 -04:00
Matthew Flatt
62f7731c36 paco pkg: allow a commit id to be used in a GitHub reference
Allow a commit id in place of a branch or tag.
2013-09-02 10:10:31 -06:00
Matthew Flatt
61e6279c49 raco pkg: work with git tags as well as branches 2013-09-02 10:10:31 -06:00
Matthew Flatt
6530062120 raco pkg {install,update}: add --checksum argument
The `--checksum` argument's main use is that it lets you pick a specific
commit from a GitHub repository. More generally, it lets you simulate
a package-catalog result, which includes a checksum.

Also, adjust checking of downloaded checksums to ensure that they
match the expected checksum, as predicted by a package catalog or
by the `--checksum` argument.
2013-09-02 10:10:31 -06:00
Matthew Flatt
e0385f36c3 raco setup: fix info-domain, first
That way, if you interrupt a `raco setup`, then programs that rely
on a directory of "info.rkt" mappings are more likely to work.
2013-09-02 10:10:31 -06:00
Matthew Flatt
95368d238e raco pkg: handle bad collection strings
Also, add `setup/collection-name`, which provides functions for
checking collection-name syntax.

Closes PR 13886
2013-09-02 10:10:31 -06:00
Matthew Flatt
a30d80a9c4 move stray rackunit module 2013-09-02 10:10:31 -06:00
Robby Findler
864cc28341 add custom writers for a bunch of contracts 2013-09-01 07:57:09 -05:00
Matthew Flatt
0dcaa5e19f net/url: fix problems with new implementation on net/http-client
Various `net/url` operations need to request a close of the
connection after the operation completes, and `het/http-client`
needs to actually close the input-port half of a connection.

Also, add `http-conn-abandon!`.

Also also, add limits on internal pipes, so that data doesn't pile
up in a connection-processing thread, and fix POST/PUT by adding
a needed CRLF after posted data.
2013-08-30 10:37:09 -06:00
Matthew Flatt
701aa9ce0a openssl: allow ssl-abandon-port on input ports
Make `ssl-abandon-port` consistent with the docs and with
`tcp-abandon-port`.
2013-08-30 10:34:56 -06:00
Stephen Chang
6e42423a2c fix use of in-producer outside of for loops
- make-do-sequence was giving producer fn an argument when none was expected

Closes PR 13986
2013-08-29 17:25:18 -04:00
Ryan Culpepper
5c462eee2b remove uses of scheme/* in src
Fixes windows snapshot builds.
2013-08-28 21:48:53 -04:00
Carl Eastlund
ec5a9616e0 Renamed set-immutable? to set?. 2013-08-28 01:33:33 -04:00
Carl Eastlund
6665f42e33 Changed set? to generic-set?. 2013-08-28 00:10:18 -04:00
Carl Eastlund
899d57f687 Fixed define-generics so that predicate definitions follow method definitions.
I'm not sure that #:defaults and #:fast-defaults predicates should ever refer to
methods from the same generic interface, but the behavior should be divergence
rather than an undefined variable error.
2013-08-27 22:26:59 -04:00
Matthew Flatt
49e6a71f72 add "collects/realm/README.txt"
Guide readers of _Realm of Racket_ to the new location of
the "realm" directory.
2013-08-27 18:00:58 -06:00
Matthew Flatt
0b6f24e3b5 ffi/unsafe: unbreak _list-struct
Broken by 0b1f96ab3d (specifically one of my changes to
Tobias's patch).
2013-08-27 17:29:33 -06:00
Matthew Flatt
3d91b6b77f raco pkg: add a missing `close-input-port' on network connection 2013-08-27 15:20:58 -06:00
Matthew Flatt
10e2db7025 move "ffi/examples" from base to "racket-doc" 2013-08-27 15:20:58 -06:00
Matthew Flatt
d175c3949c move "scheme" collection to a "scheme-lib" package
Also, move remaining "srfi" libraries to "srfi-lite-lib".

In principle, "base" should depend on "scheme-lib" and
"srfi-lite-lib", and a new "base2" package would represent the new,
smaller base. But I don't think the window has yet closed on
determining the initial "base" package.

The "srfi" libraries moved to "srfi-lite-lib", instead of "srfi-lib",
to avoid creating many extra dependencies on "srfi-lib" and all of its
dependencies. The SRFIs in "srfi-lite-lib" depend only on "base",
and they are used relatively widely.
2013-08-27 15:19:24 -06:00
Tobias Hammer
0b1f96ab3d Add missing fender to define-cstruct
prevents internal error from libffi for
(define-cstruct _S ())
2013-08-27 10:15:25 -06:00
Jay McCarthy
a2b780abee note 2013-08-27 09:16:16 -06:00
Jay McCarthy
dc8f52dbb1 Do not send Host or Content-Length if user has 2013-08-27 09:16:16 -06:00
Jay McCarthy
41901397a7 Allow different HTTP versions 2013-08-27 09:16:16 -06:00
Jay McCarthy
fbccbd8ad3 Parse HTTP responses more generously 2013-08-27 09:16:15 -06:00
Tobias Hammer
e6886e4213 Fix missing initialization in filesystem-change-evt 2013-08-27 07:27:54 -06:00
Matthew Flatt
392a8219ae futures: fix rest-arg list creation
Also, make rest-arg list creation safe for futures (and slightly
faster in general).

Closes PR 13832
2013-08-26 20:17:52 -06:00
Matthew Flatt
44e324db12 ARM JIT: fix test for VFP
Having `__VFP_FP__` defined does not mean that VFP instructions are
available; it just means that floating-point is native-endian.

According to

 https://wiki.debian.org/ArmEabiPort

the absence of `__SOFTFP__` combined with the precense of `__VFP_FP__`
can mean VFP, though.
2013-08-25 12:54:04 -06:00
Matthew Flatt
100cc0f84e fix `{put,head}-[im]pure-port'
Connection wasn't converted to a port, and included a repeated
layer of chunk decoding.
2013-08-24 15:21:06 -06:00
Matthew Flatt
7e0d3beb67 ARM JIT: avoid direct use of __aeabi_... for software fp 2013-08-24 12:28:25 -06:00
Matthew Flatt
0b8e764e99 ARM JIT: fix soft-float `round'
Use our own implementation of round(), since the round()
function might be missing.
2013-08-24 10:39:09 -06:00
Jay McCarthy
e8bafbd9b9 Adding net/http-client and using it underneath net/url 2013-08-23 12:41:37 -06:00
Matthew Flatt
e1efd2d98f package system: change syntax of a GitHub package source to "git://..."
Besides changing the URL scheme, the tag or branch is optional and
specified as a fragment (inspired by npm). Also, any subpath is expressed
as a "path=..." query (which similarly avoids giving a different meaning
to URLs than `git' itself would). The repository name can have a ".git"
suffix.

The "github://..." format is still supported for compatibility, but
`--type github' adds "git://..." instead of "github://..." if
neither is already present (which is incompatible, since branches
and tags are handled differently for the two forms).

Closes PR 13656

(See the PR for a discussion and my rationale for this choice.)
2013-08-23 07:40:45 -06:00
Matthew Flatt
52da62a956 setup/dirs: fix "config.rktd" reader 2013-08-22 10:44:26 -06:00
Matthew Flatt
e7d300d238 raco pkg: improve package-source checking and error reporting 2013-08-22 07:58:49 -06:00
Matthew Flatt
d901504174 allow hash-table chaperones to support efficient hash-clear[!] 2013-08-22 07:50:42 -06:00
Matthew Flatt
3201f1330a raco pkg install: make --force override scope-conflict errors
It's possible that an installation will have a package X already and
a user wants to install a different X. To make it all work out,
the user may have to also install a new Y for every installation-scoped
Y that refers to X --- maybe not easy, but at least possible as
a last resort.
2013-08-20 20:53:58 -06:00
Matthew Flatt
f371032a34 protect package-source parsing against non-path strings 2013-08-20 15:48:15 -06:00
Matthew Flatt
c0af1fe4bd pkg: allow path string as `#:scope' argument 2013-08-20 15:27:33 -06:00
Matthew Flatt
ccead82841 raco pkg install: add --update-deps flag
This option makes install and update even more consistent, also
`--auto` still implies `--update-deps` only in update mode.

Make `--update-deps' consult the user in `search-ask' mode,
make it ignored in `fail' or `force' mode.
2013-08-20 15:27:33 -06:00
Matthew Flatt
21d3c168a0 support file:// URLs as package sources 2013-08-20 15:27:33 -06:00
Matthew Flatt
e02e04ff2a fix `hash-clear!' on impersonated hash tables
Closes PR 13977
2013-08-20 05:52:47 -06:00
Matthew Flatt
a4b994c3cb Revert "Revert "make user PLaneT install path use installation name instead of version""
This reverts commit de230bc1ef.

Now that path computatons are built in, and now that the sandbox allows
reading the configuration file, using the installation name doesn't
break with sandboxing.
2013-08-19 17:54:20 -06:00
Matthew Flatt
220b284175 find-collects-dir' and find-config-dir' as built-in, cache values
The computations already existed in the built-in code, so moving
the functions reduces code duplication. Caching the values will
save a little time, but mostly it will avoid sandbox interactions
with the task of locating the main "collects" and "etc" directories.
2013-08-19 17:54:20 -06:00
Matthew Flatt
31c7101ec7 raco pkg: make search-ask mode work for Windows (CRLF)
More generally, trim leading an dtrailing whitespace from answers.
2013-08-19 07:17:48 -06:00
Matthew Flatt
5efab46f5a net/win32-ssl: handle eof (connection closed by server) 2013-08-19 06:58:19 -06:00
Matthew Flatt
1b7819dcd5 Windows: disable message box from system errors
For example, disable a message box for DLL links errors.
2013-08-19 06:34:18 -06:00
Matthew Flatt
e4a4a52ea9 raco pkg install: fix problem with version-triggered updates 2013-08-18 13:38:48 -06:00
Matthew Flatt
884c0bef02 fix problem with inferred package scope
When the user-scope package database hasn't been created, a
parameter to avoid changing the database without a lock
was interfering with other scopes.
2013-08-18 13:23:58 -06:00
Matthew Flatt
d9e226824f net/win32-ssl: a native Windows SSL layer
This implementation of SSL ports is less complete than `openssl', but
it's complete enough to drive HTTPS, and so it can be used to download
a package that provides the DLLs needed for the `openssl' library.

The `net/url' library uses `net/win32-ssl' on Windows when `openssl'
is not available (due to the absence of the OpenSSL DLLs).
2013-08-18 10:57:04 -06:00
Matthew Flatt
f93f488a5a add PLT_DUMP_JIT_RANGES
This variable is intended to support machine-code tracing
experiments. To enable a dump of ranges on exit, both
define PLT_DUMP_JIT_RANGES at compile time and as an environment
variable at run time.
2013-08-17 08:42:15 -06:00
Matthew Flatt
72a4191aa9 raco pkg update: allow packages sources as replacements
When an argument to `raco pkg update` is a package source,
use it to place the currently installed package.

Also, make the set of available command-line arguments more
consistent, especially for `raco pkg install` and `raco pkg update`.

Finally, fix the `--update-deps` flag, including checking
the dependencies of each updated packages based on then update,
instead of the pre-updated package.
2013-08-17 06:03:10 -06:00
Matthew Flatt
6baf90e3be Documentation and adjustments to `clear'-related hash and set operations
Document and adjust `hash-clear!', `hash-clear', and `hash-empty?'.

Also, add `hash-copy-clear'.

The clear operations are constant-time for a non-impersonated
hash table, otherwise they always remove keys one-by-one to
trigger the impersonator's interpositions.

The `hash-clear' operation works only on immutable hash tables,
in contrast to the original implementation. The new `hash-copy-clear'
works on both immutable and mutable hash tables. The "copy"
in its name is meant to suggest a difference with `hash-clear',
even on immutable hash tables: any chaperone on the input
is not on the outpue.

Change `set-clear' to be like `hash-clear', and add
`set-copy-clear'.

(Changes are in consultation with Carl.)
2013-08-17 06:03:10 -06:00
Matthew Flatt
6fc868d5b9 raco pkg show: note when auto-installed packages are not shown
Otherwise, imagine uninstalling packages without `--auto', using `raco
pkg show' to confirm that none are left, and be surprised by a later
error about installed packages.
2013-08-16 15:25:40 -06:00
Robby Findler
27e9759bd5 add shrink-path-wrt 2013-08-16 14:07:55 -05:00
Matthew Flatt
1347073cc5 fix immutable hash tree balancing
When an existing entry in the AVL tree for an immutable hash
is replaced with a new one, the new one did not always get
the right depth, which could throw off the tree balance.
2013-08-16 11:35:40 -06:00
Matthew Flatt
6a6d60dd5f setup/dirs: add `find-user-links-file' 2013-08-16 10:24:18 -06:00
Matthew Flatt
f8a225f741 faster paths for parameter lookup
Calling a parameter function (with no arguments) can be 2-3 times
as fast as before.
2013-08-16 10:24:18 -06:00
Matthew Flatt
6035db418f pkg/lib: add `pkg-directory->module-paths' 2013-08-15 18:18:42 -06:00
Matthew Flatt
21bba8a10b package system: clients extract version-specific info from a catalog result
When a client sends a query to a package catalog, it includes a
version number in the query, and a package catalog can customize its
response to the version. That approach allows evoluation of the way
that versions are mapped to results, but it does not allow a
directory-implemented catalog to offer version-specific information.
Allowing both the server and the client to filter on the version is
even more flexible, and in particular allows a directory-implemented
catalog to include version-specific mappings.
2013-08-15 18:18:42 -06:00
Matthew Flatt
fb62686d8a raco pkg catalog-{show,copy}: add `--version' flag 2013-08-15 18:18:42 -06:00
Carl Eastlund
acc4afad6f Added raise-support-error and exn:fail:support to racket/generic.
The exn:fail:support exception is used to signal "unsupported" values for
generic methods, e.g. a vector as argument to dict-remove.  Right interface,
just the wrong kind of instance.  The exception type helps define the notion of
a "supported" method, since a method might have a fallback implementation yet
some values are not considered "supported".
2013-08-15 20:10:31 -04:00
Matthew Flatt
6b16d0b9de cm: change an "internal" error to show OS-level error 2013-08-15 06:21:19 -06:00
Matthew Flatt
d586ea4e99 pkg/path: improve use of cache in `path->pkg'
Cache exploded package paths, which cuts about half
(more than a second) of the start-up time for
`raco setup' on my machine.
2013-08-15 06:21:19 -06:00
Eli Barzilay
c069b8e51c Fix output of keys.
They need to be encoded in the same way that strings are
encoded.  (Report and fixed by Phil Roberts.)

Also added a FIXME about leftover occurrences of \U in the output.

Closes PR 13966.
2013-08-14 16:51:31 -04:00
Matthew Flatt
35608b36b4 setup/getinfo: change bootstrap mode to try bytecode
Loading "info.rkt" files always from source turns out to be
expensive (adding 1 second or so on my machine to the startup
time for `raco setup'). Change bootstrap mode to try the compiled
form and fall back to source if its doesn't work.
2013-08-13 16:05:36 -06:00
Matthew Flatt
3f8475d6a9 optimizer: certain bitwise-operation patterns always produce fixnums 2013-08-13 16:05:36 -06:00
Matthew Flatt
de322740a6 file/gzip: misc clean-up
Separate state and functions, and convert a key loop to functional
style. As it turns out, this has no significant effect on performance,
but it looks a lot better to me.
2013-08-13 16:05:36 -06:00
Matthew Flatt
1acdcf2fb9 speed up gzip by moving struct definitions
Moving the `define-structs' to the module top level
makes it easier for the JIT and cuts compression time by
about 1/3.
2013-08-13 16:05:36 -06:00
Matthew Flatt
ccb31f4153 fix name handling in `tar-gzip' 2013-08-13 16:05:36 -06:00
Matthew Flatt
b1e33773c6 increase stack safety margin for 64-bit platforms
Make the stack-safety margin twice as big for 64-bit platforms
as 32-bit platforms. That was already done for Windows, but it's
also needed for Mac OS X. Also, double-check that there's a
good amount of space on the stack before calling a foreign
function.
2013-08-12 19:42:36 -06:00
Matthew Flatt
d52ba1b5e7 fix interaction of continuations and stack overflow
There was an off-by-one error in trimming overflow
records in a captured continuation.

I provoked the crash by running the program below on Mac OS X;
resizing the frame caused a crash. It has something to do with the
`try-atomic' implementation, I think. I wasn't able to make a test
case in a half-hour of trying, however, and I'm giving up for now.

(define f (new frame% [label "deep"]))
(define b (new button%
               [parent f]
               [label "0"]))
(send f show #t)
(let loop ([n 0] [m 0])
  (if (= n 10000)
      (begin
        (send b set-label (format "~a" m))
        (for ([i 10]) (yield))
        (loop 0 (add1 m)))
      (cons 1 (loop (add1 n) m))))
2013-08-12 19:42:36 -06:00
Matthew Flatt
74e49d8499 enable JIT stack trace on arity errors
On x86_64 Linux and Win64.
2013-08-12 16:27:06 -06:00
Matthew Flatt
04454678eb remove unnecessary stack-unwind test
The test was meant to detect a bad traversal step, but it could unnecessarily
truncate the stack traversal when encountering recursive calls.
2013-08-12 16:22:18 -06:00
Matthew Flatt
8f9e6529da fix (extracted part of) libunwind for x86_64
I had mixed up EBP vs. REG_EBP, etc., in extracting the x86_64 code.
2013-08-12 15:02:24 -06:00
Matthew Flatt
2d8edeffe8 make install: drop -S' flag to strip'
It turns out that no flags are standard, so don't try to use
any. That seems to be fine on the platforms that I tried.
2013-08-12 15:02:24 -06:00
Matthew Flatt
89e99657dd raco pkg {install,update}: add a `--auto' shorthand 2013-08-12 15:02:24 -06:00
Robby Findler
680d29d9cc adjust some calls to sort: use symbol<? and use strict
predicates (to get stability)
2013-08-12 12:27:16 -05:00
Matthew Flatt
502deb3bae setup/getinfo: add `#:bootstrap?' mode
Bootstrap mode disables the use of a compiled form of "info.rkt",
in case the compiled form is broken. It also attaches `info'-language
modules from the `setup/getinfo' namespace to the "info.rkt"-loading
namespace.

Formerly, `raco setup' relied on capturing the bytecode-compilation
bootstrap context used for `raco setup' itself when loading info
files. But when `raco pkg install' used `raco setup', it didn't have
the same bootstrapping context in place, so it could get confused
(e.g., if you unlink a package from one Racket version and install it
as a link in a different Racket version). Now, both `raco setup' and
`raco pkg' use `#:bootstrap?' mode for `get-info/full'.
2013-08-12 07:09:04 -06:00
Matthew Flatt
7c638a03a0 remove some obsolete files 2013-08-12 07:07:27 -06:00
Matthew Flatt
35bff5b683 first cut at script to push PLT packages to pkg.racket-lang.org 2013-08-11 14:30:04 -06:00
Matthew Flatt
7c95c5ad38 add path<?' and symbol<?'
These comparisons are useful for sorting while avoiding the overhead
of conversions to bytes or strings.

Having `path<' reduces the cost of sorting in `directory-list'.
2013-08-11 14:30:04 -06:00
Matthew Flatt
2ba615a20e directory-list: always sort results
Consistently sorting shouldn't cost much relative to the
cost of `directory-list' (except for the path->bytes conversion?),
and it makes directory traversals (including archive packaging)
more deterministic across runs and platforms.

(Eli suggested this a long time ago.)
2013-08-11 14:30:04 -06:00
Robby Findler
13e7f2f03d try to be more accomodating to low-permission contexts
when reading the development links file
2013-08-11 06:56:16 -05:00
Matthew Flatt
58c0074a71 Add ".desktop" file support
A launcher can have a ".desktop" file (found like other files: as the
same name as the main launcher file, but with a ".desktop" suffix),
where the "Exec" and "Icon" fields are added automatically. A ".png"
or ".ico" file can be supplied for the icon (where the ".ico" file
is already used for Windows launchers).

Closes PR 13953

Fix various problems with Unix-style install from an installer.

Also, add an ugly icon for the Racket Package Manager, with the hope
that it will provoke someone to create a nicer one.
2013-08-10 12:52:17 -06:00
Robby Findler
c93debe653 fix error check in #lang info 2013-08-10 05:34:22 -05:00
Matthew Flatt
47d433b9c1 Solaris: disable places and futures by default
The issue is that gcc and the Sun linker do not cooperate
correctly to implement thread-local variables on x86_64.
Since gcc is normally configured to use the Sun linker by
default, enabling places and futures is asking for trouble.
2013-08-09 19:46:37 -06:00
Matthew Flatt
19cda0396b fix stack size of threads that implement places
... on platforms other than Mac OS X and Linux.
2013-08-09 14:26:32 -06:00
Matthew Flatt
6bb55f7d14 Solaris: various repairs
Fix threading, including SIGCHLD mask.
2013-08-09 10:49:46 -06:00
Matthew Flatt
3ca82d5df7 fix subprocess issues
Fix SIGCHLD suspension for fork()-based file locks (i.e., Solaris).

Also, fix commit ea51d32e, which broke termination of process groups
where the main process terminated before the rest of the group,
because it used sigwait() before the terminate action.
2013-08-09 07:55:14 -06:00
Matthew Flatt
d93ce089a3 fixes of OpenSolaris
Make the GC always use the mmap() block cache, since mmap() on Solaris
allocates much more than a page when a single page is requested.

Enable places and threads by default on x86 and x86_64.

Fix pthread-related compilation flags.
2013-08-09 07:55:14 -06:00
Matthew Flatt
9068341cb9 JIT: add missing check on inlined `procedure-arity-includes?'
Closes PR 13951
2013-08-08 17:57:49 -07:00
Robby Findler
a8405eb77d Adjust contract-out so it uses the provide transformer machinery properly
closes PR 13946

This is probably not the optimal way to make this change; better would
have been to refactor the existing provide/contract implementation so
it does not glom the provides all together in the first place (instead
of pulling them out afterwards). Do it this way anyways, because I
have a big pile of contract-system changes in another branch that also
changes around how provide/contract works: this way will be much
easier to rebase those changes off of.
2013-08-07 15:49:08 -05:00
Matthew Flatt
b8db5aacb3 fix bytecode-format bug
The range of values used to represent "improper lists"
of length 36 to 65 overlapped with the range of values
used to represent other things.

This bug is the new chapion of the "how did we not hit that
earlier?" category. The bug was introduced around v300, at
the latest.
2013-08-07 08:37:50 -07:00
Matthew Flatt
de230bc1ef Revert "make user PLaneT install path use installation name instead of version"
This reverts commit ac20e7fc0d.

Using the installation name name seems right, but it creates sandbox
trouble, since finding the instalation name requires several
path-chasing steps. I think the sandbox problem shoudl be fixed,
somehow, but since I don't have a good idea right now, I'm reverting
the PLaneT change.
2013-08-04 10:35:30 -06:00
Matthew Flatt
c67fd14ae8 remove prohibition on handle-evt?' arguments to wrap-evt', etc.
The intent of disallowing `handle-evt?' arguments to `wrap-evt',
`handle-evt', and `chaperone-evt' was that those extra wrappers
break the tail-handling behavior that is almost certainly intended
when `handle-evt' is used. The extra checking was not obviously
worthwhile (we don't have any checked "this procedure should be called
in tail position" annotations, after all), and pushing the distinction
through Typed Racket looked particularly inconvenient.

Dropping the constraint is trivial if we say that wrapping a
`handle-evt' result disables the tail invocation of the handler
procedure.
2013-08-04 10:35:30 -06:00
Ryan Culpepper
4bc24a1117 added nearest below & above to find-seconds error message
Closes PR 13945
2013-08-03 18:20:46 -04:00
Ryan Culpepper
7d2c1c0790 fix exprs field for raise-syntax-error* 2013-08-03 18:20:33 -04:00
Matthew Flatt
df30e9c148 add missing lock acquire 2013-08-03 13:56:18 -06:00
Matthew Flatt
5e0b87a0cd raco pkg {install,remove}: promotion from & demotion to auto-installed
When you `raco pkg install' a package that is already present as
an auto-installed package, the installation is promoted to
an explicitly installed package.

When you `raco pkg remove --demote' a package, then it is changed
from an explicitly installed package to an auto-installed package.
Combine `--demote' with `--auto' to remove a package only
if there are no dependencies, leaving it auto-installed otherwise.

The defaults (promote in the case of `install', not demote in the case
of `remove') are different because it seems more likely that you
really mean to remove a package when using `pkg remove', while it
seems likely that you just want to start using a package that happened
to be auto-installed already for `pkg install'.

Also, make the package scope inferred for `raco pkg' commands
that take a list of package names, and fix up lock handling and
error reporting.
2013-08-03 12:18:46 -06:00
Matthew Flatt
ac20e7fc0d make user PLaneT install path use installation name instead of version 2013-08-02 11:19:33 -06:00
Matthew Flatt
d63b49ccbb `raco pkg' repair 2013-08-02 11:19:33 -06:00
Matthew Flatt
8eefa2126b add `current-library-collection-links' parameter
Also, the initial value causes `curent-library-collection-paths'
before collection links files, instead of after.
2013-08-02 08:24:15 -06:00
Ryan Culpepper
e0f3876e8c indent multi-line details, export more helpers 2013-08-01 19:11:28 -04:00
Ryan Culpepper
94c5e5e250 rename raise-misc-error to error* 2013-08-01 19:11:28 -04:00
Ryan Culpepper
30d6863e44 moved raise-syntax-error* to unstable/error 2013-08-01 19:11:28 -04:00
Ryan Culpepper
ed5b0afbac syntax/parse: reformat, add more info to errors 2013-08-01 19:11:28 -04:00
Ryan Culpepper
e20b5a1539 fix multi/maybe detail handling, allow missing who argument 2013-08-01 19:11:28 -04:00
Ryan Culpepper
7b113899d4 syntax/parse: removed unused exn info 2013-08-01 19:11:28 -04:00
Matthew Flatt
1b98359925 raco pkg install: use `--link' by default for directory sources
The new `--copy' flag provides the old behavior.
2013-08-01 07:01:20 -06:00
Matthew Flatt
a6f8f00f55 fix cross-phase-persistent attribute of primitive modules 2013-08-01 05:55:24 -06:00
Matthew Flatt
e5e6d097be ffi/unsafe/objc: fix selector definition lifting
The code intended to lift each selector only once (per lifting
context) was broken.
2013-07-31 17:28:56 -06:00
Matthew Flatt
c137b44a68 change `syntax-local-lift-context' to distinguish top-level environments
Although not documented as such, the implementation used to return
form did not take the special meaning of #f into account. It seems
better to fix `syntax-local-lift-context' to match its documentation.
2013-07-31 17:28:56 -06:00
Ryan Culpepper
f5b91941eb fixed hash-code for id-tables
Closes PR 13942.
2013-07-31 17:37:42 -04:00
Ryan Culpepper
2057b51f21 syntax/parse: add "expected more terms" message
Only for proper list patterns; otherwise, "more terms" might be
mischaracterization.
2013-07-31 17:37:15 -04:00
Matthew Flatt
7e3ee7105a fix `raco link -l'
Closes PR 13941
2013-07-31 12:09:59 -06:00
Matthew Flatt
895b8d2760 configure: fix `--enable-portable-binary' addition 2013-07-29 10:58:16 -06:00
Carl Eastlund
b192620b0d Restored behavior of set/c for flat contracts; #:kind defaults to 'immutable. 2013-07-28 23:52:27 -04:00
Matthew Flatt
df34ffe450 configure: pass `--enable-portable-binary' to libffi configure
The `--enable-portable-binary' flag disables optimizations specific
to the build machine's processor that may ne unportable to other
machines.

This also fixes a problem where a VirtualBox runs on an x86_64 machine
with AVX support, and so `congure' enables AVX operations, but AVX
doesn't work within a virtual machine.
2013-07-28 11:46:10 -06:00
Carl Eastlund
1c7cdfb302 Fixed a few bugs in set/c's keyword options, and one test for set/c.
Specifically, set/c no longer behaves as a flat contract, so it is necessary to
apply at least one set operation to detect a contract error on an element.  It
is possible the flat behavior can be restored for some kinds of sets, but it's
not immediately obvious what kinds those should be.  (Immutable hash sets in
particular?  Any sets that don't implement set-add! or set-remove!?)
2013-07-27 13:17:53 -04:00
Matthew Flatt
2ec49929a4 raco setup: print "summary of errors" before the summary of errors 2013-07-26 22:36:21 -06:00
Matthew Flatt
81079b3a02 Windows installer: offer to auto-launch DrRacket
The 'start-menu? aux key for launcher creation changed to 'start-menu,
with a real-number value indicating a request and precedence for
auto-launching (where a precedence is needed because only one application
can be auto-launched).
2013-07-26 22:36:21 -06:00
Matthew Flatt
67c33fb13d adjust startup to avoid config file if collection links are disabled
The intent of this change is to avoid trying to read a configuration
file from a stand-alone executable.
2013-07-26 22:36:21 -06:00
Matthew Flatt
2e067ab28c add build-stamp' configuration and fix repo-time-stamp/stamp'
The "repo-time-stamp" collection used to be omitted from a
release, but to keep things simpler, it's staying in the
"drracket" (and therefore "main-distribution") package. The
build process installs an empty `build-stamp' value (by default)
into a release build, or it installs a useful stamp for
a non-release build.
2013-07-26 22:36:21 -06:00
Robby Findler
6195c432f8 Add use of 'sub-range-binders properties for Check Syntax's benefit 2013-07-26 19:05:46 -05:00
Matthew Flatt
d94a4cd830 add migration panel to GUI package manager
Also add "gui-pkg-manager" packages, including a "Racket Package Manager"
GUI application (that needs a better icon).

The package that supplies "Racket Package Manager" is not in the main
distribution, since DrRacket already includes the GUI package manager.
2013-07-26 14:07:05 -06:00
Matthew Flatt
e776821e31 add `raco pkg migrate' 2013-07-26 13:18:06 -06:00
Matthew Flatt
9f14fe3f6d make installation name configurable via `raco pkg config' 2013-07-26 11:52:48 -06:00
Matthew Flatt
68f4d297f7 make a build via the top-level makefile set scope to `installation'
Also, set the installation name to "development".
2013-07-26 11:52:48 -06:00
Matthew Flatt
afe8c37a2a user paths depend on name (not always version); no `shared' pkg scope
An installation has a name (via the configuration file "config.rktd")
that defaults to the version string. The name, instead of the
Racket version, is used for forming the path to the user "collects"
directory, user packages, and so on. The `user' package scope is
thus user- and installation-name-specific (instead of user- and
version-specific).

Remove `shared' package and link scope, since the notion of
installation names generalizes the concept (a set of installations
can be given the same name) and fits it into `user' scope.
2013-07-26 11:52:47 -06:00
Matthew Flatt
e0bab441a8 fix `get-output-{bytes,string}' with bad starting index, no ending index
Closes PR 13933
2013-07-25 20:39:57 -06:00
Carl Eastlund
2f473c2403 Added tools for contracts, impersonators, and chaperones for generic interfaces.
Added four macros to racket/generic:
- chaperone-generics
- impersonate-generics
- redirect-generics (dynamically chooses between the above two)
- generic-instance/c
All take pairs of method names and wrappers (procedures or contracts),
and turn those into appropriate chaperone, impersonator, or contract wrappers
on the method tables of the given structs.

Used this to rewrite set/c to give better error messages.
2013-07-25 13:49:00 -04:00
Carl Eastlund
6b337efd2f Changed "generics group" to "generic interface" in errors and documentation. 2013-07-25 13:49:00 -04:00
Carl Eastlund
a651591a15 Added gen:set, mutable and weak sets, and custom set types.
Sets are now implemented as a generic interface, and lists count as sets.  Most
of the set functions have been added as methods, including mutable versions of
imperative update methods.
2013-07-25 13:49:00 -04:00
Carl Eastlund
da1fe888a7 Added dict-copy operation; renamed dict-supports(?|/c) to dict-implements(?|/c).
Similar to hash-copy or string-copy, dict-copy creates a new, mutable copy of
the given dictionary.  Added as a method of gen:dict.
2013-07-25 13:48:59 -04:00
Carl Eastlund
5c1728dce4 Added define-custom-hash-types and make-custom-hash-types.
The definition form and function consume an equality predicate and optional hash
code functions and key predicate, and produce predicates and constructor
functions for hash table-based dictionaries using the given equality and hash
functions.  Immutable, mutable, and weak dictionaries are defined.
2013-07-25 13:48:59 -04:00
Carl Eastlund
81bcd73aa7 Extended the gen:dict interface; also added some dict and hash operations.
- Added hash-empty?, hash-clear, and hash-clear! for hash tables.
- Added dict-empty?, dict-clear, and dict-clear! for dictionaries.
- Made all dict functions exported by racket/dict into generic methods; turned
  the existing implementations into fallbacks.
2013-07-25 13:48:59 -04:00
Carl Eastlund
97b78ace5b Added #:dispatch option for clauses in #:defaults and #:fast-defaults.
The #:dispatch option specifies a second, less strict predicate for a #:defaults
or #:fast-defaults clause.  The main predicate is still used for the generics
group's type predicate, but the dispatch predicate is used in choosing which
method implementation to use.  The #:dispatch option is useful when the dispatch
predicate is disjoint from all other instances, is significantly cheaper to run
than the main predicate, and the full checks can be meaningfully deferred in
method implementations.

Specifically, this is useful in the implementation of iteration for
association-list dictionaries.  The dict-iterate-{next,key,value} functions do
not need to test (andmap pair? dict) if the given dict is eq? to the one stored
in the given iterator.  The dispatch predicate, list?, is much cheaper.
2013-07-25 13:48:59 -04:00
Carl Eastlund
d9890b843a Changes to define-generics: added #:defined-predicate; improved generated code.
The #:defined-predicate option is like #:defined-table, but it defines a
two-argument predicate that only processes the requested method name and doesn't
allocate a hash table each time it is called.

Method implementations provided via #:fallbacks, #:defaults, and #:fast-defaults
are now called directly by method procedures rather than stored in a vector and
extracted by index.  This should hopefully improve inlining for methods.
2013-07-25 13:48:59 -04:00
Carl Eastlund
1f267d479c Added #:fast-defaults option to define-generics.
For datatypes that are disjoint with structs that might implement the generic,
this adds a "fast path" implementation that doesn't need to test for struct
properties.
2013-07-25 13:48:59 -04:00
Carl Eastlund
7deb4ad025 Separated prop:dict from gen:dict.
This work is in preparation for widening the interface of gen:dict with
operations like dict-for-each, dict-update, etc., each with a fallback
implementation.  The property prop:dict, with its documented, fixed-length
vector representation, cannot be extended, whereas a generic with optional
methods can be.
2013-07-25 13:48:58 -04:00
Carl Eastlund
f7f15e1113 Added a #:derive-property option to define-generics.
The define-generics form can now derive existing struct properties, so that any
instance of the new generics group is also an instance of the struct property.
2013-07-25 13:48:58 -04:00
Matthew Flatt
a5d724dda4 file/tar: limit pipe size between tar and gzip
Otherwise, tar is likely to get ahead of gzip and use much
more memory.
2013-07-25 10:11:05 -06:00
Matthew Flatt
aeb3372faf more safe-dereference repairs for DWARF native stack trace (on ARM) 2013-07-23 20:38:23 -06:00
Matthew Flatt
a31e9b29e0 no dprintf() macro in libunwind to avoid collisions on some platforms 2013-07-23 19:59:00 -06:00
Matthew Flatt
245a688c2e fix for inotify() use with places and futures disabled 2013-07-23 19:46:10 -06:00
Matthew Flatt
9f0c5b1487 fix x86_64 DWARF-based stack trace
Commit 5917d4c added a guard on some pointer dereferences, but
the guard is too strict for DWARF. Allow reading of TEXT segments,
etc.
2013-07-23 17:20:20 -06:00
Matthew Flatt
cba5bb7729 distro-build: allow missing "man" directory (for Windows) 2013-07-22 21:15:41 -06:00
Carl Eastlund
59ee9a227e Improved the error messages from generic interface contracts.
Previously, a failure during the first-order checks would print out the name of
the full contract for all the methods, while describing the value for just one
method.  This is both misleading, and incredibly verbose.  The new version
prints out just the relevant contract.
2013-07-22 22:24:18 -04:00
Matthew Flatt
0eb29a4dcf fix `raco setup' package-dependency check when PLaneT package is installed 2013-07-22 18:32:40 -06:00
Matthew Flatt
5457f72391 show package for each module in documentation
The package is normally determined automatcially, but
the `defmodule' form also supports a `#:packages' option.
2013-07-22 18:32:39 -06:00
Matthew Flatt
f85221afca adjust ".plt" S-expression matching to accept more old archives 2013-07-22 16:34:21 -06:00
Matthew Flatt
682916c8fe raco pkg show: include only non-auto by default 2013-07-22 16:20:14 -06:00
Matthew Flatt
92f2d7d386 remove bogus cross-phase-persistent declaration
Also fix and improve source-location reporting.
2013-07-22 15:31:18 -06:00
Matthew Flatt
3e53fd3a93 create "man1" directory before trying to put a man page there 2013-07-22 14:22:26 -06:00
Matthew Flatt
d7d1739d4f configure installation of man pages 2013-07-22 13:21:09 -06:00
Matthew Flatt
2247ce6266 Make `syntax-procedure-{alias,converted-arguments}-property' cross-phase 2013-07-22 12:51:38 -06:00
Matthew Flatt
9f4420b07a allow gensym' and string->uninterned-symbol' in cross-phase persistent 2013-07-22 12:51:37 -06:00
Matthew Flatt
9e2cf2ab37 add `#%declare', require declaration of cross-phase persistent modules 2013-07-22 12:51:37 -06:00
Robby Findler
7b01d2920a fix spacing in contract error message 2013-07-22 10:42:47 -05:00
Matthew Flatt
df891791b4 avoid a compiler warning 2013-07-21 21:57:25 -06:00
Matthew Flatt
a5f26013ab place: fix finalizaiton of place channels stuck in a GC'ed channel
Lack of ordering on finalization requires some care for explicit
clean-up actions in a finalizer.
2013-07-21 16:35:56 -06:00
Matthew Flatt
a0741c5ea7 JIT repair for `(/ (most-negative-fixnum) -1)'
When I added JIT-inling of '/' for fixnums, I somehow forgot to
handle the special case that is already handled for `quotient'.
2013-07-21 09:59:08 -06:00
Matthew Flatt
22dbcaa77f fix arithmetic-shift' with shifts close to (- (expt 2 31))' on 64-bit
The bug was caused by an accidental cast of a 64-bit integer to a
32-bit integer.

Closes PR 13923
2013-07-21 08:03:53 -06:00
Matthew Flatt
82c4e56631 distro-build: change `#:source?' config to mean source packages, too
Use `#:source-runtime?' to make only the run-time system have
source form, while packages are pre-built.
2013-07-20 13:39:33 -06:00
Matthew Flatt
c1ca89d674 raco setup install: add --source' and --binary' modes
These flags allow a package downloaded in "built" form to be
stripped to source or binary form, which allows a single catalog
to serve three kinds of installations.
2013-07-20 11:54:21 -06:00
Matthew Flatt
ddcabcd164 fix "etc" vs. "config" in `make install' step 2013-07-20 10:21:53 -06:00
Matthew Flatt
aecf0e60b5 add catalog, source, and Mac OS X instructions to basic README
Also, include "stamp.txt" and "collects.tgz" at a build site.
2013-07-20 10:17:14 -06:00
Tobias Hammer
8a52f8ace5 Add ffi array-type and in-array 2013-07-20 07:18:19 -06:00
Matthew Flatt
4d75690aff explicit flush after output intended to report progress 2013-07-20 07:14:18 -06:00
Matthew Flatt
e7b0e4ffab fix problems with "collects" path and GUI executables 2013-07-19 13:17:40 -06:00
Matthew Flatt
8820ae91a6 distro-build: add support for source installers 2013-07-19 11:52:03 -06:00
Matthew Flatt
67a9889ef7 add "share", move "collects" back out of "lib", move "pkgs"
The "share" directory holds platform-independent files, while
"lib" holds platform-specific files.

In principle, the "collects" directory belongs in "share",
as does "doc". Those directories are put into "share"
by a Unix-style install, but left at top level for an
in-place install.

Packages in installation scope are put in "share" instead
of "lib", and the top-level Makefile puts development links
in "share/devel-pkgs".

The `configure' script now supports `--docdir' and `--collectsdir'.

Changed the version to 5.90.0.1.
2013-07-19 11:52:02 -06:00
Matthew Flatt
0736e62a49 fix `raco exe' 2013-07-19 08:45:43 -06:00
Matthew Flatt
8013f2e815 move `planet/resolver' back to core
In consultation with Sam, partially reverts efba034e01. The default
module name resolver uses `planet/resolver' for the build-in
`(planet ....)' form. The `raco planet' command is still in
"planet-lib", though.
2013-07-18 19:53:27 -06:00
Matthew Flatt
2fafbc4b79 adjust the places <-> distributed-places connection
Instead of a dynamic-require, the connection goes through a
structure-type property on a `remote-note%' instance.
2013-07-18 17:22:24 -06:00
Matthew Flatt
937588f552 count ".scrbl" files as modules within a package
The set of relevant extensions should be made extensible, eventually.
2013-07-18 15:19:32 -06:00
Sam Tobin-Hochstadt
deb0a8c26e Move distributed places to their own package. 2013-07-18 15:21:21 -04:00
Sam Tobin-Hochstadt
efba034e01 Move most of the planet collection to 'planet-lib'. 2013-07-18 15:21:12 -04:00
Matthew Flatt
2616b025df raco pkg update: setup collections of dependent packages
If package Y depends on package X, and package X is updated,
then include the collections of Y in the set passed to
`raco setup'.
2013-07-18 11:46:51 -06:00
Matthew Flatt
7a8b2e333b find-relevant-directories: fix 'no-user mode 2013-07-17 18:32:22 -06:00
Matthew Flatt
8f195a1ff6 change release-notes' "info.rkt" field to release-note-files'
The change avoids a collision with PLaneT fields.

Also, add checking for the form of a `release-note-files' value.
2013-07-17 18:32:22 -06:00
Matthew Flatt
4500c7c4d5 path->collects-path: repair for single-collection packages
Added an optional `#:cache' argument that is propagated to
`path->pkg', if necessary.
2013-07-17 14:31:41 -06:00
Matthew Flatt
d50d0f8bca enable compilation of tests formerly in "racket-test"; reorganize
A package like "gui" does not depend on a package like "gui-test",
which means that you have to specifically ask for a test package if
you want the tests. A new "main-distribution-test" package
aggregates the tests for packages that are in "main-distribution".

The "plt-services" package, meanwhile, depends on the
"main-distribution-test" package, which means that all tests are
compiled by default for an in-place build.
2013-07-16 18:45:05 -06:00
Matthew Flatt
e59f888310 GC clean-ups related to disabled collections and place-shared space
The changes make shared-space allocation work in GC-stress mode
(forcing "master" GCs, just like other GCs).
2013-07-16 11:03:40 -06:00
Robby Findler
05ce59c54e fix bug in ->
Specifically, in the case when the arrow is of the shape
(-> any/c ... any), then the predicate didn't ensure that
there were no mandatory keywords in the given function
2013-07-16 10:52:01 -05:00
Matthew Flatt
c88dc8efc8 configure: fix a CC vs. CC_FOR_BUILD mismatch 2013-07-16 06:07:42 -06:00
Matthew Flatt
691a6303eb use CONFIGURE_ARGS_qq' in reconfigure' 2013-07-15 19:22:27 -06:00
Matthew Flatt
9aee8b53d9 use `filesystem-change-evt' for collection paths only if low-latency
Specifically, this change disables the use of inotify() for detecting
changes to collection-links files, because the latency is too large
on some (many?) Linux configurations. (The fallback is to detect changes
to a links file by reading the whole content every time.)
2013-07-15 08:58:39 -06:00
Matthew Flatt
df79198e6e add 'fs-change mode to `system-type'
Report whether `filesyste-change-evt' is supported, works
at the granularity of files, etc.
2013-07-15 08:58:39 -06:00
Matthew Flatt
b3715ba36e filesystem-notify-evt: change inotify() implementation
Create a single inotify() connection per place, which should reduce
the latency of operations on filesystem change events and make
them generally scale better on Linux.

Internally, add a filesystem-never-changes mode, which could be useful
for platforms with fixed filesystems, but it's also for experiments in
checking the cost of filesystem change events.
2013-07-15 07:07:27 -06:00
Matthew Flatt
5aab8a0137 disable inotify()-based `filesystem-change-evt'
... until we can track down latency problems with the use of
inotify().
2013-07-14 07:54:57 -06:00
Matthew Flatt
44afa3cb66 raco setup: track document dependencies based on SHA1s
Use SHA1s instead of timestamps for detecting dependency changes,
which works with pre-built documentation. (The problem with
timestamps didn't come up before because dependency checking was
broken.)
2013-07-13 08:58:21 -06:00
Matthew Flatt
59170d4caf x86_64 native stack traces: protect some pointer dereferenecs
Guard dereferences of DWARF information to avoid crashing when
the information is wrong or misinterpreted.
2013-07-12 14:52:43 -06:00
Matthew Flatt
e8e482acaa improve `raco pkg' text 2013-07-12 14:52:43 -06:00
Matthew Flatt
8a9d885774 shuffle some unstable modules and fix doc dependencies
Includes a repair for mapping a collection name to a set of
linked paths.
2013-07-12 14:52:43 -06:00
Matthew Flatt
79abd1f629 clean up deregistration of VNODE watches via kqueue()
The shotgun approach generates errors/warnings.
2013-07-12 14:52:42 -06:00
Matthew Flatt
d5558a4fe0 raco setup and scribble: fix problems tracking document changes
Some non-transparent but serializable data structures broke
the comparison between previous and new outputs, which caused
too many document rebuilds.

Includes a change to make module path indexes work with `equal?'.
2013-07-12 14:52:42 -06:00
Matthew Flatt
98ec60242a raco setup: check package build dependencies for documentation
The check uses the cross-reference database that is created
by building documentation.
2013-07-12 14:52:41 -06:00
Matthew Flatt
b9fd9ad78c installers site: include documentation of built packages 2013-07-11 10:26:03 -06:00
Matthew Flatt
75cb619866 raco setup: fix problem with info-domain clean-up 2013-07-11 10:26:03 -06:00
Robby Findler
ad86a72143 fix stronger for ->* when there are #:pre and #:post conditions specified 2013-07-11 06:25:10 -05:00
Carl Eastlund
704857bbfe Fixed bugs related to define/generic and to define-generics at top-level.
Added tests using define/generic in both #:defaults and #:fallbacks, both inside
modules and at the top level.  Changed the implementation of define-generics so
that defaults and fallbacks come after method definitions so that define/generic
works properly.  Changed internal names to be created with format-id and
syntax-local-introduce rather than generate-temporaries so that they work at the
top level.
2013-07-10 16:10:44 -04:00
Matthew Flatt
30a1c3565d fix "collects" path setup in 3m build 2013-07-10 13:41:06 -06:00
Matthew Flatt
da3ac6159d raco setup: exit with error status on failed pkg dependency check
Also, clean up printing of check errors to prefix each line with
`raco setup' (like everything else).
2013-07-10 13:19:13 -06:00
Matthew Flatt
32b0064b56 Don't install "libracket3m.a" by default
Configure with `--enable-libs' to install the library.
2013-07-10 13:09:41 -06:00
Matthew Flatt
4a45d5faa0 look for default preferences file in the configuration directory
... instead of a "defaults" collection.
2013-07-10 12:57:02 -06:00
Matthew Flatt
39dd0bb3be fix `syntax/boundmap', too
Related to PR 13911
2013-07-10 12:57:02 -06:00
Matthew Flatt
2a4f32d853 remove core dependency on `mzlib/restart' 2013-07-10 12:57:02 -06:00
Matthew Flatt
8d3c09b38b move compile-file' to compiler/compile-file'
The `mzlib/compile' module re-exports the moved function.

Also, fix `make-directory*' so that it never fails on an existing
directory. Remove `unstable/file', since it was just the same
clean-up of `make-directory*'.
2013-07-10 12:57:02 -06:00
Matthew Flatt
72c9162989 move mzscheme' and mzlib/unit200' from core to "compatibility-lib"
Also, move `mzlib/sandbox' to "compatibility-lib".
2013-07-10 12:57:02 -06:00
Matthew Flatt
a6e25f0bae file/gzip: remove use of `unit200'
The unit was just there to create an instantiable local definition
context. In modern Racket, a function body does the same job.
2013-07-10 12:57:02 -06:00
Matthew Flatt
85899c7236 ".plt" unpacking: require literal S-expression pattern
A literal S-expression is required instead of an S-expression that
is evaluated. Any ".plt" file created in the normal way will still
work.
2013-07-10 12:56:22 -06:00
Carl Eastlund
c6532131a0 Added a #:fallbacks option to define-generics.
The #:fallbacks option specifies a set of method definitions.  Each definition
is used for any value that does not support the specific method.  Like
allows define/generic and absent method definitions.  If neither a specific
implementation or the #:fallbacks clause defines a given method, the normal
runtime error is raised.  The #:defined-table option reports whether a value's
specific implementation supports a method; the presence of a #:fallbacks
implementation for a method does not change this result.
2013-07-10 12:56:16 -04:00
Carl Eastlund
7ab8aca79b Adapted define-generics so that "defaults" work like #:methods implementations.
Specifically, implementations for the #:defaults keyword in define-generics can
now use define/generic to get at the generic implementation of a method for
which a specific implementation is defined locally.  Also, unimplemented methods
are handled properly now in #:defaults.  Previously, an unimplemented method in
a #:defaults specification would go into an infinite loop if applied, because
the implementation for the specific type wound up referring to the generic
implementation of the method.

A lot of the back-end implementation of generics changes in this commit:

- The new module racket/private/generic-methods provides a uniform mechanism for
  defining method tables and recording static information about generics
  groups.  Both #:methods in [define-]struct and #:defaults in define-generics
  use this framework now.  In addition, generics based on existing properties
  such as gen:stream, gen:equal+hash, and gen:custom-write now use the struct
  from this module to store the names associated with the generics groups.

- Generic methods now expand directly into functions with the appropriate arity,
  and refer directly to the appropriate argument to perform generic method
  dispatch.  The previous implementation used procedure-reduce-keyword-arity to
  restrict the arity dynamically, and used list-ref to find the generic
  argument.

- Some error messages have changed slightly; hopefully for the better, but this
  change did require some changes to tests for specific error messages.
2013-07-10 12:56:16 -04:00
Carl Eastlund
6e01d1d9a3 Separated generic contracts from define-primitive-generics.
Now the primitive generics form just defines generics with their properties and
methods, and the surface-level form calls the contract definition form
directly.  This means the primitive generics form now requires an explicit name
for a struct property accessor, so that the same name can be used for the
contract.
2013-07-10 12:56:15 -04:00
Carl Eastlund
00ccb5850b Renamed private version of define-generics to define-primitive-generics. 2013-07-10 12:56:15 -04:00
Carl Eastlund
8c00abbf48 Removed #:prop-defined-already? option from private define-generics macro.
In the few cases that used this option, the only definition needed from the
private define-generics macro was gen:<name>.  This is easy to define directly
without using the macro, so I have changed the code to do so and avoid redundant
definitions of methods.
2013-07-10 12:56:15 -04:00
Carl Eastlund
c5760b5ed1 Keyword arguments to define-generics can be in any order, before/after methods. 2013-07-10 12:56:15 -04:00
Matthew Flatt
5c80084f68 change `find-relative-directories' to normalize completed paths
Avoids problems with clients (like the Scribble part of `raco setup')
that compare paths.
2013-07-10 07:10:39 -06:00
Matthew Flatt
fe98a80c22 add `identifier-bindig-symbol'; fix free-id-table for renames
The implement of `free-id-table' uses `identifier-binding'
to decide on a symbolic name as a key for each identifier,
but `identifier-binding' doesn't provide enough information
for local and top-level bindings. The new `identifier-binding-symbol'
function provides that information.

Closes PR 13911
2013-07-10 07:10:39 -06:00
Vincent St-Amour
a41bbd78b5 Document contract-continuation-mark-key. 2013-07-09 18:26:39 -04:00
Matthew Flatt
9b3bb96648 raco setup: move `-K' flag to intended meaning 2013-07-09 10:23:40 -06:00
Matthew Flatt
fbdff066b8 prune absolute paths from "info-cache.rktd" files
They're now stored as relative (if possible), instead of always
as absolute. When transitioning from old paths to new paths,
the old ones need to be purged explicitly.
2013-07-09 10:23:09 -06:00
Matthew Flatt
9cc50dc914 Makefile: make PKGS' not sticky by default, add again' target
More generally, `LINK_MODE' controls how the `PKGS' value is saved
or restored: "--save" saves the value (the default), "--restore"
uses a previously saved value (if any), and "" disables saving or
restoring.

The `again' target recurs to `in-place' with `LINK_MODE=--restore'.
2013-07-08 20:11:26 -06:00
Matthew Flatt
267ba4c72b fix some absolute paths in an in-place build 2013-07-08 20:01:05 -06:00
Ryan Culpepper
1275ed70de split out db pkgs 2013-07-08 17:38:32 -04:00
Matthew Flatt
f87981f960 misc changes to avoid absolute paths in bytecode files
In many cases, `path->collects-relative' is used instead of
`path->main-collects-relative' to generalize existing support
for collection-relative paths.
2013-07-08 12:24:17 -06:00
Matthew Flatt
47f2742575 pkg/path: add `path->pkg+subpath+collect'
I was going to use this extension to implement `path->module-path',
but it turns out that `path->module-path' already exists and in
a form that works with packages. Still, this extension might be
useful in the future.
2013-07-08 12:24:16 -06:00
Matthew Flatt
36f7b7051e drop non-relative paths in procedure source locations
A path that is not relative to the enclosing file can show up
due to cross-module inlining. Package-based modules do not have
a good relative path to "collects", which creates trouble for
distributing compiled modules where, say, `map' was inlined.

It might be possible to keep the path in module-path-index form
so that a path can be constructed appropriately at run time, but
it's much simpler to just punt on function source locations in
this relatively rare case.
2013-07-08 12:24:16 -06:00
Matthew Flatt
eb8fc26c59 fix bug and test for `path->relative-string/library' 2013-07-07 11:58:35 -06:00
Matthew Flatt
e3c27b2737 fix `call-with-default-reading-parameterization'
The `read-accept-compiled' parameter is supposed to be #f.
2013-07-07 11:51:25 -06:00
Matthew Flatt
1a0312acc0 Package-database reading and related library improvements
The main result is that `path->selative-string/library' now generates
"<pkg>/..." strings.

To make that possible, minimal support for reading the
installed-package database moved to a new `pkg/path' library.

To make that possible and avoid poetntial problems from concurrent
reading and writing of the database file, `racket/file' now provides
`call-with-atomic-output-file', which implements the write-and-move
dance that CM uses for compiled bytcode (i.e., `with-compile-output').
The new function is used to write links and installed-package files.

Finally, `racket/base' provides the new function
`call-with-default-reading-parameterization', which is used to guard
various file `read's to make them consistent and avoid security holes.
2013-07-07 11:26:40 -06:00
Matthew Flatt
7ef5048961 `filesystem-change-evt' and use repairs 2013-07-07 08:12:43 -06:00
Matthew Flatt
22ab892143 minor Makefile and C fixes 2013-07-07 06:42:00 -06:00
Matthew Flatt
b8e20f5a3e use `filesystem-change-evt' and static roots to speed library search
Use `filesystem-change-evt' (where supported) to detect changes to
collection link files.

Add "static root" as a new kind of collection root directory in links
files. A static root directory is assumed to not change (in terms of
its collection subdirectories) as long as the links file itself does
not change.

Propagate the notion of static roots through `raco link' and `raco pkg
install'.

Change the `pkg-links' makefile target to install static links
instead of plain links.

The result of all of these changes is to cut 25%-33% of the
time for `racket -l racket', bringing it back in line with
the pre-package-reorganization time.
2013-07-07 06:42:00 -06:00
Matthew Flatt
3b0566ea0a add `filesystem-change-evt'
The `filesystem-change-evt' function takes a path to a file
or directory and returns an event that becomes ready when
the file or directory changes (conservatively, so false
positives are possible).

These events are supported on Linux, Mac OS X and other BSD
variants with kqueue(), and Windows.
2013-07-07 06:41:59 -06:00
Robby Findler
8f539d994b adjust the collection sorting that 'raco setup' so that it works
in our new pkgs world (and has a, hopefully, similar effect)
2013-07-06 11:43:53 -05:00
Matthew Flatt
4266e606e3 fix GC bug
This is a variant of the bug fixed in
49fbca5b18,
where a GC-notification callback still
could cause problems in a GC during a finalization
callback.

(Bug found by running tests in GC-stress mode.)
2013-07-06 07:21:46 -06:00
Matthew Flatt
e3eed89b1d fix GC bug in FFI
A foreign procedure's data could get GCed before the procedure
was called, if the procedure is not otherwise reachable.

(Bug found by running tests in GC-stress mode.)
2013-07-06 07:19:42 -06:00
Eli Barzilay
8d55b892ec Further explain silent acceptance of unencoded characters.
Also highlight the two tests that use that.
2013-07-05 20:20:49 -04:00
Matthew Flatt
8be8057ff7 raco setup: just core "racket" for initial sequential build 2013-07-05 17:41:06 -06:00
Eli Barzilay
f90fe4c598 Get rid of the `#:function' keyword.
These problems are always dealt with via an internal function instead of
making the name argument part of the visible API.
2013-07-05 18:16:51 -04:00
Eli Barzilay
210c71d91c Simplify decoding code into one `cond'.
(It's likely to get written in some better way, for example, avoid the
extra work for simple strings.)
2013-07-05 18:16:51 -04:00
Matthew Flatt
2f637741e2 switch makefile's parallelism control to `JOB_OPTIONS'
Avoid potential collision with `PLT_SETUP_OPTIONS' as an environment
variable.
2013-07-05 12:09:09 -06:00
Matthew Flatt
a8ed2b1546 Add -j'/--jobs' <n> argument to `raco pkg install', etc.
Also, thread `PLT_SETUP_OPTIONS' though server and client build
(so that a `#:j' configuration works as intended).
2013-07-05 11:33:57 -06:00
Sam Tobin-Hochstadt
a4e529a816 Fix wide-character decoding in URLs. 2013-07-05 11:46:56 -04:00
Matthew Flatt
f98c56f722 fix exception handler inside links-reading code 2013-07-05 08:30:01 -06:00
Matthew Flatt
6a78219d5d fix some clang warnings
The "if (pi->unwind_info);" change might be a bug fix.
2013-07-05 08:30:00 -06:00
Matthew Flatt
5c14def43f pkg/strip: allow any info library path 2013-07-05 08:30:00 -06:00
Matthew Flatt
fb052532c0 make in-place: keep non-default `PKGS' value in "racket/etc/link-pkgs.rktd"
This change makes a `PKGS=...' setting sticky for an in-place build via
`make', `make in-place', `make pkg-links', etc.
2013-07-05 08:30:00 -06:00
Sam Tobin-Hochstadt
0e7f6e3ddd Move shared implementation file to .rktl. 2013-07-04 16:46:32 -04:00
Sam Tobin-Hochstadt
8ecb5a431e Remove unneeded info files. 2013-07-04 16:46:32 -04:00