Commit Graph

92 Commits

Author SHA1 Message Date
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
Taekyung
e9feda26f8 Correct typo in description of case macro
original commit: b9ad8fc8db91218fcf81044af84ddc0773b221b5
2019-05-22 10:42:41 -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
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
e622a495b6 Add LZ4 support and use it by default for compressing files
original commit: 8858b34bd92ac8d2b6511dc9ca17ebfa06a1bd93
2019-04-06 07:32:37 +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
dyb
46608ff1f1 Now opening 9.5.3 release. Intent is to formally release 9.5.2
(and possibly all and only even-numbered releases going forward)
and use 9.5.3 (and possibly all and only odd-numbered releases going
forward) for development.

original commit: 47110f36cea47a44078b3144c82d212de79774ce
2019-03-21 15:07:39 -07:00
dyb
b2cecd2c0f 9.5.2 changes:
- updated version to 9.5.2
    bintar/Makefile rpm/Makefile pkg/Makefile BUILDING NOTICE
    makefiles/Mf-install.in makefiles/Makefile-csug.in scheme.1.in
    c/Makefile.a6nt c/Makefile.i3nt c/Makefile.ta6nt c/Makefile.ti3nt
    mats/Mf-a6nt mats/Mf-i3nt mats/Mf-ta6nt mats/Mf-ti3nt workarea
    c/scheme.rc s/7.ss s/cmacros.ss release_notes/release_notes.stex
    csug/copyright.stex csug/csug.stex rpm/Makefile pkg/Makefile
    wininstall/Makefile wininstall/a6nt.wxs wininstall/i3nt.wxs
    wininstall/ta6nt.wxs wininstall/ti3nt.wxs
- fixed handling of bintar, rpm, pkg make files
    newrelease
- fixed a bug in the fasl representation and reading of mutually
  recursive ftypes where one of the members of the cycle is the
  parent of another, which manifested in the fasl reader raising
  bogus "incompatible record type" exceptions.  (The bug could also
  affect other record-type descriptors with cycles involving parent
  rtds and "extra" fields.)  object files created before this fix
  are incompatible with builds with this fix, and objects files
  created after this fix are incompatible builds without this fix.
    fasl.ss, strip.ss,
    fasl.c,
    ftype.ms,
    release_notes.stex

original commit: 766d591c18c2779866d1a059700e6ff1c02cb3c5
2019-03-21 14:30:49 -07:00
Oscar Waddell
78c3993817 expose default-library-search-handler and library-search-handler parameter
exposed the default-library-search-handler and a library-search-handler
parameter to permit more control over the search for libraries during
import, compile-whole-library, and compile-whole-program

original commit: 7b4fdd374f9cb973de1143bfcc830194b36befda
2019-03-14 14:31:02 -04:00
dyb
2daf225cab committing a handful of changes, none of which should be particularly
controversial, unless I damaged something in the process of integrating
them with other recent changes.  the user's guide and release notes
have been updated as well to reflect the changes of interest to end
users.
- the body of load-library is now wrapped in a $pass-time with
  to show the time spent loading libraries separately from the time
  spent in expand.
    syntax.ss
- interpret now plays the pass-time game
    interpret.ss
- added compile-time-value? predicate and
  compile-time-value-value accessor
    syntax.ss, primdata.ss,
    8.ms, primvars.ms, root-experr*
- $pass-stats now returns accurrate stats for the currently timed
  pass.
    7.ss
- compile-whole-program and compile-whole-library now propagate
  recompile info from the named wpo file to the object file
  to support maybe-compile-program and maybe-compile-library in
  the case where compile-whole-{program,library} overwrites the
  original object file.
    compile.ss,
    7.ms, mat.ss, primvars.ms
- replaced the ancient and unusable bintar with one that creates
  a useful tarball for binary installs
    bintar
- generated Mf-install InstallBin (InstallLib, InstallMan) now
  correctly indirects through InstallPrefix if the --installbin
  (--installlib, --installman) configure flag is not present.
    src/configure
- removed definition of generate-procedure-source-information
    patch.ss
