racket/s
Matthew Flatt b78838a641 cp0: move only known-single-valued out of single-value context
In safe compilation modes, avoid turning an error like

 (let ([x (values 1 2)]) x)

or

 (car (list (values 1 2)))

into a program that returns multiple values or

 (if (list (values 1 2)) 3 4)

into a program that returns without an error.

In addition, refrain from moving an expression from a non-tail
position within a procedure to a tail position, unless the expression
is not only single valued but also gauarnteed not to inspect the
immediate continuation (e.g., using `call/cc` and comparing the result
to a previously captured continuation). This constraint applies even
in unsafe compilation modes, because the intent it to provide some
guarantees about non-tail positions to complement existing guarantees
of tail positions.

original commit: 91e9631576e7b97137be856e985609320e327f32
2019-01-08 20:27:26 -07:00
..
4.ss changed copyright year to 2017 2017-04-06 11:41:33 -04:00
5_1.ss changed copyright year to 2017 2017-04-06 11:41:33 -04:00
5_2.ss changed copyright year to 2017 2017-04-06 11:41:33 -04:00
5_3.ss even? and odd?: reject exceptional flonums, since they're not integers 2017-12-28 17:00:04 -06:00
5_4.ss Fixing output of substring-fill! and vector-fill! 2017-12-12 08:43:01 -05:00
5_6.ss Fixing output of substring-fill! and vector-fill! 2017-12-12 08:43:01 -05:00
5_7.ss changed copyright year to 2017 2017-04-06 11:41:33 -04:00
6.ss improved consistency of Windows filename handling 2018-10-22 16:17:12 -04:00
7.ss add load-compiled-from-port and Sregister_boot_file_fd 2018-07-15 20:44:34 -06:00
a6fb.def changed copyright year to 2017 2017-04-06 11:41:33 -04:00
a6le.def changed copyright year to 2017 2017-04-06 11:41:33 -04:00
a6nb.def changed copyright year to 2017 2017-04-06 11:41:33 -04:00
a6nt.def changed copyright year to 2017 2017-04-06 11:41:33 -04:00
a6ob.def changed copyright year to 2017 2017-04-06 11:41:33 -04:00
a6osx.def changed copyright year to 2017 2017-04-06 11:41:33 -04:00
a6s2.def changed copyright year to 2017 2017-04-06 11:41:33 -04:00
arm32.ss add box-cas! and vector-cas! 2018-07-16 07:51:32 -06:00
arm32le.def changed copyright year to 2017 2017-04-06 11:41:33 -04:00
back.ss Various updates, mostly to the compiler, including a new lambda 2018-01-29 09:20:07 -05:00
base-lang.ss Improvements to __collect_safe 2018-04-20 21:55:09 -06:00
bytevector.ss attempt to stabilize timing tests let-values source-caching 2017-10-29 17:48:43 -04:00
cafe.ss changed copyright year to 2017 2017-04-06 11:41:33 -04:00
cback.ss changed copyright year to 2017 2017-04-06 11:41:33 -04:00
cmacros.ss cp0: move only known-single-valued out of single-value context 2019-01-08 20:27:26 -07:00
compile.ss flush expand-output and expand/optimize-output ports 2018-08-25 18:35:29 -04:00
costctr.ss changed copyright year to 2017 2017-04-06 11:41:33 -04:00
cp0.ss cp0: move only known-single-valued out of single-value context 2019-01-08 20:27:26 -07:00
cpcheck.ss Improvements to __collect_safe 2018-04-20 21:55:09 -06:00
cpcommonize.ss Improvements to __collect_safe 2018-04-20 21:55:09 -06:00
cpletrec.ss cp0: move only known-single-valued out of single-value context 2019-01-08 20:27:26 -07:00
cpnanopass.ss cp0: move only known-single-valued out of single-value context 2019-01-08 20:27:26 -07:00
cprep.ss Merge branch 'pthread' of https://github.com/mflatt/ChezScheme into mflatt-pthread-2 2018-04-21 22:09:05 -04:00
cpvalid.ss Improvements to __collect_safe 2018-04-20 21:55:09 -06:00
date.ss attempt to stabilize timing tests let-values source-caching 2017-10-29 17:48:43 -04:00
debug.ss changed copyright year to 2017 2017-04-06 11:41:33 -04:00
engine.ss changed copyright year to 2017 2017-04-06 11:41:33 -04:00
enum.ss enum-set-indexer procedure now checks for a symbol, changed "isn't" to "is not" for consistency 2017-05-05 15:22:46 -04:00
env.ss changed copyright year to 2017 2017-04-06 11:41:33 -04:00
event.ss changed copyright year to 2017 2017-04-06 11:41:33 -04:00
exceptions.ss add locate-source cache and line+column components to source objects 2017-08-01 05:23:56 -06:00
expand-lang.ss committing @akeep library change with rebuilt boot files: 2018-04-05 21:28:33 -07:00
expeditor.ss - add unicode support to the expression editor. entry and display now work 2016-07-20 21:54:50 -04:00
fasl-helpers.ss changed copyright year to 2017 2017-04-06 11:41:33 -04:00
fasl.ss add make-ephemeron-eq-hashtable, etc. 2017-07-06 16:27:23 -06:00
foreign.ss changed copyright year to 2017 2017-04-06 11:41:33 -04:00
format.ss changed copyright year to 2017 2017-04-06 11:41:33 -04:00
front.ss changed copyright year to 2017 2017-04-06 11:41:33 -04:00
ftype.ss Improvements to __collect_safe 2018-04-20 21:55:09 -06:00
hashtable-types.ss add make-ephemeron-eq-hashtable, etc. 2017-07-06 16:27:23 -06:00
i3fb.def changed copyright year to 2017 2017-04-06 11:41:33 -04:00
i3le.def changed copyright year to 2017 2017-04-06 11:41:33 -04:00
i3nb.def changed copyright year to 2017 2017-04-06 11:41:33 -04:00
i3nt.def changed copyright year to 2017 2017-04-06 11:41:33 -04:00
i3ob.def changed copyright year to 2017 2017-04-06 11:41:33 -04:00
i3osx.def changed copyright year to 2017 2017-04-06 11:41:33 -04:00
i3qnx.def changed copyright year to 2017 2017-04-06 11:41:33 -04:00
i3s2.def changed copyright year to 2017 2017-04-06 11:41:33 -04:00
inspect.ss add generate-procedure-source-information 2018-07-15 19:51:54 -06:00
interpret.ss Merge branch 'pthread' of https://github.com/mflatt/ChezScheme into mflatt-pthread-2 2018-04-21 22:09:05 -04:00
io-types.ss changed copyright year to 2017 2017-04-06 11:41:33 -04:00
io.ss changed copyright year to 2017 2017-04-06 11:41:33 -04:00
layout.ss changed copyright year to 2017 2017-04-06 11:41:33 -04:00
library.ss add box-cas! and vector-cas! 2018-07-16 07:51:32 -06:00
mathprims.ss changed copyright year to 2017 2017-04-06 11:41:33 -04:00
Mf-a6fb changed copyright year to 2017 2017-04-06 11:41:33 -04:00
Mf-a6le changed copyright year to 2017 2017-04-06 11:41:33 -04:00
Mf-a6nb changed copyright year to 2017 2017-04-06 11:41:33 -04:00
Mf-a6nt changed copyright year to 2017 2017-04-06 11:41:33 -04:00
Mf-a6ob changed copyright year to 2017 2017-04-06 11:41:33 -04:00
Mf-a6osx changed copyright year to 2017 2017-04-06 11:41:33 -04:00
Mf-a6s2 changed copyright year to 2017 2017-04-06 11:41:33 -04:00
Mf-arm32le changed copyright year to 2017 2017-04-06 11:41:33 -04:00
Mf-base allx now runs all up to three (rather than two) times to eliminate 2018-07-09 15:32:34 -07:00
Mf-cross Various updates, mostly to the compiler, including a new lambda 2018-01-29 09:20:07 -05:00
Mf-i3fb changed copyright year to 2017 2017-04-06 11:41:33 -04:00
Mf-i3le changed copyright year to 2017 2017-04-06 11:41:33 -04:00
Mf-i3nb changed copyright year to 2017 2017-04-06 11:41:33 -04:00
Mf-i3nt changed copyright year to 2017 2017-04-06 11:41:33 -04:00
Mf-i3ob changed copyright year to 2017 2017-04-06 11:41:33 -04:00
Mf-i3osx changed copyright year to 2017 2017-04-06 11:41:33 -04:00
Mf-i3qnx changed copyright year to 2017 2017-04-06 11:41:33 -04:00
Mf-i3s2 changed copyright year to 2017 2017-04-06 11:41:33 -04:00
Mf-ppc32le changed copyright year to 2017 2017-04-06 11:41:33 -04:00
Mf-ta6fb changed copyright year to 2017 2017-04-06 11:41:33 -04:00
Mf-ta6le changed copyright year to 2017 2017-04-06 11:41:33 -04:00
Mf-ta6nb changed copyright year to 2017 2017-04-06 11:41:33 -04:00
Mf-ta6nt changed copyright year to 2017 2017-04-06 11:41:33 -04:00
Mf-ta6ob changed copyright year to 2017 2017-04-06 11:41:33 -04:00
Mf-ta6osx changed copyright year to 2017 2017-04-06 11:41:33 -04:00
Mf-ta6s2 changed copyright year to 2017 2017-04-06 11:41:33 -04:00
Mf-ti3fb changed copyright year to 2017 2017-04-06 11:41:33 -04:00
Mf-ti3le changed copyright year to 2017 2017-04-06 11:41:33 -04:00
Mf-ti3nb changed copyright year to 2017 2017-04-06 11:41:33 -04:00
Mf-ti3nt changed copyright year to 2017 2017-04-06 11:41:33 -04:00
Mf-ti3ob changed copyright year to 2017 2017-04-06 11:41:33 -04:00
Mf-ti3osx changed copyright year to 2017 2017-04-06 11:41:33 -04:00
Mf-ti3s2 changed copyright year to 2017 2017-04-06 11:41:33 -04:00
Mf-tppc32le changed copyright year to 2017 2017-04-06 11:41:33 -04:00
mkheader.ss add load-compiled-from-port and Sregister_boot_file_fd 2018-07-15 20:44:34 -06:00
newhash.ss Various updates, mostly to the compiler, including a new lambda 2018-01-29 09:20:07 -05:00
np-languages.ss add box-cas! and vector-cas! 2018-07-16 07:51:32 -06:00
patch.ss cp0: move only known-single-valued out of single-value context 2019-01-08 20:27:26 -07:00
pdhtml.ss fixed gather-filedata's sort of profile entries. for any two 2017-10-30 21:01:43 -04:00
ppc32.ss add box-cas! and vector-cas! 2018-07-16 07:51:32 -06:00
ppc32le.def changed copyright year to 2017 2017-04-06 11:41:33 -04:00
pretty.ss changed copyright year to 2017 2017-04-06 11:41:33 -04:00
primdata.ss cp0: move only known-single-valued out of single-value context 2019-01-08 20:27:26 -07:00
priminfo.ss cp0: move only known-single-valued out of single-value context 2019-01-08 20:27:26 -07:00
primref.ss changed copyright year to 2017 2017-04-06 11:41:33 -04:00
prims.ss cp0: move only known-single-valued out of single-value context 2019-01-08 20:27:26 -07:00
primvars.ss cp0: move only known-single-valued out of single-value context 2019-01-08 20:27:26 -07:00
print.ss add locate-source cache and line+column components to source objects 2017-08-01 05:23:56 -06:00
read.ss add locate-source cache and line+column components to source objects 2017-08-01 05:23:56 -06:00
record.ss removed a useless check in foreign-alloc 2017-09-15 09:49:00 -04:00
reloc.ss changed copyright year to 2017 2017-04-06 11:41:33 -04:00
setup.ss changed copyright year to 2017 2017-04-06 11:41:33 -04:00
strip.ss update test patch files 2017-07-06 20:45:18 -06:00
strnum.ss changed copyright year to 2017 2017-04-06 11:41:33 -04:00
syntax.ss cp0: move only known-single-valued out of single-value context 2019-01-08 20:27:26 -07:00
ta6fb.def changed copyright year to 2017 2017-04-06 11:41:33 -04:00
ta6le.def changed copyright year to 2017 2017-04-06 11:41:33 -04:00
ta6nb.def changed copyright year to 2017 2017-04-06 11:41:33 -04:00
ta6nt.def changed copyright year to 2017 2017-04-06 11:41:33 -04:00
ta6ob.def changed copyright year to 2017 2017-04-06 11:41:33 -04:00
ta6osx.def changed copyright year to 2017 2017-04-06 11:41:33 -04:00
ta6s2.def changed copyright year to 2017 2017-04-06 11:41:33 -04:00
ti3fb.def changed copyright year to 2017 2017-04-06 11:41:33 -04:00
ti3le.def changed copyright year to 2017 2017-04-06 11:41:33 -04:00
ti3nb.def changed copyright year to 2017 2017-04-06 11:41:33 -04:00
ti3nt.def changed copyright year to 2017 2017-04-06 11:41:33 -04:00
ti3ob.def changed copyright year to 2017 2017-04-06 11:41:33 -04:00
ti3osx.def changed copyright year to 2017 2017-04-06 11:41:33 -04:00
ti3s2.def changed copyright year to 2017 2017-04-06 11:41:33 -04:00
tppc32le.def changed copyright year to 2017 2017-04-06 11:41:33 -04:00
trace.ss changed copyright year to 2017 2017-04-06 11:41:33 -04:00
types.ss add locate-source cache and line+column components to source objects 2017-08-01 05:23:56 -06:00
ubify.ss changed copyright year to 2017 2017-04-06 11:41:33 -04:00
x86_64.ss reliably preserve cp in thread context for S_call_help 2018-12-05 07:53:49 -07:00
x86.ss reliably preserve cp in thread context for S_call_help 2018-12-05 07:53:49 -07:00