Commit Graph

38051 Commits

Author SHA1 Message Date
Gustavo Massaccesi
85eee2bbbc optimizer: remove argument of finish_optimize_application
The value of rator_flags was calculated in optimize_application and used in
finish_optimize_application, but it is possible to calculate it directly in
finish_optimize_application, and then remove some internal coupling.

This also simplifies other locations where the rator of an application was
changed and then it was necessary to recalculate the value of rator_flags
to complete the optimization steps.
2016-11-15 11:39:11 -03:00
Gustavo Massaccesi
9ebfdb54e7 extend reductions for expressions like (if (if X Y #f) Z K)
=> (if X (if Y Z K) K) where K is a constant,
to expressions where the inner `if` is (if X Y #t) or (if X #t/#f Y)
2016-11-15 11:37:17 -03:00
Gustavo Massaccesi
c3595c56b4 extend reductions for expressions like (let ([x (let ([y M]) N)]) P)
=> (let ([y M]) (let ([x N]) P))

to expressions where the outer `let` has more than one clause, for example

(let ([x (let ([y M]) N)]
      [z _])
  P)
2016-11-15 10:43:26 -03:00
Leif Andersen
1582178982 Add example for dict-implements/c 2016-11-15 08:29:51 -05:00
Matthew Flatt
115dec6fd9 fix bug in scheduler
When a thread that is blocked on a set of semaphores and channels
is suspended and resumed after one of the events becomes ready,
and if the event has a wrapper function, then the wrapper was
not applied and the event selection was not reported correctly.

Thanks to Philip McGrath for reporting the problem.
2016-11-14 08:21:42 -07:00
Sam Tobin-Hochstadt
3b9354f16b Handle quasi-list patterns better inside prefab struct patterns.
Reported by William Bowman.
2016-11-09 19:47:12 -05:00
Reuben Thomas
81fa8c403d sendurl: overhaul browser list
Remove “ancient browsers” netscape and mosaic.

Remove non-browsers (xdg-open, gnome-open), because we really want a
browser, and they don’t understand file URLs with queries.

Add chromium-browser.

Add default browser finders x-www-browser and sensible-browser (Debian &
derivatives).
2016-11-09 11:17:27 -06:00
Matthew Flatt
db26a24f2f Windows: fix timezone calculation
Comparing to daylight-saving time change was performed incorrectly, so
that days in the same month as a change and the hour within the day before
the switch hour were all treated as pre-switch (instead of counting
only days up to the switch as pre-switch).

Thanks to Jon Zeppieri for the repair and George Neuner for
the report.
2016-11-09 05:57:05 -08:00
Vincent St-Amour
e7a6573a20 Fix configure.ac for NetBSD.
From Aleksej Saushev.

C.f. http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/lang/racket/patches/
2016-11-08 12:49:58 -06:00
Alexis King
393afa3759 Track the origin of modules produced by module+ forms
This ensures the 'origin property is propagated from macros that expand
to module+ forms.
2016-11-08 10:15:48 -08:00
Vincent St-Amour
81cd3622d3 Update docs to reflect xrepl being enable by default. 2016-11-08 08:58:21 -06:00
Matthew Flatt
0d4e2a3275 configure: add -Wno-nullability-completeness for xform output
Mac OS X header files for 10.12 include `_Nullable` and `_Nonnull`
annotations. When those appear in xform output, they're no longer
counted as being in system headers, and so nullability
completeness is enabled. Disable is explicitly when the flag is
supported.
2016-11-04 05:05:22 -06:00
Gustavo Massaccesi
5833390396 optimizer: extend the reductions like (equal? x y) => (eq? x y)
This kind of reductions were applied only when x or y was a constant.

Classify the relevant predicates in 4 categories. In particular,
if <expr> satisfy pred? we can use this classification to apply
the correct reduction:

(equal? <expr> y) ==> [no reduction, unless y has a different type]
(equal? <expr> y) ==> (eqv? <expr> y)
(equal? <expr> y) ==> (eq? <expr> y)
(equal? <expr> y) ==> (begin <expr> (pred? y))
2016-11-01 20:40:01 -03:00
Gustavo Massaccesi
7c1cb1a2f0 optimizer: add symbol?, keyword? and char? to the relevant predicates
Also, add a new primitive interned-char? that is hidden, but it's
useful to track in the optimizer the the chars? with a value < 256
that are interned because they are treated specially, and if they
are equal? then they are eq?.
2016-11-01 20:40:00 -03:00
Robby Findler
3760de1fa9 improve the error message in ->* 2016-11-01 17:50:31 -05:00
Robby Findler
2f53b436f9 small error message tweak 2016-11-01 11:58:58 -05:00
Andrew Kent
82204d1444 faster in-*-id-table (#1499) 2016-10-30 14:28:13 -04:00
Andrew Kent
2070db9c01 report locations in default error handler 2016-10-30 17:19:32 +01:00
Matthew Flatt
19bfe3e44d xform: another Apple divergence from normal C tokenization
Make xform work with

  __attribute__ ((availability(macosx, introduced = 10.12.1)))

where `10.12.1` is not a normal C token.
2016-10-30 12:19:42 +01:00
Georges Dupéron
df2b1dad45 Fixes #1497 free-id-table-ref! with procedure failure argument stores the procedure, not its result 2016-10-28 10:47:48 -05:00
Georges Dupéron
432afc4561 raco pkg new: include v6.5 and v6.6 and v6.7 in .travis.yml 2016-10-26 21:02:15 -05:00
Matthew Flatt
cb6af9664c fix expand + compile + write + read + module->namespace
... + prefix-in + relative-path module. All of those ingredients
(or some similar alternatives) are necessary to trigger a slow
way of saving module context for interaction evaluation where
a module-path index shift was getting lost.
2016-10-26 17:09:30 -06:00
Gustavo Massaccesi
f159295e55 optimizer: add boolean? to the list of relevant predicates
Previously the relevant predicates where disjoint, and until this commit
the only predicate that recognizes #f was `not`. So it's necessary to fix
two reductions to allow other predicates that recognize #f, like `boolean?`.

Add a hidden `true-object?` primitive that recognizes only #t, that is also
useful to calculate unions and complements with `boolean?` and `not`.

Also, extend a special case for expressions like
    (or (symbol? x) (something))
where the optimizer is confused by the temporal variable that saves the
result of `(symbol? x)`, and the final expression is equivalent to
    (let ([temp (symbol? x)])
      (if temp #t (something)))
This extension detects that the temporal variable is a `boolean?` and
reduces the expression to
    (if (symbol? x) #t (something))
2016-10-25 16:49:13 -03:00
Alexis King
2030c0b0ae Add a missing for-label require to the file/glob docs 2016-10-25 10:22:41 -07:00
Robby Findler
1b834d010a fix wrong name in docs 2016-10-23 22:54:46 -05:00
Craig Allen
b826b176d2 mistake in passing get-timestamp rather than sys-type to write-central-directory
It's worth noting that this hasn't caused me an issue, I came across it as I wanted to see what sys-type actually did. I couldn't say what the affect of this change would be and don't have a use case for it, it just looks wrong!
2016-10-23 11:25:17 -06:00
Matthew Flatt
4ce947da74 update pkg FAQ on the package build service's catalog 2016-10-23 10:43:02 -06:00
Matthew Flatt
c4d7e8bf1b improve ubsan support
Provide `--enable-ubsan` to simplify `-fsanitize=undefined` builds,
where alignment and floating-point divide-by-zero need to be
disabled to get useful results.

Also, repair undefined behavior exposed by the test suite. Most of the
repairs are avoiding `memset(..., NULL, 0)` --- which is an unhelpful
requirement, IMO. The other two repairs are worthwhile but unlikely to
have caused trouble.
2016-10-22 21:35:02 -06:00
Georges Dupéron
153dc01ccd Some small fixes to the documentation
* Wrong contract for syntax-local-value in the documentation.
* Clarified signature in documentation for expand-import, expand-export and pre-expand-export
* Corrected typo in documentation for "for".
* Fixed error message for function which seems to have been renamed in the docs
* Fixed typo in a comment in the tests
* Fixed a typo in the documentation for set-subtract.
* Use double ellipses for the free-id-table-set*, free-id-table-set*!, bound-id-table-set* and bound-id-table-set*! operations
2016-10-19 20:52:45 -05:00
Matthew Flatt
ddf6985020 fix docs on PLT_COMPILED_FILE_CHECK
Merge to v6.7
2016-10-15 07:28:52 -06:00
Matthew Flatt
ff7f1ce9ff update "More" now that xrepl is on by default
Merge to v6.7
2016-10-15 07:28:43 -06:00
Matthew Flatt
8ccde1e5b3 update HISTORY.txt for v6.7
Merge to v6.7
2016-10-15 07:10:44 -06:00
Matthew Flatt
9011fe7d83 fix optimizer on bitwise-and
The optimizer assumed a fixnum result if either argument to
`bitwise-and` implies a fixnum result. That's not correct if the
fixnum agument is negative.

Thanks to Peter Samarin for a bug report.

Merge to v6.7
2016-10-13 11:39:39 -06:00
Matthew Flatt
a9f2765b4f another errno in a signal handler 2016-10-13 11:27:28 -06:00
Matthew Flatt
6e2978fe5c save errno in write barrier signal handler
In case a write barrier happens between the set and use
of `errno`, make sure the barrier doesn't cause the
`errno` value to change in the process of making other
system calls.
2016-10-13 11:27:28 -06:00
Matthew Butterick
9422d66601 improve vertical positioning & paren shaping in syntax->string 2016-10-12 16:02:32 -05:00
Vincent St-Amour
ecadde3a65 Add #:logger keyword argument to with-intercepted-logging.
Closes #1486.
2016-10-11 11:50:33 -05:00
Stephen Chang
58d9b3eb19 add doc example for make-provide-pre-transformer 2016-10-11 11:40:13 -04:00
Vincent St-Amour
241d87c011 Avoid tech collision.
Closes #1484.
2016-10-09 10:54:53 -05:00
Alexis King
e340719e5e Ignore git-http-backend stderr output in the pkg tests 2016-10-08 16:24:04 -07:00
Vincent St-Amour
d171218215 Post-release version for the v6.7 release 2016-10-07 14:52:26 -05:00
Vincent St-Amour
d597983bb9 Make pkg git credential format extensible.
Thanks to Eli.
2016-10-07 14:17:31 -05:00
Vincent St-Amour
456a72a36c Have id-table-ref! call its failure thunks.
Closes PR15346.
2016-10-07 13:58:47 -05:00
Matthew Flatt
a1a2d9c2c7 fix missing expansion context for prop:rename-transformer proc
When calling a procedure that is attached as a
`prop:rename-transformer` property value, make sure that
any available expansion context is accessible as reflected by
`(syntax-transforming?)`.

Syntax parameters as rename transformers particularly rely on that
information for local expansion.

Thanks to Jay for the "stxparam.rktl" test.

Closes #1479
2016-10-07 08:58:44 -06:00
Alexis King
d9750064b9 Merge pull request #1472 from lexi-lambda/pkg-git-credentials
Add support for git-backed packages that require authentication
2016-10-06 18:24:24 -07:00
Ben Greenman
65a69417cc doc: clarify elements vs values in sequence/c 2016-10-06 18:46:46 -04:00
Ben Greenman
97c65102b3 add file/glob
implements globbing for path strings
- glob : globs -> listof path
  in-glob : globs -> sequenceof path
  glob-match? : globs path-string -> boolean
- wildcards are: * ? [...]
- braces {} get expanded to multiple globs
- if pattern ends with /, only match directories
- wildcards don't capture dotfiles by default (keyword arg overrides)
2016-10-06 18:41:26 -04:00
Alexis King
c459886fc5 Add some warnings about checkout credentials being stored unencrypted 2016-10-06 11:48:48 -07:00
Alexis King
4111dbc967 Add test for raco pkg install for authenticated git packages 2016-10-06 10:42:36 -07:00
Ben Greenman
684dd2d1cb typo: redeclaration 2016-10-06 08:57:05 -04:00