Commit Graph

291 Commits

Author SHA1 Message Date
Matthew Flatt
13b6b6943b committing @mflatt hashtable-cells pull request
original commit: 1900a7ef534366a4311a714cf56b9c60657ba0a1
2019-02-07 13:54:14 -08:00
dyb
a1195b7f7e addressed foreign-callable / boot file invalid memory reference:
- fixed a bug in which instantiating a static foreign-callable code object
  fails with an invalid memory reference because the collector has
  discarded its relocation information.  foreign-callable code objects
  are now flagged as "templates", and the collector now refuses to
  discard relocation information for code objects marked as templates
  when copying them to the static generation.
    cmacros.ss, cpnanopass.ss,
    gc.c,
    7.ms
- committing updated boot/*/equates.h (without the boot files, which are
  still usable for bootstrapping)
    boot/*/*.h
- updated release notes
    release_notes.stex

original commit: 71d3abba684e04b134720ea1bd9a8c847c38ac5f
2019-02-06 22:22:21 -08:00
R. Kent Dybvig
4bd603231a Merge branch 'master' into fpstr
original commit: 216139066e8ba8dc510fc7a1ee32f48bce2e5742
2019-02-05 15:03:40 -08: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
627c809de4 Merge branch 'fpstr' of github.com:mflatt/ChezScheme
original commit: 871ccfa8688baa865731e047c59677b652d808f3
2019-02-01 05:26:06 -07:00
Matthew Flatt
7027a71f01 fix string allocation for callable argument or foreign-call return
The `dofretu...*` intrinsics used %ac1 without declaring it as a used
registers, which effectively broke register allocation for handling
string/bytevector foreign-call results or callable arguments.

original commit: 993fb9036acad5445319f458fd971b1a1d8e9f84
2019-01-27 13:01:57 -07:00
Matthew Flatt
8070a7b910 Merge branch 'eqfl' of github.com:mflatt/ChezScheme
original commit: 8b36396eacb139e0fff70efcd2c9dc842815324f
2019-01-22 05:57:17 -07:00
Matthew Flatt
6e999d02c3 add ordered guardians
Also, avoid quadratic time in GC for guardian chains.

original commit: 273f79a7be5c04370c399e6b1d8af799efc8b33f
2019-01-22 05:19:38 -07: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
c647fd031d Merge branch 'titlecase' of github.com:mflatt/ChezScheme
original commit: 244185f858a01b4679d2add4f0f6dc90c9f92c3d
2019-01-20 16:35:27 -07:00
Matthew Flatt
4752199578 fix string-titlecase on special-casing characters
original commit: 0ae58f75bcf76fb41e571579a81ab2080379455c
2019-01-20 16:34:25 -07:00
Matthew Flatt
b27f3c0a94 Merge branch 'phantom' of github.com:mflatt/ChezScheme
original commit: 743a56d8f1920620e8f6e14edca7984101425e14
2019-01-20 07:56:59 -07:00
Matthew Flatt
538def47de add phantom bytevectors
original commit: 001917fd98ac6a0f13ccab902e15b9d2169c4b9c
2019-01-20 07:41:09 -07: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
Matthew Flatt
3e297e025e adjust make-arity-wrapper to enforce the supplied arity mask
original commit: a9ec7da3ea3b8edc665b060bcba675248119d260
2019-01-15 11:56:03 -07:00
Bob Burger
523384742a fixed 7.ms to specify the relative path of testfile.boot
original commit: 3ee3ffaccd2c50f69b183b4b14318b6a7aa382e7
2019-01-15 13:21:17 -05:00
dyb
20ab41bb10 - redirecting output of first two checkboot runs to /dev/null so the
ignored exception, if any, does not show up in the make output.
    s/Mf-base

original commit: 4de3eab4d76feea17431099f798a343a6205e50e
2019-01-11 18:10:38 -08:00
Matthew Flatt
ea29ba02f7 Merge branch 'sv' of github.com:mflatt/ChezScheme
original commit: 9dd62e2d4a44879ddb210bb6ebe7ad600b832634
2019-01-10 19:26:37 -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
Matthew Flatt
3658fad6b7 Merge branch 'count' of github.com:mflatt/ChezScheme
original commit: 9d0a647e87089c91195cc49480d848212025a7ed
2019-01-05 09:55:07 -07:00
Matthew Flatt
aaaa5fefa1 add compute-size-increments
Also adds `get-initial-thread`, since threa values are useful with
`compute-size[-increments]`.

Changes the compiler to inline `weak-pair?` and `ephemeron-pair?`,
since that provides better performance for `compute-size-increments`.

