Commit Graph

3535 Commits

Author SHA1 Message Date
Matthew Flatt
68a96e094e bytecode optimizer repair
Closes #1986
2018-03-12 20:17:54 -06:00
Matthew Flatt
994a4d4a35 expander: fix problem with syntax-local-expand-expression
Closes #1984
2018-03-12 07:11:31 -06:00
Matthew Flatt
2f930dd6f3 add syntax-property-remove 2018-03-11 11:31:56 -06:00
Matthew Flatt
13242b06d6 expander: fix an error message 2018-03-11 10:37:37 -06:00
Sarah Spall
14448eb1bd Moved release of lock to fix use after free 2018-03-10 08:55:21 -07:00
Matthew Flatt
f3596d96c2 bytes-converter: avoid unnecessary custodian registration
Some built-in bytes-converter combinations that were not
supposed to require custodian registration were neveretheless
registered, which created a small leak for some programs.
2018-03-10 07:20:41 -07:00
Matthew Flatt
3f2fd06cb0 expander: fix namespace-require/copy 2018-03-09 16:32:19 -07:00
Matthew Flatt
0d06ba2848 expander: treat unbound and top-level-bound as free-identifier=?
Restores quetionable but traditional behavior.
2018-03-09 16:07:37 -07:00
Matthew Flatt
35dc59ee07 expander: preserve syntax properties on let[rec]-values clauses 2018-03-09 15:44:11 -07:00
Matthew Flatt
af4c23fa72 variable-reference->namespace: ensure that module is available 2018-03-09 11:06:49 -07:00
Matthew Flatt
234e47a58f remove accidentally committed debugging output
Attempting to write the output could cause places to crash
on Windows.
2018-03-08 18:14:33 -07:00
Matthew Flatt
97721be2af Windows: fix extflonum infinity and NaN without longdouble.dll
Since the reader's implementation includes quoted references
to infinity and NaN extflonums, make sure it reads and writes
and compiles correctly before "longdouble.dll" is installed.
2018-03-08 18:14:33 -07:00
Matthew Flatt
3cf2138841 expander: avoid equal?-based hash table for module cache
Since a thread can be terminated while accessing the cache, it
can't be an `equal?`-based table where the lock can get lost.
2018-03-08 16:36:16 -07:00
Matthew Flatt
e4e17db51d expander: fix origin tracking with a set! transformer 2018-03-08 14:14:28 -07:00
Matthew Flatt
83d792fca5 reader: fix locations on various kinds of errors 2018-03-08 10:14:44 -07:00
Tony Garnock-Jones
32d119dfe6 Correct name of integer->integer-bytes in contract error message 2018-03-08 15:37:54 +00:00
Matthew Flatt
407c1b49c5 reader: repair #lang change
Commit d5d8249c12 added too many syntax wrappers on
list forms.
2018-03-07 18:08:18 -07:00
Matthew Flatt
d5d8249c12 reader: fix "original?" property on #lang-derived module name 2018-03-07 17:59:21 -07:00
Matthew Flatt
ab48afda7a expander: further repair for implicit-form errors
The previous change didn't report a top-level unbound identifier
correctly.
2018-03-07 13:53:27 -07:00
Matthew Flatt
909fed6f2f expander: reapirs for implicit-form errors
Add missing source for unavailable `#%datum`, etc., and
other similar adjustments.
2018-03-07 10:54:32 -07:00
Matthew Flatt
ac2addeeb6 expander: fix 'origin on let-syntax-bound id-macro expansions 2018-03-07 08:20:57 -07:00
Matthew Flatt
3861da41ed remove debugging temporary 2018-03-07 08:16:56 -07:00
Matthew Flatt
d8dce77984 input-port-append: add #:name argument 2018-03-06 20:01:47 -07:00
Matthew Flatt
9d77ffe6d5 avoid crashes while reading ill-formed bytecode 2018-03-06 18:33:49 -07:00
Matthew Flatt
c29e072f7e identifier-binding: don't lose nominals
Repairs ebef94435c
2018-03-06 13:33:24 -07:00
Matthew Flatt
ebef94435c identifier-binding: bias nominal to most recent require
The `identifier-binding` function doesn't promise to give back any
particular `require` as the nominal binding site, but some tests rely
on the most recent `require` as the binding site. Also, the arrows
in DrRacket look nicest that way.
2018-03-06 13:12:57 -07:00
Matthew Flatt
dffcbc1cb2 thread & io: code clean-ups
Remove unused `require`s and fix some indentation.
2018-03-06 13:04:27 -07:00
Matthew Flatt
82b5ec8d18 expander: fix registry-lock retry path
Provoking the retry path is extremely difficult, so it's unlikely to
have caused any problem so far.
2018-03-06 09:47:22 -07:00
Matthew Flatt
050cdb5983 xform: avoid problems with __signbitf128
Closes #1962 and uses the suggested patch there, among other changes.
2018-03-06 09:05:08 -07:00
Matthew Flatt
c5653b5bdd expander: code clean-ups
Use `define/who` consistently, remove some unused `require`s, and fix
some bad indentation.
2018-03-05 19:34:41 -07:00
Matthew Flatt
bbefc9ed50 expander: fix taint propagation
A taint on a syntax object without scopes to propagate was propagated
incorrectly to a nested syntax object that also has pending scopes to
propagate.
2018-03-05 18:08:42 -07:00
Milo Turner
275d7974cd Added #:cut pattern directive 2018-03-05 15:03:45 +01:00
Matthew Flatt
112aa6eb07 fix -m command-line flag for new expander 2018-03-04 11:44:00 -07:00
Matthew Flatt
fc1da5f037 reader: fix quoting in some error messages 2018-03-04 11:22:18 -07:00
Matthew Flatt
c6579bbdcf expander: fix provide of prop:exn:missing-module 2018-03-04 07:21:18 -07:00
Matthew Flatt
983a35a024 expander: repair handling of non-interned provides 2018-03-03 16:46:53 -07:00
Matthew Flatt
77028b9c95 fix potential error misreporting on a file-open failure 2018-03-03 10:02:12 -07:00
Matthew Flatt
ea7f973102 expander: repairs for top-level define-values and begin-for-syntax 2018-03-02 18:00:02 -07:00
Matthew Flatt
88b066e1b2 expander: correct scope of added #%module-begin wrapper
Also, fix a problem rendering module path indexes.
2018-03-02 15:17:37 -07:00
Matthew Flatt
e78eb0563a expander: fix shadowing require after shadowing define
Refines the repair in 11fd70c3dd to properly handle a `require` that
should be allowed to shadow the initial require.
2018-03-02 13:37:48 -07:00
Matthew Flatt
2104d02a23 reduce non-determinism in serialized syntax 2018-03-02 13:37:47 -07:00
Matthew Flatt
f439ab6b4e add some missing checks in the bytecode reader 2018-03-02 13:37:46 -07:00
Matthew Flatt
11fd70c3dd expander: fix require after shadowing define 2018-03-01 14:14:24 -07:00
Matthew Flatt
7069510d67 expander: bind U+3BB as a macro, not a core form 2018-03-01 11:55:35 -07:00
Matthew Flatt
ae0ce206f8 reader: source location for #lang language 2018-03-01 09:40:33 -07:00
Matthew Flatt
a668a6a674 expander: fix compilation of top-level begin-for-syntax 2018-03-01 08:22:22 -07:00
Matthew Flatt
618d362f09 load, ...: make sure load handlers receive paths 2018-03-01 07:56:44 -07:00
Matthew Flatt
c59c961ebc read: restore some lost source-location reporting 2018-03-01 07:54:03 -07:00
Matthew Flatt
57b6a1402f fix evaluation of #%variable-reference variants 2018-03-01 06:00:21 -07:00
Matthew Flatt
e6bab71e8a unbreak namespace-variable-value
Repair a mistake in b4f0499256.
2018-02-28 20:33:43 -07:00
Matthew Flatt
8f9fcb02f3 expander: fix sealed initial parameterization 2018-02-28 19:36:28 -07:00
Matthew Flatt
9cd4f44d42 vector*-set!: repair to disallow an impersonator 2018-02-28 18:57:48 -07:00
Matthew Flatt
6fc9368d5c revert a keyword-argument expansion that confuses TR
A change in keyword-argument expansion was intended to avoid
copy-propagation wrok in later passes. That saving does not appear to
be worthwhile, so revert it.

