Commit Graph

104 Commits

Author SHA1 Message Date
Matthew Flatt
08a9c8ecf6 Merge addition of hashtable-cells
original commit: 180948f4a6b18ffcc45fe1231b04b69c4b0bc3ff
2018-07-30 15:39:49 -06:00
Matthew Flatt
19bb7d2498 add hashtable-cells
original commit: 96c421421da95e5625f4bdec543ef31c619e876e
2018-07-30 14:19:33 -06:00
Matthew Flatt
4b5daf4594 Merge branch 'arity-wrapper' of github.com:mflatt/ChezScheme
original commit: 23102af98ccd2dacd3529dd37c182d00f1d12490
2018-07-25 16:05:17 -06:00
Matthew Flatt
b54495f58d Merge branch 'orderfnl' of github.com:mflatt/ChezScheme
original commit: abb84eb7b0dbb9824d0b32407143589ff309a0fb
2018-07-25 16:01:03 -06: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
Matthew Flatt
28c8ebaeff add make-arity-wrapper-procedure
A program can use `make-arity-wrapper-procedure` to synthesize a
function that reports a given arity mask (without calling `compile`).

In addition, `set-arity-wrapper-procedure!` suports modifying the
implementation of a synthesized procedure. Although similar
functionality could be achieved with `(lambda args (apply (unbox proc)
args))`, an arity wrapper procedure can dispatch to another procedure
without allocating a list for the arguments.

The interpreter now uses an internal variant of arity wrappers to
cooperate with `procedure-arity-mask`.

original commit: 5fede14302840b55edbeb7565e28d09350a4b2e9
2018-07-16 07:52:55 -06:00
Matthew Flatt
8fdf68f10a add box-cas! and vector-cas!
original commit: a416f68a7a02c777881f4848599deefb120d33ae
2018-07-16 07:51:32 -06:00
Matthew Flatt
9521af1518 add generate-procedure-source-information
original commit: b42213a65e75b29f51d29a77d258fa1ba8a336b0
2018-07-15 19:51:54 -06:00
Matthew Flatt
2ca43d6c6f add ordered guardians
Also, avoid quadratic time in GC for guardian chains.

original commit: a07c7e14b61862989777909ee63a2ec120c2ea47
2018-07-15 19:12:43 -06: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
Oscar Waddell
8220ce2b32 handle compiled library code in boot files once base boot is loaded
original commit: 23788415327a5396d14e452fca410ba68431098b
2018-04-13 10:25:03 -04:00
dyb
052e48e9e8 committing @akeep library change with rebuilt boot files:
- fixed an issue with the library system where an exception that occurs
  during visit or revisit left the library in an inconsistent state that
  caused it to appear that it was still in the process of running.  This
  manifested in it raising a cyclic dependency exception, even though
  there really is not a cyclic dependency.  The various library
  management functions involved will now reset the part of the library
  when an exception occurs.  This also means that if the library visit
  or revisit failed for a transient reason (such as a missing or
  incorrect library version that can be fixed by updating the
  library-directories) it is now possible to recover from these errors.
    expand-lang.ss, syntax.ss, interpret.ss, compile.ss, cprep.ss,
    8.ms

original commit: 6dbd72496fb4eaf5fb65453d0ae0a75f0ef2ad80
2018-04-05 21:28:33 -07:00
Matthew Flatt
9aa1fc4caa add collect-rendezvous
original commit: f7cb82d97e34b14bfbafe635b0d4a294527b02c3
2018-04-02 13:52:03 -04:00
Oscar Waddell
9d1b935705 standalone export form now handles (import import-spec ...)
original commit: 09b6745679892fe2fac761d5849fe78b87d57dcf
2018-04-02 10:44:17 -04: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
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
Bob Burger
fb9d36e050 Use spin loop instead of Sleep for more robust race condition mitigation
original commit: fb9f854d449ee96cccb63a12629a729046f0bee1
2018-02-21 16:39:26 -05:00
Bob Burger
6b1259cfef Mitigate a race condition in Windows when deleting files and directories.
original commit: 1a13def8d6570babe378f4c63b5a488fac58ed3f
2018-02-21 16:05:21 -05:00
dybvig
af60b1c8df updaed release-notes date
original commit: 1e010f5632306305cf1bd44d86c9c51b33a2e7a1
2018-02-01 00:38:14 -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
350f87ba4d fix bug in date->time-utc caused by incorrect use of difftime in Windows
original commit: 4748dad50c7f0e9b3ba002c27990d4c88c0189fc
2017-12-29 16:48:30 -05:00
dyb
b453ab1582 updated release notes with entry about improved compile times
for procedures with large numbers of variables

original commit: bc117fd4d567a6863689fec6814882a0f04e577a
2017-11-09 11:12:34 -05:00
dyb
e55e744c4d - updated version to 9.5.1
bintar BUILDING NOTICE makefiles/Mf-install.in scheme.1.in
    c/Makefile.i3nt c/Makefile.a6nt c/Makefile.ti3nt c/Makefile.ta6nt
    workarea c/scheme.rc s/7.ss s/cmacros.ss
    release_notes/release_notes.stex csug/csug.stex

