Commit Graph

3535 Commits

Author SHA1 Message Date
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
Matthew Flatt
2e77279be0 syntax: fix guard for multiple pattern variables under ...
Fix the part of `syntax`/`datum` that determines whether an exception
handler is needed to convert an error from `map` to one from
`syntax`/`datum`.
2017-07-14 06:58:58 -06:00
Matthew Flatt
a22a3852c6 remove unused code in "foreign.c" 2017-07-14 06:58:58 -06:00
Vincent St-Amour
73e08a2aa9 Post-release version for the v6.10 release 2017-07-07 14:19:46 -05:00
Matthew Flatt
f0fe0a4635 remove copy of startup code in racket/private/collect
The copy was made in c1c427a281 to help get "racket7" started, but
it's no longer needed. Using the copy had an unintended consequence of
duplicating the collection-search cache for phases other than phase 0,
so this change repairs that consequence.
2017-07-05 07:36:03 -06:00
Matthew Flatt
6d58b11af9 add racket/private/check
The `racket/private/check` module is dead code in this repo, but
having it simplifies the "racket7" bootstrap when "racket7" goes so
wrong that it can't rebuild itself.
2017-07-05 07:36:03 -06:00
Matthew Flatt
c082d77c97 raco exe: fix stripping of signature from Mach-O executables
To strip a signature, the old implementation effectively guessed
at the padding that was added to the original linkedit segment
to acommodate 16-byte alignment of the signature. The repaired
stripping works out the actual end of the linkedit segment based
on the various load commands that refer to it.
2017-07-03 09:33:17 -06:00
Matthew Flatt
340b878981 udp-send-to: fix deallocation bug related to rktio refactoring
The bug caused an attempt to free NULL as an addrinfo, which is
apparently ok on many OSes, but not all.
2017-07-02 14:27:59 -06:00
Matthew Flatt
af7a520102 rktio: header and extraction improvements for FFI 2017-06-29 14:36:43 -06:00
Matthew Flatt
63146e5451 ffi/unsafe/custodian: handle already-shutdown custodians 2017-06-29 14:36:42 -06:00
Daniel Feltey
e289750b03 Fix box/c typo/bug
Previously non-flat box/c contracts would always use the `write` contract to
check the contents of the box rather than the `read` contract.
2017-06-28 14:48:35 -05:00
Ben Greenman
04c1c15d89 bug: add guard against string-paths in 'find-relative-path'
Add guard, if first argument to `find-relative-path` is not a path,
 then don't call `path-convention-type` on it.

Thanks to Jack Firth for reporting:
https://github.com/racket/rackunit/pull/46
2017-06-28 10:19:50 -04:00
Matthew Flatt
76711dfb50 net/git-checkout: adjust ADLER32 check to work with streaming
Don't for an inflated stream to be held completely in memory.
2017-06-26 13:49:18 -06:00
Lehi Toskin
d7db2aff59 net/git-chckout: check ADLER32 after inflate
Check ADLER32 after inflate, instead of assuming that the inflated bytes
are correct.
2017-06-26 13:48:10 -06:00
Matthew Flatt
06a6d290fd rktio: fix bug merging fd sets when poll() is not available 2017-06-25 11:08:53 -06:00
Matthew Flatt
3e8ad02334 rktio: add some missing #includes in some configurations 2017-06-25 08:39:05 -06:00
Matthew Flatt
7a8145875c rktio: configure adjustment intended to fix OpenIndiana build 2017-06-24 17:07:33 -06:00
Ryan Culpepper
44eb5532ad syntax/parse: add ~or* and ~alt, like ~or{S,H} and ~or{EH}, respectively 2017-06-24 17:07:55 -04:00
Alexander McLin
113049607a Changed the code to pass through the prep-status to the outer HANDLE so
error reporting is uniformly handled and any SQL_BUSY errors are properly identified.
2017-06-24 17:06:42 -04:00
Alexander McLin
ed481865cf Based on PR #1704 feedback, rename copy-buffer to trim-and-copy-buffer and
adjust `string-trim` to only perform right-wise trimming of the buffer.
2017-06-24 17:06:42 -04:00
Alexander McLin
dfd585db33 Any well-formed single statement query which is terminated by a semi-colon and has extra space after the semi-colon raises 'multiple statements given' error.
The cause is any extra space after a terminating semi-colon in a SQL string passed to sqlite3_prepare_v2 procedure in the prepare1* method of `db` Sqlite3 connection% implementation will result in non-false tail and zero prep-status values being returned. The checking code sees the non-false tail value and raises the "multiple statements given" exception.

