Commit Graph

761 Commits

Author SHA1 Message Date
Matthew Flatt
a043c4b3a8 mark functions that never return as NORETURN
@pmatos did all the work here in racket/ChezScheme#8 and
racket/racket#2344.

original commit: 2e3a618b0072d547b6c5abe6dd8dbac36a98c10e
2019-06-21 14:26:01 -06:00
Matthew Flatt
1116287328 adjust sqrt and log on -0.0
original commit: 098fdb7d197bda4cd1ecc9b68407ee72fcce9311
2019-06-21 12:48:42 -06:00
Matthew Flatt
e11d9c846e fix flround on [-0.5, 0.0)
original commit: 9679b21d99477a077b226bc279a6d68ebbd7ce5b
2019-06-21 12:26:00 -06:00
Matthew Flatt
8479c4bebf print positive flonum exponents with "+"
original commit: bcf4dd26d268e25a89f24edc4ae7c75c97411c6d
2019-06-21 12:19:59 -06:00
Gustavo Massaccesi
d56e01edc9 rename who -> maybe-who
original commit: d03334caa7cfe429b5ea0d4ed245524fcf787cab
2019-06-20 12:33:51 -03:00
Gustavo Massaccesi
9c36f8dc3d make true flag automatic
original commit: a88ae6cec82e428a37827b12c0886dfc76569067
2019-06-20 12:33:51 -03:00
Gustavo Massaccesi
2a20927ac2 use more specific signatures to imply true
original commit: 7d1ad70840d85912ff08cb2d3ec0c685fc134661
2019-06-20 12:33:50 -03:00
Gustavo Massaccesi
85ef2ef788 use signatures with eof/something
original commit: 9785012847db7e6bae35ce9cef83559ca8ae7632
2019-06-18 17:49:18 -03:00
Gustavo Massaccesi
109cece609 fix signatures with errors
original commit: c9296345301d84c2708f0f45e1884bef7070e393
2019-06-18 17:49:18 -03:00
Matthew Flatt
034927b44f add eq-hashtable-try-atomic-cell
original commit: 8af6533643eaaa1b22f5724c52b6b26f4a81d7c4
2019-06-16 10:35:31 -06:00
dyb
399e0fa924 adopted latest tspl hidx and idx files, which reflect a similar but
different fix for extra make-record-type-descriptor index entry

original commit: 6c4e0a5fd7c5d99690935ad04239406188977425
2019-06-13 15:17:08 -07:00
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