Commit Graph

37419 Commits

Author SHA1 Message Date
Marc Burns
cdf9da7da4 an string -> an immutable string 2016-07-28 15:33:13 -05:00
Alexis King
1b63703ac0 Fix for-label requires for some struct documentation 2016-07-28 15:33:13 -05:00
Matthew Flatt
e3ae0103af fix a backward test on use-compiled-file-check
The backward test causes docs to be rebuilt too much.
2016-07-28 09:19:11 -06:00
Matthew Flatt
3f4e7d90cb improve compiler recognition of stuct constrcutors
Allow a `struct` form to be recognized when it provides
a number as the 8th argument to `make-struct-type`. In
particular, that change allows the construction of
optional-keyword functions to be recognized as a
purely functional operation.

Also, allow the optimizer to use information about imports
when deciding whether a module-level form is functional.
It's ok to use that information, because the validator has
it, too.

This combination of changes allows something like

 (define (f #:optional [x #f])
   (later))

 (define (later) ....)

to compile to a reference to `later` wihout a check.
2016-07-28 08:23:51 -06:00
Matthew Flatt
0d0cf535de compiler: fix copy propagation in letrec-check pass
Fixing dead-code cleanup in the letrec-check pass exposed
a bug in a part of the letrec check interpretation that is
analogous to copy propagation. The copy's representation
now refers to the original variable, instead of copying
the current set of deferrals (which is wrong if the original
is a `letrec`-bound variable that hasn't yet accumulated
its closures).
2016-07-28 08:23:50 -06:00
Matthew Flatt
cc9889d7ab fix setup for the letrec-check pass
Due to an obvious problem in the setup, the letrec-check pass wasn't
running an intended dead-code pruning pass. Correcting the problem
cuases one test in "optimize.rktl" to change, because the letrec-check
pass can see more in one case than thanother.

(Problem discovered by accidentally fixing the setup in a Racket
branch based on "linklets".)
2016-07-28 08:22:10 -06:00
Matthew Flatt
0198847980 wrap scheme/interactive load with error boilerplate 2016-07-26 10:55:43 -06:00
Matthew Flatt
453684b694 don't use isspace() on a signed character 2016-07-26 10:53:05 -06:00
Matthew Flatt
b9a9fdaa3f check for "config.rktd" before trying to read it for interactive 2016-07-26 10:47:19 -06:00
Matthew Flatt
fc345ed249 add use-compiled-file-check
Along with the `PLT_COMPILED_FILE_CHECK` environment variable, allows
the timestamp check to be disabled when deciding whether to use a
compiled bytecode file.

In accomodating this change, `raco make` and `raco setup` in all modes
check whether the SHA1 hash of a module source matches the one
recorded in its ".dep" file, even if the timestamp on the bytecode
file is newer. (If the compile-file check mode is 'exists, the
timestamp is completely ignored.)
2016-07-26 10:27:08 -06:00
Leif Andersen
c65ad1efad Moved racket/gui/init and racket/gui/interactive to the gui-lib 2016-07-26 10:14:38 -04:00
Leif Andersen
28f693a976 A few more changes based on Matthew's feedback.
Updated docs
2016-07-26 10:14:38 -04:00
Leif Andersen
e0e2708f4e Attempt to youse scheme_make_integer in dynamic_require 2016-07-26 10:14:38 -04:00
Leif Andersen
a6b7af9733 Made changes based on Matthew's comments.
1. Changed the API documentation for scheme_make_hash_tree, adding primitives for:

* SCHEME_hashtr_eq
* SCHEME_hashtr_equal
* SCHEME_hashtr_eqv

2. Changed direct uses of scheme_make_hash_tree to use these enumed values.

3. Fixed bugs in documentation

4. Defaults to racket/interactive (and racket/gui/interactive) if there is nothing in the config file
2016-07-26 10:14:38 -04:00
Leif Andersen
d0f9e4ba81 gr_config_init macro should not exist any more 2016-07-26 10:14:38 -04:00
Leif Andersen
237418ba0c Added documentation for the racket/interactive module 2016-07-26 10:14:38 -04:00
Leif Andersen
933a494fe0 Fix a few typos in the existing docs. 2016-07-26 10:14:38 -04:00
Leif Andersen
e5ff658875 Add docs for hash trees. 2016-07-26 10:14:38 -04:00
Leif Andersen
8588c43709 Oops, file checking should be on filename. 2016-07-26 10:14:38 -04:00
Leif Andersen
b0f266fad1 Moved xrepl to be part of bootloader directly. 2016-07-26 10:14:38 -04:00
Leif Andersen
314485edfb Start up xrepl when repl is loaded. 2016-07-26 10:14:38 -04:00
Leif Andersen
bd1ceb21d6 Add racketrc file to the etc/ folder. 2016-07-26 10:14:38 -04:00
Matthew Butterick
b62d0c80e4 Update examples for equal? eqv? eq? (#1391)
Use the same examples for each so it's easier to compare how the behavior differs.
2016-07-26 01:21:45 -05:00
Tony Garnock-Jones
1ba42bb70d Skip whitespace more liberally when parsing PLTSTDERR and friends.
Now accepts any whitespace, not just spaces, ignores both leading and
trailing whitespace, and accepts multiple whitespace characters
separating subterms.
2016-07-25 19:17:35 -04:00
Stephen Chang
99dd403ef6 fix another renaming provide src loc 2016-07-21 16:53:00 -04:00
Matthew Flatt
64a1209bb5 remove the other(!) debugging printf 2016-07-20 22:41:00 +02:00
Leif Andersen
f6c9f058e4 Add documentation for syntax/parse/lib/function-header 2016-07-20 14:00:10 -04:00
Matthew Flatt
8f4250ca45 remove debugging printf
Consider merge to v6.6 with 7318b1fd34
2016-07-20 11:32:57 +02:00
Matthew Flatt
7318b1fd34 fix equal? for futures
Closes PR 15331

Consider merge to v6.6
2016-07-20 09:28:18 +02:00
Matthew Flatt
e2dd92c9c1 add v6.6 to Racket "HISTORY.txt"
Merge to v6.6
2016-07-20 09:28:18 +02:00
Leif Andersen
02fa5e06b2 Update docs for racket/init 2016-07-19 17:52:43 -04:00
Leif Andersen
6c0dfa7053 Trying to use xrepl no longer swallos all errors. 2016-07-19 16:36:04 -04:00
Leif Andersen
b1adf65fd0 Make xrepl the default repl if it is installed 2016-07-19 16:36:04 -04:00
Stephen Chang
046f3eef37 fix src loc for renaming provide 2016-07-19 15:53:13 -04:00
Jonathan Schuster
562f5f01f6 Fix bugs in type errors for data/queue 2016-07-19 13:51:38 -05:00
William J. Bowman
5a9241076e Fixed location of traced procedures. Closes #1300 2016-07-19 12:24:26 -05:00
William J. Bowman
7d9b84b421 Tests for correct syntax location 2016-07-19 12:24:26 -05:00
Gustavo Massaccesi
e5e781c4ec optimizer: add more type annotations for procedures related with list?
After refactoring the test for the inferred types of some procedures that
use vector?/bytes?/string?/list? it was easier to spot the missing information.

Note that in the documentation, some arguments like the position in
  (vector-ref <vector> <position>)
are documented as exact-nonnegative-integer? but due to the implementation
details they are actually in a subset of fixnum?s.
2016-07-17 14:04:24 -03:00
Matthew Flatt
ca6c67be68 fix unsafe-immutable-hash-... on hash table from read
When `read` parses a literal hash table, it inserts an placeholder
just in case it's needed for cycles. The `unsafe-immutable-hash-...`
operations in some cases did not detect and remove the placeholder.

Closes #1376

Merge to v6.6
2016-07-15 06:23:20 -06:00
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