Commit Graph

38639 Commits

Author SHA1 Message Date
Matthew Flatt
290020c597 ffi/unsafe: add #:lock-name option to _fun and _cprocedure
While `#:in-original-place? #t` provides one way to serialize
foreign calls, it acts as a single lock and requires expensive
context switches. Using an explicit lock can be more efficient
for serializing calls across different places.

For example, running "plot.scrbl" takes 70 seconds on my machine
in the original place and using `#:lock-name` in any place,
while it took 162 seconds in a non-main place with Cairo+Pango
serialization via `#:in-original-place? #t`.

Internally, the named lock combines compare-and-swap with a
place channel. That strategy gives good performance in the case
of no contention, and it cooperates properly with the Racket
scheduler where there is contention.
2015-06-25 10:35:22 +08:00
Matthew Flatt
9931d5ef1c avoid compiler warning 2015-06-24 07:17:39 +08:00
Matthew Flatt
f7e1fcd557 log a warning for shadowing an import with a definition 2015-06-24 07:15:29 +08:00
Gustavo Massaccesi
95bac91268 Propagate types form the body of let's forms and inlined functions
The optimizer was able to use the type information gained outside
the let's to reduce expressions inside the lets. For example, in
  (lambda (z) (car z) (let ([o (random)]) (pair? z)))
it reduces (pair? z) ==> #t.

This enable the propagation in the other direction so in
  (lambda (z) (let ([o (random)]) (car z)) (pair? z))
it reduces (pair? z) ==> #t too.
2015-06-23 16:52:40 -03:00
Gustavo Massaccesi
1a091f535e Intersect types gathered in if branches 2015-06-23 16:46:23 -03:00
Matthew Flatt
ea016bec96 allow definition in module to shadow a preceding import
This change is experimental and intended to reduce (but certainly not
eliminate) the problem of breaking existing code by adding exports to
a module.
2015-06-23 21:31:57 +08:00
AlexKnauth
fae92a19f5 add define-syntax-parser
idea from
863d39229f (diff-3252674930bbd0c4e113856a2a3a5747R118)
2015-06-22 18:25:44 -04:00
AlexKnauth
cb3f296678 support this-syntax in syntax-parse, syntax-parser, etc.
closes PR 14855
2015-06-22 15:40:44 -04:00
Matthew Flatt
ca57adcf2d fix slow leak in link-establishing thread-resume
Using `(thread-resume t1 t2)` would not prevent a GC of t1, but it
would create an intermediate record to make the link from t1 to t2,
and that intermediate record would leak due to a missing level of
indirection in a table-cleanup traveral. The leak not only accumulated
memory, it also caused ever slower traversals of the table in an
attempt to clean up.

(Since the leak is small and the leaking object is not directly
accessible, I don't have a good idea on how to test this repair
automatically, but see the program in the PR.)

Closes PR 15099.
2015-06-22 16:53:52 +08:00
Eric Dobson
82218f33bd Fix docs on thread-resume-evt
It returns `thd` as in the previous sentence, not itself.
2015-06-20 21:43:34 +08:00
Tony Garnock-Jones
4b2c9cfbcc Add exn->string, following the function of the same name in the web-server. 2015-06-20 21:43:33 +08:00
Gustavo Massaccesi
502575b641 Typos in docs of raco setup 2015-06-20 21:43:33 +08:00
Alexis King
c79f646545 Add stream* to complement stream 2015-06-20 21:43:27 +08:00
Jay McCarthy
33717eebaa Fixing empty request data 2015-06-18 08:41:18 -04:00
Vincent St-Amour
97827acba6 Fix name of command in docs. 2015-06-11 14:03:16 -05:00
Matthew Flatt
bf12a2bdd7 bump version number
Should have bumped it with the xform changes.
2015-06-07 09:03:01 -06:00
Matthew Flatt
d95200f19a remove setting of socket send buffer size
Modern OS configurations likely use an even larger buffer size, and
making it small can have substantial negative performance effects
(e.g., with PostgreSQL over TCP).
2015-06-06 10:50:44 -06:00
Matthew Flatt
ed4bbcd4ad xform: further parsing corrections
Although the previous commit was enough to make the build work, it
wasn't the right fix. Simplify and correct parsing and printing.
2015-06-06 10:13:33 -06:00
Matthew Flatt
26e1dd050d xform: fix character parsing
Allow L'\x7f`, for example.
2015-06-06 09:41:39 -06:00
Matthew Flatt
4deacddde8 attempt to fix xform problem
Mark some pointer arithmetic as ok.
2015-06-06 09:21:23 -06:00
Matthew Flatt
cf8c3c9cfe adjust auto-configuration of CPPFLAGS vs. CFLAGS
When AC_PROG_CC picks GCC, move its selection of CFLAGS
into CPPFLAGS, so that preprocessing will have the same
optimization and debugging flags as compilation.

