Commit Graph

173 Commits

Author SHA1 Message Date
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
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
Gustavo Massaccesi
7a8d824b3d fix a few signatures
s/primdata.ss

original commit: 0886e9807c7ded82dd836b54c963ea8c966d5c54
2017-12-15 20:17:27 -03:00
Gustavo Massaccesi
dc0be2bfbe fix mat of substring-fill!
after the recent change, the result of substring-fill! is void
  5_5.ms

original commit: a2cd9856be74008cc23b6ca3476339e79a1cd5ff
2017-12-15 19:28:43 -03:00
Andy Keep
f1b9fc95da Fixing output of substring-fill! and vector-fill!
- fixed substring-fill! and vector-fill! to return void, reflecting the
  documented return value of unspecified value.  Also changes substring-fill!
  to use define-who instead of repeating 'substring-fill! in all the error
  messages.
    5_4.ss, 5_6.ss

original commit: 3f65788b5422693f3648a9e2fe575f464eb31ccd
2017-12-12 08:43:01 -05:00
Bob Burger
3863e63ef9 added support for Visual Studio 2017.15.5
original commit: 33eaccf5d0105186d66faa76e8463bab9369bf1a
2017-12-07 17:18:22 -05:00
Andy Keep
280e3632bb Merge branch 'master' into 17-10-Enumerate
original commit: 1ca717c9ece587f08a654772a72f1452357ca389
2017-12-05 12:22:07 -05:00
Gustavo Massaccesi
1ecfb04a58 fix bytevector-[u/s]16-native-set! signature
original commit: 5d4e2fa1b2cf1ad7011b94b2b5262f734d5f0530
2017-12-05 12:43:49 -03:00
Andy Keep
07987daf04 Merge branch 'master' into 17-10-Enumerate
original commit: ad54c2dddd68ca5aec37f0837f72cbfdaac6bb7b
2017-11-24 09:27:36 -05:00
dyb
893dfe5d35 maybe-compile-{file,program,library} and automatic import
compilation now treat a malformed object file as if it were
not present and needs to be regenerated.  A malformed object
file (particularly a truncated one) might occur if the compiling
processes is killed or aborts before it has a chance to delete
a partial object file.
  syntax.ss,
  7.ms

original commit: c2cb8c79a925c0eb2f9d589e3a497712800bd1dc
2017-11-07 21:49:08 -05:00
dyb
59d2ca053c Merge branch 'master' of github.com:cisco/chezscheme
original commit: 5cfeee1f12507b70a1aa9fe1fd2094c8ff592bca
2017-10-30 21:02:54 -04:00
dyb
64b0db8e30 fixed gather-filedata's sort of profile entries. for any two
entries x and y in the list produced by the sort call, if x's
bfp = y's bfp, x should come before y if x's efp < y's efp.
The idea is that enclosing entries should always come later
in the list.  this affects only languages where two expressions
can start at the same character position.
  pdhtml.ss
expanded capability of ez-grammar with support for simpl
parsing of binary operators w/precedence and associativity
and automatically generated markdown grammar descriptions.
ez-grammar-test.ss now also doubles as a test of pdhtml for
algebraic languages.
  mats/examples.ms,
  examples/ez-grammar.ss, examples/ez-grammar-test.ss,
  examples/Makefile

original commit: 53b8d16a1e86f3956585dbec0c7b573e485f7844
2017-10-30 21:01:43 -04:00
Bob Burger
029fe628f3 updated newrelease to handle mats/Mf-*nt
original commit: 02a321479626d2a9e9f5ee0d5b4862eaed4859c8
2017-10-30 17:32:37 -04:00
dyb
9b6b6d32ee attempt to stabilize timing tests let-values source-caching
test and ephemeron gc test while resensitizing the former
  8.ms, 4.ms
various formatting and comment corrections
  workarea,
  s/Mf-base, bytevector.ss, cpnanopass.ss, date.ss,
  5_6.ms, examples.ms

