Commit Graph

38480 Commits

Author SHA1 Message Date
Asumu Takikawa
ad2c229af1 Add doc examples for FFI union types 2016-07-14 17:30:58 -04:00
Matthew Flatt
d1c2daf15b make variable-reference->namespace enable top-level mode
The namespace returned by `variable-reference->namespace` (or
`namespace-anchor->namespace`) may be used via `eval` to define new
bindings, so enable top-level binding support for the namespace.
2016-07-14 15:10:05 -06:00
Ryan Culpepper
19707a54be syntax/parse: change test to use eval so no error logged when compiled 2016-07-14 14:32:39 -04:00
Matthew Flatt
521ff7cc67 fix broken GC-traversal registration
Bug was part of 95f6a2342b
2016-07-14 06:58:59 -06:00
Matthew Flatt
689452e1c9 update "base" version 2016-07-13 13:53:07 -06:00
Matthew Flatt
9c94e5a8df optimizer: propagate info for super struct from requires
Allows a struct declaration to be recognized when it inherits
from an imported struct.
2016-07-13 13:53:07 -06:00
Matthew Flatt
95f6a2342b optimizer: connect struct predicates and accessors
for example, make the optimizer convert something like

 (struct a (x))
 (lambda (v) (if (a? v) (a-x v) #f))

to

 (struct a (x))
 (lambda (v) (if (a? v) (unsafe-struct-ref v 0) #f))
2016-07-13 13:53:07 -06:00
Matthew Flatt
591fcb6228 optimizer: recognize more struct declarations
The optimizer change in e887fa56d1 recognized struct declarations that
involved only whitelisted properties to guarantee that constructor
properties are preserved --- while `prop:chaperone-unsafe-undefined`
can affect the constructor, and other properties might imply that one.
But the optimizer's transformer aren't actually invalidated by
`prop:chaperone-unsafe-undefined`; the JIT's assumptions are affected,
but that's handled in a different way. So, remove the whitelist and
allow any property list.
2016-07-13 13:53:07 -06:00
Sam Tobin-Hochstadt
bd28c4459d Don't compile file that prints to stderr. 2016-07-13 10:39:11 -04:00
Sam Tobin-Hochstadt
f2eba4cd09 Add info to README. 2016-07-13 10:38:54 -04:00
Benjamin Greenman
3afa58e8d1 edit: make object/c-helpers private (#1374)
Fixes the TR "undocumented public identifiers" DrDr error
2016-07-12 16:16:42 -04:00
Matthew Flatt
e76df3bb00 adjust otimizer to keep the validator in sync
Sacrifice a tiny bit of information in the optimizer as of dce42313ad
to avoid confusing the valdiator.

See also discussion for #1365
2016-07-11 18:36:20 -06:00
Matthew Flatt
671adc0de2 tweaks to hashing
Faster hasing of booleans, correct potential loss of distinction
for a compound structure that ends in a symbol or keyword, and
shortcuiting lookup in an empty immutable hash table.
2016-07-11 15:42:50 -06:00
Ryan Culpepper
52bfb32cd3 syntax/parse: only check for empty match on unbounded EH patterns
This change permits EH patterns like (~once <nullable>), because the
match will happen at most once, so there is no danger of divergence.
Thanks to Alex Knauth for pointing out this special case.

Merge to release branch.
2016-07-11 13:04:07 -04:00
Benjamin Greenman
956d10432b typo: argument to 'module-compiled-submodules' (#1370)
Changed from `pre-module?` to `non-star?`
2016-07-10 18:46:24 -04:00
Gustavo Massaccesi
397d604182 optimizer: add types for something->immutable-something 2016-07-09 02:16:54 -03:00
Gustavo Massaccesi
f8b3ba8253 optimizer: reduce ignored ifs
The optimizer tries to reduce the `if` assuming that the result will be used.
In case it later detects that the result will be ignored, it can try to
apply some additional reductions to the branches and to the whole expression.
2016-07-09 02:16:40 -03:00
Jay McCarthy
9a5aa89fb5 Switch from deprecated Posix function removed in Android's LB64 ABI 2016-07-08 20:54:09 -04:00
Gustavo Massaccesi
dce42313ad optimizer: add string? to list of relevant predicates
Also add the type information for a few related functions like
string-append and bytes-append.
2016-07-08 21:07:22 -03:00
Robby Findler
9cf9897b16 raise a syntax error uses of keywords in case-> 2016-07-08 15:36:44 -05:00
Robby Findler
fdc3b4a685 improve docs for and/c
please merge to the release branch
2016-07-08 15:35:58 -05:00
Sam Tobin-Hochstadt
8d698389e7 Add a way to recognize cpointer predicates. (#1368)
Similar to `struct-predicate-procedure?`. Allows Typed Racket
(and the contract system generally) to avoid chaperone wrapping
for cpointer predicates.
2016-07-08 12:40:03 -04:00
Ben Greenman
4650a12350 export object/c-stronger helper functions
So that Typed Racket can use them to implement object/c-opaque
2016-07-08 12:06:29 -04:00
Matthew Flatt
b0c55b7394 OpenSSL v1.1 support
The SSL_library_init() function has been removed. (There's a new
SSL_init_ssl() function, but calling it is optional.) The
SSL_load_error_strings() function is similarly gone.

The SSLv23_client_method() and SSLv23_server_method() functions
are also gone. The new TLS_client_method() and TLS_server_method()
functions are better names for what SSLv23_client_method() and
SSLv23_server_method() evolved to do.

Finally, the dance for server-triggered renogotiation needs to
change, since the old dance involved manipulating the structure
directly.

Merge to v6.6
2016-07-08 09:28:49 -06:00
Matthew Flatt
42be8aadff fix collision handling for eq?-based immutable hash with #ts
When creating a collision node, make sure the "has a value" bit
is set, since the "has a hash code" bit should imply it.

This bug was made easier to trigger by 3fbb384604, but it was
potentially a problem for scope sets before.

Closes #1366

Merge to v6.6
2016-07-08 07:29:14 -06:00
Matthew Flatt
fd85bcaf21 fix printing of eq[v]?-based hash tables
Merge to v6.6
2016-07-08 07:29:07 -06:00
Vincent St-Amour
e10c57623c Post-release version for the v6.6 release 2016-07-07 15:39:47 -05:00
Sam Tobin-Hochstadt
bacb08acf5 raco decompile: Suggest raco make when the file isn't compiled. 2016-07-06 17:47:47 -04:00
Sam Tobin-Hochstadt
8377fa842f Improve compilation of hash table patterns with literal keys. 2016-07-04 18:39:43 -04:00
Robby Findler
bdd11100bb add explanation for and/c 2016-07-04 08:08:51 -05:00
Matthew Flatt
c5868e9ab1 fix JIT-inlined immutable? for chaperones 2016-07-01 19:18:35 -06:00
Matthew Flatt
1f00509705 JIT-inline immutable? 2016-07-01 13:30:50 -06:00
Matthew Flatt
8dec2485d6 adjust docs for read-language 2016-07-01 13:30:50 -06:00
Matthew Flatt
e92b07728f repair for define-cpointer-type 2016-07-01 13:30:50 -06:00
Sam Tobin-Hochstadt
762994654c Add note about obsolete list of MIME types.
Originally by @jbclements in https://github.com/racket/net/pull/9/
2016-07-01 10:58:35 -04:00
Matthew Flatt
f16f54a1b1 fix mismatch in future primitives when futures are disabled
Closes #1356
2016-07-01 08:50:15 -06:00
Matthew Flatt
0f12c8e0dc fix compiler warning for the no-threads build 2016-07-01 08:50:15 -06:00
Leif Andersen
ebe3a77c2b Update namespace-attach-module docs 2016-06-30 14:20:27 -04:00
Matthew Flatt
3fbb384604 add hash-keys-subset?
This function exposes the fast subset operation that is built in for
immutable hash tables (and used by the set-of-scopes implementation).

Also, make the space optimization implicit for `eq?`-based hash tables
that contain only #t values (instead of explicit and only available
internally). It turns out to be easy and efficient to make the
representation automatic, because the HAMT implementation can support
a mixture of nodes with some containing explicit values and some
containing implicit #t values.
2016-06-30 08:22:18 -06:00
Matthew Flatt
8ae013cdb1 unbreak --enable-sgcdebug 2016-06-30 07:47:54 -06:00
Matthew Flatt
2662850ca1 restore lost Tsint8 2016-06-30 07:47:54 -06:00
Alexis King
e86fa9f055 Improve with-disappeared-uses and add record-disappeared-use
Now with-disappeared-uses surrounds its body with let, so it can contain
multiple body expressions. The record-disappeared-use function is like
record-disappeared-uses but for a single identifier.
2016-06-29 12:50:14 -05:00
Alexis King
517c3cfef9 Track disappeared uses of match expanders within match forms (#1349) 2016-06-27 14:13:12 -04:00
Matthew Flatt
b9445023c1 simpler #%linklet bootstrap hook 2016-06-26 07:23:36 -06:00
Spencer Florence
431110531b fixed typo in url 2016-06-25 09:31:31 -05:00
Matthew Flatt
4a1afa66c8 add partial #%linklet primitive module
The `#%linklet` module is intended to eventually provide
a simplified compiler for the core Racket language. For
now, it provides minimal hooks for bootstrapping an
expander implementation.
2016-06-22 14:19:24 -06:00
Matthew Flatt
22d397cfe1 print a little more in a test suite 2016-06-22 14:18:54 -06:00
Gustavo Massaccesi
9978696991 Fix confusing indentation 2016-06-22 09:25:55 -03:00
Ben Greenman
edcb1e5479 typo: unxpected 2016-06-21 04:17:32 -04:00
Matthew Flatt
871392f09a add inspector-superior? 2016-06-17 10:23:47 -06:00