- guardian tconc cells are now allocated in generation 0 in the hope
  that they can be released more quickly.
    gc.c
- added ftype-guardian syntax: (ftype-guardian A) creates a new
  guardian for ftype pointers of type A, the first base field (or
  one of the first base fields in the case of unions) of which must
  be a word-sized integer with native endianness representing a
  reference count.  ftype pointers are registered with and retrieved
  from the guardian just like objects are registered with and
  retrieved from any guardian.  the difference is that the garbage
  collector decrements the reference count before resurrecting an
  ftype pointer and resurrects only those whose reference counts
  become zero, i.e., are ready for deallocation.
    ftype.ss, cp0.ss, cmacros.ss, cpnanopass.ss, prims.ss, primdata.ss,
    gc.c,
    4.ms, root-experr*
- fixed a bug in automatic recompilation handling of missing include
  files specified with absolute pathnames or pathnames starting with
  "./" or "..": was erroring out in file-modification-time with a
  file-not-found or other exception rather than recompiling.
    syntax.ss,
    7.ms, root-experr*, patch*
- changed inline vector-for-each and string-for-each code to
  put the last call to the procedure in tail position, as was
  already done for the library definitions and for the inline
  code for for-each.
    cp0.ss,
    5_4.ms, 5_6.ms
- the compiler now generates better inline code for the bytevector
  procedure.  instead of one byte memory write for each argument,
  it writes up to 4 (32-bit machines) or 8 (64-bit machines) bytes
  at a time, which almost always results in fewer instructions and
  fewer writes.
    cpnanopass.ss,
    bytevector.ms
- packaged unchanging implicit reader arguments into a single record
  to reduce the number of arguments.
    read.ss
- recoded run-vector to handle zero-length vectors.  it appears
  we're not presently generating empty vectors (representing empty
  groups), but the fasl format permits them.
    7.ss

original commit: 7be1d190de7171f74a1ee71e348d3e6310392686
2019-02-11 20:06:42 -08:00
Matthew Flatt
13b6b6943b committing @mflatt hashtable-cells pull request
original commit: 1900a7ef534366a4311a714cf56b9c60657ba0a1
2019-02-07 13:54:14 -08:00
DeathKing
f089a6eed9 fixed a typo in syntax.stex; syntax->vector returns a vector not a list.
original commit: 1b13007dde4135e7ee5a04926c474633e2324c36
2019-01-24 20:55:09 +08:00
dyb
33e1149d44 clarified required use of scheme-start to start an application
packaged as a boot file and added a short "myecho" example.
  use.stex

original commit: 58c07fdd629a4f45e6d7e1a062a6d9dde7d11050
2019-01-18 10:15:20 -08:00
dyb
ee9a4b3f59 profile counts are now maintained even for code that has been
reclaimed by the collector and must be released explicitly by the
programmer via (profile-release-counters).
  pdhtml.ss, primdata.ss,
  globals.h, externs.h, fasl.c, prim5.c, prim.c, alloc.c, scheme.c,
  misc.ms,
  release_notes.stex, system.stex

original commit: 68e20f721618dbaf4c1634067c2bee24a493a750
2019-01-17 09:43:18 -08:00
dyb
530882e379 addressed small portions of github issues #278 and #353:
updated descriptions of standard-input-port and standard-output-port;
fixed a missing "and" in the description of utf-16-codec,