Arguably, AC_PROG_CC plus AC_PROG_CPP should do that
soemhow, but it's understandable that the autoconf
implementers didn't cover the possibility of
preprocessing that changes with the optimization level.

Closes #945
2015-06-06 07:55:14 -06:00
Sam Tobin-Hochstadt
fc6ead4ac2 Improve match compilation of ? and fix bugs.
- Coalesce repeated use of the same predicate.
- Fix scoring of Exact patterns, and scoring generally.
- Use `OrderedAnd` where needed.
- Guarantee that `and` patterns match in order.
- Thread bound variable information properly in GSeq compilation.
- Warn when variables are used non-linearly with `...`
  (making this behave properly was not backwards compatible).

Closes #952, which now runs in <1ms and make it a test case.

Also add margin note about `?` patterns and multiple calls.
2015-06-05 18:08:33 -04:00
Matthew Flatt
e1e89adf62 adjust Active-X example to work with newer IE 2015-06-05 09:15:25 -06:00
Alexis King
35c3554343 Make pair accessor shorthand examples properly link to id docs 2015-06-04 06:48:18 -06:00
Matthew Flatt
4ba3adf11b document raco read 2015-06-04 06:48:18 -06:00
Alexis King
495784ed49 Fix contract error in in-vector documentation example 2015-06-04 07:38:57 -05:00
Matthew Flatt
3da4b863cf add raco read 2015-06-03 11:53:11 -06:00
Alexis King
391a672bf6 Fix the first order check on async-channel/c 2015-06-03 12:19:28 -05:00
Matthew Flatt
0bed8e8928 fix command-line docs for flags that start "--"
Closes PR 15080
2015-05-31 06:06:22 -06:00
Sam Tobin-Hochstadt
b4c52698c0 Increase timeout more. 2015-05-27 12:56:52 -07:00
Sam Tobin-Hochstadt
c8ff0c8b18 Fix timeout for core tests. 2015-05-27 13:51:09 -04:00
Robby Findler
53f03d73f4 add more accurate timeouts 2015-05-27 09:35:05 -05:00
AlexKnauth
2b0ba444c0 and/c: use projections more on flat-contract arguments 2015-05-26 20:39:41 -05:00
Sam Tobin-Hochstadt
00893cbd3f Avoid timeouts now that raco test enforces them. 2015-05-26 12:17:58 -04:00
Sam Tobin-Hochstadt
0acb35ddbb Try using cover for code coverage. 2015-05-26 12:13:22 -04:00
Spencer Florence
2de9cf42eb fix default timeout 2015-05-26 06:39:46 -06:00
Sam Tobin-Hochstadt
4a82b01845 Merge pull request #2 from florence/fix-travis-display
Fix display missing errors on travis
2015-05-20 16:03:50 -04:00
Sam Tobin-Hochstadt
9de3f8b87f Depend on new "plai-lib" pkg. 2015-05-20 15:58:10 -04:00
Robby Findler
78ecccc2b1 fewer quotes 2015-05-19 11:17:17 -05:00
Alex Knauth
d30b90cba3 contract docs: explain positive and negative as server and client 2015-05-19 11:14:13 -05:00
Robby Findler
a9ac3be43c add missing default value 2015-05-18 20:35:36 -05:00
Matthew Flatt
235bd4de8f raco setup: fix shared-file cleanup on uninstall
The tidying step of `raco setup` looked for the "shares.rktd"
receipt file in the wrong directory.
2015-05-18 18:55:18 -06:00
Matthew Flatt
7067559ac7 raco setup: fix reporting of stderr output
Handle was mangled in commit 17275b946a.
2015-05-18 18:08:44 -06:00
Gustavo Massaccesi
542b960d12 Tests for 16ce8fd90d 2015-05-16 22:32:05 -03:00
Matthew Flatt
aaa289c7b6 tests and repairs for early checks
Also, avoid "early" checks when recurring, just in case.
2015-05-16 17:15:22 -06:00
Matthew Flatt
5aa7ba6f30 raco pkg install: check for installed before catalog, etc.
Add an early check for whether a package is installed before
doing more time-consuming work, such as consulting a catalog.
2015-05-16 16:44:46 -06:00
Matthew Flatt
07b8007edb raco pkg: better error message for bad Git URL 2015-05-16 16:26:55 -06:00
Matthew Flatt
9272781d6d git-checkout: add #:initial-error argument 2015-05-16 16:23:16 -06:00
Matthew Flatt
c4401313d4 when a directory URL fails, suggest a ".git" extension 2015-05-16 16:23:16 -06:00
Matthew Flatt
88551aa8c6 git-checkout: add #:initial-error argument 2015-05-16 16:22:08 -06:00