The easy fix is to trim any trailing whitespace by calling string-trim on the buffer string before its converted to a byte string in the copy-buffer procedure used by sqlite3_prepare_v2 to initialize the sql-buffer.

See Issue #1702
2017-06-24 17:06:42 -04:00
Alexander McLin
31d7dd0317 Certain malformed queries such as "SELECT ,* FROM SomeTable" (which has an incorrect extra comma) raise "multiple statements given" error while Sqlite3 actually generates a syntax error that doesn't get returned as a raised exception.
The same problem is encountered when executing a DDL statement such as "Create Table" more than once after the table had already been created by the first execution.

The cause is when sqlite3_prepare_v2 encounters a bad statement, it aborts the preparation, sets prep-status flag to non-zero and also sets tail? to be non-false.

The previous code ignored the prep-status flag and only checked tail? and raises "multiple statements given" exception when tail? is non-false.

The new code takes prep-status into account and extracts the actual Sqlite3 error message by evaluating get-error-message and raising it as an exception.

See Issue #1702
2017-06-24 17:06:42 -04:00
Matthew Flatt
5dbeb39a01 rktio: fix configure detection of iconv 2017-06-24 07:37:40 -06:00
Matthew Flatt
c5022c5d4f rktio: fix small header problems 2017-06-24 07:35:07 -06:00
Matthew Flatt
990a1d7154 rktio: further improve header declarations
Also, add variants of `rktio_read` and `rktio_write` that can be more
convenient to use through an FFI.
2017-06-23 19:50:19 -06:00
Matthew Flatt
316df0af7a rktio: add standalone build mode
Also, add a script to extract the "rktio.h" header information to an
S-expression form suitable for FFI use, and refine the "rktio.h"
information to improve that output.
2017-06-23 13:08:02 -06:00
Matthew Flatt
3c07250db4 fix printer for (unquote @d)
Avoid printing `(unquote @d)` or `(unsyntax @d)` as `,@d` or `#,@d`,
which would mean `(unquote-splicing @d)` or `(unsyntax-splicing @d)`
to the reader, by adding an extra space before the `@`.
2017-06-22 15:00:00 -06:00
Matthew Flatt
8473c1d4a8 raco pkg install: error message improvement
When a package to be installed has a module that conflicts with an
existing installed module, but the existing module isn't in a package,
then say so explicitly in the error message. Also report the current
collection and links paths.

Error reporting could do even more work to figure out which path is
relevant, but reporting a list of paths is relatively easy. Listing
paths also seems likely to give a user enough hints for this rare
case, especially if the user just needs to be reminded that collection
links exist.
2017-06-22 12:40:09 -06:00
Daniel Feltey
87e4bdbec8 Fix segfault on accessing non-present impersonator properties of property-only vector chaperones
Additionally this adds macros that distinguish between the chaperone redirects of prop-only vector
chaperones, function chaperones, and structure chaperones since each of these may store a vector
in the redirects field.
2017-06-22 12:46:58 -05:00
Matthew Flatt
f8c7feaf88 fix problem with prefabs, auto fields, and construction via a key
Auto fields were incorrectly recorded as immutable in a structure type
that is first generated from the prefab struct key instead of
`make-struct-type`.