original commit: c9c45641cc50b073329cc6d219140cf93fbd5c4c
2017-10-11 19:57:53 -04:00
dyb
5705bf3a69 - added version number to scheme.1.in trailer; updated date.
scheme.1.in, newrelease
- removed version update of no-longer-existing bldnt.bat.  "fixed"
  sed patterns to replace \? with * for the benefit of the deficient
  mac sed.
    newrelease
- updated version to 9.5
    bintar BUILDING NOTICE makefiles/Mf-install.in scheme.1.in
    c/Makefile.i3nt c/Makefile.a6nt c/Makefile.ti3nt c/Makefile.ta6nt
    workarea c/scheme.rc s/7.ss s/cmacros.ss
    release_notes/release_notes.stex csug/csug.stex
- updated release notes and fixed user's guide overfull hbox.
    release-notes.stex, syntax.stex
- updated install target to do something more sensible
    release_notes/Makefile

original commit: adb3b7bb22ddaa1ba91b98b6f4a647427c3a4d9b
2017-10-11 18:26:23 -04:00
Matthew Flatt
9d8cc87758 add locate-source cache and line+column components to source objects
Add optional beginning-line and beginning-column components to a
source object, so that line and column information can be recorded
independent of the file. Add `locate-source-object-source` to use
the recorded information. Add a cache for `locate-source` as enabled by
the `use-cache?` optional argument, which can avoid compilation times
that are quadratic in the number of `let-values` or `define-values`
forms.

original commit: b36fab81d5041a54ce01a422395eee79d2f930bc
2017-08-01 05:23:56 -06:00
Matthew Flatt
59c772ba48 add make-ephemeron-eq-hashtable, etc.
Revert the use of ephemeron pairs in weak hashtables, since the
difference is visible via guardians. Add hashtable based on ephemerons
(to avoid key-in-value problems) as an explicit variant.

original commit: 31ac6d78592e1a9ba6bfbe802260e3d56d4cf772
2017-07-06 16:27:23 -06:00
Matthew Flatt
1932612543 add bytevector-compress and bytevector-decompress
original commit: aa062c09c9f0d129250db84aeb0a5190647c5574
2017-06-21 17:52:28 -06:00
dyb
dacb66ac72 fixed a bug in flonum-extractor, which on 64-bit machines was using an
8-byte read instead of a 4-byte read to pick up the 4 highest-order
bytes of a little-endian flonum, potentially reading past the end of
mapped memory for flonums produced by taking the imaginary part of an
inexact complexnum (which, unlike other flonums, are not aligned on
16-byte boundaries).  The 8-byte load would also have failed to produce
correct results on 64-bit big-endian machines (of which we presently
have none) because the offsets passed to flonum-extractor assume the
bits are in the lowest-order 4 bytes of the extracted field.
  cp0.ss,
  misc.ms,
  release_notes.stex

original commit: 97bd75bcedbcf32b77c59615a638ea1528ebe26b
2017-06-09 21:21:08 -04:00
Sam Tobin-Hochstadt
0e41c9d8be Add date-dst? and date-zone-name procedures
Accesses existing-but-hidden DST information in date records,
and adds support for getting a name of the current time zone
when a time zone offset is not explicitly provided.

original commit: 3c8be62d12a8197018fb6c5aae182fd75da14fe8
2017-06-08 11:21:39 -04:00
Bob Burger
323eb3c285 fix overflow detection for fxsll, fxarithmetic-shift-left and fxarithmetic-shift
original commit: f286688b64f877248ab8d8f00528d19363c6ceba
2017-05-05 15:28:29 -04:00
Bob Burger
d1a5bcf399 enum-set-indexer procedure now checks for a symbol, changed "isn't" to "is not" for consistency
original commit: 5df52745d793eb5a16cb6e55065f78f313170ed5
2017-05-05 15:22:46 -04:00
Bob Burger
cbae4b9d77 mutexes and conditions are now freed when no longer used
added $close-resurrected-mutexes&conditions and $keep-live

original commit: 8d9aa4dffc371fc365020e5dac62270dae2aaa95
2017-04-13 09:41:58 -04:00
Bob Burger
c19e662ed0 destroy_thread now processes guardian entries
original commit: 9bcf0a10c1a1c12d93a8eabb061821377de0934f
2017-04-12 10:26:03 -04:00
Kent Dybvig
118e3f6fd9 added entry for record-type-equal-procedure and friends
release_notes.stex

