Commit Graph

42440 Commits

Author SHA1 Message Date
Matthew Flatt
e1c1269939 cs: improve chaperoned structure-property access
Avoid looking up the property twice.
2020-02-17 09:02:04 -07:00
Xu Chunyang
5555019ec2
fix doc typo (#3047) 2020-02-17 10:49:43 -05:00
Matthew Flatt
cdd0659438 cs: fix GC:major logging on exit
Also, add `PLT_GCS_ON_EXIT` to force 2 major GCs on exit, which
is useful for checking peak and end memory use.
2020-02-15 09:11:44 -08:00
Matthew Flatt
e63433c4fd makefile: change INSTALLER_OPTIONS_q to INSTALLER_OPTIONS
Trying to support multiple command-line arguments doesn't work so
easily with nmake, so avoid that.
2020-02-15 08:54:56 -08:00
Matthew Flatt
6738c4e9e2 makefile: add INSTALLER_OPTIONS_q for installer-building options
This change makes it easier for `distro-build` to define new options
that get communicated from "site.rkt" to `distro-build/installer`.
2020-02-14 08:02:49 -08:00
Matthew Flatt
e90df3f2f2 adjust build of libssl for x64-bit Mac OS 2020-02-12 13:49:21 -07:00
Matthew Flatt
760b2924c6 expander: fix typo
Misplaced paren created a misapplication of `weak-box-value`.
2020-02-11 06:37:08 -07:00
Matthew Flatt
aa0c555c70 Add support for record types with anonymous fields
Avoid saving a list of per-field vector descriptions when
field names are not going to be relevant and the rest of
the description is easily computed from information that is
alerady available.

original commit: a20e3f305cee3b4a386582dd50cda344a49174c3
2020-02-11 06:10:47 -07:00
Matthew Flatt
7279a59c27 cs: improve make-struct-type on large field counts 2020-02-11 05:43:08 -07:00
Matthew Flatt
56fe13e6f7 cs: small interpreter clean-ups 2020-02-10 20:11:18 -07:00
Matthew Flatt
5e45dd2e1c cs: use anonymous-field record types
Record types with unnamed fields can be significantly more compact,
excdeption in combination with the constrain the the fields all
contain Scheme objects. Saves 2% for DrRacket's initial footprint.
2020-02-10 19:12:00 -07:00
Paulo Matos
fb63f399ef
Add option --enable-werror (#3038)
This adds configure option `--enable-werror` to `./configure` script which adds `-Werror` to build time CFLAGS.
2020-02-10 20:07:20 +01:00
Matthew Flatt
e8fa0613db cs: fix internal issues in struct [property] layer 2020-02-09 18:27:14 -07:00
Matthew Flatt
fd9a5f0357 cs: clean up and improve dump-memory-stats 2020-02-09 11:34:44 -07:00
Matthew Flatt
5d45d6dca2 adjust event-detour path again to apply more often
Instead of constaining the use of event-detour so much, make it merely
unlikely that the detour will have to allocate when used in a loop
that otherwise doesn't allocate. We'll only have to allocate if the
available stack space turns out to be too small --- and if we do
allocate, it's not the end of the world.

original commit: f1dbed82df415c18c8304bedcee2ecf4912badc7
2020-02-09 09:43:26 -07:00
Matthew Flatt
fab0282acb disable cptypes specialization of call-with-values, for now
It's not clear whether there's something wrong with this case or
whether it's exposing a more general problem, but disabling it for
now allows a parallel Racket CS build to proceeed.

original commit: 00f6733e573c068165abc4dbbdb46cdede9f778e
2020-02-09 08:54:21 -07:00
Matthew Flatt
115f08603b make cptypes caches thread-local
original commit: 4627507cf081e2ea85b43fe8ca02404396ede253
2020-02-09 08:54:21 -07:00
Matthew Flatt
34dc3f4371 doc clarification on eq-hashtable-try-cell
original commit: bcea49bf88c916c742de48c58e91060489ac8592
2020-02-08 19:25:16 -07:00
Gustavo Massaccesi
24be6703bf cptypes: add support for call-with-values, apply and similar functions
In some procedures, one of the arguments is a function that will surely be called
and the result is the result of the whole expression. These procedures need an
special version of define-specialize that gives more control.

original commit: f2f0401d2b83313e8cb0d5742e89ed098500cbd6
2020-02-08 23:18:23 -03:00
Matthew Flatt
c5dc0841c1 cs: mark some parameters a always-succeeds 2020-02-08 14:02:15 -07:00
Matthew Flatt
a3f1ab8b60 cs: tweak for chaperoned structure reference
No need for `|#%app|` on chaperoned operation.
2020-02-08 10:13:44 -07:00
Matthew Flatt
7f729a1a2b cs: fix structure property accessor & predicate names 2020-02-08 09:06:57 -07:00
Matthew Flatt
e4c5d54e37 cs: avoid locks on struct-related tables
Avoing a lock speeds up predicates like `struct-predicate-procedure?`,
which speeds up creation of struct chaperones.
2020-02-08 08:20:06 -07:00
Matthew Flatt
1900c0e57a cs: faster struct impersonation 2020-02-08 07:42:58 -07:00
Gustavo Massaccesi
c581cd24fe cptypes: uses define-specialize handlers for special functions like eq? or list
Rewrite the handler of record? and $sealed-record? to make it easier to
understand.

Also, delay the reductions of lambdas in a sequence of arguments. This helps
to reduce for example

  (map (lambda (x) (box? b)) (unbox b))
=>
  (map (lambda (x) #t) (unbox b))

original commit: 20e478b9280c779e260f5557c2eee74946313a44
2020-02-07 21:28:49 -03:00
Gustavo Massaccesi
eb29023ed9 cptypes: add bottom-fxmap
It is a fxmap that is is full of 'bottom.

original commit: c171fca3345de3190e8d915b0cdf4c11d5ec055c
2020-02-07 21:28:48 -03:00
Matthew Flatt
615e4f707a cs: sync with Chez Scheme change for trap check, again
We had to give back some space savings to avoid potential problems
with allocating in the event callback and running out of stack
space[?] when passing an argument. We get to keep most of the
improvement though.
2020-02-07 16:20:21 -07:00
Matthew Flatt
baf3bba9de constrain smaller trap-check code to avoid allocation
Having the trap check allocate is questionable, since it can be
triggered during a loop that otherwise performs no allocation. Also,
on platforms where at most 1 argument is passed in a register, then
sending two arguments to the event handler could potentially need
stack space that isn't there. So, constrain the smaller trap-check
code to cases where no stack space is needed and where no allocation
happens unless the wrong number of arguments are provided.

original commit: 260a7ef5bc0bf851d9848587b0a78bdb4aab59f8
2020-02-07 15:27:07 -07:00
Matthew Flatt
d4981dd8c3 less code for trap checks
When a proceudre starts with a trap check, move the check to the very
beginning, even before checking the argument count. That way, event
detection can turn into a compact jump to an event handler, instead of
inserting a general call to `$event` in the procedure body.

original commit: 06b12d505698a2378734689370bb9e0f8eda06b9
2020-02-07 10:56:15 -07:00
Matthew Flatt
595b62a038 cs: change code generated for defining module variables
Makes a small difference in code + relocation sizes (about 1%)
2020-02-07 08:57:49 -07:00
Matthew Flatt
df039c1b73 cs: sync with Chez Scheme change for trap check
Less code for a trap check saves about 5% code space for DrRacket,
which is about 2% of the overall starting footprint.
2020-02-06 18:54:35 -07:00
Matthew Flatt
65d77ee00c build 64-bit Mac OS native libraries against the 10.9 SDK 2020-02-06 15:12:47 -07:00
Matthew Flatt
7eb0b8534d improve makefile's bundle target
Use `--no-user` for the `raco setup` that is supposed to finish a
bundle. Otherwise, things installed in user scope for the same Racket
version (i.e., the one being bundled) can interfere with the bundling
process.
2020-02-06 12:40:05 -07:00
Leo Shen
08d33a773d net/http-client: add support of deflate content encoding 2020-02-06 11:16:32 -07:00
Matthew Flatt
41175b7e05 cs & zo-parse: preserve marshaled bytes
To support `zo-marshal`, keep original byte-string form of linklets.
2020-02-05 17:11:37 -07:00
Matthew Flatt
3b3bc7ce95 fix documentation history typo 2020-02-05 16:51:02 -07:00
Matthew Flatt
ce85e3c66d ffi/unsafe: fix _enum for non-fixnums
Use `assv` instead of `assq`, because an `_enum` variant's value might
be a non-fixnum integer.

Closes #3036
2020-02-05 06:20:37 -07:00
Matthew Flatt
f615be26a3 cs: fix log-level? and related
Broken cache clearing caused out-of-date results to be returned
sometimes.
2020-02-04 18:04:52 -07:00
Matthew Flatt
e45d0ab9d8 add 'GC:major logging
Racket CS already had a form of 'GC:major logging, but normalize it
and add it to traditional Racket.
2020-02-04 17:36:51 -07:00
Matthew Flatt
4ed253d66e fix line counting with mixed CR and LF
A CR by itself could be incorrectly treated as preceding a later LF,
which would form a CRLF combination if they had been adjacent.

Closes #3033
2020-02-03 17:21:51 -07:00
Matthew Flatt
654f821919 correct pretty-print and improve consistency
Fix a regression in 712494312a, and change other other two printers to
be more consistent for

 #lang racket
 (struct s () #:transparent)
 (define a (s))
 (pretty-print (list (cons a 0) (cons a 0)))
2020-02-03 17:21:51 -07:00
Jon Zeppieri
c358df6de4 [CS] regexp-replace: handle #f submatches
A regexp can match while having sub-patterns that are not used in
the match. In regexp-replace, the "insert" argument can refer to
these unused sub-matches. If a function is given for the "insert"
argument, it will receive these unused submatches as #f values.
If a string or byte-string is given, then any reference to an
unused sub-match (by means of a back-reference) is treated as the
empty string or byte-string.

Fixes #3032.
2020-02-03 17:21:38 -07:00
Matthew Flatt
c81228f31e cs: more clearing of a terminated thread
In particular, clear out the `suspend+resume-callbacks` field so that
retaining the thread object does not retain those callbacks.
2020-02-01 08:15:50 -07:00
Matthew Flatt
67595cc255 cs: include accounting time in reports GC time
When logging GC debugging, a pecentage after the time for a GC reports
what fraction was extra steps after GCing proper, especially the extra
step of memory acounting when that is enabled.

Also, avoid Chez Scheme gensyms even more. Otherwise, using low-level
facilities like `dump-memory-stats` can force the unique name of a
gensym used for a structure type, which causes it to be permanent,
which could be exactly what you don't want when debugging a
memory-rentention problem.
2020-02-01 07:30:00 -07:00
Matthew Flatt
eeb73a6c05 expander: avoid keeping thread in registry lock
Weakly retain the lock holder in a namespace registry. Otherwise, it
can retain a thread that should have been unreachable.
2020-02-01 07:14:49 -07:00
Matthew Flatt
519e4aa9a3 add -O2 for CI builds 2020-01-31 13:30:16 -07:00
Matthew Flatt
2c9bf94451 cs: faster struct hashing and struct->vector
Take advantage of `$record-type-field-count` to replace
`record-type-field-names`, which isn't constant-time.
2020-01-31 13:29:07 -07:00
Matthew Flatt
40c407e1c2 add $record-type-field-count
This is a `$` function because it is defined only for record types
that have pointer-sized fields (i.e., the normal case).

original commit: 47213a7c8450aa52bd18e8f605c02b6c1081eadf
2020-01-31 11:17:04 -07:00
Matthew Flatt
fd1745c628 improve code generation for black hole as an immediate
original commit: 2e15df8a992d1c634f04bf4e162f40026a4f0840
2020-01-31 06:43:14 -07:00
Matthew Flatt
9a9a5eef3b cs: improve jitify letrec output 2020-01-31 06:12:42 -07:00