Commit Graph

42787 Commits

Author SHA1 Message Date
Matthew Flatt
7975bdf25d traditional Windows directory paths are limited to 247 characters
... not 259 characters, which is the limit on file paths.
2020-11-10 14:53:07 -07:00
Matthew Flatt
23710d5862 cs & io: avoid overlong Windows paths
Convert paths to "\\?\" as needed to avoid the 259-character limit on
a path length.
2020-11-10 14:53:07 -07:00
Matthew Flatt
0342804b18 rktio on windows: fix buffer size for getting OS current directory
Relevant to #3493
2020-11-10 14:00:43 -07:00
Matthew Flatt
aea024736a unbreak cify 2020-11-10 11:31:41 -07:00
Matthew Flatt
e050c82896 makefile: fix DIST_CATALOGS_q propagation
The `DIST_CATALOGS_q` variable was propagated incorrectly, which
mainly affected the `client-compile-any` target that is used for
creating source bundles.
2020-11-10 10:36:21 -07:00
Matthew Flatt
1ac6c15207 add #:unsafe option for #%declare
Finally give in and add an option to compile a module as unsafe. This
was going to be easy, since the option already exists at the linklet
level, but it turns out that a lot of plumbing was needed to propagate
the argument, and even more to preserve unsafety with cross-module
inlining.

