Commit Graph

700 Commits

Author SHA1 Message Date
Matthew Flatt
e8bd9b83cd repair {Free,Open,Net}BSD build
Use OSSP UUID on {Free,Open}BSD and native UUID on NetBSD.

Building on OpenBSD requires a filesystem mounted with wxneeded.

original commit: e964d7d01a6d115e469c01626896b683d421d599
2019-06-11 09:34:09 -06:00
Matthew Flatt
6a8b48bd72 repair some safeongoodargs in "primdata.ss"
@gus-massa's adjustments to the Racket test suite exposed more places
where the "primdata.ss" spec was wrong.

original commit: 5cb4996c7b317307299e8dd55a25e8e58144a30e
2019-06-10 10:26:55 -06:00
Gustavo Massaccesi
2089562e73 fix flag in signature of inexact->exact
It fails when the argument is +inf.0, so it's not possible to make it unsafe
automatically when the argument is a number.

original commit: 4d31d65b0e685adca7c01973cf7f30e716356a6b
2019-06-07 23:44:06 -03:00
Matthew Flatt
81191397b5 Merge github.com:cisco/ChezScheme
original commit: bb65f1a8e429683e2925cf1678145efe0ade59bb
2019-06-07 08:56:14 -06:00
Paulo Matos
af63b73bad Update shift left that might cause ub
A few shift lefts cause ub because of `(1 << n)` where `n` is 31. 
The constant 1 is signed causing ub. Initially my fix was to do `(1U << n)` however, I have seen the pattern `((U32)1 << n)` elsewhere in the file so decided to follow this.

Caught by ubsan racketcs.
original commit: a902c9ab67010f521f786e2027d4e197d78975a4
2019-06-06 08:57:25 -06:00
Matthew Flatt
a0fea7f0a8 Merge pull request #6 from pmatos/patch-4
Make variables unsigned to avoid ub in calculation
original commit: 2c404b7232555b405027819fd1841cefe5322180
2019-06-06 08:56:48 -06:00
Paulo Matos
4988a45c06 Make variables unsigned to avoid ub in calculation
According to ubsan we get several times into undefined behaviour due to signed overflow:
foreign.c:91:21: runtime error: signed integer overflow: 3291370622602663862 * 3 cannot be represented in type 'long int'

