Commit Graph

39518 Commits

Author SHA1 Message Date
Robby Findler
176f09a7ad add generator for symbols 2018-08-24 15:46:11 -05:00
Robby Findler
47ad1552d5 revert part of 6c676cf48 because make-custom-hash is actually
the only way to do certain jobs
2018-08-23 08:53:35 -05:00
Matthew Flatt
1d3e3d5a08 bytecode compiler: fix set! repair
Fix problem with generated viable in 53a08c065e.
2018-08-22 09:43:22 -06:00
Matthew Flatt
53a08c065e bytecode compiler: fix order of set! undefined checking
Evaluate the right-hand side of the assignment first.
2018-08-22 07:53:07 -06:00
Matthew Flatt
974988fe3c bytecode compiler: don't discard another set! that should error
The repair in 7176fc4253 did not make the no-discard decision stick
well enough for some cases. Robby found this bug using the Redex model
and random testing, too.
2018-08-21 20:50:58 -06:00
Matthew Flatt
16e496b0c5 expander: avoid parameters for dynamic-extent indicators
Using a parameter for the current expansion context means that if a
macro spawns a thread, the thread thinks that it's in an expansion
context. Switching to a raw continuation mark avoids that problem.

Along the way, bring Racket and RacketCS more in line by making both
have an internal notion of "root" prompt tag that can be used to get
all continuation marks independent of any prompts. That's not structly
necessary, since a continuation mark could be combined with a distinct
tag to make the mark always accessible, but it's simpler and more
lightweight to use a root prompt tag.
2018-08-21 19:37:18 -06:00
Matthew Flatt
eed18fac93 schemify: improve use-before-definition analysis
This improvement removes only a few places where a variable use is
considered possibly too early in the RacketCS implementation, but
the improvement is significant for uses of `input-port?` in "io".
2018-08-21 15:46:22 -06:00
Matthew Flatt
473ec2762e io: streamline read-char and read-byte 2018-08-21 15:46:22 -06:00
Alexis King
2a667dc9a8 Fix reader error message when encountering illegal graph notation
Also, document explicitly that graph notation is not allowed at all in
read-syntax mode.
2018-08-21 15:02:09 -05:00
Matthew Flatt
34231aca7e cs: repairs for chaperoned events
The recent `sync` shortcut was wrong for chaperoned events.
2018-08-20 18:08:11 -06:00
Matthew Flatt
ae7a64b4ea cs: fix weak hash table weakness after iteration 2018-08-20 18:08:11 -06:00
Matthew Butterick
70f7cf99ae match examples: #:when and => 2018-08-20 11:14:59 -07:00
Matthew Flatt
2d09e121c5 cs: fix dependency in makefile 2018-08-19 20:41:25 -06:00
Matthew Flatt
7176fc4253 bytecode compiler: don't discard set! that should error
Robby found this bug using the Redex model and random testing.
2018-08-19 17:17:31 -06:00
Matthew Flatt
4128189499 generalize some function arities
Allow a single argument to comparison functions like `<`, and
support the same arities as the generic version for fixnum and
flonum operations like `fx+` or `fl+`.
2018-08-19 16:56:50 -06:00
Matthew Flatt
008102decc cs (mostly): fix hash table problems
RacketCS weak `equal?`-based hash tables didn't retain flonums, and
hashing of hash tables was not properly insensitive to the order of
keys.

Racket, meanwhile, didn't limit work consistently for different kinds
of hash tables, and it didn't keep a counter value odd as intended
(but the counter never gets large enough to appear to be a mapped
pointer, anyway).
2018-08-19 05:36:26 -06:00
Matthew Flatt
27693843ea fix break checking on continuation applciation
Racket did not check for a break when escaping from a break-disabled
context to a break-enabled context. RacketCS didn't check in other
cases, either. Fix those various cases.
2018-08-18 17:07:38 -06:00
Matthew Flatt
40b5fffb80 cs: avoid unnecessary work in exception handler 2018-08-18 17:07:37 -06:00
Matthew Flatt
ae4b101ec5 cs: add sync shortcuts for simple cases 2018-08-18 17:07:37 -06:00
Matthew Flatt
e15eadd106 unbreak unixstyle-install
Commit 1afcbee381 effctively dropped a conditional case that was
marked as "shouldn't happen" --- but it does happen and makes sense.
Adjust the replacement `delete-directory/files` call to accomodate the
case.

Relevant to #2198 and #2236
2018-08-18 11:22:48 -06:00
Matthew Flatt
a01feffa83 expander: improve error reporting for definitions without expression
Closes #2183
2018-08-18 11:22:48 -06:00
Ben Greenman
369eb65ec2 doc: make 'deftech' for match failure procedure 2018-08-17 16:03:58 -04:00
Matthew Flatt
dde342a198 compiler: fix a copy-propagation bug in the letrec checker
The bug could cause reachable code to be replaced with `(void)`.

