Commit Graph

594 Commits

Author SHA1 Message Date
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
82257f1cbe Merge pull request #324 from mflatt/letname
prefer nearest binding name for procedures
original commit: d02fd343e3860b1e18bb481abe21e489dd2f17fc
2018-07-09 10:43:17 -07:00
R. Kent Dybvig
9b0664956e Merge branch 'master' into letname
original commit: 18ef2f99a66b4050fd434e644afc6ccf110b8ebf
2018-07-09 10:42:15 -07:00
dyb
9e7900e2f9 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

cherry picked from cisco/ChezScheme#d8c2704031

original commit: f03e2535577df3e3b5d8ad7349c46d4c2e89b507
2018-07-02 07:43:23 -06: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
Andy Keep
72719ccd71 Merge pull request #331 from Hyzeta/master
add an option `--disable-x11` to configure, which allows you to build Chez Scheme with X11 disabled
original commit: 68fe2d780c3b891bad493dd97457e3a2d4af88a3
2018-07-01 10:05:16 -04:00
820563b5b6 update log
original commit: e8059074dd0a81ed825e15b1d32fb385f8ec994b
2018-07-01 20:20:03 +08:00
da2799034e remove vscode-related file
original commit: f6d040b5c54f760c77eedde2fef26c27f59a0eba
2018-07-01 20:14:06 +08:00
d7dcda9637 add an option --disable-x11
original commit: ab43608f22dc68497577ab527c782507144ef0e4
2018-07-01 20:13:18 +08:00
Matthew Flatt
349f36e2a0 make bootfiles
original commit: e579a0abd365bbe68e4db50eac831c59ef4dc0bd
2018-06-22 12:45:58 -06:00
Matthew Flatt
3a2659968a 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.

cherry-picked from mflatt/ChezScheme#letname

original commit: fb75f08cfa9690f94ae2abaa237278b287367d68
2018-06-22 09:33:12 -06: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
ad09be1a6a Updated some copyright years in csug
original commit: 6c738bdfde601b815c296f489697e61c314e4621
2018-06-21 13:44:05 -04:00
Bob Burger
81af193970 wininstall make workareas now builds boot files
original commit: 53ddbb37cc24dc1d0099478733d2d5a1263b353b
2018-06-21 09:25:31 -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
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
Bob Burger
5501a81a31 fix mats/foreign4.c compiler error when used in non-threaded systems
original commit: 778c79f6f6c4706b4072b46dc704712365421c16
2018-06-13 15:39:16 -04:00
Quentin Dufour
924708b5ef Use a hard link instead of a symbolic to fix temp root bug
original commit: afb265e3fb8d8547884c1e7ca154c963894f703b
2018-06-12 09:57:21 -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
6b4ae1726b Merge pull request #299 from weinholt/gcc-8
- Double FMTBUFSIZE to fix compilation with gcc-8
original commit: 5850c5ec26a8c4d09282aa04cfc3149594ea371a
2018-05-22 23:54:36 -04:00
Andy Keep
b01e92fc4f Merge branch 'master' into gcc-8
original commit: 3fe77b72d97829294f9df3d87deae4649812885c
2018-05-22 23:50:11 -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
Andy Keep
364413fda8 Merge pull request #308 from owaddell/owaddell/typos
fix a couple typos and some duplicate words in csug
original commit: 92b49b413ddaecda347570a6b30290fc5f46172f
2018-05-22 21:49:12 -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
R. Kent Dybvig
ced22b147e Merge pull request #306 from owaddell/owaddell/reject-invisible
Reject attempts to visit invisible library
original commit: 454cf722eff397d4c9e2afbe3da2fc6477ae61a0
2018-05-22 10:48:50 -07:00
Oscar Waddell
84352b6b7d add tests for some library-manager uses cases
original commit: 2e6bbc5148bdbcc0546652d8c6c94b89302da4ac
2018-05-21 17:13:18 -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
f425d8846d fix typo in code comment
original commit: 5a11fac7fb92cd8a1bc278ddc782d33bd24c7106
2018-05-16 15:44:16 -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
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
eae6342a9f Updated bootfiles.
original commit: 451e4728a710ea6c297030d40798accaf473bc66
2018-04-22 12:04:10 -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
Andy Keep
9f78570343 Changed the base language to allow for a list of conventions.
Changed the base language foregin and fcallable forms to accept a list of
conventions, which are each symbols, instead of a single convention, which was
a list of conventions, mostly to make it clear in the grammar what is going on.
  base-lang.ss, cp0.ss cpcheck.ss, cpcommonize.ss, cpletrec.ss, cpnanopass.ss,
  cprep.ss, cpvalid.ss, interpret.ss, syntax.ss,

Fixed a place where we were checking for eq? of two conventions, which now
should be equal? since it is a list (assuming this list will always be in a
consistent order).
  cpcommonize.ss

Removed a spurious definition of convention?
  np-languages.ss