This happens only when the symbol name is relatively large like as for the call:
symhash (s=0x5555558caab8 "(cs)set_enable_object_backreferences")
original commit: 1e1c91869443d8a22beeebfcbe6fa14f9c3e2a6e
2019-06-05 22:49:55 +02:00
Steven Watson
21c7dd839d Added support for building chez with VS2019. (#435)
added support for Microsoft Visual Studio 2019 on Windows
original commit: 549b4468b619a9377332509472a4346ac223b5ae
2019-06-04 16:37:57 -04:00
Gustavo Massaccesi
6a353c5a0e make bootfiles in travis-ci
original commit: af7ea3bab08aa0d64b4b06373a0d9d9be320fd0f
2019-06-02 09:03:09 -03:00
Gustavo Massaccesi
40d33fc72e make test for relop-length more sensitive
5_2.ms

original commit: b34695bb3faa28c3e55d65cc659f6a9f2c3b1547
2019-05-24 10:33:52 -04:00
Gustavo Massaccesi
3c53b8b940 small fix in relop-length to enable the optimization
original commit: 587e0f4c01bf6bc187fc4e829fba9cc8ca7c38dd
2019-05-23 14:34:54 -04:00
Matthew Flatt
6cd6071c3a update test case for number->string changes
Should have been part of 1976cd57b6.

original commit: a48f3525d764938cfc1a343d810b5f0f0b14dbbb
2019-05-22 13:41:50 -06:00
Matthew Flatt
2cf27c4727 Merge github.com:cisco/ChezScheme
original commit: 8118200e237d756f83be54e8bf3eabb4af2388ed
2019-05-22 10:46:59 -06:00
gus-massa
58ee63722a Fix signatures of $file-options and friends (#429)
They were defined inside a block with the `proc` flag, but they are `enum-set`s.
  primdata.ss
original commit: 3fce8333e3856573292b97b9a2d47827216f9097
2019-05-22 10:52:24 -04:00
Taekyung
e9feda26f8 Correct typo in description of case macro
original commit: b9ad8fc8db91218fcf81044af84ddc0773b221b5
2019-05-22 10:42:41 -04:00
Matthew Flatt
0de9e0808b suppress "|" precision indicator when printing flonums
I'm not sure why precision is shown when `print-precision` is set to
0.5e-323.

original commit: 1976cd57b6981c3c5a559943763190855ca6ab21
2019-05-18 10:21:45 -04:00
Bob Burger
17f0052f45 Fix #79: make-record-type-descriptor appears twice in the index
original commit: 23833c7d0194248143af425dd22e34a760e81505
2019-05-06 15:17:51 -04:00
Bob Burger
62ddec8b4b fixed typo & improved wording
original commit: ecb540fec3b3933040a4f8ee98929ae289f4e22d
2019-05-02 15:29:16 -04:00
Bob Burger
62907754b4 fix multiply of -2^30 to itself on 64-bit platforms
original commit: 566c7a98ec4e070a26450781ffc2b9054860e4ed
2019-05-02 15:19:58 -04:00
Matthew Flatt
40ced8629e repair multiply of (- (expt 2 30)) to itself
On a 64-bit platform, the test for "short" arguments to
avoid overflow was incorrect, because `(- (expt 2 30))`
counted as short.

original commit: 6d05b70e86987c0e7a07f221ba5def492300aaaf
2019-05-01 09:20:35 -06:00
Matthew Flatt
8ec5457627 sync expected test output
original commit: 10a95153007ff5ae850b65b686705bb23be349d8
2019-04-27 06:01:10 -05:00
Matthew Flatt
c069bbf219 adjust compute-size-increments test for interpreter
original commit: 7b64c7701664d11cd5ab6a777dc0993456513c82
2019-04-26 22:37:06 -05:00
Matthew Flatt
a585c64390 adjust object-backreferences test for interpreter
original commit: 5a80683a60189b096e2edc6c45afdbc0e49e97c3
2019-04-26 22:36:55 -05:00
Gustavo Massaccesi
25cfadaeec fix check of size of make-phantom-bytevector in 32 bits
original commit: d44ab30993fdf085566ecd71b0f7db9a50eb0cc5
2019-04-25 12:46:15 -03:00
Gustavo Massaccesi
67f15c1d99 fix get-initial-thread signature
original commit: d0e11950a4bcd00b24c69408164a78bbdbfddc46
2019-04-25 12:46:14 -03:00
Bob Burger
897e53b430 add Windows builds and update Linux dist to xenial
original commit: e44a209f27f8670c23a1d402b3f968eaa10cad29
2019-04-24 13:21:03 -04:00
Matthew Flatt
8850655e7d fix uses of fxzero? on a 32-bit immediate in 32-bit mode
original commit: 01808c6187319174ce519d788d05319585bf8eb0
2019-04-22 10:53:32 -04:00
Gustavo Massaccesi
03214b9bdb cp0: reductions for $record-ref
original commit: 8a04158ef995388ffcdfb369d6cfaf4ec384408d
2019-04-20 23:10:46 -03:00
dyb
7e4ed70f72 minor relop-length and assertion-violationf improvements
- zero?, fxzero?, positive?, fxpositive?, etc., now go through
  (a suitably modified) relop-length so that, for example,
  (zero? (length x)) results in the same code as (null? x).  added
  correctness tests for these and all of the other predicates that
  go through relop-length.
    cpnanopass.ss, 5_2.ms
- assertion-violationf and friends now show the who, message, and
  irritants in the original call when who or message is found not to
  be of the right type.
    exceptions.ss

original commit: 9cdc8733cbde4046fd404eefbca6433aabebcef9
2019-04-19 20:22:09 -07:00
Matthew Flatt
eb998e34f2 x86 back-end: repair incorrect uses of fxzero?
original commit: e6328a59d5438d158f42fcc14e48ecefde138c3f
2019-04-19 20:53:53 -06:00
Matthew Flatt
3eb9217c39 remove bootfiles
For this patched variant of Chez Scheme, rely on bootstrapping via
Racket.

original commit: 15a783860252b675c60bbf910cf99db69247274a
2019-04-19 18:41:26 -06:00
dyb
a4d8f42835 added release note for record-ref bug
original commit: 68cdaba264bfbac582190c2b090d257644dcdf84
2019-04-19 10:17:12 -07:00
R. Kent Dybvig
e9619146f6 Merge pull request #421 from gus-massa/19-4-Fix-Record-Ref
Fix record-ref reduction in cp0
original commit: 53d09d9e049c78d331505105b125f23113f3ea2b
2019-04-19 09:35:13 -07:00
Gustavo Massaccesi
51dd12788b Fix record-ref reduction in cp0
In expressions like
  (record-ref ... (begin (newline) (record ...)))
the reduction was dropping the possible side effect expressions
in this case the (newline).

 cp0.ss

original commit: 5c50c5d1c520c79035065b4bd977eadd8e4cb800
2019-04-19 00:33:04 -03:00
R. Kent Dybvig
39c9f4d7f2 Merge pull request #418 from dybvig/compress-level
Add a compress-level parameter
original commit: 3ea6f8e4b166b033f1cb33293090ca78b8986db9
2019-04-18 10:05:59 -07:00
dyb
82b2cda639 compress-level parameter, improvement in lz4 compression, and various other related improvements
- added compress-level parameter to select a compression level for
  file writing and changed the default for lz4 compression to do a
  better job compressing.  finished splitting glz input routines
  apart from glz output routines and did a bit of other restructuring.
  removed gzxfile struct-as-bytevector wrapper and moved its fd
  into glzFile.  moved DEACTIVATE to before glzdopen_input calls
  in S_new_open_input_fd and S_compress_input_fd, since glzdopen_input
  reads from the file and could block.  the compress format and now
  level are now recorded directly the thread context.  replaced
  as-gz? flag bit in compressed bytevector header word with a small
  number of bits recording the compression format at the bottom of
  the header word.  flushed a couple of bytevector compression mats
  that depended on the old representation.  (these last few changes
  should make adding new compression formats easier.)  added
  s-directory build options to choose whether to compress and, if
  so, the format and level.
    compress-io.h, compress-io.c, new-io.c, equates.h, system.h,
    scheme.c, gc.c,
    io.ss, cmacros.ss, back.ss, bytevector.ss, primdata.ss, s/Mf-base,
    io.ms, mat.ss, bytevector.ms, root-experr*,
    release_notes.stex, io.stex, system.stex, objects.stex
- improved the effectiveness of LZ4 boot-file compression to within
  15% of gzip by increasing the lz4 output-port in_buffer size to
  1<<18.  With the previous size (1<<14) LZ4-compressed boot files
  were about 50% larger.  set the lz4 input-port in_buffer and
  out_buffer sizes to 1<<12 and 1<<14.  there's no clear win at
  present for larger input-port buffer sizes.
    compress-io.c
- To reduce the memory hit for the increased output-port in_buffer
  size and the corresponding increase in computed out_buffer size,
  one output-side out_buffer is now allocated (lazily) per thread
  and stored in the thread context.  The other buffers are now
  directly a part of the lz4File_out and lz4File_in structures
  rather than allocated separately.
    compress-io.c, scheme.c, gc.c,
    cmacros.ss
- split out the buffer emit code from glzwrite_lz4 into a
  separate glzemit_lz4 helper that is now also used by gzclose
  so we can avoid dealing with a NULL buffer in glzwrite_lz4.
  glzwrite_lz4 also uses it to writing large buffers directly and
  avoid the memcpy.
    compress-io.c
- replaced lz4File_out and lz4File_in mode enumeration with the
  compress format and inputp boolean.  using switch to check and
  raising exceptions for unexpected values to further simplify
  adding new compression formats in the future.
    compress-io.c
- replaced the never-defined struct lz4File pointer in glzFile
  union with the more specific struct lz4File_in_r and Lz4File_out_r
  pointers.
    compress-io.h, compress-io.c
- added free of lz4 structures to gzclose.  also changed file-close
  logic generally so that (1) port is marked closed before anything is
  freed to avoid dangling pointers in the case of an interrupt or
  error, and (2) structures are freed even in the case of a write
  or close error, before the error is reported.  also now mallocing
  glz and lz4 structures after possibility of errors have passed where
  possible and freeing them when not.
    compress-io.c,
    io.ss
- added return-value checks to malloc calls and to a couple of other
  C-library calls.
    compress-io.c
- corrected EINTR checks to look at errno rather than return codes.
    compress-io.c
- added S_ prefixes to the glz* exports
    externs.h, compress-io.c, new-io.c, scheme.c, fasl.c
- added entries for mutex-name and mutex-thread
    threads.stex

original commit: 722ffabef4c938bc92c0fe07f789a9ba350dc6c6
2019-04-18 05:47:19 -07:00
Matthew Flatt
cbd40899f6 avoid graph references that are especially uncooperative for Racket's reader
original commit: 5b864346fd692896ed13fca84a974bc990ed7806
2019-04-17 18:33:55 -06:00
Matthew Flatt
b9e43c6e78 add "scheme.h" dependency for "main.c" to Windows makefiles
original commit: 413cf148327345847aa3d1f6b839e77d74a8996e
2019-04-09 17:11:26 -06:00
Matthew Flatt
3bf5733f46 sync Windows bootfiles [threaded]
original commit: 0d1bc99f830d429976c6c53cb9d614f7dd81088e
2019-04-08 11:17:54 +02:00
Matthew Flatt
085b78aba9 Merge branch 'reccas' of github.com:mflatt/ChezScheme
original commit: cd641e47fd849385544aa99354d98f5b7193d237
2019-04-08 11:11:52 +02:00
Matthew Flatt
2c5c391652 add $record-{ref,set!,cas!}
original commit: 01b029b11be3bbe165752294f26617d036ba4b49
2019-04-08 11:09:45 +02:00
Matthew Flatt
766093d9a7 sync bootfiles [threaded]
original commit: e23ab9a7cf83b801b85e7e3d1f8cce81ad622771
2019-04-07 10:23:22 +02:00
Matthew Flatt
2da5fd740e Merge branch 'hashmix' of github.com:mflatt/ChezScheme
original commit: b620bd23a962989db5f5b489eb67a1fa45ee123d
2019-04-07 10:14:10 +02:00
Matthew Flatt
ffc02a9877 improve hash mixing
original commit: d7469cedd67a950931a561ce14388fe7e628770d
2019-04-07 09:37:37 +02:00
Matthew Flatt
23a1d1f25c fix merge of ftype and ordered guardians
Fill in missing field initializations in the case of an ftype
guardian.

original commit: fafb0ec18ba4751d972019b95897de0e1355ed91
2019-04-06 21:53:53 +02:00
R. Kent Dybvig
77e84faa24 Merge pull request #410 from mflatt/lz4
Add LZ4 support and use it by default for compressing files
original commit: 7df2fb2e77e6bfb4fac0fd5c2817b984ed0b41a7
2019-04-06 09:52:53 -07:00
Matthew Flatt
e622a495b6 Add LZ4 support and use it by default for compressing files
original commit: 8858b34bd92ac8d2b6511dc9ca17ebfa06a1bd93
2019-04-06 07:32:37 +02:00
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
Jéssica Milaré
bcf25a17fb Mutexes and condition variables with names (#380)
add name fields for mutexes and condition variables, now `make-mutex` and `make-condition` accept an optional argument `name`, which must be a symbol or #f.  The name, if not #f, is printed every time the object is printed, which is useful for debugging.
original commit: 1397e173200d1697ed714d24fc2eb4767421b976
2019-04-03 09:36:54 -04: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