Thanks to Deren Dohoda for the report.
2017-06-22 10:46:49 -06:00
Matthew Flatt
a7d161cfac raco pkg update: fix --update-deps and cross-scope deps
When `--update-deps` (which is implied by `--all`) was used on
user-scope packages that depend on installation-scope packages, the
installation-scope dependencies were treated as missing, which forced
an update of the user-scope packages. Check both scopes for
dependencies.

Closes #1730
2017-06-22 07:33:08 -06:00
Matthew Flatt
cfa1d7c54c add more information to copy-file error message
The `file/cache` relies on matching the text of a message, and the
text had changed to have less information on Unix, including whether
the problem was with the source or destination file. Add a notion of
error step to rktio and use it to improve the `copy-file` message.
2017-06-21 16:51:02 -06:00
Matthew Flatt
7152cc1ba6 rktio: add <sys/types.h> to reliably get u_char 2017-06-21 16:22:46 -06:00
Matthew Flatt
58dea081c6 fix memory-management bugs in rktio on Windows 2017-06-21 16:19:14 -06:00
Matthew Flatt
a15b16cfd9 repair expand-user-path 2017-06-21 16:19:14 -06:00
Matthew Flatt
6a543f4783 rktio: add iconv 2017-06-21 16:19:14 -06:00
Matthew Flatt
db7c242983 rktio: add syslog 2017-06-21 15:01:45 -06:00
Matthew Flatt
4de2ff4cbd fix make-file-or-directory-link 2017-06-21 05:23:53 -06:00
Matthew Flatt
69a208eb21 rktio: add Windows path conversion functions 2017-06-21 05:23:53 -06:00
Matthew Flatt
898b9ffe10 rktio: add ShellExecute 2017-06-21 05:23:53 -06:00
Matthew Flatt
d70cb9aec0 use "errno" in error messages only for Posix errors
Use "win_err" for Windows errors, and so on. Otherwise, the error
number can be misleading, especially if it's a rktio-level error.
2017-06-21 05:23:53 -06:00
Matthew Flatt
c3da23209b rktio: replace Windows invalid-decoding hack
Report a proper error when path decoding fails, instead of
synthesizing a path hat shouldn't exist. The rktio conversion
made it much easier to report the error at the Racket level
like other filesystem errors.
2017-06-21 05:23:53 -06:00
Matthew Flatt
83cb1a0d00 repair and tests for Windows path handling
In the process of extracting minimal Windows path encoding for rktio,
I noticed a decoding issue with a path that ends with an unpaired
high-surrogate value. Add a suitable tests and fix the old decoder
(although it will probably go away).
2017-06-21 05:23:53 -06:00
Matthew Flatt
d4742a0618 fix bytes-convert-end
The `bytes-convert-end` function didn't set up a proper decoding.
Make sure that it at least does nothing for encodings where
there's nothing to do.
2017-06-21 05:23:53 -06:00
Matthew Flatt
d90976f865 rktio: repair to listen failure handling 2017-06-20 12:33:09 -06:00
Matthew Flatt
a7ab538403 fix timer handling in subprocess
This bug was introduced with the rktio conversion.
2017-06-20 11:57:43 -06:00
Matthew Flatt
a5b28c453a rktio: fix init of accepted socket 2017-06-20 09:06:06 -06:00
Matthew Flatt
20f1f146c7 raco exe: fix incorrect shortcut in submodule checking
Closes #1712
2017-06-20 08:28:54 -06:00
Matthew Flatt
51bf69e356 switch for/list back to a loop plus reverse
Closes #1721, which points out that the `for/list` expansion
introduced in commit 5e94a906cd interacts badly with a body
that captures a continuation plus Racket's current implemenation
of continuations.