original commit: dabf5a8abeaef12cdfcb36d9aac236dda9ac9158
2018-04-20 16:50:28 -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
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
528e055466 use patch-exec-path in 7.ms
original commit: a4cc341a57b381c63ed79f316a9bf4fec12bfb70
2018-04-13 11:12:25 -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
Gustavo Massaccesi
62ae3ff4e6 Additional improvements in cptypes
original commit: e53bae2d4ac549ac466d5f9942a839d624fb58fe
2018-04-12 21:54:19 -03:00
Andy Keep
18b12f21fd Fixes and small improvements for type recovery.
Removed counter field from prelex, using the operand field instead to
provide the index into the fxmap.  This follows other uses within the compiler
where we use the operand field as a little place for state that is used
within a single pass.  This has a few advantages.  First, it keeps the record a
little smaller.  Second, it means that the prelex numbering can start from 0
for each compilation unit, which should help keep the numbers for the fxmap a
bit smaller in longer running sessions with multiple calls to the compiler.
Finally, it avoids adding to the burden of the tc-mutex, since within the pass
it is safe for us to set the prelexes, since only the instance of the pass
holding this block of code has a handle on it.  As part of this change
prelex-counter is now defined in cptypes and the operand is cleared after the
variables go out of scope.
  base-lang.ss

Fixed the highest-set-bit function in fxmap so that it will work in the 32-bit
versions of Chez Scheme.  The fxsrl by 32 raises an exception, and was leading
to tests to fail in 32-bit mode.
  fxmap.ss

Restructured predicate-implies? so that it uses committed choice instead of
uncommitted choice in comparing x and y.  Basically, this means, instead of
doing:
(or
  (and (predicate-1? x) (predicate-1? y) ---)
  (and (predicate-2? x) (predicate-2? y) ---)
  ...)
we now do:
(cond
  [(predicate-1? x) (and (predicate-1? y) ---)]
  [(predicate-2? x) (and (predicate-2? y) ---)]
  ...)
This avoids running predicates on x that we know will fail because an earlier
predicate matches, generally getting out of the predicate faster.  This did
require a little restructuring, because in some cases x was dominant and in
other cases y was dominant.  This is now restructured with y dominate, after
the eq? and x 'bottom check.

Replaced let-values calls with cata-morphism syntax, including removal of maps
that built up a list of values that then needed to be separated out with
(map car ...) (map cadr ...) etc. calls.  This avoid building up structures we
don't need, since the nanopass framework will generate a mutltivalued let for
these situations.

The if clause in cptypes/raw now uses types1 (the result of the recursive call
on e1) in place of the incoming types clause when processing the e2 or e3
expressions in the cases where e1 is known statically to produce either a false
or non-false value.

Fixed a bug with directly-applied variable arity lambda.  The original code
marked all directly-applied variable arity lambda's as producing bottom,
because it was chacking for the interface to be equal to the number of
arguments.  However, variable arity functions are represented with a negative
number.  For instance, the original code would transform the expression:
(begin
  ((lambda (a . b) (set! t (cons* b a t))) 'a 'b 'c)
  t)
to
((lambda (a . b) (set! t (cons* b a t))) 'a 'b 'c)
anticipating that the call would raise an error, however, it is a perfectly
valid (if some what unusual) expression.  I tried to come up with a test for
this, however, without building something fairly complicated, it is difficult
to get past cp0 without cp0 turning it into something like:
(let ([b (list 'b 'c)])
  (set! t (cons* b 'a t))
  t)

Fixed make-time, time-second-set!, and time-second to indicate that second can
be an exact-integer, since it is not really restricted to the fixnum range (and
if fact we even test this fact in the mats on 32-bit machines).
  primdata.ss

Changed check of prelex-was-assigned (which is not reliably on the input to any
give pass) with prelex-assigned, which should always have an accurate, if
conservative, value in it.

Added enable-type-recovery parameter to allow the type recover to be turned on
and off, and added cptype to the cp0 not run path that runs cpletrec, so that
cptypes can be run independent of cp0.  This is helpful for testing and allows
us to benefit from type recovery, even in cases where we do not want cp0 to
perform any inlining.
  compile.ss, front.ss, primdata.ss

Stylistic changes, mostly for consistency with other parts of the compiler,
though I'm not married to these changes if you'd really prefer to keep things
the way the are.
1. clauses of define-record type now use parenthesis instead of square brackets.
2. indented by 2 spaces where things were only indented by one space
3. define, let, define-pass, nanopass pass productions clauses, now use
   parenthesis for outer markers instead of square brackets.
  fxmap.ss,

original commit: 5c6c5a534ff708d4bff23f6fd48fe6726a5c4e05
2018-04-12 21:54:01 -03:00
Gustavo Massaccesi
05c81335a4 Add safeongoodargs flag to primref
for example reduce (car <pair>) => (#3%car <pair>)

original commit: fedfc84d6abf348f9d2579d479b08f727eb7d445
2018-04-12 21:53:56 -03:00