Commit Graph

37873 Commits

Author SHA1 Message Date
Matthew Flatt
aa130df8b2 fix prop:custom-write printing on structure ports
When a `prop:custom-write` function prints to a given port for
recursive printing, don't reject a port that is a structure port.

Relevant to #1579
2017-01-27 18:04:20 -07:00
Matthew Flatt
03f2deeea9 fix module->namespace problem resoring bindings
If a module has any sort of complex bindings, such as a definition of
a macor-introduced identifiers, then `module->namespace` and variants
(like `variable-reference->namespace`) need to recreate suitable
bindings. Make sure that the module-path index for recreated bindings
is the run-time one, not the compile-time one.

Closes #1584
2017-01-27 17:30:35 -07:00
Gustavo Massaccesi
0a5c510b72 advance the vclock for a values with 0 or more than 1 argument
To avoid moving expressions that may have a side effect, the optimizer must
recognize that in this position this will cause an error and advance
the virtual clock.

Currently the only primitive that is flagged as SCHEME_PRIM_IS_OMITABLE and
may have multiple return values is `values`.

Thanks to Robby for finding the original version of the test.
2017-01-27 18:18:26 -03:00
Robby Findler
a5118f7525 guard against missing scribble and syntax-color libraries
we don't want an actual dependency from at-exp-lib to those libraries,
so when they aren't present, don't just crash, but instead fall back
to the defaults passed to the get-info procs
2017-01-27 11:43:13 -06:00
Matthew Flatt
0e12201c4d fix bytecode writer for immediate compile-time values
When a hash table or other special value appears immediately on the
right-hand side of `define-values`, it needs to be protected by an
explicit quote when writing to bytecode.