Macros can effectively conditoinalize their expansion in unsafe mode
by generating the pattern

 (if (variable-reference-from-unsafe? (#%variable-reference))
     <unsafe variant>
     <safe variant>)

The compiler will only keep one of the two variants, because it
promises to optimize `(variable-reference-from-unsafe?
(#%variable-reference))` to a literal boolean. The expander will still
expand both variants, however, so avoid putting code in both variants
that itself can have safety variants.
2020-11-10 10:36:03 -07:00
Matthew Flatt
c85659b905 Chez Scheme: fix compiler bug introduced with unboxing
When simplifying certain expressions, a non-pointer variable was
created to hold a pointer value.
2020-11-09 13:23:39 -07:00
Matthew Flatt
c017ecbafe cs: avoid inlining error path internally 2020-11-09 11:44:12 -07:00
Matthew Flatt
91e3065991 Chez Scheme: fix typo for flvector operation 2020-11-09 11:43:36 -07:00
Matthew Flatt
a17516f5b6 rktio: repair for subprocesses on Unix witthout threads
A list of pending process records was not managed correctly when
interest in a subprocess is abandoned before the subprocess completes.
2020-11-09 09:24:05 -07:00
Matthew Flatt
a0375111a3 Chez Scheme: fix flvector-copy for 32-bit platforms
Closes #3490
2020-11-09 05:55:47 -07:00
Paulo Matos
4892d2ad80 Fix workflow syntax 2020-11-09 13:44:04 +01:00
Paulo Matos
3369bf6658 Allow test-cgc to fail without failing the workflow
Related to #3491
2020-11-09 13:40:56 +01:00
Matthew Flatt
fe54cbc63f Chez Scheme: avoid copying huge objects during GC 2020-11-08 19:22:09 -07:00
Matthew Flatt
42f3825738 docs: correct recent addition on make-caching-managed-compile-zo 2020-11-08 08:48:24 -07:00
Matthew Flatt
d2b954c428 reference: specify time complexities for many list and vector operations 2020-11-08 07:52:01 -07:00
Matthew Flatt
3a47af217e docs: more clarifications on compiler/cm and namespaces 2020-11-08 07:34:34 -07:00
Matthew Flatt
e40e86ae5a Chez Scheme: unbreak 32-bit build 2020-11-08 05:56:56 -07:00
Matthew Flatt
7a12b4ac93 cs & thread: repair suspending a thread that is currently in sleep
Thanks to Greg Rosenblatt for the report.
2020-11-07 17:35:30 -07:00
Matthew Flatt
db195a52b5 raco decompile: avoid static-generation code
Update the decompiler to avoid hard-coding the static-generation
numebr, which changed.
2020-11-07 14:08:36 -07:00
Matthew Flatt
7c8d9c6523 bc: avoid bad floating-point roundoff in seconds->date
Thanks, Xsmith!

Closes #3489
2020-11-07 12:52:38 -07:00
Matthew Flatt
09c9901f6b bc: don't drop operations when impersonators can interpose
For example, if the result of `(when (box? x) (unbox x))` is not used,
then the `(unbox x)` still must be done, because the box might be an
impersonator. In contrast, `(when (box*? x) (unbox* x))` can be
dropped, since `unbox*` is an authentic unbox.

This change applies to unsafe operations like `unsafe-struct-ref`,
too, and applies to struct accessors for non-authentic structure
types.

Racket CS already preserves operations appropriately.

Relevant to #3487
2020-11-07 10:53:44 -07:00
Matthew Flatt
1149bb8b2c reader: extend error message for disabled #lang
Try to give more hints to help somone who writes `#lang` twice.
2020-11-07 07:55:20 -07:00
Matthew Flatt
2b7e36b5f4 Chez Scheme: fix version mismatch for install 2020-11-07 07:54:46 -07:00
Matthew Flatt
2b945d12fb Chez Scheme: add flvectors
To make room in the type encoding, remove immutable fxvectors from
Chez Scheme --- which had been added just to go along with immutable
strings, vectors, and bytevectors, but immutable fxvectors do not seem
useful, and they have no counterpart in Racket.
2020-11-07 07:34:33 -07:00
Matthew Flatt
128174594e fix symbol prining with #\uFEFF characters
Since the reader now treats #\uFEFF as whitespace, adjust the printer to
escape \uFEFFa.

Thanks, Xsmith!

Writing an actual #\uFEFF character seems bad, even escaped, but
Racket's symbol syntax doesn't have a kind of escaping that uses
different characters than the one to be represented.

Closes #3486
2020-11-06 12:20:47 -07:00
Matthew Flatt
6b7a184297 bc: fix gcd on most negative fixnum
Xsmith found this fixnum-boundary bug.

Closes #3484
2020-11-05 17:25:30 -07:00
Matthew Flatt
add9ed72c6 bc: sync expander expansion 2020-11-05 17:24:39 -07:00
Matthew Flatt
3db7e471eb cs: faster path for a foreign call with a lock
The call is only slightly faster, but since it affects text drawing
with `racket/draw`, a slight improvement can be worthwhile for
DrRacket.
2020-11-04 16:33:18 -07:00
Matthew Flatt
1aab61340e cs: fix printed name of some fx and fl functions 2020-11-04 15:33:42 -07:00
Matthew Flatt
e50f53e990 cs: reduce allocation on foreign calls with 5-8 arguments
Extend a fast path for up to 4 arguments to work on up to 8 arguments.
2020-11-04 15:22:41 -07:00
Matthew Flatt
18ff816358 cs: performance improvements related to string encoding
Streamline rktio byte-result copying (main improvement), use fixnum
arithmetic more consistently (minor improvement), and change
`in-bytes`, etc., to avoid some checks in unsafe mode (intermediate
improvement).
2020-11-04 11:57:52 -07:00
Matthew Flatt
fc53f2998c normal-case-path: leave bad encoding bytes alone
When bytes within a Windows path cannot be converted using
`bytes->string/locale` (i.e., when the bytes do not fit a UTF-8
encoding), then leave the bytes alone, instead of triggering a failure
from `bytes->string/locale`.

Fixing this bug uncovered others: `string-locale-downcase` did not
work on an empty byte string on a little-endian machine, and
`in-bytes` and similar reported range errors in terms of "vectors".
2020-11-04 10:27:07 -07:00
Matthew Flatt
66ed5369ef Chez Scheme: accomodate new MinGW for 32-bit Windows 2020-11-03 18:09:56 -07:00
Matthew Flatt
5d53bdac0c Chez Scheme: unbreak 32-bit Windows cross-build 2020-11-03 17:32:08 -07:00
Matthew Flatt
06021193ee cs: fix (system-type 'link) 2020-11-03 15:00:55 -07:00
Matthew Flatt
ae2b2c9989 docs: explain interacton of managed-compile-zo and namespace 2020-11-03 14:59:10 -07:00
Matthew Flatt
689fa6e2b2 cs: adjust how boot images get to Chez Scheme
Change the way boot images are sent to Chez Scheme by the Racket CS
wrapper, especially in the case where boot images are embedded in an
executable (which is always true for a distriution build). The revised
approach avoids a little filesystem work, and it may help Chez Scheme
pull bytes in faster.
2020-11-03 13:21:24 -07:00
Robby Findler
daf142c1c0 improve the error messages for flat hash/dc contracts 2020-11-03 09:47:43 -06:00
Matthew Flatt
6e917a610e cs configure: add --disable-wpo
Builing Racket CS on a 64-bit platform requires a little more than 1.5
GB of memory due to whole-program optimization of the Racket core
immplementation. Add a `--disable-wpo` configure option, which keeps
memory use below 0.5 MB to provide the option of building Racket in a
more constrained environment.
2020-11-03 08:11:44 -07:00
Matthew Flatt
7ef4ac10d2 Chez Scheme: move C compiler default flags to configure
Instead of selecting flags through a mixture of `configure` and
"c/Mf-*", determine defaults in `configure`. If `CFLAGS` is provided,
then the defaults are not used. Flags needed for threaded mode are an
exception, and `LDFLAGS` and `LIBS` are expanded even if supplied ---
unless `--disable-auto-flags` is specified.

Closes #3467
2020-11-02 21:03:14 -07:00
Matthew Flatt
3553df0246 avoid C compiler warning 2020-11-02 08:33:49 -07:00
Walter H. Yang
10cc9a605e
docs: add example for subprocess
Closes #3395
2020-11-02 08:05:04 -07:00
Matthew Flatt
0a7c4e2613 bc: fix printing of #:|.| and #:|#|.
Closes #3477

Thanks, Xsmith!
2020-11-01 06:12:31 -07:00
Matthew Flatt
f6a598a116 raco setup: add --sync-docs-only flag
The `--sync-docs-only` flag is intended for contexts like pkg-build as
a backstop against unintended and time-consuming activity when the
intent is to assemble documentation.
2020-11-01 06:12:31 -07:00
Matthew Flatt
741048eebb remove accidentally comitted debugging output 2020-10-30 17:01:43 -06:00
Matthew Flatt
a53250ddd7 doc: the relevant propert for char-numberic? is "Numeric_Type"
R6RS seems to get ths slightly wrong, since there isn't a "Numeric"
property, but a "Numeric_Type" property.

Relevant to #3460
2020-10-30 17:01:43 -06:00
bdeket
8137798937
Improve (sinh x) : x around 0 (#3473)
* sinh - Taylor expansion near 0
* fast path for |z| < 1e-8 in this case the second term is already to small to matter
2020-10-30 12:36:13 -04:00
Paulo Matos
07148a22a0 Instead of just cleaning workspace, clean whole home dir 2020-10-30 15:42:45 +01:00
Matthew Flatt
24bd6abecb cs: _path should not force an absolute path
While sending an absolute path to a foreign library is usually the
right idea to ensure that it's relative to `(current-directory)`, the
`_path` FFI type should not do that automatically --- because
sometimes it's useful to send a relative path to a foreign library,
but most because it hasn't been defined that way in BC.
2020-10-30 08:25:43 -06:00