When Racket one day gets a better implementation of continuations,
this change could be considered again, but the general question is
whether programs can detect or be affected by the size of the
continuation (when the programs don't directly control the
continuation creation --- otherwise continuation marks obviously
expose the size).
2017-06-20 08:28:53 -06:00
Matthew Flatt
23d2a4c58f restore scheme_fd exports
Provide a compatibility layer to bridge the old (not completely
documented) `scheme_fd` interface and rktio. The old interface is
used by the Gtk implementation of `racket/gui`, for example.
2017-06-19 18:30:21 -06:00
Matthew Flatt
9279b96d9e fix connection-failure error message 2017-06-19 11:06:26 -06:00
Matthew Flatt
9bf68adbb0 fix configure wrt places/futures vs. pthreads enabled state 2017-06-19 10:55:44 -06:00
Matthew Flatt
68f55f5b85 rktio: fix success check for connect 2017-06-19 09:47:10 -06:00
Matthew Flatt
54f16758a5 bump version number to reflect rktio refactoring 2017-06-19 06:45:54 -06:00
Matthew Flatt
19ee6d2a0c librktio: fix 32-bit Windows projects 2017-06-19 06:45:19 -06:00
Matthew Flatt
2e4518d08e rktio: makefile repair for --enable-racket= builds 2017-06-19 06:45:19 -06:00
Matthew Flatt
f741208b77 rktio: another Windows pipe repair 2017-06-19 06:45:19 -06:00
Matthew Flatt
cdf22f7cdd rktio: fix incorrect uses of errno
Using `errno` is not right for Winsock.
2017-06-19 06:45:19 -06:00
Matthew Flatt
8449470db4 rktio: restore early SIGCHLD blocking to support Linux
Process handling relies on SIGCHLD being blocked, but signals are
blocked per-thread in Linux, so SIGCHLD needs to be blocked before new
threads are created.
2017-06-19 06:45:19 -06:00
Matthew Flatt
8d857245a4 rktio: fix normalization of envvar names on Windows 2017-06-19 06:45:19 -06:00
Matthew Flatt
4250d51f08 rktio: more text-mode repairs 2017-06-19 06:45:18 -06:00
Matthew Flatt
b96fc45133 rktio: make append mode imply can-exist on Windows 2017-06-19 06:45:18 -06:00
Matthew Flatt
a13bfd25d0 rktio: reset non-blocking on sockets after dup
On Linux, is appears that duping a socket doesn't give the
new one the same non-blocking option as the original.
2017-06-19 06:45:18 -06:00
Matthew Flatt
c1416d07d6 rktio: fix Unix file copy to copy permissions 2017-06-19 06:45:18 -06:00
Matthew Flatt
c0275b37d5 rktio: fix text mode (for Windows) 2017-06-19 06:45:18 -06:00
Matthew Flatt
20e23902ba rktio: simplify Windoes 98 pipe writer
This code is unlikely to get used, but make sure it runs just
in case Racket otherwise works on Windows 95/98.
2017-06-19 06:45:18 -06:00
Matthew Flatt
dacdf64f59 rktio: fix eventmask handling (for Windows) 2017-06-19 06:45:18 -06:00
Matthew Flatt
36ca1361d9 rktio: normalize 'replace and 'truncate/replace behavior
For `open-output-file`:

Move 'replace mode handling out of rktio and into the client.
Formerly, on Windows, 'replace mode was just 'truncate with a fallback
for permission problems, so this change makes it delete an existing
file and replace it, which is more consistent with how 'replace has
always worked on Unix.

