Commit Graph

42299 Commits

Author SHA1 Message Date
Matthew Flatt
35e77092f3 fix typo in a debugging assertion
original commit: 10148ea09455445a76b037e2e9fb5abcb72913ae
2020-03-07 07:06:05 -07:00
Matthew Flatt
00b6803e36 cs: enable embedding in other applications
The "Inside: Racket C API" manual now has a CS part and a BC part.
2020-03-07 06:39:41 -07:00
Gustavo Massaccesi
75872880f8 cptypes: rewrite implementation of primref->argument-predicate
Also, remove signatures from primref. Now the record is reverted to the one in
the main ChezScheme version.

And lift most of the code outside the cptypes function.

original commit: 8f4384e0a5e1e9b383f65e097d6088b30d8069e5
2020-03-07 08:47:37 -03:00
Gustavo Massaccesi
db47781c8c cptypes: rewrite primref->result-predicate
Also, move all result-types calculations to priminfo.ss

original commit: 5a36377edca85724e44a6462ad8a0e53b1c4f669
2020-03-07 08:47:37 -03:00
Gustavo Massaccesi
1cb4278a06 cptypes: pass an explicit variable for the prelex counter
The implicit counter to number the prelex has caused problems in the multithread
version many times, so make it an explicit arguments of the functions that is
passed around until the prelex-counter function uses it.

Perhaps it can be remover later, after rewriting the implementation of
define-specialize.