original commit: a5db479b68b74dda9f62665c44cfad2b1baf322e
2018-10-22 19:29:30 -07:00
R. Kent Dybvig
b0abacbb55 Merge pull request #354 from goober99/hacktoberfest
Fixed typos pointed out in #353
original commit: fad29dbdf9f305abd6d1a7e4609bf96b251b47bc
2018-10-22 19:20:20 -07:00
Bob Burger
4699fc1db0 improved consistency of Windows filename handling
original commit: 9017943cdba8c54c8f0acf20b037174780c10039
2018-10-22 16:17:12 -04:00
Matthew D. Miller
03ae461f54 Fixes typos pointed out in #353
original commit: ebee5db8fac9639bd88f313ef0c4a0641dba8317
2018-10-05 15:01:36 -05:00
Bob Burger
75a70547f8 use uuid_generate on unix-like systems for S_unique_id
original commit: 2fd3db68230d094a0d396348a8140a4d3693b120
2018-09-19 10:19:03 -04:00
Oscar Waddell
36ea9a354d fix typos
original commit: 64a4374513fa19123147c6ef5644f75177a77541
2018-08-30 07:51:27 -04:00
Bob Burger
be2777e261 fix boot_call and the invoke code object to handle multiple values
original commit: 7fd080903d96a1ef9ab79780bf73aa1619f33894
2018-07-18 14:55:53 -04:00
Bob Burger
02131784f9 Merge branch 'procloc' of https://github.com/mflatt/ChezScheme into procloc
# Conflicts:
#	LOG
#	release_notes/release_notes.stex