Closes #2232
2018-08-17 09:54:42 -06:00
Matthew Flatt
1cf6ab7102 places and GC: avoid race in out-of-memory handling
Make the out-of-memory handler thread-local, so that places
don't interfere with each other when setting the handler.
2018-08-16 20:56:08 -06:00
Matthew Flatt
570aa5737d cs: fix missing stack trace frames 2018-08-16 20:56:08 -06:00
Alexis King
d152ddd8e1 Fix documentation for or patterns in racket/match
fixes #2213
2018-08-16 13:05:16 -05:00
Ben Greenman
cf45c623e4 typo: 'Addede' -> 'Added' 2018-08-16 12:45:31 -04:00
Philip McGrath
88e92b4837 rackunit/docs-complete: accept any module-path?
The contract on `check-docs` was unnecessarily restricted to `symbol?`
module paths, which prevents using `check-docs` with submodules.
2018-08-16 06:15:47 -05:00
Ben Greenman
f29bd9d457 typo: 'hash' -> 'has' 2018-08-16 00:47:44 -04:00
Matthew Flatt
9704cc4731 add syntax-binding-set functions
The `syntax-binding-set` functions enable explicit construction of
lexical information for a syntax objects.
2018-08-15 10:34:33 -06:00
Matthew Flatt
9658c723db more consistent expander/linklet performance-logging output 2018-08-15 07:41:48 -06:00
Matthew Flatt
f46721fe85 document procedure-reduce-keyword-arity-mask
Should have been part of ecbd6f1578.
2018-08-14 20:35:08 -06:00
Matthew Flatt
facba8a6ab unbreak cify on "startup.inc"
Commit 7cbeebbb89 broke the input to cify, and eb73837baf uncovered a
different problem.
2018-08-14 20:29:32 -06:00
Matthew Flatt
a25efeb8a9 thread & io: performance improvement
Part of this change restores a `++direct` that was lost in 98ae91e0ba
for "racket/src/thread" to make the atomicity state a virtual
register. Also make `display` on a byte string more directly call
`write-bytes`. That change restores a 5-10% speed improvement for
`racketcs -cl racket/base`.
2018-08-14 19:35:00 -06:00
Matthew Flatt
a58d115bf2 fix problem with parameter impersonator
Closes #2228
2018-08-14 12:27:33 -07:00
Matthew Flatt
bbde12991c cs: faster continuation trace
Reduce the cost of getting a source backtrace for a continuation mark
set (especially as recorded in an exception).
2018-08-14 06:59:51 -07:00
Matthew Flatt
eb73837baf expander: enable performance measurements permanently
Change the expander-performance macro so that it's a very low cost if
not enabled on startup. An extra JIT specialization reduces the cost
further, since the enabled state is known by JIT time.
2018-08-12 11:05:20 -06:00
Matthew Flatt
7cbeebbb89 linklet flattener: repair to name simplifier
The linklet flattener's name-simplification pass (intended to avoid
gratuitious changes in "startup.inc") didn't recognize all binding
forms.
2018-08-12 08:50:35 -06:00
Matthew Flatt
107d1e42a7 raco demod: fix module name in generated bytecode
Closes #2226
2018-08-11 18:25:55 -06:00
Matthew Flatt
4a7c4d184c optimizer: don't drop application when argument count is wrong
Guard some ad hoc optimizations with an arity check in the cases of 1
or 2 arguments.

Closes #2222
2018-08-11 17:28:11 -06:00
Matthew Flatt
305d02f46a OpenBSD: constrain W^X-by-signal to x86_64
Closes #2214
2018-08-11 16:40:09 -06:00
Matthew Flatt
89583a4d03 fix inexact->exact on subnormal single-flonums and extflonums
Closes #2223
2018-08-11 16:23:31 -06:00
Matthew Flatt
cf396064c3 places and GC: subtarct terminated place's memory use
When a child place terminates, the parent's count of the child's
memory use needs to be updated. Until this repair, the
`current-memory-use` function has been reporting an incorrectly large
number after a place terminates.
2018-08-11 09:50:49 -06:00
Ryan Culpepper
15186ff41c syntax/parse: fix struct match patterns with wrong number of subpatterns 2018-08-10 18:04:56 +02:00
Ryan Culpepper
31519f827a syntax/parse: fix fixup of and pattern with head subpatterns 2018-08-10 18:04:56 +02:00
Matthew Flatt
0d1f4e3c63 unbreak no-JIT build 2018-08-10 09:59:15 -06:00
Matthew Flatt
c05b9409d5 procedure-arity: fix bug in non-JIT mode
The arity calculation for a `case-lambda` as a `prop:procedure`
argument did not drop the self argument as it should.
2018-08-10 09:11:17 -06:00
Matthew Flatt
696e9143a6 expander: declare readtable structure as #:authentic 2018-08-10 09:10:55 -06:00
Matthew Flatt
b533a13d20 JIT code accounting: add count of procedures
Extends ac601a095b.
2018-08-10 05:06:36 -06:00
Matthew Flatt
59d505c157 JIT: tweak unsafe references
Use a constant offset directly instead of loading into a register
for unsafe vector, struct, etc., access.
2018-08-10 05:06:36 -06:00