Commit Graph

37906 Commits

Author SHA1 Message Date
Matthew Flatt
f43234e1cb add prop:authentic and (struct .... #:authentic ....)
An authentic structure type is one whose instances cannot be
impersonated or chaperoned. The intended use of `prop:authentic` is to
annotate a library-private data structure where impersonators are
never needed internally for the data structure, and the declaration
lets the compiler produce less code and fewer branches by omitting
impersonator support.
2017-05-12 12:40:57 -06:00
Robby Findler
65beb4de4c fix cons/dc's predicate 2017-05-12 11:26:49 -05:00
Robby Findler
8f34b702ab improve flat-contract test suite so that it checks
the predicate-ness of the contracts
2017-05-12 11:26:49 -05:00
Matthew Butterick
7908be8ce9 Fix spelling errors (#1687)
“cooresponds” → “corresponds” x2
2017-05-11 10:08:26 -04:00
Matthew Flatt
e6793c4598 fix variable-reference->module-path-index on primitive refs 2017-05-09 20:28:25 -06:00
Matthew Flatt
26c4dd6909 add #%unsafe exports to implement ffi/unsafe/atomic
Export functions through the usual `#%unsafe` primitive module,
instead of using the FFI to get at unsafe operations.
2017-05-09 09:32:34 -06:00
Matthew Flatt
e68e4bd6f6 minor configure --help format repairs 2017-05-09 09:32:34 -06:00
Robby Findler
79cef0a96e clean up a bunch of contract names 2017-05-06 22:10:41 -05:00
Robby Findler
2db8523eb5 add dependency on the icons pkg 2017-05-02 15:32:28 -05:00
Ben Greenman
11484b9d34 doc: explain blame object passed to late-neg
The blame object passed to a late-neg-proj function will be missing
 one party. The missing party is sometimes the negative party and
 sometimes the positive party.
2017-05-01 18:26:01 -04:00
Sam Caldwell
a666f1b0c1 typo 2017-05-01 16:34:26 -04:00
Vincent St-Amour
4ffd2fc1b8 Restore docs about impersonator-of? and immutable hash tables.
In the impersonate-hash docs, this time.
2017-04-30 13:44:49 -05:00
Vincent St-Amour
206ced8d47 Add examples for impersonator-of?. 2017-04-30 13:44:49 -05:00
Vincent St-Amour
d9b39eac1f Add back desciption of impersonator-of?'s behavior on impersonator subparts. 2017-04-30 13:44:49 -05:00
Daniel Feltey
e29dba115b New impersonator-of? docs 2017-04-30 13:44:49 -05:00
Matthew Flatt
de0d84f7b3 racket/serialize: repairs for structs that have auto fields
Closes #1650
2017-04-29 13:20:25 -07:00
Matthew Flatt
bb2f1998f1 document binding structure of for/fold
The binding structure is not natural, but changing the binding rules
would risk breaking existing code.

Closes #1659
2017-04-29 11:08:42 -07:00
Vincent St-Amour
13443dec92 Add chaperone-vector*, unsafe-chaperone-vector, and property-only vector chaperones.
By analogy with the procedure chaperone equivalents.
2017-04-28 14:27:53 -05:00
Vincent St-Amour
541015ba3b Update raco pkg new for v6.9.
(cherry picked from commit 351dcfe14d0f3aa7f7b5b1491d882c887a971c24)
2017-04-27 11:50:13 -05:00
Matthew Butterick
6e64da6880 Fix typos (#1651)
Fix typos

`sourve` → `source` x4
2017-04-27 09:16:22 -06:00
John Clements
473a3f5573 doc update for info.rkt files
specifically, mention that info.rkt files do
not provoke package conflicts
2017-04-27 09:15:03 -06:00
Matthew Flatt
608e6cc2a2 add tests for racket/port
Also, fix some doc typos.
2017-04-26 17:16:59 -06:00
Matthew Flatt
d469265a6e Makefile: support both cross-platform and non-cross installers
In non-cross mode, `-C` needs to go after `-G` and `-X` when setting
up a "bundle" directory to turn into an installer, because that mode
needs to use foreign libraries (such as SQLite) at build time, and it
can use the instances that are being set up for the installer.

Meanwhile, improve the advice for setting `PLAIN_RACKET` to use `-C`
for a cross-platform build mode, even though things tend to work
anyway without it.
2017-04-26 15:59:04 -06:00
Matthew Flatt
6de3659664 repair for hash-keys-subset?
When comparing a part of a hamt that is a collision node versus a
subtree node, a "hash code" was extracted from the collision node ---
but that's really a code for an integer key is that used for the
collision element. The comparison should instead use a code extracted
from the reference to the collision node (which is the code that is
common to all colliding keys).
2017-04-26 15:27:39 -06:00
Matthew Flatt
f8aeed279b Windows: fix 64-bit mzdyn.exp
Also, make the `raco exe` tests more accommodating to uncooperative
Windows configurations.
2017-04-25 16:31:51 -07:00
Philip McGrath
e9cd1e5595 Corrected Racket Reference for get/build-late-neg-projection
and `get/build-val-first-projection`.
Both had incorrectly shown that the returned function took
a `contract?` as an extra first argument.
2017-04-25 14:57:50 -05:00
Matthew Flatt
c0f158b38c Makefile: add a client-testing entry for use by distro-build
Also, add a "distro.rkt" test to "tests/racket/test" to hold
basic checks to run in a client build.
2017-04-25 11:12:01 -06:00
Matthew Flatt
c917434a86 improve cross-platform support
Detangle the target and host DLL and library directories by
making `get-lib-search-dirs` and `get-dll-dir` report the
host system's directories, and add `get-cross-lib-search-dirs`
and `get-cross-dll-dir`.

A new `-C`/`--cross` flag causes `racket` to save a host config and
collection directory and make them available via `(find-system-path
'host-{config,collects}-dir)`, while plus `(system-type 'cross)`
reports whether `-C` mode is in effect. Besides making the host paths
available, this change allows a same-platform build to run in
corss-platform mode.

The immediate problem to solve was the creation of Windows installers
on Windows, where recent changes to support 'gui-bin-dir configuration
need a clear distinction between the host Racket and the target Racket
being built, even if they're the same platform. (The "GRacket.exe"
executable didn't work, for example.)

The changes in this commit are more than needed for the immediate
problem, but they naturally build on the necessary `-C` flag, and they
support cross-platform package setup where native libraries are needed
during setup.
2017-04-25 08:31:26 -06:00
Matthew Flatt
83bf0e49ff add more auto-detected Visual Studio versions 2017-04-24 13:05:17 -06:00
Matthew Flatt
a71d87c5a9 optimizer: remove incorrect assertion 2017-04-21 14:28:57 -06:00
Matthew Flatt
9cb8c8fdd9 avoid O(n^2) GC time with ephemeron chains
Avoid the well-known possibility of quadratic handling of ephemeron
chains, where all ephemerons are immediately known, no keys are
immediately known, and each link in the chain has a value that refers
to the next link's key.

To aviod quadratic behior, attach a list of ephemerons to each page of
allocated objecst, where marking any object on the page triggers a
rescan of the ephemerons without waiting to rescan all ephemerons.
2017-04-20 20:48:55 -06:00
Scott Moore
54bd21e65a Discuss security considerations of racket/sandbox in Reference 2017-04-20 16:23:00 -05:00
Matthew Flatt
3bc3fe9e26 fix dynamic-wind matching for continuation jumps
Thanks to Gustavo and Robby for tracking down the relevant feature
of a complex example that was found by random testing.
2017-04-19 07:00:34 -06:00
Vincent St-Amour
c652afa894 Document surprising behavior of in-range with floats and zero. 2017-04-17 20:23:28 -05:00
Matthew Flatt
fae55e83e2 history note for v6.9 2017-04-17 13:12:07 -06:00
Matthew Flatt
803d8ff0d5 fix launcher creation for gracket[-text] on Mac OS
The repair in 71a43f34c8 fixed the creation of some launchers, but it
broke GUI launchers with a relative reference on Mac OS.
2017-04-16 15:51:28 -06:00
Leif Andersen
47a2d4a879 Fixed tests for log function.
The test cases relied on arity and changing log to have an arity
of both 1 and 2 activated new (incorrect) tests. I fixed the
incorrect tests as they applied to the log function.
2017-04-16 15:34:13 -04:00
Ryan Culpepper
995f320918 fix in-query result checks with grouping
closes racket/db#8

merge to release branch
2017-04-15 12:19:31 -04:00
Leif Andersen
922b5f06e9 Make log also accept a base. (#1667)
Make `log` in `racket/base` optionally accept a second argument.

The second argument is the log `base`. The docs also recommend
`fllogb` when precision is important.

* Error message when base is 1
* Added docs.
* Add tests.
2017-04-15 10:40:41 -04:00
Robby Findler
6492226411 add a #:name argument to flat-contract-with-explanation 2017-04-13 10:19:20 -05:00
Robby Findler
e7f68472e5 the "I don't konw what name to give" name has changed; update the guide to reflect that
closes #1661
2017-04-13 09:37:25 -05:00
Robby Findler
b3d3bf7c01 improve the guide section on how to use the contract library
to build new combinators
2017-04-12 21:27:50 -05:00
Philip McGrath
8bb8365a38 Revise Racket Guide 7.8 Building New Contracts
to use late neg projections in the examples, rather val first projections.
2017-04-12 21:27:50 -05:00
Ben Greenman
1e29362dad typo: error message in parse-command-line 2017-04-12 14:51:32 -04:00
Matthew Flatt
662fd84eda raco: fix command name selection by prefix
Repairs a problem with 409321c03b.

Merge to v6.9
2017-04-10 08:22:49 -06:00
Matthew Flatt
016b8009c5 repair "info-cache.rktd" assumption of relative paths
Fix for 459a74455c to handle the case that a path
to record is not relative. The `raco pkg` tests
exposed the problem.
2017-04-09 10:53:05 -06:00
Ben Greenman
50f67cf6e4 remove @history for flat contracts #:exercise
Remove the history annotation on `build-flat-contract` property
 about removing the `#:exercise` keyword.

Because the keyword wasn't actually removed from the function,
 only from the (incorrect) documentation. So there aren't any
 legal programs that depend on the removed keyword argument.
2017-04-09 11:36:06 -04:00
Matthew Flatt
459a74455c avoid platform-specific path conventions in "info-cache.rktd"
Store relative paths in "info-cache.rktd" (which corresponds,
roughly, to packages) in a platform-independent form, instead
of using the current platform's convention.

Using the current platform's covention works badly when
cross-compiling for Windows on Unix, since relative paths are used as
keys in the "info-cache.rktd" table. For example, updating a
pre-installed package on Windows mangles the mapping if the installer
is created from a cross-compiled installation.
2017-04-09 08:16:56 -06:00
Ben Greenman
3bb131ecb2 add #:generate keyword to build-flat-contract-property
the public function was missing the `#:generate` keyword,
 added this and documented why `#:exercise` is missing
2017-04-08 21:37:39 -04:00
Robby Findler
d224da3105 document the #:missing-party argument to raise-blame-error
closes #1658
2017-04-08 18:55:58 -05:00