original commit: 67b326cb9199a021d7c025834dedc8ac6285fc46
2018-07-18 10:18:24 -04:00
Bob Burger
15bcad22b4 Merge branch 'cas' of https://github.com/mflatt/ChezScheme
original commit: 9866aa6aa4b1cf54bd9e2e5ec64d08628fb46bc0
2018-07-17 15:27:51 -04:00
Matthew Flatt
8fdf68f10a add box-cas! and vector-cas!
original commit: a416f68a7a02c777881f4848599deefb120d33ae
2018-07-16 07:51:32 -06:00
Matthew Flatt
067555c251 add load-compiled-from-port and Sregister_boot_file_fd
original commit: a0adfa18af879f90d746b0b3541b036016957324
2018-07-15 20:44:34 -06:00
Matthew Flatt
9521af1518 add generate-procedure-source-information
original commit: b42213a65e75b29f51d29a77d258fa1ba8a336b0
2018-07-15 19:51:54 -06:00
Bob Burger
ad09be1a6a Updated some copyright years in csug
original commit: 6c738bdfde601b815c296f489697e61c314e4621
2018-06-21 13:44:05 -04:00
Bob Burger
3c7c397fff Updated csug socket code to match that in examples folder
original commit: 5bdf715809e5847dfa0807216bcc6d0dac2f10ea
2018-06-18 09:28:53 -04:00
Bob Burger
8885445d6d Improved Unicode support for command-line arguments, environment variables, the C interface and error messages, and the Windows registry, DLL loading, and process creation
original commit: aa1c2c4ec95c286a12730ea75588a18dd9fb9d59
2018-06-14 14:24:15 -04:00
Andy Keep
29a9931e9b Small fix to with-output-to-string documentation (thanks @jtaylor-us)
and usage (thanks @ocyzl---issue #280).

original commit: 78b3946d3747a87f1ee3de811170c671c0c2b0c5
2018-05-25 21:46:01 -04:00
Andy Keep
f673aeb57e Small fixes to documentation.
Fixed typo in profile-dump-html index and corrected overfull box issue in pdf
version of docs.
  foreign.stex, system.stex

original commit: 3a3385c7d62326ba3d0d3220329dfcd3e3d0ac8e
2018-05-22 21:57:49 -04:00
Oscar Waddell
3a5a3ab751 fix duplicate words
original commit: 38ade9595fe9771a02b00e22a50cede215a6b9ce
2018-05-22 16:09:14 -04:00
Oscar Waddell
0fa4928592 fix typos
original commit: 014d199a83960f58df1fb2da4c4849b162fc59e1
2018-05-22 16:09:00 -04:00
Andy Keep
331ab0f645 Merge pull request #289 from gavwhela/master
Return descriptions for most-positive-fixnum and most-negative-fixnum
original commit: 0be4cfdd01a70ead96c649979d7ddee35a9ef920
2018-04-22 12:08:37 -04:00
Andy Keep
1f0e42f0ec Merge branch 'pthread' of https://github.com/mflatt/ChezScheme into mflatt-pthread-2
original commit: 2230e5adcb61ac8b27c9deee682270f4e17fbafb
2018-04-21 22:09:05 -04:00
Matthew Flatt
270b0a44c5 Improvements to __collect_safe
Improve error reporting and improve docs as suggested by Andy, and
adjust `conv` -> `conv*` to fit a naming convention.

original commit: b34817aea5d3c4862e7bb313ee9f5281472a832f
2018-04-20 21:55:09 -06:00
Gavin Whelan
bc6795cfac Return descriptions for most-positive-fixnum and most-negative-fixnum
were reversed in csug, flipped to be correct.

original commit: f0ea46428e90095ce864964e5bfe7449c9488d85
2018-04-16 06:42:02 +00:00
Matthew Flatt
9aa1fc4caa add collect-rendezvous
original commit: f7cb82d97e34b14bfbafe635b0d4a294527b02c3
2018-04-02 13:52:03 -04:00
dyb
9991dd14ae fixed typo reported by github:@guenchi
original commit: 27e2a5c2d076e03ac6a70da06250a393f2253ea1
2018-03-28 08:56:54 -07:00
Matthew Flatt
7c94235f6b Change __thread to __collect_safe
Also, report an error if a string type is misused as an argument (for
foreign procedures) or result (for foreign callables) with
`__collect_safe`.

original commit: cdbfa3d86cb0719bf0979b3fe0aa5c4383282b77
2018-03-28 09:29:47 -06:00
dyb
718cfada6f corrected typo reported by github:@ocyzl
original commit: 5b6b89cd8f030d7a94194d94bed8f56fade5af34
2018-03-27 14:06:42 -07:00
Matthew Flatt
22d4fd9978 Add __thread foreign-call convention
See the `foreign-callable` docs for a good example use.

original commit: e3463c78c511ad861dfa49865bb447e9777f9eb8
2018-03-14 17:20:33 -06:00
Matthew Flatt
743800bbb5 support struct args to and results from foreign procedures
original commit: f0a94bdb9f57c1bf7ffbb66693fb5476a6f0e65b
2018-03-12 21:01:47 -06:00
dybvig
34b328092d Added some adapted charter and contributing text to the user's giude
preface and intro.  Added Matthew Flatt to the acknowledgements.

original commit: 332e015dc2cd96160c468278def7d3b2cf8a1131
2018-02-01 00:13:58 -05:00
dybvig
f7c414bda3 Various updates, mostly to the compiler, including a new lambda
commonizatio pass and support for specifying default record
equal and hash procedures:

- more staid and consistent Mf-cross main target
    Mf-cross
- cpletrec now replaces the incoming prelexes with new ones so
  that it doesn't have to alter the flags on the incoming ones, since
  the same expander output is passed through the compiler twice while
  compiling a file with macro definitions or libraries.  we were
  getting away without this just by luck.
    cpletrec.ss
- pure? and ivory? now return #t for a primref only if the prim is
  declared to be a proc, since some non-proc prims are mutable, e.g.,
  $active-threads and $collect-request-pending.
    cp0.ss
- $error-handling-mode? and $eol-style? are now properly declared to
  be procs rather than system state variables.
    primdata.ss
- the new pass $check-prelex-flags verifies that prelex referenced,
  multiply-referenced, and assigned flags are set when they
  should be.  (it doesn't, however, complain if a flag is set
  when it need not be.)  when the new system parameter
  $enable-check-prelex-flags is set, $check-prelex-flags is
  called after each major pass that produces Lsrc forms to verify
  that the flags are set correctly in the output of the pass.
  this parameter is unset by default but set when running the
  mats.
    cprep.ss, back.ss, compile.ss, primdata.ss,
    mats/Mf-base
- removed the unnecessary set of prelex referenced flag from the
  build-ref routines when we've just established that it is set.
    syntax.ss, compile.ss
- equivalent-expansion? now prints differences to the current output
  port to aid in debugging.
    mat.ss
- the nanopass that patches calls to library globals into calls to
  their local counterparts during whole-program optimization now
  creates new prelexes and sets the prelex referenced, multiply
  referenced, and assigned flags on the new prelexes rather than
  destructively setting flags on the incoming prelexes.  The
  only known problems this fixes are (1) the multiply referenced
  flag was not previously being set for cross-library calls when
  it should have been, resulting in overly aggressive inlining
  of library exports during whole-program optimization, and (2)
  the referenced flag could sometimes be set for library exports
  that aren't actually used in the final program, which could
  prevent some unreachable code from being eliminated.
    compile.ss
- added support for specifying default record-equal and
  record-hash procedures.
    primdata.ss, cmacros.ss, cpnanopass.ss, prims.ss, newhash.ss,
    gc.c,
    record.ms
- added missing call to relocate for subset-mode tc field, which
  wasn't burning us because the only valid non-false value, the
  symbol system, is in the static generation after the initial heap
  compaction.
    gc.c
- added a lambda-commonization pass that runs after the other
  source optimizations, particularly inlining, and a new parameter
  that controls how hard it works.  the value of commonization-level
  ranges from 0 through 9, with 0 disabling commonization and 9
  maximizing it.  The default value is 0 (disabled).  At present,
  for non-zero level n, the commonizer attempts to commonize
  lambda expressions consisting of 2^(10-n) or more nodes.
  commonization of one or more lambda expressions requires that
  they have identical structure down to the leaf nodes for quote
  expressions, references to unassigned variables, and primitives.
  So that various downstream optimizations aren't disabled, there
  are some additional restrictions, the most important of which
  being that call-position expressions must be identical.  The
  commonizer works by abstracting the code into a helper that
  takes the values of the differing leaf nodes as arguments.
  the name of the helper is formed by concatenating the names of
  the original procedures, separated by '&', and this is the name
  that will show up in a stack trace.  The source location will
  be that of one of the original procedures.  Profiling inhibits
  commonization, because commonization requires profile source
  locations to be identical.
    cpcommonize.ss (new), compile.ss, interpret.ss, cprep.ss,
    primdata.ss, s/Mf-base,
    mats/Mf-base
- cpletrec now always produces a letrec rather than a let for
  single immutable lambda bindings, even when not recursive, for
  consistent expand/optimize output whether the commonizer is
  run or not.
    cpletrec.ss,
    record.ms
- trans-make-ftype-pointer no longer generates a call to
  $verify-ftype-address if the address expression is a call to
  ftype-pointer-address.
    ftype.ss

original commit: b6a3dcc814b64faacc9310fec4a4531fb3f18dcd
2018-01-29 09:20:07 -05:00
Bob Burger
db1ce365fc fixed two typos
original commit: 2d1d3ad5fcf4b63423d9e7ff783315792ac81626
2017-11-22 10:38:33 -05:00
Andy Keep
59e6db7a61 Merge branch 'master' of github.com:cisco/ChezScheme
original commit: 1febe9b1a1e1cde4b7be8bc562153ee4b42afd8c
2017-10-14 00:00:19 -04:00
Andy Keep
b681ad9738 - Updated CSUG to replace \INSERTREVISIONMONTHSPACEYEAR with the current
month and year at the time of generation.
    csug.stex, copyright.stex
- Updated configuration to set machine types in the CSUG and release notes
  make files, and updated distclean target to remove these files.
    configure, makefiles/Makefile-csug.in (renamed from csug/Makefile),
    makefiles/Makefile-release_notes.in
      (renamed from release_notes/Makefile),
    makefiles/Makefile

original commit: d4fdb3e0c88c40cceeeeeb52032068408edc7a6e
2017-10-13 23:50:20 -04:00
dyb
f102c718c6 no longer using replacements for \tt underscore, tilde, at-sign, dots,
and curly braces, since the current cmtt font seems to support these
characters better than it once did.
  csug/scheme.sty
  release_notes/scheme.sty

original commit: f6c57b55cfbe34b269a606bd96983d62191a9aa1
2017-10-12 23:48:32 -04:00
Bob Burger
4a3e756767 more version number updates
original commit: 35ea1941338338894a05b57cd6656a4b58fc1a17
2017-10-12 10:05:30 -04:00