original commit: 57d0cc13f8e932972cba3837b4f54e9c86786091
2019-01-05 09:49:12 -07:00
Matthew Flatt
f6b40d39ba Merge branch 'noncm' of github.com:mflatt/ChezScheme
original commit: b99995a8d38565cbedfbe46ab8a6006ee936b331
2018-12-30 08:18:13 -07:00
Matthew Flatt
9a366730f4 cp0: move only known-single-valued out of single-value context
Aviod turning an error like

 (let ([x (values 1 2)]) x)

or

 (car (list (values 1 2)))

into a program that returns multiple values.

original commit: 4efb3d6f226d9131f87023e45ff2b7e4713da8ae
2018-12-30 08:15:55 -07:00
Matthew Flatt
a0e9eed93f Merge dfasl branch of mflatt/ChezScheme
original commit: c6168b2d0b1b97e9822bc8eae2e08900cebb7152
2018-12-28 08:45:06 -06:00
Matthew Flatt
7c548bb3a1 update vfasl merge
original commit: 99dac3f53f4a7d2b2c373489135e5d270c256726
2018-12-28 08:39:21 -06:00
Matthew Flatt
6d3fc30233 avoid fasl overflow of C stack
When writing a fasl stream, add extra graph points as needed
to limit recursive reading to about 500 non-tail recursions.

original commit: a6759efdc6ac68e45ec8755a5fe9b75038e173a5
2018-12-28 08:26:50 -06:00
Matthew Flatt
efb93d2653 Merge branch 'gcbt' of github.com:mflatt/ChezScheme
original commit: 51c6b2a880000ce754e1595f4481957e9fc7f722
2018-12-16 07:00:22 -07:00
Matthew Flatt
7864a1f45e Merge branch 'arity-wrapper' of github.com:mflatt/ChezScheme
original commit: 1967e6fb2948ea59d9f3b403b7b6e20d228502b1
2018-12-16 06:51:39 -07:00
Matthew Flatt
5a27f6de14 Merge branch 'orderfnl' of github.com:mflatt/ChezScheme
original commit: 04618715b7b447877cd874715d78094befb0b988
2018-12-16 06:46:34 -07:00
R. Kent Dybvig
abf4ae18bb Update LOG
original commit: 62b92d664e166133d96cb084791ad51e57207bb1
2018-12-05 15:25:21 -08:00
Christian Häggström
d9d0e94d95 Initialize more fields of seginfo
original commit: 48e93161f6ac2796d17a0f147f0dca1e1e195684
2018-12-05 23:36:57 +01:00
Matthew Flatt
54ffb5dfbe reliably preserve cp in thread context for S_call_help
Also, for completeness, correct the listing of callee-save registers
in callable return for x86 & x86_64.

original commit: 4cd942be6ab2eb5e02f6d6c5c509db3131bd015f
2018-12-05 07:53:49 -07:00
Bob Burger
4699fc1db0 improved consistency of Windows filename handling
original commit: 9017943cdba8c54c8f0acf20b037174780c10039
2018-10-22 16:17:12 -04:00
dyb
19f3c85fe2 attempted partial fix for github issue 352
- when thread_get_room exhausts the local allocation area, it now
  goes through a common path with S_get_more_room to allocate a new
  local allocation area when appropriate.  this can greatly reduce
  the use of global allocation (and the number of tc mutex acquires
  in threaded builds) when a lot of small objects are allocated by
  C code with no intervening Scheme-side allocation or dirty writes.
    alloc.c, types.h, externs.h

original commit: 93dfa7674a95837e5a22bc622fecc50b0224f60d
2018-10-05 09:03:30 -07: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
Bob Burger
57b0163e93 add PDB files for Windows
original commit: 6d9bda11c1f8d31bf86c559892cf968d7f0c1595
2018-09-07 16:56:33 -04:00
Bob Burger
d468c35f29 added uninstall target for Unix-like systems
original commit: 4e5831fc0220ceede934f1d300b588129f770783
2018-08-31 13:22:47 -04:00
Oscar Waddell
8b9b2e6b10 restore the import code on reset to provide consistent error message
original commit: 3da0f8ed90b849ea4a72d37169fa78652058d70f
2018-08-25 18:35:29 -04:00
Oscar Waddell
47e236a07c clarify "unknown module" error message in determine-module-imports
original commit: 6af5ae075c4cce789d3528c3a6ef2620f90793e8
2018-08-25 18:35:29 -04:00
Oscar Waddell
75bce2810b flush expand-output and expand/optimize-output ports
original commit: 39a1aa4034dc11e808146e5a3ed44acfc1f0f99b
2018-08-25 18:35:29 -04:00
dyb
61df2f25f7 fix for issue #343
- the compiler now uses a temporary variable to hold the return
  value of a nested call across the restore-local-saves form to
  properly handle the case where the destination lvalue is an mref
  whose base and/or index is a local save.
    cpnanopass.ss,
    misc.ms

