Commit Graph

38051 Commits

Author SHA1 Message Date
Robby Findler
ba060131d1 fix syntax error source location for define/contract
closes #1561
2017-01-04 16:53:26 -06:00
Robby Findler
057ab0c5ff fixed error messages to say struct/c when appropriate 2017-01-04 16:49:38 -06:00
Robby Findler
67da8dbaf0 add a tech link for "path or string" 2017-01-04 09:18:54 -06:00
Robby Findler
abc061aae1 style tweaks, following the style guide 2017-01-04 09:18:54 -06:00
Alexis King
597661fa4e Make range from racket/list act like in-range when used with for 2017-01-03 15:26:42 -08:00
Robby Findler
cff1c1dd4e fix interaction between real? and flat-named-contract
and fix opters, which were just broken for flat-named-contract and names

closes #1559
2017-01-03 17:06:42 -06:00
Matthew Flatt
83d4cf4485 add test that a sandbox can be created in a sandbox 2017-01-03 13:09:36 -07:00
Matthew Flatt
78bbcec963 avoid trying to load Foundation framework on non-Mac OS
Relevant to #1549
2017-01-03 12:48:38 -07:00
Ben Greenman
88b2d5d4e6 document raco/all-tools, fix typos in raco documentation 2017-01-03 14:19:02 -05:00
Alexander Hedges
f1d853eeac Use JIT on powerpc 2017-01-03 11:39:40 -07:00
Alexander Hedges
d031f30d2a Add support for PowerPC on FreeBSD 2017-01-03 11:39:40 -07:00
Robby Findler
efb96c97b5 add #:name-for-blame to define-module-boundary-contract 2017-01-03 07:10:30 -06:00
Matthew Flatt
ada002616e fix Win64 native stack trace
Fix Win64-specific bug in 7812c604f4.
2017-01-02 12:42:02 -07:00
James Bornholt
ae21f8f875 Make PLTDISABLEGC work again
In e59f888, new GCs no longer inherit the `avoid_collection` value set by
PLTDISABLEGC, and so that setting is lost as soon as the master place spawns
(due to `GC_switch_out_master_gc`).
2017-01-02 11:24:11 -07:00
Matthew Flatt
e041d0f32f fix optimizer bug related to detected arity errors
When multiple-binding `let-values` form is split into a single-binding
form on the grounds that the right-hand side will definitely error,
the optimizer's effect clocks were advance incorrectly.

Closes #1552
2017-01-02 07:00:22 -07:00
Matthew Butterick
fc194d7337 update copyright year to 2017 2017-01-02 06:42:31 -07:00
Matthew Flatt
869d48b784 error context printing: show repeat counts
Instead of duplicating a context line, show "[repeats <n> times]".
This improvement particularly helps avoid showing less context
now that `for/list` creates a non-tail recursion to build up
the result list.
2017-01-02 06:42:31 -07:00
Robby Findler
c4926b5684 clarify the purpose of the (bad) match expander example
closes #1553
2016-12-30 08:51:00 -06:00
Robby Findler
66b199307c Adjust and/c so that it cooperates with between/c
Specifically, when it sees these contracts:

  (and/c real? negative?)
  (and/c real? positive?)
  (and/c real? (not/c positive?))
  (and/c real? (not/c negative?))

it generates the corresponding use of >=/c, <=/c, </c, or >/c, but
those contracts have also been adjusted to report their names as
(and/c real? ...).

This mostly is an improvement for contract-stronger, but also make it
so that (between/c -inf.0 +inf.0) just uses the real? predicate
directly, instead of a more complex function
2016-12-29 09:30:39 -06:00
Robby Findler
9019e8b318 make real? and (between/c -inf.0 +inf.0) be the same contract
mostly this just makes contract-stronger? work (slightly) better
2016-12-28 18:56:30 -06:00
Reid D McKenzie
f039a4c571 Typo - "describes" should be "described" 2016-12-27 16:57:19 -05:00
Matthew Flatt
a5af8708dd glib-log test: copy nul terminator
The classic C bug, possible in Racket thanks to `ffi/unsafe`.
2016-12-23 15:15:18 -07:00
Matthew Flatt
710320e3dc "Mac OS X" -> "Mac OS"
Although "macOS" is the correct name for Apple's current desktop OS,
we've decided to go with "Mac OS" to cover all of Apple's Unix-like
desktop OS versions. The label "Mac OS" is more readable, clear in
context (i.e., unlikely to be confused with the Mac OSes that
proceeded Mac OS X), and as likely to match Apple's future OS names
as anything.
2016-12-23 12:18:36 -07:00
Matthew Flatt
5cc5bb7c55 fix GRacket makefile to detect ".icns" change 2016-12-23 11:40:09 -07:00
Matthew Flatt
769ca13b35 update "Racket Documentation" app icon to match new logo
Icon by Matthew Butterick
2016-12-23 11:29:03 -07:00
Matthew Flatt
88aa7fdeff don't reorder some unsafe expressions that can depend on an effect
For example, an `unsafe-unbox` call should not be moved past the
call to an unknown function that might change a box's content.

Thanks to Sergey Pinaev for the report.
2016-12-23 08:01:30 -07:00
Matthew Flatt
5a4391dd90 don't share "gmp.c" compilation between CGC and 3m
Using `--disable-jit` causes futures to be disabled, and places are
always disabled for CGC; in that case thread-local variables are
not needed. Meanwhile, the 3m build still has places, so a "gmp.c"
compiled without thread-local support is broken.
2016-12-22 19:40:08 -07:00
Gustavo Massaccesi
992f990860 optimizer: merge lookup_constant_proc and optimize_for_inline
The objective of lookup_constant_proc and the first part of
optimize_for_inline was to find out if the value of an expression was a
procedure and get it to analyze its properties or try to inline it. Both
were called together in a few places, because each one had some special
cases that were missing in the other.

