Commit Graph

38639 Commits

Author SHA1 Message Date
Robby Findler
8c5c8da1a7 fix fast path to not ignore pre/post conditions and bail out appropriately 2017-02-05 14:36:43 -06:00
Sam Tobin-Hochstadt
71a43f34c8 Use correct base path for finding gracket. (#1609)
Fixes error in http://drdr.racket-lang.org/38697/pkgs/compiler-test/tests/compiler/embed/test.rkt#output1
2017-02-03 15:19:28 +00:00
Sam Tobin-Hochstadt
8a49a8e545 Fix for PLT_DELAY_FROM_ZO custodian. 2017-02-02 17:06:40 +00:00
Ryan Culpepper
2def574c3c syntax/parse: clean up "at"/"within"-term handling
Added comments and examples about "at" and "within" terms
Fixed ps->stx+index bugs related to struct and vector patterns
2017-02-02 01:06:14 -05:00
Ryan Culpepper
febf3f36d7 syntax/parse: compress test, add more variants 2017-02-02 00:25:20 -05:00
AlexKnauth
68bd27707d add regression test for #1602 2017-02-02 00:25:20 -05:00
Ryan Culpepper
de60c00f56 syntax/parse: fix ps->stx+index; fixes #1602
Collapse CDR frames separated by ORD, POST, etc. For example,
(1 ORD 2 stx) should be same as (3 stx).
2017-02-02 00:25:20 -05:00
Stephen Chang
fe9f0e6e92 fix segfault when using preserved stx prop with non-interned-symbol key
closes #1594
2017-02-01 22:21:04 -05:00
Matthew Flatt
69d7636770 fix position counting with internal read shortcut
The primitive `read` uses a shortcut --- a private "ungetc"
implementation --- that did not count position correctly for
non-ASCII characters.

Closes #1599
2017-01-30 20:01:22 -07:00
Matthew Flatt
6c9dbea31f make pretty-print-newline work on any output port
The documentation says that it should work on any output port,
although there's special treatment of ports that originate
from `pretty-print` itself.

Closes #1579.
2017-01-30 05:41:49 -07:00
Matthew Flatt
572b96a6ef add 'gui-bin-dir as a separate configuration option
Allow the directory for GUI executables to be specified as different
from console executables. The defaults for those two are different
on Mac OS, and configuring them differently might be useful to
address #1575.

Although there is probably no demand on Windows or Unix for splitting
the console and GUI bin directories, this patch tries to make things
work sensible there. On Windows, there's a corner case where a
launcher that starts GRacket (especially with `-z`) is intended to be
a console executable. The launcher creator can be told that via a
`subsystem` option, but a new `#:console?` argument was needed for
`make-gracket-launcher-path` lets the path selector know.
2017-01-30 05:41:49 -07:00
Matthew Flatt
dc85374501 Add ignore-stderr submodule and test-ignore-stderrs "info.rkt"
These configuration options apply to `raco test` and mirror the
`--ignore-stderr` command-line flag.
2017-01-30 05:41:49 -07:00
Sam Tobin-Hochstadt
80abc0a020 Fix warning. 2017-01-30 12:40:23 +00:00
Gustavo Massaccesi
a21b33a760 mark struct operations as single valued and mark preserving
Also, the optimizer recognizes struct operations as procedures,
so it will reduce

  (procedure? my-struct?) ==> #t
2017-01-29 20:05:46 -03:00
Gustavo Massaccesi
601587c068 advance effect clocks after reductions
After some reductions, the new rator advance less the effect
clocks than the original rator. For example in

    (equal? x 7) ==> (eq? x 7)

    (my-struct? x) ==> #t or #f
2017-01-29 20:05:46 -03:00
Gustavo Massaccesi
b73e1dfd6c consider the flags of unclonable lambdas for reductions
The lambdas can be marked as single valued and/or mark preserving.
With this information is possible to remove unnecessary wrapping
like the `values` in

    (let ([f (lambda () '(1))])
      (display f f)
      (values (f)))

or in reductions like

   (car (list (f))) ==> (values (f)) ==> (f)

Moreover, this is useful to test that the optimizer has marked
correctly the function f as single valued and mark preserving.
2017-01-29 20:05:45 -03:00
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