Commit Graph

15 Commits

Author SHA1 Message Date
Gustavo Massaccesi
dd67d22b95 cptypes: reduce (if t <error> x) ==> (begin (if t <error> (void)) x)
so the surrounding code can be reduced, for example

(+ 2 (if t <error> 3)) ==> (begin (if t <error> (void)) 5)

original commit: c1993e7c707b3528c6de5e1d4b36005655d22aff
2019-04-04 18:31:00 +02:00
Matthew Flatt
e5cd2ec27a Revert "cptypes: reduce (if t <error> x) ==> (begin (if t <error> (void)) x)"
This reverts commit 79f23f2ddb858aa6c69bd1e9314e745145ad2b15.

original commit: 83377ac5f916dc4848536f204f49645829007f4a
2019-03-31 11:13:19 -06:00
Gustavo Massaccesi
6d0780488c cptypes: reduce (if t <error> x) ==> (begin (if t <error> (void)) x)
so the surrounding code can be reduced, for example

(+ 2 (if t <error> 3)) ==> (begin (if t <error> (void)) 5)

original commit: 79f23f2ddb858aa6c69bd1e9314e745145ad2b15
2019-03-29 18:45:58 -03:00
Matthew Flatt
60005f02d2 Merge github.com:cisco/ChezScheme
original commit: 629f8b653ff46afa64bffa1fcfbb8e7c94dd7451
2019-02-17 18:22:55 -07:00
Oscar Waddell
a58dfb690a make cp0 heed app-convention when folding primitive calls
fix #389 (apply doesn't throw exception when last argument isn't a list)

fold-primref and fold-primref2 ignored app-convention when
attempting to fold certain primitive calls in 'test and 'effect
context and when falling back on the default primitive handler.

We now residualize primitive references if the app-convention
is not 'call.  The original fold-primref2 already bypassed the
inline handler when the app-convention was not 'call.

original commit: f9d10c4cf2e6cd184ad7429f251360a738600959
2019-02-05 12:24:07 -05:00
Matthew Flatt
67a0b0948f Merge branch 'leftassoc' of github.com:mflatt/ChezScheme
original commit: 19d0cb77e6b6dd32fa4a7a26505ee952b4efa756
2019-01-21 10:54:19 -07:00
Matthew Flatt
ae71f7472d add enable-arithmetic-left-associative
Add a parameter to constrain the compiler (off by default) to
implement `+`, `*`, and variants as left-associative when given
multiple arguments.

original commit: d126ba3364893e66263c65af1cd6dbdd8b021439
2019-01-21 10:51:16 -07:00
Matthew Flatt
54282dedc4 Merge branch '17-5-Types-Pass' of github.com:gus-massa/ChezScheme
original commit: caf857a33e13c116afa6e2d960eccbada3604190
2019-01-11 15:35:20 -07:00
Gustavo Massaccesi
6afcc310dd use "single-valued" to simplify some call-with-values patterns
original commit: 0b9d2f0d778789ee9fda8a7249c8d7da329c9bcd
2019-01-10 19:23:36 -07:00
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
Gustavo Massaccesi
05c81335a4 Add safeongoodargs flag to primref
for example reduce (car <pair>) => (#3%car <pair>)

original commit: fedfc84d6abf348f9d2579d479b08f727eb7d445
2018-04-12 21:53:56 -03:00
Bob Burger
831ea8ad18 changed copyright year to 2017
7.ss, scheme.1.in, comments of many files

original commit: 06f858f9a505b9d6fb6ca1ac97234927cb2dc641
2017-04-06 11:41:33 -04:00
Kent Dybvig
f825e23db2 - generated bytevector=? procedure now gets out quickly on eq
arguments.  cp0 optimizes away a number of additional equality
  operations at optimize-level 3 (including bytevector=?) when
  applied to the same variable references, as it already did for
  eq?, eqv?, and equal?, at all optimize levels.
    cpnanopass.ss, cp0.ss, primdata.ss,
    cp0.ms
- updated bullyx patches
    patch*
- updated release notes and tweaked user's guide.
    release-notes.stex, objects.stex

original commit: e90c39a72563eafa4fccaf1d197060bf20aa552f
2017-03-15 21:24:52 -04:00
dybvig
ca1560f4d0 - fixed a side-effect preservation bug with non-trivial test-context
not-like patterns.
    cp0.ss,
    cp0.ms, 4.ms

original commit: 5626f4433d886c43d40b4ec4fedc8b34fa6d0bb2
2016-08-14 10:19:22 -04:00
dyb
1356af91b3 initial upload of open-source release
original commit: 47a210c15c63ba9677852269447bd2f2598b51fe
2016-04-26 10:04:54 -04:00