original commit: 28cbb65f9796672bb9a85d3eb2d63cc149031a1e
2017-03-26 21:04:55 -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
Bob Burger
636d1568ab updated copyright date in csug and release_notes
original commit: 35fd693021ae0ad142ebefd910d11778d1527064
2017-03-14 14:27:47 -04:00
Bob Burger
288243924f added optional timeout to condition-wait
original commit: 26d4dfc437fde2ba85d2d1a9ccadc2fa36979da0
2017-03-14 12:53:10 -04:00
Matthew Flatt
21fe925d06 add procedure-arity-mask
original commit: 4bd061000ab903feb3fe8e3b96ecbcb10c59dba9
2017-02-22 07:16:53 -07:00
Bob Burger
30c6552ec2 Use high-precision clock time on Windows 8 and up.
original commit: 15982a28189454d5b7b3b065db5aac9816781bde
2016-09-22 13:36:10 -04:00
dybvig
c680147c5b - added descriptions of print-extended-identifiers to the user's guide
and release notes.  updated the release notes to account for a couple
  of other log entries.
    release_notes.stex,
    intro.stex, io.stex

original commit: 7d1bbdaaccc6640e1529fdbd8b40a8ff7012bee4
2016-08-22 23:34:32 -04:00
dybvig
35eaa9feff - fixed a bug in cpvalid resulting in it leaving behind a cpvalid-defer
form for later passes to choke on.  also fixed cp0 to print the correct
  name for cpvalid when it does this.
    cpvalid.ss, cp0.ss,
    misc.ms
- updated the prototype for s_ee_write_char to match the definition
    expeditor.c
- updated LOG and release_notes
- rebuilt boot files due to s-directory changes

original commit: 50aa8b34774a9e65e96481ae329a3f329fad7aca
2016-08-07 23:36:40 -04:00
Bob Burger
51db0ddbc1 scheme_mutex_t now uses volatile keyword for owner and count fields
because these fields can be accessed from multiple threads concurrently.
Updated $yield and $thread-check in mats/thread.ms to be more tolerant of timing variability.

original commit: 0a6a1e14e7ecb9e39fa7a10a8584ed2fec24cbf4
2016-06-22 15:33:21 -04:00
Bob Burger
9e92d0ce21 add note about TZ environment variable in Cygwin, fix typos in release notes
original commit: 20cad4ed4091b4b4d55f1857894cf56d35e1e59f
2016-06-17 14:33:28 -04:00
Bob Burger
7e9d64fc29 fixed typos in release notes for new time-object manipulation procedures
original commit: 29946dc8340a921e576b64971eb1c20f282ce627
2016-06-16 15:18:29 -04:00
Bob Burger
39410c8447 - Cygwin is now used on Windows, updated mats, eliminated unused killme
- added a cast to eliminate warnings in c/number.c
- fixed bug in Windows version of directory-separator-predicate in s/6.ss when path-* procedures are passed a path that is not a string.
- fixed bug in s/cp0.ss on Windows with $foreign-wchar?.
- fixed spelling of non-existent

original commit: dd1b741f7572cb0d5a6210c7c796aee7c4026040
2016-06-10 10:07:07 -04:00
dybvig
8935c6fbd9 - updated the descriptions of statistics and related functions to
reflect the Version 9.3.1 change from sstats structures to sstats
  records, with sstats times represented as time objects and sstats
  bytes and counts represented as exact integers; also updated the
  sstats-difference description to reflect that it no longer coerces
  negative differences to zero.  added a corresponding release note.
    system.stex,
    release_notes.stex

original commit: cd93f130c2a911d67bc19b75da0f205d50b8f6ff
2016-06-09 00:11:45 -04:00
dybvig
aa62ffb153 * updated version to 9.4.1
bintar BUILDING NOTICE makefiles/Mf-install.in scheme.1.in
    c/Makefile.i3nt c/Makefile.a6nt c/Makefile.ti3nt c/Makefile.ta6nt
    mats/bldnt.bat workarea c/scheme.rc s/7.ss s/cmacros.ss
    release_notes/release_notes.stex csug/csug.stex

original commit: f0c9a4fbc082fa17c5bd3bd06d82365e77edc86b
2016-05-17 00:18:33 -04:00
dybvig
3cf4bdebd7 updated release month to May
release_notes.stex

original commit: d74078aee4dac3ee3b10bdcf42ecf1b8e2e817f0
2016-05-13 09:59:20 -07:00
dybvig
5718697d60 updated release_notes.stex to describe the recent fixes for bugs that
dated back to Version 8.4 or before and to combine the three performance
subsections directly related to the new compiler back-end, since the
changes all occurred between publicly available releases.

original commit: 65df1d1f7c37f5b5a93cd7e5b475dda9dbafe03c
2016-05-06 23:04:44 -04:00
Bob Burger
d60a41a363 fixed typos in release notes
original commit: eb2b1fd30761c6af0eb471ea5b78d849b2b5f52a
2016-05-03 11:29:42 -04:00
Bruce Mitchener
0f8d2e6998 Fix typos involving articles.
original commit: 1ada02cc4cadc6b9a7b2b2da4dd326fb0e7518f6
2016-04-28 11:01:10 +07:00
dyb
1356af91b3 initial upload of open-source release
original commit: 47a210c15c63ba9677852269447bd2f2598b51fe
2016-04-26 10:04:54 -04:00