Closes #1580
2017-01-27 09:07:53 -07:00
Matthew Flatt
89512edad9 fix JIT handling of struct type property predicates and accessors
When the JIT guesses that a rator will always be a struct type
property or accessor, the run-time check to confirm that guess
was broken.
2017-01-27 07:53:03 -07:00
Jay McCarthy
420330fef0 Protecting literal data, like vectors and hashes, from tagged paren styles 2017-01-25 17:47:39 -05:00
Matthew Flatt
1638fd5214 benchmark tabulate: fix handling for "rx" benchmark output 2017-01-24 17:38:01 -07:00
Robby Findler
06f31954d5 missed a place to stop trying to use the (now non-existent) scribble definitions-text-surrogate 2017-01-24 15:18:38 -06:00
Vincent St-Amour
45bacf4917 Update raco pkg new for v6.8.
(cherry picked from commit 420f4795b6da2b8206ec9e2812d42123b8284fa1)
2017-01-24 14:50:13 -06:00
Robby Findler
8e396f27c1 use drracket:keystrokes instead of the surrogate stuff 2017-01-24 11:23:13 -06:00
Georges Dupéron
e311d671de Applied changes requested by @rmculpepper for PR #1587 2017-01-23 20:32:40 -05:00
Georges Dupéron
5a8780ab0d Run all stxparse tests as part of the Travis and AppVeyor builds 2017-01-23 20:32:40 -05:00
Georges Dupéron
6a07a3f986 Fixes several issues with syntax/parse, and adds some tests.
* byte-regexp? values should not be considered 3D syntax.
* hash? values are now allowed in serialized syntax properties with (template … #:properties (…))
* marshalling properties which were prefab structs called map on the result of struct->vector, changed it to struct->list as the struct "name" is always serializable.
2017-01-23 20:32:40 -05:00
Matthew Flatt
a9ae341105 in-bytes: use unsafe-bytes-ref
In the same way that `in-vector` uses `unsafe-vector-ref`,
make `in-bytes` expand to a use of `unsafe-bytes-ref`.
2017-01-22 07:57:46 -07:00
Matthew Flatt
aead07b5de bytecode compiler: fix misuse of "optimize" mode on a "resolved" form
Thanks to Robby for the test.
2017-01-20 21:35:09 -07:00
Matthew Flatt
736cdfb2c1 yet more repairs to the interaction of errors and let-values
Continuing the saga that includes 8190a7730d and d1ba9fbb6e, it turns
out that a 0-binding clause as the last one isn't so special after
all. A little later in the optimizer, now that we're sometimes moving
an error to the body, we can't assume that the body can be discard
if an error was detected.
2017-01-20 18:07:05 -07:00
Gustavo Massaccesi
d1ba9fbb6e fix wcm on error in let's
Repairs a problem with 8190a7730d, which can incorerctly
move an erroring experssion into tail position.
2017-01-20 15:04:11 -07:00
Matthew Flatt
8190a7730d fix optimizer bug related to errors and zero-values binding 2017-01-20 12:19:05 -07:00
Matthew Flatt
d0b5de398e fix internal function names 2017-01-20 10:44:25 -07:00
Matthew Flatt
80e8e0f9e0 fix a mismatch between the optimizer and validator
Thanks to Leif for the report and test case.
2017-01-18 15:39:38 -07:00
Matthew Flatt
ecaa14544f add v6.8 HISTORY note 2017-01-16 15:40:34 -07:00
Matthew Flatt
3f2de918d8 fix variable-reference->namespace for phase > 0
Set up bindings and shift phases as needed to make
`variable-reference->namespace` work in a run-time position when the
enclosing module is instantiated at a phase other than 0.

Thanks to Rohin Shah for the bug report.
2017-01-16 08:53:57 -07:00
Matthew Flatt
b138c340e1 fix extended {read,peek}-char-or-special
The changes in 08ca76b741 require the primitives to be reclassified
from non-CM to general.

Also, add an internal shortcut for checking arity.
2017-01-15 10:02:57 -07:00
Matthew Flatt
2cf6691439 expose read capabilities of string->number
Extend the `string->number` parser for use by readers, which need
error messages and/or extflonum results.
2017-01-13 08:09:19 -08:00
Matthew Flatt
08ca76b741 extend {read,peek}-char-or-special
Support an external implementation of `read-syntax` by exposing
functionality that is currently internal to `read-syntax`: a srcloc
argument to a "special"-producing port function and wrapping special
results to reliably distinguish them from characters.
2017-01-13 08:09:18 -08:00
Matthew Butterick
74909ff06b Update start.scrbl
Typo: "will use go" => "will go"
2017-01-12 19:09:36 -08:00
Matthew Flatt
7ef20dd606 transplant-output-port: defend against weird ports
Avoid an error within `transplant-output-port` if the given output
port's position somehow goes down instead of up.

Merge to v6.8
2017-01-11 08:06:25 -07:00
Matthew Flatt
a860791d6f Windows: avoid using pipe code for file redirection
When Racket is run with stdout or stderr redirected to a file,
then it must be treated as a regular file, otherwise flushing
and position counting doesn't work right.

Merge to v6.8
2017-01-11 06:48:07 -08:00
Alex Knauth
286e5bebed doc: switch "A is the result of B" to make more sense 2017-01-10 22:03:30 -06:00
Matthew Butterick
cfc0784e49 delete unnecessary linebreak 2017-01-10 22:01:18 -06:00
Michael Myers
e2070b882d Replace arithmetic with bit operations
quotient/remainder is replaced with word-index and bit-index, expt with arithmetic-shift.
2017-01-10 21:59:22 -06:00
Sam Tobin-Hochstadt
63182523df Add appveyor integration for racket.slack.com 2017-01-10 18:12:47 -05:00
Sam Tobin-Hochstadt
226fb24ea9 Add racket.slack.com travis integration. 2017-01-10 18:05:43 -05:00
Royall Spence
e331ae75a6 Fix typo in struct section
Change "must to be allocated" to "must be allocated"
2017-01-10 13:02:21 -06:00
Gustavo Massaccesi
3eb86584c0 use flags of lambdas if they can't be inlined
Merge to 6.8 release.
2017-01-10 14:39:09 -03:00
Matthew Flatt
aa9d5e5614 expander: avoid misinterpreting unforced module context
Use the simple-scope shortcut only when the module context
is itself simple.

Merge to v6.8
2017-01-10 09:40:46 -07:00
Matthew Flatt
6bb4f2ecad update docs to clarify handling of paths in syntax object srclocs 2017-01-08 07:14:28 -06:00
Matthew Flatt
8ff011fc51 fix srcloc collapse for a path to a file in a root directory 2017-01-08 07:14:28 -06:00
Alexis King
dc9aa8a569 Fix source location in errors reported by define/match 2017-01-07 08:22:13 -08:00
Vincent St-Amour
57e787eec2 Post-release version for the v6.8 release 2017-01-07 07:40:13 -06:00
Robby Findler
c9100a98c5 adjust scribbling style guide for new location
(and a few other minor tweaks)
2017-01-06 11:58:39 -06:00
Robby Findler
7d70c4cc6e add dictat about predicates as nouns 2017-01-06 11:58:19 -06:00
Matthew Flatt
3fca7273c3 "Mac OS X" -> "Mac OS" 2017-01-06 11:53:38 -06:00
Matthew Flatt
527c458940 clarifications and additions to style guide
original commit: c5f821b641
2017-01-06 11:53:36 -06:00
Eli Barzilay
daad01ed97 Recketizing much in `net/*', mass ".ss" -> ".rkt" conversion in .scrbl files.
(Some other minor things here and there.)

original commit: debd1f9f1e
2017-01-06 11:53:36 -06:00
Matthew Flatt
04ec4d604e "under <platform>" -> "on <platform>"; "X" -> "Unix"
I originally picked "under" as the preposition to go before
 a platform name, but obviously you should build "on" a
 platform, and "under" suddenly annoys me. The choice of "on"
 is now codified in the documentation style guide. Meanwhile,
 "Unix" insted of "X" seems more clear and consistent in the
 `racket/gui' docs.

 More usefully, this patch also fixes a few out-of-date
 platform-specific claims.

original commit: f34a31cac9
2017-01-06 11:53:36 -06:00
Matthew Flatt
f3dab045a8 a round of doc corrections from Gwyth
original commit: 0b496d5275
2017-01-06 11:53:36 -06:00
Matthew Flatt
fddf8ffbcc style guide: use v' for "any value" (as opposed to x')
original commit: 6a34dce36d
2017-01-06 11:53:36 -06:00
Matthew Flatt
75031de6d5 more Scribble "---" doc fixes
original commit: 78b54a7324
2017-01-06 11:53:36 -06:00