Commit Graph

870 Commits

Author SHA1 Message Date
dyb
1d2d9c6f54 updated release notes date
original commit: 600edcdc0f2ce629d1d632f6df390fb0fbbfb610
2020-01-24 10:39:20 -08:00
Matthew Flatt
83f8acbfef avoid symbolic link in repo checkout
original commit: 8eb10e62d0a58d945dec67cdc38a317a8a1d88e0
2020-01-23 17:58:15 -07:00
Matthew Flatt
754bae07e3 add enable-unsafe-application
original commit: 4c0750d292999dbc476b2b0a80cad3b8beaab660
2020-01-23 15:25:22 -07:00
dyb
4d819b1a1e fix for scheme-version string
original commit: bfd06eccfccf395cb3ff9e1d0f9419dc16709378
2020-01-23 11:23:01 -08:00
dybvig
48db0a9405 various library-manager improvements including the ability to verify
loadability without actually loading; also, support for unregistering
guarded objects.
- improved error reporting for library compilation-instance errors:
  now including the name of the object file from which the "wrong"
  compilation instance was loaded, if it was loaded from (or compiled
  to) an object file and the original importing library, if it was
  previously loaded from an object file due to a library import.
    syntax.ss, 7.ss, interpret.ss,
    8.ms, root-experr*
- removed situation and for-input? arguments from $make-load-binary,
  since the only consumer always passes 'load and #f.
    7.ss,
    scheme.c
- $separate-eval now prints the stderr and stdout of the subprocess
  to help in diagnosing separate-eval and separate-compile issues.
    mat.ss
- added unregister-guardian, which can be used to unregister
  the unressurected objects registered with any guardian.  guardian?
  can be used to distinguish guardian procedures from other objects.
    cp0.ss, cmacros.ss, cpnanopass.ss, ftype.ss, primdata.ss,
    prims.ss,
    gcwrapper.c, prim.c, externs.h,
    4.ms, primvars.ms
    release_notes.stex
    smgmt.stex, threads.stex
- added verify-loadability.  given a situation (visit, revisit,
  or load) and zero or more pathnames (each of which may be optionally
  paired with a library search path), verity-loadability checks
  whether the set of object files named by those pathnames and any
  additional object files required by library requirements in the
  given situation can be loaded together.  it raises an exception
  in each case where actually attempting to load the files would
  raise an exception and additionally in cases where loading files
  would result in the compilation or loading of source files in
  place of the object files.  if the check is successful,
  verity-loadability returns an unspecified value.  in either case,
  although portions of the object files are read, none of the
  information read from the object files is retained, and none of
  the object code is read, so there are no side effects other than
  the file operations and possibly the raising of an exception.
  library and program info records are now moved to the top of each
  object file produced by one of the file compilation routines,
  just after recompile info, with a marker to allow verity-loadability
  to stop reading once it reads all such records.  this change is
  not entirely backward compatible; the repositioning of the records
  can be detected by a call to list-library made from a loaded file
  before the definition of one or more libraries.  it is fully
  backward compatible for typical library files that contain a
  single library definition and nothing else.  adding this feature
  required changes to the object-file format and corresponding
  changes in the compiler and library manager.  it also required
  moving cross-library optimization information from library/ct-info
  records (which verity-loadability must read) to the invoke-code
  for each library (which verity-loadability  does not read) to
  avoid reading and permanently associating record-type descriptors
  in the code with their uids.
    compile.ss, syntax.ss, expand-lang.ss, primdata.ss, 7.ss,
    7.ms, misc.ms, root-experr*, patch*,
    system.stex, release_notes.stex
- fixed a bug that bit only with the compiler compiled at
  optimize-level 2: add-library/rt-records was building a library/ct-info
  wrapper rather than a library/rt-info wrapper.
    compile.ss
- fixed a bug in visit-library that could result in an indefinite
  recursion: it was not checking to make sure the call to $visit
  actually added compile-time info to the libdesc record.  it's not
  clear, however, whether the libdesc record can be missing
  compile-time information on entry to visit-library, so the code
  that calls $visit (and now checks for compile-time information
  having been added) might not be reachable.  ditto for
  revisit-library.
    syntax.ss
    syntax.ss, primdata.ss,
    7.ms, root-experr*, patch*,
    system.stex, release_notes.stex
- added some argument-error checks for library-directories and
  library-extensions, and fixed up the error messages a bit.
    syntax.ss,
    7.ms, root-experr*
- compile-whole-program now inserts the program record into the
  object file for the benefit of verify-loadability.
    syntax.ss,
    7.ms, root-experr*