Reverting the change exposed weakness in the expander flattener and an
unsoundness in its simplification pass. That unsoundness has to do
with the assumption that variables are defined before use. The unsound
assumption is likely to be fine for code that is flattened --- all the
more considering that flattened code is routinely run in unsafe mode
--- but it's a departure from the intended safety of the simplifier.
Improving the analysis to so that it's sound and good enough will
require sometimes inferring when a structure-type property guard (for
`prop:evt`, at least) will succeed.
2018-02-28 18:49:58 -07:00
Matthew Flatt
b4f0499256 expander: add 'protected property to protected references
As documented and as implemented by the old expander.
2018-02-28 17:14:06 -07:00
Matthew Flatt
24a4882e5d linklet evaluation: correctly install prompt in a no-JIT build 2018-02-28 16:23:51 -07:00
Matthew Flatt
6018dcfdf6 expander: propagate module properties to #%module-begin
Closes #1968
2018-02-28 14:23:22 -07:00
Matthew Flatt
de27be536d expander: propagate srcloc on rename-transformer expansion 2018-02-28 13:59:13 -07:00
Matthew Flatt
3c69a1296a expander: pay more attention to (error-print-source-location)
When source locations are disabled, don't include a source location in
an error message from `raise-syntax-error`.
2018-02-28 13:08:22 -07:00
Matthew Flatt
25b0c23db7 expander: adjust bindings in module->namespace
Make the module path index for bindings in a `module->namespace` be a
"self" MPI (with #f for path and base), instead of the MPI associated
with bindings as view from the outside of the module instance. That
makes interactive evalaution in the namespace more closely approximate
expansion within the original module.

Example use: ASL detects a "self" MPI to determine when it should
allow assignment to module-defined variables in the REPL.
2018-02-28 10:30:24 -07:00
Matthew Flatt
4eacbbd296 change makefile to be more helpful for "seletc-startup.rkt" failure 2018-02-28 06:56:16 -07:00
Matthew Flatt
e4296f5c1e add stdout logging in the same style as stderr logging
Use stdout log reporting instead of stderr log reporting for status
reporting during the build, so that the status report is not
misinterpreted as an error.
2018-02-28 06:52:55 -07:00
Ryan Culpepper
19df146ccf expand and expand-to-top-form unset observer parameter
This change means that if a macro transformer calls expand (not
local-expand, but top-level expand), the macro debugger won't
receive the inner expand's events. Previously, the macro debugger
tried to parse and then discard the inner expand, but that was
brittle and complicated the grammar.
2018-02-28 06:11:00 -07:00
Ryan Culpepper
ceee75b5ce make symbols consistent with macro debugger, send events as symbols 2018-02-28 05:37:22 -07:00
Ryan Culpepper
2f7c0dd9fa fix/simplify logging for main expand and expand-to-top-form 2018-02-28 05:36:52 -07:00
Ryan Culpepper
3a40125168 add arity checks for log-expand, fix some uses 2018-02-28 05:36:52 -07:00
Ryan Culpepper
ed3d2d0082 fix typo 2018-02-28 05:36:52 -07:00
Matthew Flatt
408a8cb79e compiler/cm: repair for chained compiled-file roots 2018-02-27 20:23:13 -07:00
Matthew Flatt
bd231cd75d restore syntax-local-make-delta-introducer
Closes #1965
2018-02-27 20:23:12 -07:00
Matthew Flatt
e288df5e8e add missing key in "system.rktd" to enable cross-compilation 2018-02-27 20:23:12 -07:00
Matthew Flatt
0e9634f917 namespace-variable-value: fix default vale for 2nd argument 2018-02-27 18:14:55 -07:00
Matthew Flatt
4e1e91a34e peek-{char,byte}-or-special: add 'special option
The old reader used an internal option to short-circuit special-value
reading when a special value acts as a terminating "character". Expose
that shortcut by allowing 'special as an argument to
`peek-{char,byte}-or-special`, and update the reader to use it.
2018-02-27 18:14:54 -07:00
Matthew Flatt
613de748df reader: fix another here-string problem 2018-02-27 13:48:40 -07:00
Matthew Flatt
e707d7decd expander: fix lift context for multiple #%module-begins
Also, restore the old syntax-error message for an `if`
without an "else" clause.
2018-02-27 13:44:11 -07:00
Matthew Flatt
1d8e04896e avoid a pattern that confuses xform 2018-02-27 06:58:12 -07:00
Matthew Flatt
654e846720 namespace-attach-module: fix namespace for declaration callback 2018-02-27 06:46:55 -07:00
Matthew Flatt
f691d4b68c fix incorrect variable reference in the compiler 2018-02-27 06:07:41 -07:00
Matthew Flatt
ada6b8c5d1 reader: handle port whose position moves backwards 2018-02-27 05:46:59 -07:00
Matthew Flatt
586feb6df0 expander: fix problems with cross-phase persistence 2018-02-26 20:29:22 -07:00
Matthew Flatt
cf60eb2715 reader: fix #reader 2018-02-26 19:24:52 -07:00
Matthew Flatt
5ba83c6340 expander: fix cross-module reference to gensymed name 2018-02-26 19:18:58 -07:00
Matthew Flatt
95333f6fe8 avoid a compiler warning 2018-02-26 18:46:58 -07:00
Matthew Flatt
8f77775cf5 JIT: fix 32-bit x86 problem 2018-02-26 18:14:02 -07:00
Matthew Flatt
6757a202d5 reader: fix/unbreak reading of here strings
The repair in 55a27e01a6 wasn't right.
2018-02-26 17:36:07 -07:00
Matthew Flatt
55a27e01a6 expander: fix tracking of MPIs for cross-submodule inlining 2018-02-26 17:18:54 -07:00
Matthew Flatt
283b8ad788 fix interning of chars read from bytecode 2018-02-26 15:42:01 -07:00
Matthew Flatt
62b7ff6f84 syntax-source-module: use second argument
The implementation still lacks a way to find the original source name,
though, in case of a ".ss" to ".rkt" conversion.
2018-02-26 15:30:04 -07:00
Matthew Flatt
014441bceb reader: fix parsing of here strings 2018-02-26 14:59:25 -07:00
Matthew Flatt
61fffa4646 avoid a compiler warning 2018-02-26 14:48:05 -07:00
Matthew Flatt
59ef254318 switch to a new, Racket-implemented expander & module system
This commit merges changes that were developed in the "racket7" repo.
See that repo (which is no longer modified) for a more fine-grained
change history.

The commit includes experimental support for running Racket on Chez
Scheme, but that "CS" variant is not built by default.
2018-02-26 13:19:53 -07:00
Leandro Facchinetti
00211413a5 Fix typo in error message 2018-02-26 10:18:16 -06:00
Matthew Flatt
32b274dee1 make syntax/moddep more useful
This tool seems misplaced, but improve it a little to be practical for
larger module hierarchies.
2018-02-19 07:03:52 -07:00
Matthew Flatt
11e81f8776 add variable-reference-from-unsafe?
For now, the result is always #f, but this is a bridge to slightly
more useful functionality in the racket7 branch.
2018-02-19 07:03:52 -07:00
Robby Findler
8393f0b2f6 fix opt/c for flat-contract?
Thanks to Philip McGrath for spotting the problem

Also, along the way, discover the setup for chaperoneness for opt
contracts was bogus, so fix that up too
2018-02-17 19:52:58 -06:00
Daniel Feltey
26ed4b246c Use the thread-cell strategy for recursive-contracts that are list contracts 2018-02-15 19:00:58 -06:00
Matthew Flatt
55ffc24011 JIT: fix bug with call-with-values
Handling of runstack overflow wasn't right for platforms
with a distinction between short and long jumps --- which
includes x86_64, but only after enough code has been
allocated.
2018-02-14 08:24:16 -07:00
Milo Turner
2e1a81b345 for/stream can use #:break as advertised (fixes #1910) 2018-02-11 18:59:18 -05:00
Matthew Flatt
ecde607a62 fix expander tracking of unbound phase-1 identifiers
Thanks to Mitchell McLean and Jacob Ginspark for the report.
2018-02-11 14:14:17 -07:00
Matthew Flatt
60b6b43485 pretty-print: order hash keys in common cases 2018-02-11 14:14:17 -07:00
Sam Tobin-Hochstadt
9fe03ff6d9
Tell Typed Racket about the initial error continuation. (#1950)
Closes racket/typed-racket#660.
2018-02-10 17:38:08 -05:00
Leif Andersen
dd2a0dceb3
define-simple-macro now works with an ~or macro. (#1949)
The previous definition of define-simple-macro would fail (with
a very poor error message) if the user made a simple macro like:

(define-simple-macro (~or a b)
  (let ([tmp a])
    (if tmp tmp b)))

While the define-simple-macro form does allow syntax-parse patterns,
this should not be enabled for the initial head pattern, as described
in the define-simple-macro documentation.
2018-02-09 10:41:27 -05:00
Alexis King
02f6162283 Add splicing-parameterize to racket/splicing 2018-02-01 10:28:20 -08:00
Kashav Madan
9981a15901 fix typo in FORCE_MAJOR_AFTER_COUNT comment
"arbitraily" -> "arbitrarily"
2018-02-01 09:08:39 -06:00
Juan Francisco Cantero Hurtado
c173b629d5 aarch64 is now an OpenBSD supported platform 2018-02-01 06:22:24 -07:00
Robby Findler
ad0a47c570 use an absolute require to avoid an error in the sandbox test suite 2018-01-29 07:47:37 -06:00
Robby Findler
551db6c1ef corret c98b0e6 so that empty? is not provided by racket/base
also do the same treatment with cons? as with empty?
2018-01-28 15:04:41 -06:00
Matthew Flatt
32e12fded4 ffi/objc: improve caching for objc_send foreign-procedure variants
Reduce the generation of foreign-function wrappers by `ffi/objc`
by caching type vectors when all of the types refer to module-level
constant bindigs.

Includes an optimizer-validation repair, where improved generation
creates a reference to a variable that would normally be replaced
by constant propagation.
2018-01-28 09:01:37 -07:00
Robby Findler
c98b0e6e1e add empty? to the list of known-good-contracts 2018-01-26 16:51:05 -06:00
Matthew Flatt
b8171611aa fix initial peek on file that attempts jump past the end
Closes #1938
2018-01-25 20:08:10 -07:00
Matthew Flatt
2bf00a1208 add unsafe-os-thread-... to #%unsafe
These functions just `raise exn:fail:unsupported`, but having
them present allows the version of Racket to bootstrap
Racket-on-Chez.
2018-01-25 15:10:39 -07:00
Matthew Flatt
6eb740300f ffi/unsafe: add a #:blocking? argument for foreign callouts
The `#:blocking?` argument has no effect for now, but it will enable
better cooperation with OS thread in Racket-on-Chez. Function that
block indefinitely in a place, for example, will need to be called
with `#:blocking? #t` to prevent stalling GCs in other places.
2018-01-25 11:05:20 -07:00
Matthew Flatt
a12a4a51b0 vector-copy!: fix for impersonated overlapping regions
Ensure memmove-like behavior when source and destination
overlap.
2018-01-24 14:32:02 -07:00
Matthew Flatt
62b8ca3ca7 ffi/unsafe: add _bytes/nul-terminated
Add a `_bytes` variant type that will work more consistently with
Racket-on-Chez, where the representation of a byte string does not
include an implicit nul terminator.
2018-01-19 15:17:36 -07:00
Matthew Flatt
d7421b5dc0 fix some exn:fail:contract:continuation
Some excepts that should be `exn:fail:contract:continuation`
were `exn:fail:contract`.

Closes #1920
2018-01-18 13:04:06 -07:00
Matthew Flatt
0c35905270 continuation-marks: fix caching problem in continuations
Closes #1931
2018-01-18 12:46:26 -07:00
Matthew Flatt
8eb9285116 rktio: fix pthread configuration
The Racket-level `configure` script effectively hid the
problem, but it's better to get the pthread flags right.
2018-01-17 11:00:38 -07:00
Matthew Flatt
f2e6978ac2 Mac OS: fix Unix-style --enable-xonx build 2018-01-16 17:16:44 -07:00
Matthew Flatt
a35633ec36 history notes for 6.12 2018-01-12 15:15:55 -07:00
Matthew Flatt
87192caa57 add racket/private/primitive-table
Like `racket/private/check`, this module simplifies a "racket7"
bootstrap.
2018-01-12 15:15:55 -07:00
Matthew Butterick
06bdd2f0c3 update copyright year to 2018 2018-01-12 15:44:07 -06:00
Vincent St-Amour
a44d8b698d Post-release version for the v6.12 release 2018-01-07 10:08:40 -06:00
Matthew Flatt
1634be71de fix error-message typo 2018-01-06 15:13:23 -07:00
Matthew Flatt
00d3ec2f9c fix scheme_extract_pointer to handle offsets
And not handling offsets causes `register-process-global`
to work in correctly, for example.
2018-01-03 17:56:24 -07:00
Matthew Flatt
5e47b23276 register-process-global: fix argument check 2018-01-01 19:16:43 -07:00
Jay McCarthy
9580109901 Remove C compiler warning 2018-01-01 09:31:45 -05:00
Matthew Flatt
0ace17a3e9 ffi/unsafe/global: add get-place-table 2017-12-31 08:54:37 -06:00
Matthew Flatt
fb99c0bc57 avoid a C cmopiler warning 2017-12-28 13:32:29 -06:00
Matthew Flatt
36d563d7ce improve JIT impersonator property predicate/accessor fast path
Faster for the case that an impersonator has a small number of
impersonator properties. To enable hand-coded search, a small number
of properties are now kept in a vector instead of a hash tree.
2017-12-23 06:06:59 -07:00
Matthew Flatt
8444b70bc1 improve JIT support for property reference with failure value
For a non-procedure failure value, stay in the fast path and
return that value.
2017-12-22 19:07:36 -07:00
Matthew Flatt
9092d31c29 JIT: fix property predicate & selector handling
Commit 89512eda had accientally disabled the JIT's fast
path for structure-type property predicates and selectors.

Re-enable it, but but repair a problem with the way that
impersonator-property operations are handled by the same
code.
2017-12-22 18:01:19 -07:00
Matthew Flatt
5dec488ec4 add custodian-shut-down? 2017-12-18 15:37:04 -07:00
Matthew Flatt
9e3bdaa328 call-in-nested-thread: add prompt
Before 544b7a3d53, an incorrect barrier check prevented applying
a continuation captured in other threads from being applied in a
thread created with `call-in-nested-thread`. There's no good
reason to prohibit such an application, and now that the bogus
check is gone, an explicit prompt is needed in the implementation
to make it behave correctly.
2017-12-18 08:10:23 -07:00
Ryan Culpepper
9be7bf53cf syntax/parse: add unwindable state: syntax-parse-state-{ref,set!,...} 2017-12-18 09:10:31 +01:00
Ryan Culpepper
164b3abed1 syntax/parse: remove some absolute paths related to lazy-require-syntax
Since the previous version of this code was first written, Racket's
requirements seem to have relaxed---but not completely!

If *all* related module paths are made relative, then the deps
test case breaks (but only the test is pre-compiled ?!!).

If requires from disappearing module(s) to residual module(s)
use absolute module paths, it seems to work.
2017-12-15 21:53:25 +01:00
Ryan Culpepper
0c8711a650 syntax/parse: use lazy-require-syntax 2017-12-15 21:25:20 +01:00
Ryan Culpepper
8d04bd67d6 add lazy-require-syntax 2017-12-15 21:19:12 +01:00
Alexis King
fb80d18428 syntax/parse: Arrange for built-in macro’s names to be preserved
The dance that syntax/parse performs to lazily load its implementation
rewrites uses of syntax/parse macros in such a way that their original
names were discarded, which shows up in error messages. By simply
invoking the underlying transformer directly in the proxy macro instead
of expanding to a rewritten use, users’ names can be preserved.

fixes #1909
2017-12-13 11:05:15 -08:00
Matthew Flatt
93ae78af91 rktio: better ltps checking for epoll support
Don't report ltps success for file descriptors that are not supported
by epoll.

Racket ports probably were not affected, since Racket doesn't try ltps
registration for regular files or devices like /dev/null that report
always being ready.
2017-12-12 16:44:35 -07:00
Matthew Flatt
c3f61a7626 add ffi/unsafe/port
Provide unsafe functions for working with file descriptors and
sockets. Although more functions are potentially useful, these
reflect the one scurrently exported by the C API.
2017-12-12 15:57:54 -07:00
Matthew Flatt
5ad28e8942 fix unsafe-poller result handling and improve docs 2017-12-12 12:07:41 -07:00
Matthew Flatt
544b7a3d53 fix continuation-barrier checking
Continuation-barrier checking was sometimes too strict,
disallowing jumps out past a barrier (as opposed to
into a barrier) that should be allowed.
2017-12-12 09:11:49 -07:00
Matthew Flatt
7aff978a1f fix merging of marks when applying a composable continuation
When a composable continuation has continuation marks that should
be merged with marks in the immediate continuation frame when
the continuation is applied, then mergeing did not always work.
It only worked in the case that the merge cadidates are the only
marks, because the merging check used the wrong end of the captured
sequence of marks.
2017-12-10 09:02:50 -07:00
Ryan Culpepper
414fd515ab syntax/parse: make undo cooperate with ~commit and ~! (cut) 2017-12-09 13:42:12 +01:00
Ryan Culpepper
f816a8afcd syntax/parse: add ~undo, #:undo for unwinding effects
Note: this version doesn't work with ~commit or ~!, because
it stores both choice points and undo actions in the failure
continuation. Commit and cut should discard choice points but
preserve undo actions.
2017-12-09 13:42:12 +01:00
Matthew Flatt
6a9a269546 bytes-utf-8-{length,index}: fix bytecode optimizer bug
The `bytes-utf-8-{length,index}` function was incorrectly marked as
always returning a fixnum.

Thanks to Jonathan Simpson for reporting the bug.
2017-12-08 17:47:14 -07:00
Gabriel Ebner
b614e87d07 xform: add __isinff128 2017-12-06 05:33:29 -07:00
Greg Hendershott
1f4b989e48 CRLF terminate get-pure-port/headers; fixes #1901
Supply a final CRLF just like purify-port.
2017-12-02 22:34:04 -05:00
Matthew Flatt
0de27b6ce9 rktio: adjust Mac OS setenv workaround
A `setenv` bug appears to be fixed as of Sierra, so only use the
workaround for earlier versions.
2017-12-02 16:58:31 -07:00
Matthew Flatt
29606b1e5e fix cleanup of tcp-connect connection state
Repairs another regression due to the rktio conversion, where a
connection that takes a while can be mismanaged, especially if
multiple connection attempts run concurrently.
2017-11-17 13:08:55 -07:00
Matthew Flatt
77d904839a tcp-listen: repair error messages 2017-11-10 08:08:29 -07:00
Daniel Feltey
c5cf7c1320 Avoid repeatedly constructing contracts as a result of checking a recursive contract
This may provide a speedup on Typed Racket programs that spend a lot of time
constructing contracts.
2017-11-09 22:07:54 -06:00
Matthew Flatt
d673ad79c0 note upgrade to SQLite for native-package builds 2017-11-09 06:13:27 -07:00
Huma Zafar
4e864a5387 Adds optional keyword argument to check-duplicates to determine returned value when no duplicate found. 2017-11-08 18:47:19 -06:00
Vincent St-Amour
f214ea761a Make sample build matrix more reasonable.
After discussion with Leif, who wrote the original code.
2017-11-07 18:16:00 -06:00
Robby Findler
afde639ec5 add contract check to shuffle 2017-11-07 12:30:24 -06:00
Milo Turner
27ec348a62 curry checks that a single argument is a procedure (notified by #1839) 2017-11-04 23:49:30 -04:00
Vincent St-Amour
4258c3bfe6 Update raco pkg new for v6.11.
(cherry picked from commit 5fbf3f94b3f0fb0f7a9eae813b65534aa3a83f3d)
2017-10-30 18:00:31 -05:00
Matthew Flatt
512910c83f expander: fix 'module-begin expansion with definition contexts
Using `(local-expand <expr> 'module-begin <stops> def-ctx)` didn't
work right, because definitions added to `def-ctx` were not visible.
(While adding definitions before `module-begin` expansion is an unusual
thing to do, there's no reason that it has to fail.)
2017-10-28 10:15:39 -06:00
Jay McCarthy
033cd43b8f Better fix for git checkout problem 2017-10-28 07:23:36 -04:00
Jay McCarthy
9b1c71a381 Catch all errors so credentials are tried 2017-10-27 16:20:11 -04:00
Robby Findler
259e3a6fe1 use the right identifier
closes #1845
2017-10-26 16:48:12 -05:00
Matthew Flatt
5f1b707881 unbreak no-futures/no-places build 2017-10-26 07:12:24 -06:00
Matthew Flatt
dfa5d48092 unbreak JIT and check limits
Repairs a problem with ce9894c8bf, where a large "inlined" vector
allocation is not actually inlined, but other parts of the JIT
assume that it will behave as inlined --- which implies that the
runstack will be left unchanged after the call.

Closes #1868
2017-10-25 17:48:31 -06:00
Matthew Flatt
55c1685526 JIT: inline vector and struct CAS primitives 2017-10-25 17:36:03 -06:00
Matthew Flatt
c52bd91c54 add unsafe-struct*-cas! 2017-10-25 17:36:03 -06:00
Daniel Mendler
bc26d29bf8 add vector-cas! and unsafe-vector*-cas! 2017-10-25 17:36:03 -06:00
Matthew Flatt
d8e2192145 Revert "Revert "JIT: fix inline allocation for large vectors""
This reverts commit f7b3d3f4b4.
2017-10-25 17:34:54 -06:00
Matthew Flatt
f7b3d3f4b4 Revert "JIT: fix inline allocation for large vectors"
This reverts commit ce9894c8bf.

I don't immediately see what has gone wrong, so reverting for now.
2017-10-25 17:18:32 -06:00
Matthew Flatt
ce9894c8bf JIT: fix inline allocation for large vectors
Cloaes #1800
2017-10-25 09:55:41 -07:00
Matthew Flatt
22e8af32f3 Windows: avoid loop on reparse-point cycles
In Windows 10 Fall Creators Update, a OneDrive mount looks to Racket like
a reparse point that refers to itself. Make Racket stop trying to resolve
the path further in that case.

Relevant to #1671
2017-10-24 08:26:26 -06:00
Matthew Flatt
ae4e85a6a7 evt:struct with unsafe-poller: skip sleep if poll reports ready
Intended to fix racket/gui#80
2017-10-23 06:03:25 -07:00
Matthew Flatt
e03ec08736 history notes for 6.11 2017-10-20 14:29:46 -06:00
Jay McCarthy
06e3205787 Fix PR1859 2017-10-20 11:34:40 -04:00
Matthew Flatt
e255c737b5 rktio: fix bug in 'text mode on Windows
If a #\return lined up in just the wrong way with a file-read
request, then the #\return could get mishandled.
2017-10-19 19:55:38 -06:00
Matthew Flatt
b6b9d0d409 repair unmarshling fix
Fixes a problem with 78fdee6b6b
2017-10-19 14:52:26 -06:00
Matthew Flatt
78fdee6b6b fix unmarshaling of module-namespace information
Avoids errors that sometimes appear as "cannot redefine lifted.0".

Merge to 6.11.
2017-10-19 07:45:51 -06:00
Andrew Kent
9e16d3f9c9 add #:result clause to for/fold forms 2017-10-18 07:15:15 -04:00
Andrew Kent
3119c5b732 better stx errs for/fold and for*/fold 2017-10-18 07:15:15 -04:00
Alexis King
1e38918aa9 Improve how splicing-syntax-parameterize interacts with module* forms
Commit 00d438cfbe made an attempt at this,
but this commit does it in a much more careful way, based on manually
emulating how the macroexpander expands module* forms in order to allow
splicing-syntax-parameterize to apply even within #%module-begin forms
introduced by the expander.
2017-10-17 14:57:09 -07:00
Matthew Flatt
dd585e7ff7 fix environment -> resolved path -> module path index 2017-10-17 08:23:02 -06:00
Matthew Flatt
d64961cdba improve an error message from the expander
Mostly, fix "compiled" versus "expanded" in an error message,
but this variant of the message copied from the new expander
implementation seems better overall.
2017-10-16 10:00:15 -06:00
Matthew Flatt
2454fd6931 Fix hashing on lists containing self-references
The hashing function was bounded, but with an accidental backtrack
so it could take time exponential in the intended bound.

Closes #1842
2017-10-16 09:27:50 -06:00
Robby Findler
f24273d7ef bring down below 102 columns 2017-10-15 21:25:46 -05:00
Robby Findler
4354488453 add some more popular keys, based on TR's contract generation 2017-10-15 17:50:05 -05:00
Alexis King
00d438cfbe Make splicing-syntax-parameterize recur into module* without a mod-path 2017-10-15 15:53:59 -06:00
Matthew Flatt
402bf2173d subprocess: fix problems with adding subprocess to a group 2017-10-12 14:40:23 -06:00
Matthew Flatt
1cc55f30fe subprocess: support adding to an existing subprocess group 2017-10-12 12:37:21 -06:00
Matthew Flatt
afc5f919f1 ffi/unsafe/schedule: expose some scheduler internals
These internals are needed for `racket/gui`, which currently
accesses them via C functions.
2017-10-12 12:37:15 -06:00
Vincent St-Amour
fadf0d4a7d Post-release version for the v6.11 release 2017-10-12 13:15:45 -05:00
Justin Slepak
3935824922 Fix bug in hash-table key-value match pattern (#1532)
Match pattern allowed `(hash-table)' to match on non-empty hashes
2017-10-12 01:11:00 -04:00
Robby Findler
404539c894 only do the in-tail-position contract elimination with chaperone (or flat)
contracts

closes #1829
2017-10-06 13:30:05 -05:00
Matthew Flatt
c7c8f6da7e fix expand corner to be consistent with eval
Repairs a problem reported by Laurent Orseau, where running the
following program with errotrace enabled reports an error:

 #lang racket/base
 (require racket/class)
 (new object%)
 (define-namespace-anchor nsa)
 (define ns (namespace-anchor->namespace nsa))
 (eval '(new object%) ns)

I haven't been able to make a standalone test, yet, but I'll keep
trying.
2017-10-05 10:41:19 -06:00
Daniel Feltey
3b56866fc1 Fix object/c contract-stronger? 2017-10-02 15:12:17 -05:00
Ben Greenman
c02d91d174 contract-stronger: swap order of cases
Check that the input to the default `contract-stronger?` is
 not an impersonator before calling `equal?` on it
2017-10-02 02:11:52 -04:00
Daniel Feltey
ed5911e531 make contract-stronger? return #f for impersonator contracts that don't implement stronger 2017-09-29 15:57:56 -05:00
Robby Findler
39dea70732 fix promise/c in the case of multiple values coming out of the promise
closes #1821
2017-09-29 07:11:48 -05:00
Vincent St-Amour
23fb09a806 Fix error message for takef-right and co. 2017-09-25 14:06:49 -05:00
Matthew Flatt
d4f2f01c80 ffi/unsafe: add void/reference-sink 2017-09-24 08:27:48 -06:00
Matthew Flatt
fb312df90e openssl: remove 'sslv2 from supported-protocols list
The 'sslv2 mode shouldn't be used and it seems available but fails on
modern OpenSSL builds, so just never claim that it's available.
2017-09-23 17:12:32 -06:00
Leif Andersen
5e3a23886a Make compute-offsets public. (#1814)
Make compute-offsets public.
2017-09-22 23:15:28 -04:00
Vincent St-Amour
c68f42a1ef Update raco pkg new for v6.10.1.
(cherry picked from commit 006ec1bfc993c4b59657882c8a07aae3d896c81d)
2017-09-12 16:38:33 -05:00
Matthew Flatt
e819b58461 raco setup: fix dependency checking for extensions like ".a60" 2017-09-09 19:48:20 -06:00
Vincent St-Amour
bc3e661181 Post-release version for the v6.10.1 release 2017-09-08 13:45:54 -05:00
Matthew Flatt
425d08c8e2 optimizer: improve hashing of variables during inlining
When creating a copy of a variable in the process of inlining, make
sure the copy has its own `eq?` hash code.
2017-09-07 17:54:11 +01:00
Matthew Flatt
1f02cf226e fix eq[v]? hashing with many collisions
Normally, it's impossible to generate lots of `eq?`-hashing
collisions, but when the compiler inlines a function, it can duplicate
variables in a way that gives each copy the same `eq?` hash code. The
immutable-hash tree implementation failed when more than 32 collisions
occurred (which triggers a subtree in the collision node).

It's similarly very difficult to generate > 32 values that collide on
`eqv?` hashes but are not `eqv?` (although it must be possible using
exact rationals or complex numbers).
2017-09-07 17:42:29 +01:00
Matthew Flatt
94cee519e1 re-unbreak handling of symlinks on Windows
The repair from commit 046503de88 was lost in 98a78add9f.
2017-09-07 09:01:07 +01:00
Royall Spence
e991dd5ccb Move rackunit-lib to build-deps instead of deps
This should only needed for development purposes and not at runtime for the typical package.
2017-09-01 00:17:25 -04:00
Ryan Culpepper
e9f2c084eb db/sqlite3: use {start,end}-atomic instead of call-as-atomic
On my machine, this reduces the running time of the sqlite3
tests by about 1/4 (~3.2s to ~2.4s).

Other things I tried that didn't make as big a difference:
- coalesce A regions
- fast path for call-with-lock
2017-08-23 12:30:48 -04:00
Ryan Culpepper
2df51c4d19 db: add strict dependency on prepared-statement module
Otherwise, lazy-require can make the finalizer thread
get the wrong initial custodian.
2017-08-23 02:39:19 -04:00
Ryan Culpepper
09e90c65dc db: remove custodian registration on disconnect 2017-08-23 02:39:12 -04:00
Ryan Culpepper
532b322896 syntax/parse template: add datum-template 2017-08-23 02:01:27 -04:00
Ryan Culpepper
5fba2ee9c7 syntax/parse template: move quasitemplate support to pre-pass
Note: quasisyntax has a bug: #`(... (1 2 #,@(list 3) 4)).
Within an escape, no way to express splicing desugaring.
So add a private variant of ?@ that is interpreted even escaped.
2017-08-23 02:01:27 -04:00
Ryan Culpepper
a3511fbafb syntax/parse template: separate guide for re-syntax
Make datum->syntax explicit in guide rather than combined with
constructors like t-cons/x and t-dots (conditional).
This will make datum support easier, later.
For now, it makes it easier to do relocate correctly.

Also, make t-metafun, h-splice inlinable.
2017-08-23 02:01:27 -04:00
Ryan Culpepper
723140720e syntax/parse template: add simple ellipsis special case 2017-08-23 02:01:27 -04:00
Ryan Culpepper
50cb7fbaf7 syntax/parse template: compile = datum->syntax
Change guide reps to coincide with expressions for template compilation.
2017-08-23 02:01:27 -04:00
Ryan Culpepper
affe32e148 syntax/parse template: reorganize code, update comments 2017-08-23 02:01:27 -04:00
Ryan Culpepper
5005a26901 syntax/parse template: encourage inlining of template combinators
With inlining, the optimizer can turn templates into mostly
first-order code.
2017-08-23 02:01:27 -04:00
Ryan Culpepper
916ebf403e syntax/parse template: track syntax vs non-syntax pairs in template
Allows generation of more specialized code (hopefully smaller
and faster).

Also clean up some other guide reps.
2017-08-23 02:01:27 -04:00
Ryan Culpepper
ca38b89ae6 syntax/parse template: change run-time strategy
Instead of doing run-time interpretation of a "guide" tree,
generate code for procedure (using stx -> stx combinators).
2017-08-23 02:01:27 -04:00
Ryan Culpepper
eb65a859cd syntax/parse template: remove syntax-property handling
Since template was written, Racket has added a notion of preserved
syntax properties.
2017-08-23 02:01:27 -04:00
Matthew Flatt
ff1ec66c7f pkg catalog operations: store and propagate ring number
Although `raco pkg` doesn't use a package's ring number, it's useful
to preserve for other tools (like the pkg-build service). Adjust `raco
pkg catalog-copy` and `raco pkg catalog-info` to recognize and store a
ring number.
2017-08-22 16:55:10 -06:00
Matthew Flatt
8257a592a0 avoid unnecessary security-guard invocations in ffi-lib
Relevant to racket/sandbox-lib#1
2017-08-21 19:19:57 -06:00
Robby Findler
67ac06e6ed fix some issues surrounding the #:list-contract? argument to various contract combinator utilities
closes #1756
2017-08-21 14:39:52 -05:00
Matthew Flatt
98a78add9f rktio: move dlopen/dlsym/etc. adapter to rktio
Also, sync header-annotation improvements from the racket7 branch.
2017-08-20 15:32:47 -06:00
Matthew Flatt
93ea42d7b7 tcp-addresses: fix result for a connection peer
In the rktio conversion, the peer-address results were incorrectly
wired to the local-address function.
2017-08-18 09:27:23 -06:00
Matthew Flatt
046503de88 unbreak handling of symlinks on Windows
A mistake in the rktio conversion causes a crash if certain functions,
such as `directory-exists?`, are used before certain other functions,
such as `resolve-path`.

Thanks to Alex Harsanyi for the report.
2017-08-16 08:31:46 -06:00
Matthew Flatt
1a9dee59da deregister semaphore for a blocking file descriptor
The rktio conversion lost the deregistration of file descriptors in an
internal fd-to-semaphore table building on kqueue/epoll, causing the
wrong semaphore to be checked for a later recycling of the file
descriptor. This bug mainly affects Linux and ports created by
`subprocess`, since kqueue is not used for pipes on Mac OS and BSD
variants. The bug does not affect network sockets (which are the
primary intended clients of epoll/kqueue support), since the relevant
semaphore is deregistered when a socket is closed.

Thanks to James Bornholt for discovering the problem and providing the
repair.

Closes #1769
2017-08-10 19:54:04 -06:00
Matthew Flatt
664bec2040 repair a problem with module->namespace
Fix a problem with compile-time bindings added to a
namespace created by `module->namespace` for a module
that does not have a source file.

Possibly, there's a different fault that should be fixed that caused a
binding to use the module's instantiation-time module path index
instead of its compile-time module path index (which is what happens
when a file is involved). This repair fixes the problem in a general
way, though, and leaves further improvement to the reimplementation of
the expander in Racket (which already does not suffer from the bug).

Thanks to Alexis for providing the example.
2017-08-10 18:33:49 -06:00
Leif Andersen
f88704858a
Fix the contract for with-intercepted-logging
The contract was missing the required log-level/c. This commit
adds it.
2017-08-08 12:20:13 -04:00
Ryan Culpepper
4a71936f23 syntax/parse: improve stxclass arity mismatch error messages 2017-08-04 12:24:13 -04:00
Matthew Flatt
2092deab28 more corrections for unquoted-printing string addition
More repairs to cbfcc904ab. Thanks to Ryan for noticing
the problems.
2017-08-04 10:16:41 -06:00
Matthew Flatt
d062212ebc future: fix problem related to continuation marks
Capturing, restoring, then capturing again a future's continuation
marks did not work right.
2017-08-04 10:13:52 -06:00
Matthew Flatt
f6e863a4dd fix GC handling of unquoted-printing strings
Adds missing change to cbfcc904ab.
2017-08-04 09:18:15 -06:00
Matthew Flatt
05c5c4fa3e fix space-safety of JIT-generated apply
In a non-tail position, a JIT-generated application of `apply`
retained the argument list until the called function returned.
Fix it to drop the reference to the list before the function
is called.
2017-08-04 07:23:50 -06:00
Matthew Flatt
cbfcc904ab add unquted-printing strings
And unquoted-printing string contains a string to `display` in all
print modes. Although it could be implemented with a structure type
that has a printing function, `raise-arguments-error` further treats
unquoted-printing strings specially by not using the error value
conversion handler, so it reliably produces literal text in the error
message; that way, `raise-arguments-error` can be used to construct
more error messages.
2017-08-04 06:13:19 -06:00
Matthew Flatt
04138340eb Unix: unbreak gracketcgc build 2017-08-01 10:05:10 -06:00
Matthew Flatt
34afef1c38 fix an error message 2017-07-31 17:33:21 -06:00
Vincent St-Amour
029132e4c3 Update raco pkg new for v6.10.
(cherry picked from commit f75eced6f7c5cd452c2343c93b5ff71b96a909ae)
2017-07-31 15:54:24 -05:00
rain
8ee5d18107 support 1-byte numbers in integer->integer-bytes and integer-bytes->integer 2017-07-28 09:39:49 -06:00
Matthew Flatt
2cf38ecad7 ffi/unsafe: attempt to improve _union
The hack to implement `_union` without help from libffi failed when
the total size of the variants is too large. Try a different approach,
which involves a bet that the total size plus whether the content is
all floating-point numbers will be enough information for most cases.

Relevant to #1351
2017-07-28 09:05:24 -06:00
Matthew Flatt
45940f69a9 fix error-message typo 2017-07-25 08:12:11 -06:00
Matthew Flatt
9c48ee003a add missing lock on chaperoned/impersonated hash-table operations
For `equal?`-based hash tables, various operations are supposed to
take a lock on the table, but the lock was missing.
2017-07-24 19:25:17 -06:00
Matthew Flatt
e13d40c5ef vector-{ref,set!}: fix chaperone error for JIT-generated check 2017-07-23 08:27:14 -06:00
Matthew Flatt
e98cfeae5b chaperone-vector: adjust contract-error reporting
The convention is to check argumen contracts indpendently
first, then raise an eror there's a mismatch among pairs
of objects.
2017-07-23 08:21:33 -06:00
Matthew Flatt
c54e671a14 change sigset() and signal() to sigaction()
The sigaction() API is the more modern, more portable one.
2017-07-22 06:41:56 -06:00
Matthew Flatt
d818e8d996 rktio: fix SIGCHLD signal-handler installation on Solaris
The switch to rktio swapped the sense of "signal" and "sigset"
incompletely, and "signal" on Solaris is the one that resets
the signal handler to SIG_DFL.
2017-07-21 07:40:35 -06:00
Matthew Flatt
1d74c214a1 racket/HISTORY.txt: update for v6.10
Merge to v6.10
2017-07-19 08:00:32 -06:00
Matthew Flatt
808bd1b897 raco setup: adjust --clean mode
Make `raco setup` propagate the original value of
`use-compiled-file-paths` in case it's reset to avoid loading bytecode
files. Then, `--clean` mode can remove bytecode relevant to that
setting, instead of always clearing "compiled" subdirectories.

There's no external way to initialize `use-compiled-file-paths` right
now, other than forcing it to `null` with the `-c` flag at the
`racket` level, but the current "racket7" implementation uses
different `use-compiled-file-paths` settings for different build
modes, and it seems to make sense in general.

Also, make `--clean` sensitive to `-D` and `-d`, so that it's easy to
clean just bytecode.
2017-07-17 14:45:43 -06:00
Robby Findler
5ecbc54fff fix recursive-contract's name patch up code 2017-07-16 16:52:14 -05:00
Matthew Flatt
ac43a93a13 fix arg order in errors for JIT-inlined {string,bytes}=?
Closes #1741
2017-07-14 09:16:39 -06:00
Matthew Flatt
d081586959 fix immutability of some syntax-e results
Internally, when scopes are propagated to nested syntax objects,
vectors and boxes were not reconstructed as immutable.

Closes #1745
2017-07-14 07:37:55 -06:00