Commit Graph

42252 Commits

Author SHA1 Message Date
Matthew Flatt
78b7cc3fc9 cs: use thread-local allocation while sweeping in collector
This is a second step toward parallel collection.
2020-09-05 17:22:12 -06:00
Matthew Flatt
3f3cf5ab83 cs: more thread-local allocation
Improved support for thread-location allocation (and using more
fine-grained locks in fasl reading) may provide a small direct
benefit, but the change is mainly intended as setup for more
parallelism in the collector.
2020-09-05 08:47:07 -06:00
Matthew Flatt
f50f44bb25 anoter repair to test for raco pkg 2020-09-03 13:30:50 -06:00
Ryan Culpepper
9464bc3274 add note about "quotable" to docs for make-constructor-style-printer 2020-09-03 16:56:28 +02:00
Matthew Flatt
b9e4b5dbb1 makefiles: enable ".boot" files in non-cross CS builds on Windows
There's a trade-off between keeping the distribution sizes small and
making ".boot" files available for convenient embedding, even though
embedding is relatively rare. For Unix platforms, since you have to
build from source to get a static library for embedding anyway, we'll
leave out ".boot" files. For Mac OS, the distribution's "Racket"
framework includes ".boot" files --- even though the framework is
itself unused for a normal distribution build, since signing and
notarization are handled by embedded the boot files in an executable,
but the framework was kept for a kind of backward compatibility. For
Windows, the Racket DLL can be used for embedding, so the ".boot"
files would be the only missing piece; also, they were already
included in a cross-built distribution.

Update "Inside" to note that ".boot" files must be built on Unix and
to clarify the location of ".boot" files on Mac OS.

Closes #3377
2020-09-03 07:31:01 -06:00
Matthew Flatt
3f0631116a Chez Scheme: improve repair for arm32 return-address reference
Since the offset is always a multiple of 4, expand the range of
compactly encoded offsets.
2020-09-03 06:46:46 -06:00
Matthew Flatt
f5895ebc97 Chez Scheme arm32: avoid bouncing in label-address assignment
The A32 instruction set has an interesting encoding of immediate
values where a larger value sometimes fits in a smaller set of
instructions. That turns out to be a bad property for loading a return
address, because it means that the as label computations push code
further away, a contracting return-address calculation can pull code
back nearer, and this push-and-pull can keep the label allocator from
arriving at a fixpoint.

This became a bigger problem with 8834597c1f, which creates
return-label references that go backwards and where the offset can be
much larger than the normal, forward references.
2020-09-02 18:37:15 -06:00
Ryan Culpepper
6f11f1f527 add documentation for datum and syntax variables, attributes 2020-09-02 20:21:44 +02:00
Ryan Culpepper
07f9b843a6 fix syntax/parse docs: add pretty-printing to evaluator 2020-09-02 20:21:44 +02:00
Ryan Culpepper
5c0d75fa3e datum: always force promise 2020-09-02 20:21:44 +02:00
Ryan Culpepper
45fb9b4d63 make datum variable in syntax template an error
Previously, a datum variable was treated as a constant.
2020-09-02 20:21:44 +02:00
Ryan Culpepper
25142daea5 change datum to work with syntax variables too 2020-09-02 20:21:44 +02:00
Matthew Flatt
3967a36102 raco pkg test repair 2020-09-02 08:18:08 -06:00
Matthew Flatt
bf1d99d9e0 expander: repair prompt that should be a barrier 2020-09-02 07:54:38 -06:00
Matthew Flatt
8ca49775b4 improve docs on issues with for bindings
See #3378: The possibility of mutation should be considered in
`:do-in` in somme rare cases, while it's not clear that there's
anything better to be done for mutation of the list accumulators in
`for/lists`. At least make the pitfalls clearer in the documentation.
2020-09-01 19:02:42 -06:00
Matthew Flatt
fb9bd97844 for/lists: repair body handling
Closes #3375
2020-09-01 19:02:42 -06:00
Philip McGrath
e8ba4462cc docs: port-number? and listen-port-number? require exact integers 2020-09-01 07:51:07 -06:00
Stephen De Gabrielle
863e29e827
GitHub issues: add contact links back to racket users and slack 2020-09-01 07:17:28 -06:00
Matthew Flatt
f90b1f21bf makefile: more fixes for install of include files on Windows 2020-08-31 20:16:58 -06:00
Matthew Flatt
ba5cbaf2e2 Chez Scheme and rktboot: adapt to work with latest nanopass
This commit doesn't update nanopass itself, but adapts `rktboot`
so it can be used with the main Chez Scheme bbranch. It also
adjust "cpnanopass.ss" to avoid different behavior between the
old and newer versions of nanopass.
2020-08-31 12:48:10 -06:00
Matthew Flatt
60e6989620 Chez Scheme: further improve memory-use reporting
Remove counts for more GC-time administrative structures (counting
them only in the overhead).