- changed 'loading' import-notify messages to the more precise
  'visiting' or 'revisiting' in a couple of places.
    syntax.ss,
    7.ms, 8.ms

original commit: b911ed47190727b0e1d6a88c0e473d1757accdcd
2020-01-23 10:43:17 -08:00
Matthew Flatt
5a01e2c589 make a test portable
original commit: 86b384b5ed2e1cde6c61abe50db5b606e8841cfc
2020-01-20 15:00:56 -07:00
R. Kent Dybvig
c1a4de6f4f Merge pull request #490 from mflatt/cp-push-mvrs
fix missing continuation call in `cp-push-mvrs`
original commit: 585068e174bde7d685ca8743533ea0f02f157753
2020-01-20 10:59:13 -08:00
Matthew Flatt
bdaeb6afaa fix missing continuation call in cp-push-mvrs
original commit: 2758eb1848fbc21f7f6af718d952547132b265a0
2020-01-20 09:27:45 -07:00
Matthew Flatt
94fee207a1 fix missing continuation call in mp-push-mvrs
original commit: d841744b26e4b4421fc4388b6943e558014e5e70
2020-01-20 09:26:46 -07:00
Matthew Flatt
345621fc91 cp0 repair for mutated library variables
This was supposed to be part of 628d57e1bd and fixes a test
failure introduced there.

original commit: bb186c9a29acf36a7c5954356690f6648cf9348c
2020-01-20 09:25:44 -07:00
Matthew Flatt
6020b944ef improve cross-library inlining
Allow a library-defined function to be inlined when the inlined
expressions refer to other library-defined functions. Since the
library function's body may already have inlined calls, don't allow
further inlining of calls within the inlined code.

This commit also adds `$app/no-inline`, which can be used to prevent
inlining of a function. For consumers other than Racket on Chez
Scheme, probably it would make sense to provide a nicer-looking
syntactic form that expands to use the internal `$app/no-inline`
function.

original commit: 628d57e1bd2e658aad4da97a3e85bda72c38f6ab
2020-01-19 08:35:02 -07:00
Matthew Flatt
45381612b2 fix popcount support to work on Windows
Avoid RDI, since it's preserved in the Windows ABI.

original commit: 68b2f597ec67ed8752998807bd0c9fc66667c752
2020-01-11 16:41:46 -07:00
Matthew Flatt
196a9800f9 implement fxbit-count using fxpopcount
original commit: 470b088840576872fd0a7ede7bf5342f44555af0
2020-01-11 11:21:42 -07:00
Matthew Flatt
540c58bbe8 use POPCNT instruction when available on x86_64
On x86_64, a POPCNT instruction is usually available, and it can speed
up `fxpopcount` operations by a factor of 2-3.

Since POPCNT isn't always available, code using `fxpopcount` is
compiled to a call to a generic implementation. The linker substitutes
a POPCNT instruction when it determines at runtime that POPCNT is
available.

Some measurements on a 2018 MacBook Pro (2.7 GHz Core i7) using the
program below:

 popcnt = this implementation, POPCNT discovered
 nocnt  = this implementation, POPCNT considered unavailable
 optcnt = compile to use POPCNT directly (no linker work)
 cpcnt  = compile to inlined generic (no linker work, no POPCNT)