In 'truncate/replace mode, if a truncating open fails due to a
permission error and the file exists, then try again as a 'replace.
That's how it worked on Windows before, and now it's how Unix works.
2017-06-19 06:45:18 -06:00
Matthew Flatt
5d68ec297a rktio: repair for Windows fs-change
Also, add stress mode to rktio demo.
2017-06-19 06:45:18 -06:00
Matthew Flatt
ffc749f29e rktio: repairs for Windows 2017-06-19 06:45:18 -06:00
Matthew Flatt
6123b31064 rktio: fix non-Windows date timezone 2017-06-19 06:45:18 -06:00
Matthew Flatt
193e6cb518 librktio: more Windoes fixes
Now passes rktio tests and builds Racket 3m, but crashes with places.
2017-06-19 06:45:18 -06:00
Matthew Flatt
1e0a55cc8f rktio: repairs for Windows
Might break other systems...
2017-06-19 06:45:18 -06:00
Matthew Flatt
773050805b rktio: switch demo to use rktio_pipe 2017-06-19 06:45:18 -06:00
Matthew Flatt
e445051790 rktio: update some source notes 2017-06-19 06:45:18 -06:00
Matthew Flatt
38a5e7aacd rktio: repairs for SOME_FDS_ARE_NOT_SELECTABLE
... as set for Solaris, but no idea whether it's
still needed there.
2017-06-19 06:45:18 -06:00
Matthew Flatt
7fe2c1cadf rktio: repair for --enable-shared 2017-06-19 06:45:18 -06:00
Matthew Flatt
a3725374ca rktio: repair for UDP disconnect 2017-06-19 06:45:18 -06:00
Matthew Flatt
58f463ee1d rktio: repairs for non-places, non-futures build 2017-06-19 06:45:18 -06:00
Matthew Flatt
46908c377c rktio: fix MinGW compilation 2017-06-19 06:45:18 -06:00
Matthew Flatt
c02eacd5d2 rktio: repairs to kqueue-based fs-change events 2017-06-19 06:45:18 -06:00
Matthew Flatt
a1cf37eb0f rktio: repairs 2017-06-19 06:45:18 -06:00
Matthew Flatt
d34fcc31db rktio: repairs for various configurations 2017-06-19 06:45:18 -06:00
Matthew Flatt
35d47f89f6 rktio: repairs for Linux 2017-06-19 06:45:18 -06:00
Matthew Flatt
8a426eb086 rktio: configure fixes 2017-06-19 06:45:18 -06:00
Matthew Flatt
dff32444ea rktio: remove migrated configure elements 2017-06-19 06:45:18 -06:00
Matthew Flatt
d72a04285d rktio: remove obsolete preprocessor definitions
Many have moved to rktio, and others became irrelevant
over the decades.
2017-06-19 06:45:17 -06:00
Matthew Flatt
c4b3b19c1e rktio: repairs
All tests now pass for MacOS.
2017-06-19 06:45:17 -06:00
Matthew Flatt
463862d793 rktio: repairs
More tests pass.
2017-06-19 06:45:17 -06:00
Matthew Flatt
99c3643033 rktio: repairs
Builds and starts on MacOS.
2017-06-19 06:45:17 -06:00
Matthew Flatt
f0a644990c rktio: repairs
Compiles ons MacOS, but doesn't quite link.
2017-06-19 06:45:17 -06:00
Matthew Flatt
93834adc99 rktio: move udp over to rktio
Still doesn't work...
2017-06-19 06:45:17 -06:00
Matthew Flatt
2b439fc554 rktio: most of switch to rktio fd
Doesn't work, yet...
2017-06-19 06:45:17 -06:00
Matthew Flatt
63505d3e16 rktio: switch to rktio envvars 2017-06-19 06:45:17 -06:00
Matthew Flatt
49e30ea6fb rktio: better file size and timestamp types 2017-06-19 06:45:17 -06:00
Matthew Flatt
d9d8c7758d rktio: fix MzCOM projects 2017-06-19 06:45:17 -06:00
Matthew Flatt
2d21523b2d rktio: fixes for Windows build 2017-06-19 06:45:17 -06:00
Matthew Flatt
75e835351a rktio: add MSVC projects 2017-06-19 06:45:17 -06:00
Matthew Flatt
6e06329c61 rktio: fix scheme_os_getcwd() wrapper 2017-06-19 06:45:17 -06:00
Matthew Flatt
0402075f2b rktio: repairs to file & directory operations 2017-06-19 06:45:17 -06:00
Matthew Flatt
6268cd7ce9 rktio: switch file & directory operations to rktio 2017-06-19 06:45:17 -06:00