Commit Graph

41059 Commits

Author SHA1 Message Date
Matthew Flatt
b0f77a98a3 schemify: improve cross-module optimization
The schemify pass collects known-value information as the first step
of processing a linklet body, but the main pass to process the linklet
body may simplify it in a way that exposes new information. For
example, in

 (define (call) (values 1 2))
 (define-values (x y) (call))

the main pass will inline `call` and expose the fact that `x` and `y`
are always 1 and 2, respectively.

Adjust schemify to inspect the simplified form of a definition and
potentially add new information to known-value information, which is
useful later in the ame linklet body and also as cross-module
information.
2019-07-01 15:19:28 -06:00
Matthew Flatt
ecabcd385a schemify: add constant folding
Like other optimizations that schemify duplicates, constant folding
helps support cross-module optimization. Related "no-prompt"
declarations for primitives can reduce `call-with-module-prompt`s in
schemified output, too, which can interfere with Chez Scheme's
optimizer.
2019-07-01 14:34:25 -06:00
Paulo Matos
831e75d731
Remove SCHEME_NO_EXN block (#2718)
This is probably related to #2712.
It's the only occurrence of SCHEME_NO_EXN pointing to the fact that
this is an historical artifact that can be removed.
2019-07-01 16:17:07 +02:00
Matthew Flatt
0e1af0be89 schemify: recognize define-values split after inlining
Recognize `(define-values (id ...) (values rhs ...))` and split to
multiple `define`s after simplifying the right-hand side of
`define-values`. Also, don't split if a define variable is referenced
too early.
2019-07-01 06:11:17 -06:00
Matthew Flatt
c5523fef02 use fixnum-for-every-platform? for case 2019-07-01 05:41:08 -06:00
Paulo Matos
e97c85b79e
Mark do_raise as NORETURN and ensure it does not return (#2717) 2019-07-01 12:55:30 +02:00
Paulo Matos
26cd03ec8f
Do not add explicit return statement when it doesn't exist (#2715)
Adding return statement where it doesn't exist, causes problems with
functions marked no return so it should be avoided.

Related to #2709 - with this PR, clang won't complain any longer
about issues with xform generated sources about functions marked
no return that do indeed return.
2019-07-01 12:30:45 +02:00
Paulo Matos
fcddf7e9ba
Whitespace cleanup (#2716)
Requested as a separate PR in #2714
2019-07-01 12:28:22 +02:00
Paulo Matos
da2d75c81b
Trim spaces (#2657)
It's a non-functional commit.
2019-07-01 12:27:51 +02:00
Matthew Flatt
f8e5526b28 unbreak some 32-bit x86 builds 2019-06-30 11:40:17 -06:00
Matthew Flatt
020c75792c add fixnum-for-every-system?
The `case` macro needs to use the new predicate instead of `fixnum?`,
but delay swittching over until Typed Racket is ready.
2019-06-29 20:18:23 -06:00
Matthew Flatt
b1a5c86702 cs: disable bytecode loaded with a non-original code inspector
Racket CS now passes all tests in the core Racket test suite.
2019-06-29 09:20:36 -06:00
Matthew Flatt
4400b70b87 sandbox test: repair for bytecode directory other than "compiled" 2019-06-29 08:33:17 -06:00
Matthew Flatt
97b2982a1d schemify: update demo 2019-06-29 08:30:08 -06:00
Matthew Flatt
efeb9116d5 cs & schemify: fix set!-vs.-define tracking 2019-06-29 08:13:52 -06:00
Matthew Flatt
2bff59766d adjust a test for Racket CS
The fact that Racket uses double hashing and Racket CS uses single
hashing can show up in a test that supplies a `equal-key-proc`
argument to `{impersonate,chaperone}-hash`.
2019-06-29 06:12:14 -06:00
Matthew Flatt
e0d454040a doc correction for in-syntax 2019-06-29 06:02:36 -06:00
Matthew Flatt
82d40d1509 use wrappers for trig functions in complex variants
Using wrappers applies various "sconfig.h"-configured fixups.
2019-06-29 05:46:10 -06:00
Matthew Flatt
2847d1d22a improve atan, asin, and acos on complex numbers
Replace naive calculations with ones based on Kahan's "Branch Cuts for
Complex Elementary Functions" as implemented in Chez Scheme.
2019-06-28 16:51:48 -06:00
Matthew Flatt
8e1b27592f cs: disable non-decimal string->number on inexacts 2019-06-28 10:57:59 -06:00
Matthew Flatt
77bcfde77c fix a memory-accounting test 2019-06-28 10:57:59 -06:00
Matthew Flatt
75ff7870bd improve / precision on mixed exact--inexact complex numbers 2019-06-28 10:57:59 -06:00
Matthew Flatt
ff94c6d8d8 cs: fix variable-reference->module-... on reference to primitive 2019-06-28 10:57:59 -06:00
Matthew Flatt
032ab4e374 cs: add place logging 2019-06-28 10:57:59 -06:00
Noah W M
c84765b554 Update general-function.scrbl 2019-06-27 23:08:13 -05:00
Matthew Flatt
67a1cd9274 fix OpenSSL ephemeral cipher test
Thanks to Sam for the repair.
2019-06-27 15:04:45 -06:00
Matthew Flatt
993563a829 openssl: fix a test to suppress some expected error output 2019-06-27 15:04:45 -06:00
Matthew Flatt
d93c12fcda raise some test timeouts 2019-06-27 15:04:44 -06:00
Ryan Culpepper
3c12957c7e template: mark pattern variables as disappeared
This fixes a bug introduced in 291565.
2019-06-27 22:22:08 +02:00
Paulo Matos
aaf1127093
Shallow clone LLVM 2019-06-27 10:33:48 +02:00
Matthew Flatt
cbaddd2164 cs & thread: repairs for memory accounting and places 2019-06-26 13:50:06 -06:00
Matthew Flatt
8985a409b8 openssl: fix bytes-terminator problem on Racket CS
Make sure the argument to SSL_ctrl has a nul terminator.
2019-06-26 13:50:06 -06:00
Matthew Flatt
5e59ae0586 rktio: use only async-signal safe after fork
In particular, `malloc` is not async-signal safe.
2019-06-26 13:50:06 -06:00
Matthew Flatt
0e2805a0db raise timeout on raco exe test 2019-06-26 13:50:06 -06:00
Paulo Matos
7422abb42a
Remove reference to NO_SCHEME_EXNS (#2712) 2019-06-26 17:03:12 +02:00
Matthew Flatt
f97342b138 raco exe test: add no-GUI mode 2019-06-25 21:03:52 -06:00
Matthew Flatt
a0023d5797 fix environment-variables-copy and case-normalization
Preserve the original case of an environment variable for
round-tripping on systems where environment variable names are
case-normalized.
2019-06-25 14:56:39 -06:00
Matthew Flatt
d4123698b4 fix case-sensitivity in a test 2019-06-25 11:15:30 -06:00
Matthew Flatt
8c1dbae88b expander: improve extractor to recognize once-set variables
When `set!` is used to tie a recursove knot in a flattened linklet,
the expander can recognize that pattern and not complain that a
mutable variable might be shared across places. Improving that
inference means fewer `++global-ok` flags in Makefiles.

This commit also avoids single-quote as an escaping form in a
makefile, which doesn't work with nmake on Windows.
2019-06-25 08:43:38 -06:00
Matthew Flatt
3fb226ce2a cs: fix future-thread signaling
Fix confusion between signal and broadcast operation.
2019-06-24 20:14:52 -06:00
Matthew Flatt
b64e17388f cs: fix stdio/syslog GC logging as triggered by future thread
Always use the main `rktio` instance and don't try to explicitly start
atomic mode.
2019-06-24 20:00:51 -06:00
Matthew Flatt
309a0c2489 cs: fix future-logging race 2019-06-24 18:28:03 -06:00
Matthew Flatt
51ab4a5c6a thread: repairs for event logging
Fix RacketCS so that the future visualizer works.
2019-06-24 16:36:16 -06:00
Matthew Flatt
0106abaf6e bump version number
Since it removes an built-in place-local definition, commit 564dcf339a
can affect compilation for Racket CS.
2019-06-24 15:29:45 -06:00
Matthew Flatt
87673902dc docs: correct description of file-position
Explain more when a file's size is changed by `file-position`.
2019-06-24 15:28:22 -06:00
Matthew Flatt
0d3d0d7d86 thread: add notes on the behavior of futures 2019-06-24 14:54:37 -06:00
Matthew Flatt
564dcf339a cs: fix memory accounting and futures
Also avoid problems with interrupting a rapidly allocating
computation and shutting down the main custodian.
2019-06-24 13:59:03 -06:00
Matthew Flatt
a5a84ea8c6 remove accidentally committed debugging printout 2019-06-24 08:14:58 -06:00
Matthew Flatt
1192225c97 avoid some compiler warnings 2019-06-23 06:46:28 -06:00
Matthew Flatt
2a530b4c88 makefile: avoid git submodule update in cs-as-is 2019-06-22 08:01:12 -06:00