Commit Graph

41059 Commits

Author SHA1 Message Date
Paulo Matos
362edb00de
Check that file specified by --enable-racket exists (#3118) 2020-04-22 23:22:19 +02:00
Matthew Flatt
b320cfb103 fix test of dump-memory-stats
The `dump-memory-stats` function writes to stderr (although that's a
questionable choice).
2020-04-22 14:47:09 -06:00
Matthew Flatt
9358ebc97d cs: fix peak-memory logging
That number shouldn't be negative, but print it right in case it is.
2020-04-22 14:39:08 -06:00
Matthew Flatt
7c7d514f73 cs: fix glib logging callback
Commit 16ad9ed522 removed a `lock-object`, but that's only ok as long
as the callable is retained (which is better than using
`lock-object`).
2020-04-22 14:39:08 -06:00
Sam Tobin-Hochstadt
e95c3e337d
Update FUNDING.yml 2020-04-22 15:43:36 -04:00
Paulo Matos
0bc9007365
Fix CI yml syntax (#3117)
Do not use working directory on uses.
Also - update actions download/upload artifact to use v1 instead of master.
2020-04-22 21:34:28 +02:00
Paulo Matos
7a57072af3
Put all Racket installations in runner temp (#3116)
* Put all Racket installations in runner temp

Avoid relative paths (see #3112).

Fixes #3112.

* Replace missed .. in artifact download
2020-04-22 20:15:39 +02:00
Georges Dupéron
d09ce588bf Allow dotted list syntax for match expanders, e.g. (match v [(some-match-expander a b c . d) (displayln (list a b c d))])
Closes #1438.
2020-04-22 14:10:59 -04:00
Matthew Flatt
16ad9ed522 cs: use new immobile-object support
Implement 'atomic-interior allocation and immobile cells using
`make-immobile-bytevector` and `make-immobile-vector`, which avoids
having to unlock through a finalizer.

Also, the Chez Scheme GC can now mostly mark a major generation,
instead of copying it, which can significantly reduce memory
use during a GC for an old, large heap (such as DrRacket's).
2020-04-22 07:19:38 -06:00
Matthew Flatt
dccd841adf adjust peak-memory logging
Show peak administrative as a parenthesized delta on peak space.

For BC, this extra delta is small, because BC compacts (instead of
copying) old-generation objects. For CS, the extra delta can large ---
typically an extra 50%, but potentially another 100% --- because a
full collection copies all old-generation objects.

Also, for BC, fix cumulative-allocation reporting to include child
places.
2020-04-22 07:19:38 -06:00
Sam Tobin-Hochstadt
859e7b4373 Avoid unnecessary use of fprintf.
Closes #3113.
2020-04-21 18:35:04 -04:00
Paulo Matos
392dc33ceb
Update gmp invert_limb from arm (#3111)
Extract invert_limb code for ARM from GMP 6.2.
In order to check for thumb mode availability use defined macro `__thumb__`, which in turns requires us to process the source file with `gcc` instead of `as` in order to access the preprocessor - tested with `clang` as well.

Fixes #3050
2020-04-21 07:12:05 +02:00
Paulo Matos
876aff85c2
Constrain the values of a and b in function not to be both NULL (#3106)
Fixes #2686
2020-04-17 21:55:17 +02:00
Matthew Flatt
734491b511 configure: fix unix-style configuration with --prefix
Closes #3046
2020-04-17 12:05:21 -06:00
Matthew Flatt
fb677d9569 cs: sync with Chez Scheme update
The Chez Scheme change avoids a leak while collecting in counting
mode, which is used by Racket's memory-accounting mode.

Also, add a small repair for 4256214981.
2020-04-16 17:25:04 -06:00
Matthew Flatt
8145434fa7 cs: small memory-accounting simplification
Remove an unneeded accounting hook.
2020-04-16 13:44:43 -06:00
Matthew Flatt
4256214981 cs: repair retention of a custodian with a memory limit 2020-04-15 17:25:23 -06:00
Matthew Flatt
d685c835f9 expander: fix reader demo 2020-04-14 08:14:56 -06:00
Matthew Flatt
9c53358035 raco pkg catalog-archive: revert bad change
Unchanged with respect to state database is still changed with respect
to the catalog being constructed!
2020-04-12 14:05:25 -06:00
Matthew Flatt
3d9d12a4d6 raco pkg catalog-archive: avoid writing non-changed information 2020-04-12 13:54:15 -06:00
Sam Tobin-Hochstadt
803f235c30 Use new URL for GitHub tarballs.
GitHub switched URLs for tarballs, redirecting to the new one with
a 302. However, old versions of Racket don't follow redirects in
`raco pkg install`, so they broke (before 6.3). Using the new URL
should work for everyone.

Reported by @greghendershott.
2020-04-12 15:22:05 -04:00
Matthew Flatt
7ed8ea040e raco pkg catalog-archive: support platform-specific dependencies 2020-04-12 11:19:18 -06:00
Matthew Flatt
5df1b7906b raco pkg archive-catalog: add --include and --exclude
Also `--include-deps`, which support the creation of a catalog archive
that is restricted to a specific set of packages. Also
`--fast-file-copy`, which is usefl for speeding up a pipeline of
archiving (helpful to pkg-build).
2020-04-12 05:26:40 -06:00
Matthew Flatt
1b48cd86f9 net/url: add #:method argument to get-pure-port/headers
Supports HEAD with redirections, for example.
2020-04-12 05:26:40 -06:00
Robby Findler
7f9784775f fixes a bug in case->, closes #3098
also use the contract equivalence predicate instead of
two calls to contract stronger
2020-04-09 15:53:59 -05:00
Matthew Flatt
99af295d99 cs: fix constant-time list?
Closes #3097
2020-04-09 09:44:06 -06:00
Sam Tobin-Hochstadt
c81689bf9f Declare loop-updated variable outside the loop.
Found by scan-build.
2020-04-08 15:03:34 -04:00
Sam Tobin-Hochstadt
92c1ba9a62 Free buffer in error case.
Found by scan-build.
cc @pmatos.
2020-04-08 15:03:34 -04:00
John Clements
36bb3bc21f Post-release version for the v7.7 release 2020-04-08 00:23:46 -07:00
Matthew Flatt
f673534ad7 cs: fix place root for accounting
Avoid charging a thread for a place's allocation just bacuse it refers
to the place.
2020-04-06 09:25:47 -06:00
Matthew Butterick
0f351dbf29
correct docs for fast-clean flag
`-c` is not shorthand
2020-04-05 21:31:34 -07:00
Matthew Butterick
d396c70d0e
correct function name in error messages
needs to be `s-exp->fasl` not `fasl->s-exp`
2020-04-05 11:30:02 -07:00
Matthew Flatt
282ec8125a cs: use fused garbage collection and memory accounting
Chez Scheme now supports a single-pass combination of `collect` and
`compute-size-increments`, which makes a GC with accounting about
twice as fast. Meanwhile, other GC improvements reduce non-accounting
full-collection times by 10-20%.

Much of the GC implementation is now generated from a "Parenthe-C"
description, so update the bootstrap process for that step.
2020-04-04 10:43:58 -06:00
Paulo Matos
ed93eedecc
Static Analysis CI workflow using LLVM scan-build (#3090) 2020-04-02 21:35:37 +02:00
Sam Tobin-Hochstadt
dbaf9a8860 Just try brute force for packers.rkt instead. 2020-04-01 16:46:47 -04:00
Sam Tobin-Hochstadt
9c92189c82 Add output to help debug packers.rkt intermittent failure. 2020-04-01 16:44:10 -04:00
Ricardo Herdt
b822c25751 fix typo (extra "the") 2020-03-31 20:11:16 -03:00
Tom Gillespie
1933ba1584 extensions.scrbl fix confusing typo in example
The module is named `hi` but the text said that it was named `hello`
which is quite confusing since `"hello"` is actually the string that
is bound to `greeting`.
2020-03-28 22:13:16 -07:00
Matthew Flatt
5c77bfced9 further signed-vs-unsigned repairs to time handling
Changing the result of cpu-time functions to unsigned suggests
further corrections to avoid overflow.
2020-03-28 09:11:38 -06:00
Paulo Matos
9c2b84d849 Change return type of rktio_get_milliseconds to be unsigned
This fixes a major issue in arm 32bits, detected by ubsan, where
conversion of type to milliseconds results in overflow.

```
rktio_time.c:92:21: runtime error: signed integer overflow: 1584975753 * 1000 cannot be represented in type 'long int'
```
2020-03-28 08:55:24 -06:00
Matthew Flatt
9cb6debf44 cs & thread: memory accounting corrections
Repair trigger of a GC when using `current-memory-use`
on a custodian when a limit was just installed.
2020-03-28 08:39:42 -06:00
Paulo Matos
7621ccbb7b
Explicit zero assign to avoid warning (#3082)
GCC 9.3 things that `h2` might reach line 385 uninitialized.
```
./hash.c:385:14: warning: 'h2' may be used uninitialized in this function [-Wmaybe-uninitialized]
  385 |       h = (h + h2) & mask;
      |           ~~~^~~~~
```
2020-03-27 18:37:19 +01:00
Matthew Flatt
4a2cb6f577 bc: fix optimizer bug
Local-variable type information was not properly removed from
information threaded through optimization.

Closes #3081
2020-03-24 08:51:37 -06:00
Matthew Flatt
9222a135c3 cs: reliable GC callbacks on major GCs
A Chez Scheme garbage collection involves a rendezvous among threads
that are used to implement places and futures (and potentially other
things that create Chez-level threads). The thread that is used to
drive the garbage collection was not formerly specified, and callbacks
like the GC icon in DrRacket can only be run in the initial thread.
When a major collection was run in a non-initial thread, the callback
was simply skipped.

The Racket branch of Chez Scheme now drives a collection in the
initial thread whenever that thread is active. In Racket CS, the
initial thread can be inactive if it's waiting for external events,
and a place can meanwhile trigger a GC. Now, when the Racket CS GC
callback is called for a major collection in any thread other than the
initial one, it defers the major collection to an asynchornous
callback in the main thread (and meanwhile performs a minor
collection).

So, a major collection might now be delayed by just a little while if
the main thread is inactive, such as when it's waiting for external
events, but callbacks like the GC icon in DrRacket will be reliably
invoked for major collections.
2020-03-23 17:50:04 -06:00
Paulo Matos
4a62408b71
Fix typo in comment 2020-03-23 16:58:33 +01:00
Sorawee Porncharoenwase
3c966bc297 Unbreak syntax/to-string tests
It's still unclear what the specification of syntax->string regarding whitespace
before closing parens should be. The implementation also has not dealt with
the issue. This PR therefore removes whitespace before closing parens from
the tests.

Once the discussion at
https://github.com/racket/racket/issues/3071#issuecomment-601984438
has reached a conclusion and implemented, we can add these tests back.
2020-03-22 20:46:12 -04:00
lkh01
d9c064d06c make syntax->string work with unquote, quasiquote, etc. 2020-03-22 15:05:01 -04:00
lkh01
6a7ad2e49e add some tests for syntax->string 2020-03-22 15:05:01 -04:00
lkh01
40c589ef8a do not overwrite whitespace after a quote 2020-03-22 15:05:01 -04:00
lkh01
2a8e10b31a account for difference between quote and ' in syntax->string 2020-03-22 15:05:01 -04:00