Related to #3338
2020-08-31 12:46:37 -06:00
Matthew Flatt
c75d8d71c1 cs makefile: fix cross-compilation dependency 2020-08-31 08:59:25 -06:00
Matthew Flatt
ef9a4a4e29 cs makefiles: fix cross install for Windows to install include files
Closes #3374
2020-08-31 08:33:24 -06:00
Matthew Flatt
8834597c1f Chez Scheme: fix continuation on result-count exception
The Scheme stack pointer was left in call state when the number of
results is wrong, with the intent of exposing the enclosing function's
frame for debugging purposes, but there's no guanrantee that the
result address is still on the stack (i.e., the continuation make have
been captured). Reinstall the return address before calling the
exception handler.
2020-08-31 07:18:26 -06:00
Matthew Flatt
b83e598b20 makefile: fix gractketcgc dependency
This change was meant to be part of 979fbf551d.
2020-08-30 09:12:51 -06:00
Matthew Flatt
f1b98900f5 rumble: fix misuse of fx=
Looks like I previously changed the wrong `eq?` to `fx=`.
2020-08-30 09:11:40 -06:00
sorawee
6a685f52c6
track disappeared-use for case's else
Closes #3363
2020-08-29 06:21:05 -06:00
Matthew Flatt
754211eead raco pkg: adjust tests to use PLTUSERHOME
The tests formerly set `PLTADDONDIR` to separate runs, but that no
longer makes the cache directory separate. Setting `PLTUSERHOME` is a
more complete separation.
2020-08-28 16:18:46 -06:00
Matthew Flatt
c95775641d expt: improve for flonum base and exact integer exponent
Avoid coercing an integer to a flonum when doing so loses
precision. It's especially helpfu lto preserve oddness
versus evenness.

Closes #3360
Closes #3100
2020-08-28 16:18:46 -06:00
Matthew Flatt
f086075093 ffi/unsafe: fix _bitmask in non-application position
The exported `_bitmask` is a macro that picks up a compile-time name
when available, but the macro expanded inconsistently.

Closes #3367
2020-08-28 14:28:01 -06:00
Matthew Flatt
7382f5d7e4 docs: update call-with-espace-continuation
The performance notes there applied to BC, not CS.

Closes #3373
2020-08-28 14:08:53 -06:00
Matthew Flatt
0ae3ef7b42 suppress built-in functions in stack traces
Experiment with removing built-in Racket functions in stack traces to
make the trace less noisy. "Built-in" is defined as code that exists
in the built-in modules. On CS, built-in code is detected as residing
in the static generation. (Also, on CS, the code must have a name but
no source location or detailed debugging information to be
suppressed.) On BC, a code object has a bit set if it's loaded at boot
time.

This change makes stack traces look more like Racket BC traces before
the macro expander was implemented in Racket. The frames for built-in
functions have been useful for implementing the expander and Racket
CS, but probably they're just noise for most users most of the time.

Set the `PLT_SHOW_BUILTIN_CONTEXT` environment variable to preserve
all available frames in the stack trace.
2020-08-28 13:01:47 -06:00
Matthew Flatt
95812bd7a5 cs: repair decoding of method names in stack traces 2020-08-28 11:05:15 -06:00
Matthew Flatt
a22550a963 prefer XDG paths, but fall back to old paths
Use "~/.racket" for 'pref-dir if it exists and "~/.config/racket"
doesn't, for example.

Based on discussion at #3268, especially with Ryan.
2020-08-28 09:26:40 -06:00
Ryan Culpepper
f52bff8a31 use XDG paths
'pref-dir = ${XDG_CONFIG_HOME:-~/.config}/racket/
 'pref-file = (build-path (find-system-path 'pref-dir) "racket-prefs.rktd")
 'addon-dir = ${XDG_DATA_HOME:-~/.local/share}/racket/
 'init-dir = ${XDG_CONFIG_HOME:-~/.config}/racket/
 'init-file = (build-path (find-system-path 'init-dir) "racketrc.rktl")
 'cache-dir = ${XDG_CACHE_HOME:-~/.cache}/racket/