original commit: 6ca1db6a0159b6a7756fad7c5e25b0225c858609
2020-03-07 08:47:36 -03:00
Gustavo Massaccesi
d6d30d2fcc cs: sync with Chez Scheme change fix in cptypes 2020-03-07 08:07:30 -03:00
Matthew Flatt
e2c9544ed5 bc: fix hash-set key replacement for eq? values 2020-03-06 11:15:50 -07:00
sorawee
6685120c0a
Doc: more illustrative example for the filter-map function (#3066) 2020-03-05 21:46:15 -05:00
Matthew Flatt
d2961790b0 add fasl terminator
While "\44\26\2\f6" currently works as a terminator for non-compressed
fasl streams, the working byte sequence varies as the fasl format
changes. Add "\177" as a simpler and unchanging terminator.

original commit: 332019360491be6cedd2063c9a8056183d764bbb
2020-03-05 17:05:22 -07:00
Matthew Flatt
b4dd4684d9 cs: fix problem getting structure hash codes 2020-03-05 11:28:28 -07:00
dybvig
0a5700cef6 support for internal fasl compression to allow seeking past compile-time info at run time and run-time info at compile time
- the collector now releases bignum temporaries in the collector
  rather than relocating them so we don't keep around huge bignum
  temporaries forever.
     gc.c
- removed the presumably useless vector-handling code from load()
  which used to be required to handle fasl groups.
     scheme.c
- object files are no longer compressed as a whole, and the parameter
  compile-compressed is no longer defined.  instead, the individual
  fasl objects within an object file are compressed whenever the
  new parameter fasl-compressed is set to its default value, #t.
  this allows the fasl reader to seek past portions of an object
  file that are not of interest, i.e., visit-only code and data
  when "revisiting" an object file and revisit-only code and data
  when "visiting" an object file.  the compressed portions are
  compressed using the format and level specified by the compress-format
  and compress-level parameters.  the C-coded fasl reader and
  boot-file loader no longer handle compressed files; these are
  handled, less efficiently, by the Scheme entry point (fasl-read).
  a warning exception is raised the first time a program attempts
  to create or read a compressed fasl file.
    7.ss, s/Mf-base, back.ss, bytevector.ss, cmacros.ss, compile.ss,
    fasl-helpers.ss, fasl.ss, primdata.ss, strip.ss, syntax.ss,
    externs.h, fasl.c, gc.c, scheme.c, thread.c,
    mats/6.ms, mats/7.ms, mats/bytevector.ms, mats/misc.ms, patch*,
    root-experr*,
    intro.stex, use.stex, io.stex, system.stex,
    release_notes.stex
- added begin wrappers around many of the Scheme source files that
  contained multiple expressions to cut down the number of top-level
  fasl objects and increase compressibility.  also removed the
  string filenames for debugging at the start of each file that had
  one---these are best inserted universally by a modified compile-file
  during a debugging session when desired.  also removed unnecessary
  top-level placeholder definitions for the assignments that follow.
    4.ss, 5_1.ss, 5_2.ss, 5_3.ss, 5_7.ss, 6.ss, 7.ss, bytevector.ss,
    cafe.ss, cback.ss, compile.ss, cp0.ss, cpcommonize.ss, cpletrec.ss,
    cpnanopass.ss, cprep.ss, cpvalid.ss, date.ss, engine.ss, enum.ss,
    env.ss, event.ss, exceptions.ss, expeditor.ss, fasl.ss, foreign.ss,
    format.ss, front.ss, ftype.ss, inspect.ss, interpret.ss, io.ss,
    library.ss, mathprims.ss, newhash.ss, pdhtml.ss, pretty.ss,
    prims.ss, primvars.ss, print.ss, read.ss, record.ss, reloc.ss,
    strnum.ss, syntax.ss, trace.ss

original commit: b7f161bf2939dfedce8accbfa82b92dbe011d32a
2020-03-04 16:53:35 -05:00
Bob Burger
668467cdd6 fix Travis-CI tests
original commit: 7360186d9f0e97e2121ba5aa5afbbacd30f8ecd0
2020-03-04 16:23:47 -05:00
Bob Burger
12081203af handle CTRL-C in ta6nt without expression editor
original commit: 7ca7ad78a278278df55140617a3112f5271f42d8
2020-03-04 16:23:47 -05:00
Bob Burger
54112e9bf1 simplification
original commit: 8e4b5f7893b6bb1ee557b4a30ff341bf6268816d
2020-03-04 16:23:47 -05:00
Neal Alexander
e7bb4def71 added unicode support to windows console i/o
original commit: e7e638e871ac4b46a84149dda93aae8741683e0a
2020-03-04 16:23:47 -05:00
Sam Tobin-Hochstadt
8a63d80379 Preserve undocumented args syntax class attribute.
PR #2678 unintentionally removed this attribute, but it was used
at least by "collections-lib" and "static-rename-lib".

cc @sorawee @lexi-lambda @jackfirth @rmculpepper
2020-03-04 15:05:16 -05:00
Sorawee Porncharoenwase
cc76761c1f Update grammar in the syntax class page, s/subdefthing/defsubthing/ 2020-03-04 13:22:19 -05:00
Sorawee Porncharoenwase
3043dbd35c Expose function-header's name, document attributes, fix links 2020-03-04 13:22:19 -05:00
Sorawee Porncharoenwase
1b4126d1e5 Fix a typo, add examples, switch to non-experimental form 2020-03-04 13:22:19 -05:00
R. Kent Dybvig
cec5dce677 Merge pull request #502 from gus-massa/20-3-FaslRead
Fix fasl-read signature
original commit: d1d1945e45ca4606168f0f286f171f2038737f94
2020-03-04 08:27:56 -08:00
Gustavo Massaccesi
3018d8823a fix fasl-read signature
primdata.ss

original commit: f54da8207572e9aa71d97352b3040c5c791a6dc1
2020-03-04 11:09:27 -03:00
sorawee
29c518abbc
Allow multiple catalogs in raco pkg install and friends
Allow `--catalog` to be specified multiple times.
2020-03-04 07:02:45 -07:00
Ben Greenman
258eee40ce
contract: use impersonator prop. for impersonator-unconstrained-domain->/c (#3055)
rename the contract property from a chaperone prop to an impersonator
prop (looks like this was an old copy/paste error)
2020-03-03 15:50:19 -05:00
Štěpán Němec
95b9f0e210 doc: Fix some typos 2020-03-03 07:56:16 -07:00
Štěpán Němec
098a784b88 doc: Fix an error
".rkt" suffix is not added for relative path strings.

Discussed here: https://groups.google.com/d/msg/racket-users/lxQ-SqZ0QNY/8bqv0YqPDgAJ
2020-03-03 07:55:50 -07:00
Sorawee Porncharoenwase
3bb873aea8 Remove contract for define/generic
`local-id` and `method-id` don't have a syntax identifier as a value, so
a contract is inappropriate here.
2020-03-03 07:54:31 -07:00
Gustavo Massaccesi
83e920e0a0 fix fasl-read signature
primdata.ss

original commit: 8a3300b4898fb2f8504512b9a8a91a41582d8b3a
2020-03-01 13:25:17 -03:00
Ben Greenman
a57f96ea9c
doc: contract, clarifications (#3061)
- reword the first-page explanation of chaperone contracts;
  try to give a positive description by talking about wrappers first
  (rather than starting with what chaperones maybe don't do)

- name the recognizer functions for chaperone & impersonator contracts
  (on the first page)

- clarify that `contract-projection` and `contract-val-first-projection`
  are bad --- that there's a preferred alternative

- describe the outputs of `contract-projection` and
  `contract-val-first-projection`; their docs were identical before, but
  now re-use prose from sec 8.7 (Building New Contract Combinators)
2020-03-01 08:49:36 -05:00
Ben Greenman
24cdc58951
style: consistent figure style (#3060)
Use a consistent style for the "good / bad" examples:

- start the code at the far left of each box
- keep a little space between the top of the box & the label
2020-02-28 08:42:59 -05:00
Ben Greenman
354dfbac04 doc: '-> void' to '-> void?'
(accepts anything non-#f vs. accepts (void))
2020-02-27 15:51:20 -05:00
kryptine
8dd65db7e2
Update package LICENSE files (#3048)
* Remove obsolete LGPL license files
* Add LICENSE files to packages
2020-02-25 14:13:34 -05:00
James Bornholt
ac41c8a361 Make get-pure-port redirection case-insensitive
GitHub's CDN seems to have recently started returning the `Location` header for a redirect with a lowercase `l`, which breaks the redirect logic. The HTTP spec says that header names are case-insensitive, so we need to look for either version.
2020-02-25 13:38:44 -05:00
Bob Burger
68c114c930 fixed typo
original commit: 29c9bfebf730a2691e4302ad82c0be7c22e0d2d2
2020-02-25 11:14:51 -05:00
Bodie Solomon
c7b4ce90a0 Exclude unresolved symbol scheme_signals_registered on Win32 builds
Commit 72d90e4 ("library-manager, numeric, and bytevector-compres
improvements") introduced a regression causing Win32 nmake builds to
fail due to an undefined symbol in c\schsig.c.

This symbol (scheme_signals_registered) is defined in a preprocessor-
conditional code block excluding WIN32 between lines 544 and 737.

This commit bypasses the build regression by enclosing the unresolved
expression in a preprocessor conditional excluding WIN32.

See GitHub Issue #497 for more details:
https://github.com/cisco/ChezScheme/issues/497

original commit: 10bccf39badee76f80d87326d2fc7c4d808fa08e
2020-02-25 10:34:21 -05:00
Ben Greenman
164ce0274c doc: typo, 'produce' -> 'produces' 2020-02-24 21:09:25 -05:00
Matthew Flatt
fb620d5556 cs: constrain register-process-global to intended behavior
Make `register-process-global` check for byte strings, and avoid
retaining the byte string that it's given (in case that changes, for
example).

Closes #3053
2020-02-24 07:23:59 -07:00
John Clements
b63e9a4983
add text on spaces (#3049)
Merging this. Please feel free to revert this change if it's not the right thing.
2020-02-23 09:40:20 -08:00
Matthew Flatt
f8fa08dafb fix version in install makefile
original commit: 060bf8c21f1fc758de68d2eff0b6f9f802207c25
2020-02-23 07:20:24 -07:00
Matthew Flatt
5b7f4e2fd8 unbreak Windows build
original commit: 6c062f550486dfb9b25dfc62f6d1a829bbce1d1b
2020-02-22 19:41:02 -07:00
Matthew Flatt
ef856eda76 cs: fix separator for embedded boot files 2020-02-22 17:32:51 -07:00
Matthew Flatt
995e53ca71 Merge github.com:cisco/ChezScheme
original commit: 8cf52012e2a7b5928cb2602bb17e0128ae0f2776
2020-02-22 15:18:47 -07:00
Matthew Flatt
06cbc94ced sync with updated Chez Scheme 2020-02-22 13:23:52 -07:00
Matthew Flatt
a68c8eadc6 cs: fix hash{,eq,eqv} on an odd number of arguments
Closes #3051
2020-02-21 21:26:18 -07:00
dybvig
d0b405ac8b library-manager, numeric, and bytevector-compres improvements
- added invoke-library
    syntax.ss, primdata.ss,
    8.ms, root-experr*,
    libraries.stex, release_notes.stex
- updated the date
    release_notes.stex
- libraries contained within a whole program or library are now
  marked pending before their invoke code is run so that invoke
  cycles are reported as such rather than as attempts to invoke
  while still loading.
    compile.ss, syntax.ss, primdata.ss,
    7.ms, root-experr*
- the library manager now protects against unbound references
  from separately compiled libraries or programs to identifiers
  ostensibly but not actually exported by (invisible) libraries
  that exist only locally within a whole program.  this is done by
  marking the invisibility of the library in the library-info and
  propagating it to libdesc records; the latter is checked upon
  library import, visit, and invoke as well as by verify-loadability.
  the import and visit code of each invisible no longer complains
  about invisibility since it shouldn't be reachable.
    syntax.ss, compile.ss, expand-lang.ss,
    7.ms, 8.ms, root-experr*, patch*
- documented that compile-whole-xxx's linearization of the
  library initialization code based on static dependencies might
  not work for dynamic dependencies.
    system.stex
- optimized bignum right shifts so the code (1) doesn't look at
  shifted-off bigits if the bignum is positive, since it doesn't
  need to know in that case if any bits are set; (2) doesn't look
  at shifted-off bigits if the bignum is negative if it determines
  that at least one bit is set in the bits shifted off the low-order
  partially retained bigit; (3) quits looking, if it must look, for
  one bits as soon as it finds one; (4) looks from both ends under
  the assumption that set bits, if any, are most likely to be found
  toward the high or low end of the bignum rather than just in the
  middle; and (5) doesn't copy the retained bigits and then shift;
  rather shifts as it copies.  This leads to dramatic improvements
  when the shift count is large and often significant improvements
  otherwise.
    number.c,
    5_3.ms,
    release_notes.stex
- threaded tc argument through to all calls to S_bignum and
  S_trunc_rem so they don't have to call get_thread_context()
  when it might already have been called.
    alloc.c, number.c, fasl.c, print.c, prim5.c, externs.h
- added an expand-primitive handler to partially inline integer?.
    cpnanopass.ss
- added some special cases for basic arithmetic operations (+, -, *,
  /, quotient, remainder, and the div/div0/mod/mod0 operations) to
  avoid doing unnecessary work for large bignums when the result
  will be zero (e.g,. multiplying by 0), the same as one of the
  inputs (e.g., adding 0 or multiplying by 1), or the additive
  inverse of one of the inputs (e.g., subtracting from 0, dividing
  by -1).  This can have a major beneficial affect when operating
  on large bignums in the cases handled.  also converted some uses
  of / into integer/ where going through the former would just add
  overhead without the possibility of optimization.
    5_3.ss,
    number.c, externs.h, prim5.c,
    5_3.ms, root-experr, patch*,
    release_notes.stex
- added a queue to hold pending signals for which handlers have
  been registered via register-signal-handler so up to 63 (configurable
  in the source code) unhandled signals are buffered before the
  handler has to start dropping them.
    cmacros.ss, library.ss, prims.ss, primdata.ss,
    schsig.c, externs.h, prim5.c, thread.c, gc.c,
    unix.ms,
    system.stex, release_notes.stex
- bytevector-compress now selects the level of compression based
  on the compress-level parameter.  Prior to this it always used a
  default setting for compression.  the compress-level parameter
  can now take on the new minimum in addition to low, medium, high,
  and maximum.  minimum is presently treated the same as low
  except in the case of lz4 bytevector compression, where it
  results in the use of LZ4_compress_default rather than the
  slower but more effective LZ4_compress_HC.
    cmacros,ss, back.ss,
    compress_io.c, new_io.c, externs.h,
    bytevector.ms, mats/Mf-base, root-experr*
    io.stex, objects.stex, release_notes.stex

original commit: 72d90e4c67849908da900d0b6249a1dedb5f8c7f
2020-02-21 13:48:47 -08:00
Matthew Flatt
bfce3ba665 fix glib-log test 2020-02-21 08:11:27 -07:00
Matthew Flatt
dad9995f56 cs: add glib logging hook
Building glib-specific support into the main Racket executable is
unsatisfying, but it's consistent with Racket BC, and the alternative
is especially tedious to deal with places and namespaces and
allocation.
2020-02-20 14:52:30 -07:00
Matthew Flatt
745482e3e4 vfasl: repairs for fcallables
A 0 relocation is used by fcallable code as a recognizable cookie, and
its relocations must be preserved.

original commit: 38fb3fdf75cf6540d6bd2568f015af6272d22995
2020-02-20 13:24:47 -07:00
R. Kent Dybvig
8457bfe57a Merge pull request #494 from jltaylor-us/concatenate-object-files
Add concatenate-object-files procedure.
original commit: 28254f270ab55e8dde4a4318c9998b42a241f7a5
2020-02-20 10:48:09 -08:00
Stephen Chang
e4c0f450e5
fix typos: Guide 16.3 Module Instantiations and Visits 2020-02-20 12:17:13 -05:00
Matthew Flatt
fe64841290 cs: fix error conversion condition-who is a string
For example, `(string->symbol 10)` raises a Chez Scheme condition with
the string "string->symbol" instead of 'string->symbol.
2020-02-19 20:04:33 -07:00