Commit Graph

36207 Commits

Author SHA1 Message Date
Matthew Flatt
91eaf40b1f fix modulo and remainder related to most negative fixnum
Robby noticed the bug while looking for undefined behavior.
2016-03-30 09:14:54 -06:00
Robby Findler
bfd2404328 move late-neg projection warnings to the info level in the logger
because right now they are too noisy to be useful to anyone other
than contract system maintainers. Once the problems inside the contract
library itself is fixed, consider moving these back to warning
2016-03-30 09:29:50 -05:00
Ryan Culpepper
bcacb34110 syntax/parse: update tests for error reporting changes 2016-03-28 15:36:52 -04:00
Ryan Culpepper
fafa83a8a0 syntax/parse: reorder and compress error messages
Collect common types of frame (eg message, literal, etc) and
report together. For literals, symbols, and other atoms, compress
multiple entries to list. For example:
  before: "expected the identifier `X' or expected the identifier `Y'"
  now:    "expected one of these identifiers: `X' or `Y'"
2016-03-28 15:36:52 -04:00
Ryan Culpepper
a86931d5f9 syntax/parse: improve error reporting
Previously, syntax-parse would only report errors for one maximal
progress equivalence class (and generate a useless "and other errors
occurred" message). But approach to linearizing the tree of failures
behaved badly if there was too much branching even for a single progress
equiv class. So now it dumps all of the maximal failures into one pile
and tries to find shared "sync points" (frames and terms) to linearize
the failure tree.

In particular, this eliminates the "and other errors" message.

Also updated and improved comments.
2016-03-28 15:36:52 -04:00
Ryan Culpepper
25b2ec2e03 syntax/parse: fix bug that disabled opt, improve debugging 2016-03-28 15:36:52 -04:00
Robby Findler
cf595678f6 clean up logging of compiler/cm a little
use trace-printf for all of the printing (which logs to info@compiler/cm
already) and make all of the indentation printing use the nicer:

   |  |  |  |  |

style, and avoid creating the indentation strings unless they are actually used
2016-03-27 17:29:19 -05:00
Gustavo Massaccesi
ab546d662e Fix SCHEME_LISTP 2016-03-27 10:52:33 -03:00
Robby Findler
20e2e839cb add current-path->mode 2016-03-26 18:39:17 -05:00
Matthew Flatt
9a3e16edff fix problem with lifted bindings and the top level
Repair a mismatch between `syntax-local-lift-expression` and the
way that `compile` tries to avoid creating bindings while
compiling a top-level `define` form.

Closes #1284 and #1282
2016-03-26 16:00:51 -06:00
Matthew Flatt
f7182e7a5c GC on Linux: adjust handler to not abort on SI_KERNEL signals
The meaning of SI_KERNEL signals is not clear, but ignoring
them seems to let the process continue ok. (These signals show
up when running `typed-racket-test/main --int`.)
2016-03-26 13:58:34 -06:00
Matthew Flatt
92f4f8ad10 hints and updates on Git package sources in "Getting Started" docs 2016-03-26 13:58:33 -06:00
Sam Tobin-Hochstadt
b1ba506b52 Remove unused variable. 2016-03-26 14:33:43 -04:00
Gustavo Massaccesi
b9b71b20cc optimizer: add hidden list-pair? primitive
This is useful in the optimizer to track simultaneously the list? and pair?
types of an expression.
2016-03-25 19:17:10 -03:00
Gustavo Massaccesi
cff10bc5a8 extract types for branch when the tests is (not <expr>)
In some cases, complex variants of (if (not <expr>) tb fb) are not reduced.
Extract the type information of the tests in <expr> to use it in tb and fb.
2016-03-25 19:15:51 -03:00
Robby Findler
df157cdfd0 make cm compile all depdencies, not just the first one that needs it
This wouldn't matter if the dependencies recorded in the dep file were
exactly the same as the files that are actually loaded when a file is
required. But in the case of lazy-require (or, more accurately, when
the cm-accomplice library is used), the dependencies in the dep files
can include things that are, in some cases, not actually
required. This is no problem for raco setup, since it looks at all of
the files anyway, but it can cause a particularly bad interaction with
DrRacket's online compilation facility.

For example say there is some file, e.g., mzscheme/main that is
required lazily. So when you edit a file in DrRacket, it will traverse
the requires and lets say it sees that the of mzscheme/main's
dependencies need to be compiled.  So it will compile that dependency,
and then the ormap in this commit will be shortcircuited, which will
cause CM to stop looking at dependencies and decide to compile
mzscheme/main. So DrRacket will compile mzscheme/main, and then
whatever other pending compiles were going on and DrRacket's online
check syntax will complete, but because the lazy require doesn't
triggered, mzscheme/main isn't actually loaded during compilation.

Now you make another edit to the buffer and the same thing happens
except this time it gets past that first dependency of mzscheme/main
because there is now a .zo file for it from the last go 'round. But
say there isn't one for the second dependency. So it compiles that
file and compiles mzscheme/main now for a second time, but still
doesn't look at the third and fourth (etc) dependencies of
mzscheme/main.

Overall, this means that the second time you edit you file in
DrRacket, it should have been quick for the expansion portion to
finish because, after all, everything has been compiled and should
have been cached in .zo files. But because of the short circuiting, it
the .zo files weren't actually created and so your second edit is also
slow to come back.

After this commit, because of the ormap, the second edit will be
faster.

One worry with this commit is that it might change something that
could cause raco setup to go slower. To test that, I applied only this
change to a fresh checkout and did a full build. I then deleted all zo
files in racket/share/pkgs and timed 'raco setup -D' twice (four times
total). Here are the timings I get. The version of the code that uses
ormap:

  % ... delete .zo files ...
  % time raco setup -D
  real    9m2.354s
  user    37m5.176s
  sys     4m14.963s
  % ... delete .zo files ...
  % time raco setup -D
  real    9m2.421s
  user    37m43.793s
  sys     4m23.111s

The version of the code that uses the change in this commit:

  % ... delete .zo files ...
  % time raco setup -D
  real    8m58.852s
  user    36m51.369s
  sys     4m13.633s
  % ... delete .zo files ...
  % time raco setup -D
  real    8m53.980s
  user    37m40.262s
  sys     4m23.692s
2016-03-23 15:41:01 -05:00
Robby Findler
668e2ffbe2 fix error message 2016-03-23 15:41:01 -05:00
Robby Findler
790096529c report a reason when entering bootstrapping mode 2016-03-23 15:41:01 -05:00
Robby Findler
04b86b1d2f fix docs 2016-03-20 22:16:00 -05:00
Matthew Flatt
8b3ea4c842 avoid runstack issue with early GC 2016-03-19 08:33:06 -06:00
Matthew Flatt
0b7c8e0b2e fix GC registration of the initial parameterization 2016-03-19 08:33:06 -06:00
Vincent St-Amour
894873c2ff Fix arity checking for ->*.
Some functions were passing when they shouldn't have, only to fail when
the function is called.

Technically not backwards compatible, but should only affect functions
that were never called.
2016-03-18 12:36:05 -05:00
Matthew Flatt
b94e77a062 raco pkg migrate: fix cross-version locking 2016-03-17 17:01:57 -06:00
Matthew Flatt
b1ff73155f raco pkg update: avoid too-early normalization of clone URL
For example,

  raco pkg update --lookup gui-doc

should suggest uncloning "gui-lib", too, assuming they were
cloned in the usual way. Due to too-early normalization of
GitHub URLs, though, shared-clone detection was broken.
2016-03-17 17:01:57 -06:00
Matthew Flatt
e412a2d5a9 raco pkg {install,update,...}: add --dry-run 2016-03-17 17:01:57 -06:00
Robby Findler
040078ab01 fix some @racket[] references 2016-03-16 16:53:31 -05:00
Matthew Flatt
d27bf66f1a revise hash function for flonums and extflonums
As suggested by Tony.

Closes #1280
2016-03-15 05:28:04 -06:00
Matthew Flatt
182d648af6 improve some comments and an assertion 2016-03-14 18:17:10 -06:00
Matthew Flatt
2556733359 update certificates for openssl testing 2016-03-11 16:15:08 -07:00
Robby Findler
8bcb035693 add suggest/c 2016-03-11 11:42:14 -06:00
Matthew Flatt
33acbaeaf1 fix tests to avoid writing to the current or installation directory 2016-03-11 07:35:05 -07:00
Matthew Flatt
cbba4e75f9 fix inconsistency in cross-module inlined variable reference
The variable's position in its module was wrong, and
possibly the shape info. The demodularizer test exposed
the inconsistency.
2016-03-11 07:35:05 -07:00
Ian Harris
de0fbf2648 scalinger -> scaliger
This fixes racket/racket#757. Tests are included for both versions,
and documentation now only references the new, correctly named,
procedures.
2016-03-10 15:08:48 -06:00
Matthew Flatt
d22df41001 add support for preserved syntax properties
A syntax property is added as preserved or not. For backward
compatibility, the default for a 'paren-shape key is preserved, and
any other key's default is non-preserved.
2016-03-09 20:19:55 -07:00
Matthew Flatt
2213b61536 Windows (MinGW 64-bit): fix logging for place activity
Like 4d358d9914, but for 64-bit builds using MinGW.
2016-03-09 15:37:43 -07:00
Robby Findler
041cebc9c0 fix error message in ->i
in the case where the dependened on contract is a first-order contract, there
is a shortcircuit that incorrectly formulated the error message
2016-03-09 15:37:52 -06:00
Robby Findler
11927aea37 respond to Matthias's comments 2016-03-09 14:36:25 -06:00
Robby Findler
6a250fb089 remove obsolete git commands 2016-03-09 14:36:25 -06:00
Matthew Flatt
4d358d9914 Windows: fix logging for place activity
Logging tends to use "%Id" for `intptr_t` formatting,
at least with MSVC, but the log-string formatting function
didn't recognize the "%Id" pattern.
2016-03-09 13:14:38 -07:00
Robby Findler
1e72b96f9a added a section on unsafe operations 2016-03-09 12:22:48 -06:00
Robby Findler
0f73870a1b fix keyword argument order bug in ->i
the bug required all mandatory arguments to manifest

closes PR 15267
2016-03-08 21:50:15 -06:00
Matthew Flatt
26d28a28fe fix mismatch between optimizer snd run-time on "constant" detection
Cross-module inlining that pulls a variable reference across a
module boundary imposes a more struct requirement that run-time
"constant" detection is consistent with the optimizer's view of
"constant" within a module. So, make sure they're the same.
2016-03-08 16:37:28 -07:00
Vincent St-Amour
747185184b Don't store result arity of reduced-arity functions in a field.
Instead compute it on the fly.
2016-03-08 17:00:53 -06:00
Vincent St-Amour
9fdffc446a Further cleanup and robustness. 2016-03-08 16:56:06 -06:00
Vincent St-Amour
b5503151ac Split impersonator property into two.
To avoid future confusion.
2016-03-08 16:31:20 -06:00
Vincent St-Amour
d80a8244a2 Fix the fix in 686bc68.
Original fix did not break correctness, but did introduce too much wrapping.
2016-03-08 16:21:58 -06:00
Vincent St-Amour
686bc68b0a Fix object/c multiple-wrapping optimization.
A shortcut in the optimization made it drop all but the most recent contract.
2016-03-08 15:51:51 -06:00
Gustavo Massaccesi
509da64135 reduce (let ([x <expr>]) #f) => (begin <expr> #f)
Sometimes the optimizer removes all the references to a variable but it
doesn't detect that the variable is unused, so it keeps the definition.

Later, the sfs detects the unused variable so it marks it, but it doesn't
remove the let form.
2016-03-07 20:30:46 -03:00
Matthew Flatt
89f30c3c0d Guide: remove a broken example
Using `syntax` to capture local binding information in the current
phase doesn't work with the set-of-scopes expander. Although the
example could be adjust to use `(quote-syntax car #:local)`, it
seems like too much detail at that point in the explanation.
2016-03-07 16:23:25 -07:00
Matthew Flatt
ffbae2c090 fix resolve-path to always return a path (not a string)
Closes #1132
2016-03-07 15:34:57 -07:00