original commit: 19e2505fc6477fce2d1d0e61187bd504b58ea994
2017-10-29 17:48:43 -04:00
dyb
0d236d959c fixed LOG entry
original commit: 328cb00845cc52fa89c3e558bfdab2fcf8f3bee1
2017-10-27 23:21:28 -04:00
dyb
983e8b6c00 Numerous changes to improve register/frame allocation speed for
procedures with large numbers of variables:
- added pass-time tracking for pre-cpnanopass passes to compile.
    compile.ss
- added inline handler for fxdiv-and-mod
    cp0.ss, primdata.ss
- changed order in which return-point operations are done (adjust
  sfp first, then store return values, then restore local saves) to
  avoid storing return values to homes beyond the end of the stack
  in cases where adjusting sfp might result in a call to dooverflood.
    cpnanopass.ss, np-languages.ss
- removed unused {make-,}asm-return-registers bindings
    cpnanopass.ss
- corrected the max-fv value field of the lambda produced by the
  hand-coded bytevector=? handler.
    cpnanopass.ss
- reduced live-pointer and inspector free-variable mask computation
  overhead
    cpnanopass.ss
- moved regvec cset copies to driver so they aren't copied each
  time a uvar is assigned to a register.  removed checks for
  missing register csets, since registers always have csets.
    cpnanopass.ss
- added closure-rep else clause in record-inspector-information!.
    cpnanopass.ss
- augmented tree representation with a constant representation
  for full trees to reduce the overhead of manipulating trees or
  subtress with all bits set.
    cpnanopass.ss
- tree-for-each now takes start and end offsets; this cuts the
  cost of traversing and applying the action when the range of
  applicable offsets is other than 0..tree-size.
    cpnanopass.ss
- introduced the notion of poison variables to reduce the cost of
  register/frame allocation for procedures with large sets of local
  variables.  When the number of local variables exceeds a given
  limit (currently hardwired to 1000), each variable with a large
  live range is considered poison.  A reasonable set of variables
  with large live ranges (the set of poison variables) is computed
  by successive approximation to avoid excessive overhead.  Poison
  variables directly conflict with all spillables, and all non-poison
  spillables indirectly conflict with all poison spillables through
  a shared poison-cset.  Thus poison variables cannot live in the
  same location as any other variable, i.e., they poison the location.
  Conflicts between frame locations and poison variables are handled
  normally, which allows poison variables to be assigned to
  move-related frame homes.  Poison variables are spilled prior to
  register allocation, so conflicts between registers and poison
  variables are not represented.  move relations between poison
  variables and frame variables are recorded as usual, but other
  move relations involving poison variables are not recorded.
    cpnanopass.ss, np-languages.ss
- changed the way a uvar's degree is decremented by remove-victim!.
  instead of checking for a conflict between each pair of victim
  and keeper and decrementing when the conflict is found, remove-victim!
  now decrements the degree of each var in each victim's conflict
  set.  while this might decrement other victims' degrees unnecessarily,
  it can be much less expensive when large numbers of variables are
  involved, since the number of conflicts between two non-poison
  variables should be small due to the selection process for
  (non-)poison variables and the fact that the unspillables introduced
  by instruction selection should also have few conflicts.  That
  is, it reduces the worst-case complexity of decrementing degrees
  from O(n^2) to O(n).
    cpnanopass.ss
- took advice in compute-degree! comment to increment the uvars in
  each registers csets rather than looping over the registers for
  each uvar asking whether the register conflicts with the uvar.
    cpnanopass.ss
- assign-new-frame! now zeros out save-weight for local saves, since
  once they are explicitly saved and restored, they are no longer
  call-live and thus have no save cost.
    cpnanopass.ss
- desensitized the let-values source-caching timing test slightly
    8.ms
- updated allx, bullyx patches
    patch*

original commit: 3a49d0193ae57b8e31ec6a00b5b49db31a52373f
2017-10-27 23:16:47 -04:00
Gustavo Massaccesi
425b39da5b fix enumerate signature
original commit: f28167b985190ebab58a1c58d7693077ee29e96a
2017-10-15 23:11:21 -03: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
3f79fa0c65 - ifdef'd out include of xlocale.h for glibc, since the glibc
locale.h includes xlocale.h or, in glibc 2.26, its replacement.
    expeditor.c

original commit: b04e9123a427034a39fc9084ba2a8b04608bbb3b
2017-10-13 16:59:16 -04:00