original commit: 835cbc2430be4f7381cee27133d42e77ace2b37f
2018-08-23 15:29:01 -07: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
陈梓立
90362e220c Autoconfig, detect if X11 exist on Mac OS X (#333)
original commit: b4793db8362152b242d5694417f555efec0db81a
2018-07-17 10:40:33 -04:00
Bob Burger
5de438ba7d Merge fdstart from mflatt
original commit: 40faa8c4b489c34da44ccaf269c7b807740f5396
2018-07-17 10:26:20 -04:00
Matthew Flatt
48228739fe add object-references to reflect GC's tracing of objects
The `object-references` function is intended to support debugging of
memory leaks by providing a mapping from each live object to the
object that retained it.

original commit: 61f6602b7e6c388c529f3c5995dcf71a7c42e005
2018-07-16 18:08:48 -06:00
Bob Burger
cd175b091c fixed typo & removed whitespace at end of lines in LOG
original commit: 329e8d4a277216143c2c7eb4dbe7f45c956d14e5
2018-07-16 11:04:15 -04:00
Matthew Flatt
3a422fabb2 update tests for "prefer closest binding name"
original commit: 0c7bb874a2357187e6012601b32ed354c0ff9ba9
2018-07-16 11:01:17 -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
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
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
dyb
ee967194d7 allx now runs all up to three (rather than two) times to eliminate
bootstrap failures after small changes like the recent change to
procedure names, so we don't have to rebuild the boot files as often.
  Mf-base

original commit: 94aaebe54807780791b8373017c979f59e6c45f1
2018-07-09 15:32:34 -07:00
R. Kent Dybvig
9b0664956e Merge branch 'master' into letname
original commit: 18ef2f99a66b4050fd434e644afc6ccf110b8ebf
2018-07-09 10:42:15 -07:00
Andy Keep
c090b317bd allow s_ee_get_clipboard to use the pastebuffer on macOS even when X11 is not available.
expeditor.c

original commit: f8cf536720fe43d07ca83d284e5bd1733c97372a
2018-07-01 11:45:10 -04:00
820563b5b6 update log
original commit: e8059074dd0a81ed825e15b1d32fb385f8ec994b
2018-07-01 20:20:03 +08:00
Matthew Flatt
3f9da4af46 prefer closest binding name for procedures
In some cases, such as

 (define g (let ([f (lambda (x) x)]) f))

the inner name `f` could get replaced by the outer name `g`.
Prefer the inner name so that macros can use a `let` wrapper
to reliably name a procedure.

original commit: 9ae0f856b0f81610c6caea13a5bfdf3b135de5b0
2018-06-22 09:09:56 -06: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
2f355b464e Avoid an occasional invalid memory violation on Windows in S_call_help
original commit: c2d2467d48eea145455124343c8819dfb683c39e
2018-06-15 16:42:09 -04:00
Matthew Flatt
49be8b2e3a x86_64: fix foreign-procedure & results that are not multiples of a word
Relevant to #320

original commit: 8143c414c078ec1a0898d7d25340668e855013f0
2018-06-15 13:59:34 -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
b01e92fc4f Merge branch 'master' into gcc-8
original commit: 3fe77b72d97829294f9df3d87deae4649812885c
2018-05-22 23:50:11 -04:00
Oscar Waddell
0d829bbdfb reject attempts to visit invisible library
Libraries incorporated via compile-whole-program are, by default,
not visible to environment or eval, unless libs-visible? is true;
complain if we try to visit such libraries.

original commit: 220dca39d0cb482a1cff3f31b8a3197f8b5ee1bc
2018-05-21 17:13:18 -04:00
Oscar Waddell
c5e349cacb propagate enable-check-prelex-flags to separate-eval sub-process in tests
original commit: 760c3414e412ecb6708c890e32fdb8056be1e805
2018-05-21 12:03:30 -04:00
Bob Burger
486792e042 Use Windows path separator character when finding boot files on Windows.
original commit: 553ac1ae4df56d547051fff5dbbaf82b979ea5e1
2018-05-14 12:15:13 -04:00
Bob Burger
137342a80f Windows install now sets HeapSearchPath in the registry
original commit: e15dffdaa6492a971b60e58e23d6d1f6262ea5da
2018-05-14 11:45:42 -04:00
Göran Weinholt
336fe9d344 - Double FMTBUFSIZE to fix compilation with gcc-8
c/prim5.c

original commit: 82a14c87aaa44ae004b9d76af42144155e426290
2018-05-04 19:10:44 +02:00
Bob Burger
ace59999fd Don't install equates.h
original commit: 7c86c154e9d175370ed4ae5f67201ff7e466ca02
2018-05-03 14:15:25 -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
Oscar Waddell
cd2dc690b0 add newline to (import-notify) message in compile-whole-library and compile-whole-program
original commit: 3d6d526a77da70d47ddbef7105709bd720ca1fc0
2018-04-13 11:29:35 -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
Andy Keep
e79f9a66eb Fixes #273 (on master this time) with -Wno-implicit-fallthrough
Embarrassingly, I committed this change on the wrong branch initially.
Added -Wno-implicit-fallthrough flag to macOS C makefiles.
  c/Mf-a6osx, c/Mf-i3osx, c/Mf-ta6osx, c/Mf-ti3osx

original commit: 8eb8336a7d2870f8e592f060bab8321703e40b48
2018-04-08 12:22:25 -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
dyb
30934965f3 - added identifier? checks to detect attempts to use non-identifier
field names in define-record-type field specs.
    syntax.ss,
    record.ms, root-experr*

original commit: be022d947b3831afcb4c538151899f9bd6559615
2018-04-04 15:34:54 -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
Oscar Waddell
68e1ae0ece install equates.h, kernel.o, and main.o on unix-like systems
original commit: fd7812d05c791e05eb65982c93bd8c36f7a0404f
2018-03-27 13:03:48 -04: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
dybvig
aa8bea9648 reworked the S_call_help/S_return CCHAIN handling to fix a bug in which
the signal handler could trip over the NULL jumpbuf in a CCHAIN record.
  schlib.c
remade boot files

original commit: d8c270403121547101cb523cc1f80a569dbb0378
2018-03-13 12:28:20 -04: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
6b1259cfef Mitigate a race condition in Windows when deleting files and directories.
original commit: 1a13def8d6570babe378f4c63b5a488fac58ed3f
2018-02-21 16:05:21 -05:00
Gustavo Massaccesi
4991067ed7 Remove special case for (#2%map p '()) in cp0
So the reduced version checks that p is a procedure
Also make the same change for #2%for-each.
  cp0.ss, 4.ms

original commit: 5caa11c85bc74c0af25ac215d48b7f5f0c1d3e42
2018-02-13 17:47:43 -03: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
Gustavo Massaccesi
63a6443c26 fix a few signatures
primdata.ss

original commit: 903e017f2611f7e2c3817667afefee7a0ebfae35
2018-01-15 22:58:34 -03:00
Andy Keep
ef497bf210 Merge branch 'bounds' of https://github.com/mflatt/ChezScheme into mflatt-bounds
original commit: b619c426142eaa8ae410138e17d16bd1e7f133e9
2018-01-15 13:10:29 -05:00
Andy Keep
3cedf42ed2 - added tests to ensure the optimize-level version 2 of map and for-each raise
a non-procedure exception when the first argument is not a procedure, even
  when the rest of the program is compiled at optimize level 3.
    4.ms, root-experr-compile-0-f-f-f, patch-compile-0-t-f-f,
    patch-compile-0-f-t-f, patch-interpret-0-f-t-f, patch-interpret-0-f-f-f,
    patch-interpret-3-f-t-f, patch-interpret-3-f-f-f

original commit: 7916447d1a482ec91ae63927692053d727d9b459
2018-01-15 13:07:23 -05:00
Andy Keep
1a35e17a60 Merge branch '17-12-Map-Error' of https://github.com/gus-massa/ChezScheme into gus-massa-17-12-Map-Error
original commit: 154ed6a4113b3f440e9d5a8348270d2ca1ace807
2018-01-13 12:28:11 -05:00
Gustavo Massaccesi
eb9d65d88c avoid building the result list in a map that is called for effect
cp0.ss

# Conflicts:
#	s/cp0.ss

original commit: 12353c17917f0979e72740592891ce928b40963f
2018-01-10 17:59:16 -03:00
Gustavo Massaccesi
d593fe4a78 Check that first argument of map is a procedure in cp02 expansion
to raise the same error that the non expanded version
  cp0.ss

original commit: cf10634c29c5f873e1e77b1868dd58071650dba3
2018-01-10 17:57:06 -03:00
Matthew Flatt
1dba8c4624 fix bounds check on immutables values and an immediate index
original commit: fc064b5b91bc5c7da8b7c71441a37e3c05523986
2018-01-07 08:48:57 -07: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
Andy Keep
b1a19f79bb Merge branch 'master' into evenodd
original commit: 1c0f190d28f2304a57e5db051a3dea69a914e903
2017-12-28 21:03:59 -05:00
Matthew Flatt
9a51376b5a even? and odd?: reject exceptional flonums, since they're not integers
original commit: 94a28793313c714520635bd09359ef8bde2d52a8
2017-12-28 17:00:04 -06:00
Bob Burger
1a8a6dee21 fix comment about Sscheme_program
original commit: abb991bcd87f64eeae9a3848959191a4da5d6542
2017-12-28 10:54:03 -05:00