... except actually the "~" uses PLTUSERHOME if set.

Use cache-dir as default "download-cache" parent dir.

related to #2740
2020-08-28 08:19:56 -06:00
Matthew Flatt
979fbf551d makefile: fix some dependency tracking
Add cm-accomplice tracking to the expander extractor, so changes to
"rktio.rktl" are picked up for "io".

Fix GRacket BC dependencies on rktio.
2020-08-27 17:41:02 -06:00
Matthew Flatt
d280462250 reader: treat BOM like whitespace in places where comments are allowed
Some text-editing tools on Windows include a BOM character (encoded)
at the start of a file that is intended as UTF-8. The general
recommendation for UTF-8 is to *not* include a BOM --- but, well,
Windows. When a BOM is there, meanwhile, the recommendation is to
preserve it in the stream, so always discarding an initial BOM at the
file-port level is not a good idea. A new file mode would make sense,
but distinctions like 'text and 'binary mode have turned out to be
best avoided.

Although I'm not sure it's really a good idea, treating a BOM
character as whitespace in the reader (at least in comment positions)
is an easy way around the problem for text files that are intended as
programs.

Closes #1114
2020-08-27 16:59:08 -06:00
Matthew Flatt
ace1c6a128 Mac OS: add libedit to the set of native libraries
The libedit library supplied by Mac OS is old and does not support
Unicode, so include a build that does support it.
2020-08-27 12:14:56 -06:00
Matthew Flatt
e5899bd3e6 cs: initialize locale on startup
The `current-locale` parameer value is transferred to the C lbrary via
`setlocale` on demand by Racket functions that depend on the locale,
but some libraries (like libedit) can also depend on the locale
setting. By default, the C library starts with the "C" locale, so it's
worthwhile to install the default locale on startup, even if that's
not a complete solution to support changes to `current-locale`.
2020-08-27 10:47:41 -06:00
Matthew Flatt
38570e3ea6 improve unsafe-linklet error message 2020-08-26 06:18:04 -06:00
Bogdan Popa
1177112970
rktio: get CPU count from the OS on FreeBSD and OpenBSD 2020-08-26 06:17:40 -06:00
Paulo Matos
a5ddbd3c9b
Fix typo in comment 2020-08-26 07:43:58 +02:00
Sorawee Porncharoenwase
66547f3aaf Change else in match to _
This fixes at least one "potential" bug in the file
`collects/pkg/private/create.rkt`, where `else` in the
`cond` is bound to `else` from `match` instead of `racket/base`.
(though it turns out that the format will always be
truthy, making the program happen to be correct.)
2020-08-25 09:37:02 -06:00
bdeket
6edc3dbfab gracket/gc2 makefile
Without this change, the below build fails for me.
This reflects the GRACKETLDFLAGS in the makefile one folder above. However I have no idea if this has wider implications...
```
mkdir build
cd build
..\configure --enable-bcdefault
make
```
2020-08-25 09:07:56 -06:00
Matthew Flatt
80ad628eef cs: avoid Chez Scheme fasl of immutable hash table
Change the ".zo" format to convert a linklet bundle hash table to a
list, which avoids probblems with stencil-vector encodings and cross
cimpilation between 32-bit and 64-bit platforms. Avoiding records,
stencil values, and hash code should make the fasled form simpler.
2020-08-23 20:20:07 -06:00
Matthew Flatt
b164f16681 compile-directory-zos: improvements for skip-path[s] and info 2020-08-23 19:34:55 -06:00
Matthew Flatt
b1aee01b8c cs: fix cross-compile depdency tracking 2020-08-23 19:34:55 -06:00
Matthew Flatt
1f18530719 cs: repair boot-reset linking for cross compiles 2020-08-23 19:34:55 -06:00
Matthew Flatt
71bf119460 Chez Scheme: repair pseudo-random for cross compile 2020-08-23 19:34:55 -06:00
Matthew Flatt
8d96a758d0 cs: support cross compile for Arm Linux 2020-08-23 19:34:55 -06:00