Since the generic implementation is always a 64-bit popcount, it's not
as good as an inlined version for `fxpopcount32`, but otherwise the
link-edit approach to POPCNT works well:

            fxpopcount      fxpopcount32
 popcnt:       0.098s
 nocnt:        0.284s
 optcnt        0.109s  [slower means noise?]
 cpcnt:        0.279s         0.188s

 (optimize-level 3)
 (time
  (let loop ([v #f] [i 100000000])
    (if (fx= i 0)
        v
        (loop (fxpopcount i) (fx- i 1)))))

original commit: 5f090e509f8fe5edc777ed9f0463b20c2e571336
2020-01-11 11:04:48 -07:00
Gustavo Massaccesi
f88714210b fix signature in primdata
original commit: bcb7841a33645c55bdd839c3de80bce53ce78402
2020-01-09 10:24:03 -03:00
Matthew Flatt
81ea967aea add stencil vectors and fxpopcount
original commit: ec766fca869b5e0407c4f54230b72619af73b40b
2020-01-06 05:34:28 -07:00
Matthew Flatt
27883d2749 another repair to bitwise-arithmetic-shift/ash folding
Fuzz testing exposed a problem with the example

   (bitwise-arithmetic-shift-left -1 -1)

original commit: fc6f411ffc65f436d54979dfc0455ae771f3375d
2020-01-06 05:34:28 -07:00
Sam Tobin-Hochstadt
e039b19653 Repair bitwise-arithmetic-shift/ash on bad first arguments.
Fixes 0b0777912b1aa80.

original commit: d1a82e712c9c4645c1d790162827ad4e5d8c9f1d
2020-01-03 11:42:05 -05:00
Gustavo Massaccesi
7e647535b4 don't fold ash in cp0 when the shift is too big
fix also bitwise-arithmetic-shift/-right/-left.

  primdata.ss, cp0.ss, 5_3.ms

original commit: 0b0777912b1aa80cff108dc1d34917bb80875e0b
2020-01-02 13:03:19 -03:00
Gustavo Massaccesi
8796743cbd cp0: reduce (if <boolean> #t #f)
It may help to reduce expressions like
  (and <boolean> <obviously-true>)

original commit: bf6d3134a306f0cf12768f344d647ceaf820e9fa
2020-01-02 13:03:19 -03:00
Matthew Flatt
2efa342323 speed up objlist
Instead of using `%` to compute the index into an oblist, use a power
of 2 for the oblist length and bit masking to compute an index. (Maybe
the old hashing function was bad; the current hashing function should
produce good hash-code variation at the level of bits.) Also, make the
oblist array a little sparser to reduce bucket chaining.

original commit: fb87fcb8e47902b80654789d059a25bd4a7a8def
2020-01-01 15:08:52 -07:00
Matthew Flatt
bbbda808e5 propagate $AR and $ARFLAGS to submodule builds
original commit: 652aed04f243ce4a7f5c71f18d1754952380a479
2019-12-31 07:58:12 -07:00
Matthew Flatt
69444da5a0 clear temporary bignum registers
After a bignum computation using temporary thread registers W, U, or V
is complete, clear ther register. (The X and Y registers hold only
small bignums, so clearing them doesn't matter in the same way.)

original commit: a9e11fcf9e86aee5d149764476e1fabfeee12f84
2019-12-30 07:03:19 -07:00
Matthew Flatt
7675d58fb2 avoid --exclude with git-describe
The `--exclude` flag is not supported by older-but-still-used version
of Git.

original commit: a5a594f7c3f71d17d2e55ed50463b92515de02dc
2019-12-27 04:58:56 -06:00
Matthew Flatt
6352009def sometimes-faster fixnum / via quotient
Try `fxquotient` with a `fx*` check to implement `/` on fixnums.
That's fast enough to be much faster when it works, and only slows
down a more general `/` a little.

original commit: e91430be9b71f4913965db688a15f6d7206b38f3
2019-12-25 08:04:09 -06:00
Matthew Flatt
29abe3e317 sync expected-error patch file
original commit: 77854d418b6d05bd0e0b913f421f0e475b06ec30
2019-12-18 12:29:57 -07:00
Matthew Flatt
ecaec06f64 add string-append-immutable
original commit: 353ee30534757fb37bfe231e9be21482d9f858ce
2019-12-17 19:29:10 -07:00
Matthew Flatt
c8ea435c85 make strings within symbols always immutable
original commit: 7859d16dac7bae6ab836e2200003583dc572deba
2019-12-16 17:11:49 -07:00
Matthew Flatt
f858bec12a skip <xlocale.h> on Linux
It's not available with musl, either, musl intentionally
doesn't provide a preprocessor test, and we're avoiding
(for now) `configure`-time tests in the style of autoconf.

original commit: a9bfb72027fc83ed6bb690d033bc6fed0629dba7
2019-12-11 14:41:07 -07:00
Matthew Flatt
01a40286c2 propagate CC and CPPFLAGS to ZLib and LZ4 builds
original commit: cbb7c5f21a879ee90293c3abf99d344c4fc42b7f
2019-12-09 08:34:50 -07:00
Gustavo Massaccesi
b8508e5170 Alternative version of enable-type-recovery
Don't run cptypes, when cp0 is disabled, for example with
(run-cp0 (lamba (cp0 x) x)

This is easier to understand because run-cp0 is a single point to control
all the cp reductions. The reductions in cptypes can be independently disable
using enable-type-recovery.

original commit: b23645e669fbf02806a261a2d87160fdbe06db93
2019-12-08 11:41:15 -03:00
Gustavo Massaccesi
30beb65af3 add uninterned-symbols to cptypes
original commit: e85c19895bd47126a434364ae8007b6c40a87393
2019-12-07 16:59:23 -03:00
Gustavo Massaccesi
19819ef4bf don't copy propagate uninterned symbols in cp0 and cptypes
original commit: 9758171949520e9f97e54f1140ae14083b168a8e
2019-12-07 16:44:29 -03:00
Matthew Flatt
50e529364d fasl: move uptr continue bit from low to high
Use the high bit of a byte to continue instead of the low bit.
That way, ASCII strings look like themselves in uncompressed fasl
form.

original commit: 89a8d24cc051123a7b2b6818c5c4aef144d48797
2019-12-06 16:43:26 -07:00
Matthew Flatt
4998cda524 fix version in Mf-install
original commit: 999a4fe636fde497a7b203132dee9d496bf64013
2019-12-05 20:11:22 -07:00
Matthew Flatt
71072b7221 cpvalid: obey enable-error-source-expression
original commit: 45af7f62cfe9b0f77bb2c58e49c7543b9603458b
2019-12-05 16:41:47 -07:00
Matthew Flatt
4b61c87227 cp0: more reliably set accessor/mutator/predicate names
original commit: 17414888f010ea7407cd3663bec5f19e1e3e20d8
2019-12-05 09:16:03 -07:00
Matthew Flatt
de2dedcdd7 Add uninterned symbols
Uninterned symbols are slightly more expensive to allocate than 0- or
1-argument calls to `gensym`, but they're much cheaper to hash (and
print). They're also more consistently distinct when unfasled, and the
fasled form is determinsitic.

original commit: 3167083008031b1f880e76a6f573563c7d9c888c
2019-12-04 12:43:35 -07:00
Matthew Flatt
7e36c21d81 document enable-type-recovery
original commit: 30033287ad504058bc6810b1ef4ff5ecbe927dac
2019-11-26 07:15:16 -07:00
Matthew Flatt
ee54863999 enable hyperlinks in CSUG
original commit: 0060fea5806b3238be207abd9843ee5f0a7d9039
2019-11-26 07:09:52 -07:00
Matthew Flatt
232b230e65 add enable-error-source-expression
original commit: 02f383510653bb16c65fc812eb0c619bcb0347b5
2019-11-26 06:31:48 -07:00
Matthew Flatt
ddf4322ef2 ignore result of mktime
The result of `mktime` is -1 for an error. The result is also -1 if
the time is 1 second before the epoch. That's not useful, so ignore
it.

original commit: aa8ca31cef223128fd8ed1abdc76beb31a0e077a
2019-11-23 19:54:30 -05:00
Gustavo Massaccesi
6789fd84c1 Use system flag of primitives to avoid check in primvars.ms
With this flag the primitive is not tested in primvars.ms but other
parts of the compiler can use the signature/flags.

Also, add a signature to every system boolean primitive.

  primvars.ms, primdata.ss

original commit: ee023c673bda6557bc223de7f8b0e732600619bc
2019-11-15 17:03:00 -03:00
Matthew Flatt
8c82d4e5b7 fix continuation-attachment optimization and non-single-value primitives
original commit: 6180395ad38887c6278e96a6cea9e0a4aad2453a
2019-11-05 17:49:50 -07:00
Bob Burger
3e9e4f684d fix warning in fasl.c
original commit: a3ea77d5a81acbef7542942d3e2e261f02b58bcd
2019-11-05 14:21:14 -05:00
Matthew Flatt
f0dc15c335 mark single-valued internal primitives
Probably makes no difference right now, since these internal functons
rarely show up in the process of optimizing user programs, but just in
case.

original commit: b54a288b31731368dbcf57c95b78f0a162c29147
2019-10-28 11:41:37 -06:00
Oscar Waddell
05ced37f45 fix typo
original commit: 243cd029bb19ce555dac4012e6e20c5673143b64
2019-10-26 17:30:53 -04:00
Matthew Flatt
9ae0e9b971 fix call/cc inside call-...-continuation-attachment
Can't simply use a continuation reified by an attachment
operation, because it is probably a 1-shot continuation
that needs to be promoted.

original commit: 8201aff06df8011ffbc41f217d50e4c430d75bb5
2019-10-24 05:40:55 -06:00
Matthew Flatt
f52283de7e semi-inline call/cc in tail position
Effectively, change a `call/cc` call to `let/cc` when it appears in
the tail position of a function. This change takes advantage of
continuation-reification support that was built for continuation
attachments.

original commit: 4c015a5b55f7d04839a0efd8e5554fc237e4663b
2019-10-23 08:33:01 -06:00
Bob Burger
f9a2c87545 Travis: use bionic dist
original commit: a6a7e27f818da196f32e907d085d5e3456a9cd65
2019-10-21 13:15:41 -04:00