So, move the lookup and special cases from optimize_for_inline to
lookup_constant_proc, and keep only the code relevant to inlinig in
optimize_for_inline.
2016-12-22 23:34:27 -03:00
Matthew Flatt
d4ec96e35c recognize EROFS for file-or-directory-permissions
Closes #1478
2016-12-22 18:10:19 -07:00
Matthew Flatt
4bff048fb3 update app icons to new Racket logo 2016-12-22 13:36:52 -07:00
Matthew Flatt
eaa486db11 unbreak no-places, no-futures build 2016-12-22 10:50:27 -07:00
Matthew Flatt
cefb3aec2a make glib logging hook work with extra threads
If an OS-level thread other than a Racket thread logs a message, then
the message needs to be queued instead of handled immediately.

If multiple places are running, then the right handler thread is not
clear, so just queue to the main place's thread.

Closes racket/gui#66
Closes racket/drracket#77
2016-12-22 09:35:04 -07:00
Matthew Flatt
00171a3c2c file/[un]tar: support for long paths
Implement POSIX.1-2001/pax and GNU extensions for long paths and links
in `untar` and `tar`. Add a `#:format` argument to `tar` to select
among POSIX.1-2001/pax, GNU, or error encoding for long paths.
2016-12-21 16:00:12 -07:00
Matthew Flatt
9eb7d6b84e fix uses of namespace context without ensuring prepared
Closes #1530
2016-12-21 16:00:12 -07:00
Robby Findler
deaf48ae30 add #:use-wrapper-proc to racket/surrogate 2016-12-21 15:12:15 -06:00
Robby Findler
3e191fef04 misc small improvements to racket/surrogate
(generate less code in macro, add some basic test cases,
 small improvement to syntax errors, and small docs clarification)
2016-12-21 12:35:59 -06:00
Robby Findler
02a267fdb2 clarify that futures don't run in parallel with errortrace 2016-12-21 12:35:59 -06:00
shhyou
498f1795db Change the wording of the documentation for impersonate-procedure with wrapper-proc being #f 2016-12-20 08:47:29 -06:00
Tony Garnock-Jones
b99639ff97 Detect and propagate errors from tar to result of tar-gzip. 2016-12-20 17:44:52 +13:00
Matthew Butterick
3e4a0353cf fix misuse of trace-printf 2016-12-19 19:17:00 -07:00
shhyou
3b6eda5f7d Remove the documentation mentioning chaperon-procedure*? 2016-12-19 23:40:25 +08:00
Robby Findler
98c3906059 missed a spot in b100f4b 2016-12-17 17:09:09 -06:00
Robby Findler
23226d4290 clarify docs for unsupplied-arg in ->i
related to #1539
2016-12-17 09:10:17 -06:00
Robby Findler
21cf407616 fix a bug in 003e8c7
closes #1539
2016-12-17 08:16:13 -06:00
Robby Findler
7fcba3fcaa another test case 2016-12-15 20:17:43 -06:00
Robby Findler
b100f4bb75 fix error in 003e8c7 2016-12-15 17:35:23 -06:00
Robby Findler
8918279b21 adjust ->i so that when it sees that it got a flat contract,
it doesn't apply it the second time (since we know that the
only difference for indy blame is in the negative position
and we know that flat contracts never assign negative blame)

This commit combined with the two previous (2b9d855 and 003e8c7) do
not seem to have a significant effect on the performance of ->i
contract checking. In particular, I see a 50% slowdown between the
version before and the version after these commits on the third `time`
expression below, but no significant difference on the first two.

(without the improvement to flat-contract?, these commits are
a significant slowdown to `g`)

 #lang racket
 (require profile)
 (define f
   (contract (->i ([y () integer?]
                   [x (y) integer?])
                  (values [a () integer?]
                          [b (a) integer?]))
             values
             'pos 'neg))

 (define g
   (contract (->i ([y () (<=/c 10)]
                   [x (y) (>=/c y)])
                  (values [a () (<=/c 10)]
                          [b (a) (>=/c a)]))
             values
             'pos 'neg))

 (define (slow-predicate n)
   (cond
     [(zero? n) #t]
     [else (slow-predicate (- n 1))]))

 (define h
   (contract (->i ([y () slow-predicate]
                   [x (y) slow-predicate])
                  (values [a () slow-predicate]
                          [b (a) slow-predicate]))
             values
             'pos 'neg))

 (time
  (for ([x (in-range 100000)])
    (f 1 2) (f 1 2) (f 1 2)
    (f 1 2) (f 1 2) (f 1 2)
    (f 1 2) (f 1 2) (f 1 2)))

 (time
  (for ([x (in-range 100000)])
    (g 1 2) (g 1 2) (g 1 2)
    (g 1 2) (g 1 2) (g 1 2)
    (g 1 2) (g 1 2) (g 1 2)))

 (time
  (for ([x (in-range 10000)])
    (h 50000 50000)))
2016-12-15 12:43:17 -06:00
Robby Findler
2b9d855231 special case the flat-contract? predicate to avoid having
to create the whole contract struct for values that get coerced to flat contracts
2016-12-15 12:42:48 -06:00
Robby Findler
003e8c7870 avoid evaluating the dependent contract expressions multiple times in ->i 2016-12-15 12:42:48 -06:00
Robby Findler
f1d6e8bfe8 bring down below 102 columns 2016-12-15 12:42:48 -06:00