Matthew Flatt
64146e94dc
rktio: first cut at moving Racket OS wrappers to a library
...
The world doesn't need yet another cross-platform I/O library, but
it's getting one. This one has exactly the things that Racket needs,
and pulling it out will make it reusable from other VMs while
improving the Racket code organization.
This first step just gets started.
2017-06-19 06:45:16 -06:00
Sam Tobin-Hochstadt
5d4bf33906
Tests keep taking longer.
2017-06-09 18:08:12 -04:00
Matthew Flatt
dc14a68162
fix performance problem in expander
...
For a term
(lambda (arg-id ...) (define def-id _rhs) ... (arg-id def-id) ...)
the expander could take quadratic time in the number of `def-id`s
due to walking an environment to remove use-site scopes. (The
variant of the expander rewritten in Racket didn't have this
problem.)
2017-06-08 07:01:31 -06:00
Matthew Flatt
ff26c2f29b
fix complexity of type merging in bytecode optimizer
...
Merge a smaller table into a larger one to avoid an overall
quadratic-time computation.
2017-06-08 07:01:30 -06:00
Ben Greenman
5cfe5619de
style: document '/', as in 'call/cc'
...
Add row to the table in the section on "Names".
Also clarify that the nearby margin note is about `#%`
2017-06-07 14:29:33 -04:00
Leif Andersen
5c27f5550c
Add mzrt_sema_trywait to the mzrt library.
...
This commit add mzrt_sema_try_wait to the functions that operate
on semaphores. The existing ones are:
* int mzrt_sema_create(mzrt_sema **sema, int init);
* int mzrt_sema_post(mzrt_sema *sema);
* int mzrt_sema_wait(mzrt_sema *sema);
* int mzrt_sema_destroy(mzrt_sema *sema);
2017-06-05 10:46:24 -04:00
Leif Andersen
40d4a35329
Add documentation for scheme_atexit
2017-06-04 18:52:09 -04:00
Leif Andersen
5510a76dca
scheme_add_atexit_closer now uses scheme_atexit.
...
This is because calling atexit is not correct in all
situations, namely on old operating systems.
2017-06-04 08:56:07 -04:00
Leif Andersen
a8fa5d4ebb
Add scheme_atexit c function.
...
This way programs can actually call atexit. (Otherwise atexit
is frequently not provided in libc as a symbol.)
2017-06-03 20:47:34 -04:00
Leif Andersen
2f6c42f3c1
Add a #:make-c-id flag to define-ffi-definer
...
This make-c-id allows an author to specify a convention for how
to connect and identifier defined with define-ffi-definer and
the actual symbol in the file.
* Adds docs.
* Adds tests.
* Adds history.
2017-06-02 10:26:57 -04:00
Matthew Flatt
f459dd9eb7
make collapse-module-path-index
work on a "self" modidx
2017-06-01 19:37:18 -06:00
Leif Andersen
3364dba903
Another typo in the docs:
...
type? -> ctype?
2017-06-01 15:37:16 -04:00
Leif Andersen
cac1266d05
Fixed documentation for cblock->vector.
...
It defined cblock->vector as cblock->vector, rather than
comparing it cblock->list.
2017-05-31 15:46:54 -04:00
Alexis King
69fb636a1c
Add a missing for-label require in the contracts section of the guide
2017-05-30 20:09:50 -07:00
Ben Greenman
6d7f075ec5
typo: set 'subset?' functions take 2 arguments, no more
2017-05-30 17:47:53 -04:00
Matthew Butterick
4c5f66ff4a
fix typo
...
`that do` → `that does`
2017-05-30 11:05:40 -04:00
Leif Andersen
ea778e1dd9
FIx typo in #:retry docs for _fun.
2017-05-30 08:46:10 -04:00
Matthew Flatt
06b69c625f
repair chainges to ffi/file
...
Bring back the exported `_file/guard`, `_file/r`, and `_file/rw`;
restore/move tests in "file.rktl" test suite; and add docs for new
functions.
2017-05-27 07:29:47 -06:00
Matthew Flatt
87c0ca84a8
add ffi/unsafe/global
and switch openssl
to use it
...
Continues the move away from using the FFI to access unsafe Racket
functionality.
2017-05-26 17:49:16 -06:00
Matthew Flatt
bf83d1126d
add some unsafe operations as an alternative to FFI access
...
Accessing unsafe functionality through the FFI seemed like a good way
to avoid writing C code, but it made things more complicated instead
of easier, and it interacts badly with a more agressive shift away
from C (such as porting to Chez Scheme). So, add functions to the
primitive `#%unsafe` module, instead.
2017-05-26 16:26:06 -06:00
Matthew Flatt
7f1ab90806
raco exe on Mac OS: ensure that "PkgInfo" is writable
...
Relevant to #1680
2017-05-25 13:01:12 -06:00
Matthew Flatt
f27be30c15
fix error message
2017-05-25 13:01:08 -06:00
Leif Andersen
8f6ec91fb1
code-define-id -> core-define-id
...
Just another small typo.
2017-05-25 14:48:53 -04:00
Leif Andersen
3f61100dcc
ctype -> ctype?
...
Also void -> void?
These two forms are now documented using contracts, which matches
with the rest of the FFI docs.
2017-05-25 13:48:48 -04:00
Jay McCarthy
07f35d248c
Abort if munmap or protect_pages fails
...
On Linux, munmap can fail when you run out of mappable regions.
If protect_pages fails, then you can't install a write barrier
2017-05-25 13:38:33 -04:00
Milo Turner
cc25a27f87
fix id-set-symmetric-difference, same as 4716a6e
fixed for sets
2017-05-24 15:55:03 -04:00
Stephen Chang
7620bfcb7c
fix and actually run id-set tests
2017-05-24 13:25:15 -04:00
Stephen Chang
42152ed31c
add neg-party arg to id-set-contract-check
2017-05-24 10:01:43 -04:00
Robby Findler
6a145244d6
add missing adjust-location call
2017-05-23 09:05:30 -05:00
Robby Findler
ffe07718b8
adjust browser-run to include any stderr message into the error dialog box
2017-05-23 08:46:21 -05:00
Ben Greenman
b36c35ac7e
typo: 'an mutable' => 'a mutable'
2017-05-21 02:00:00 -04:00
Robby Findler
f175148ca3
attempt to fix the "cannot visit documentation because the anchors
...
are dropped in the urls" problem
inspired by Greg's approach, as discussed here:
http://www.greghendershott.com/2017/03/please-scroll.html
2017-05-19 15:18:26 -05:00
Alexis King
699dd39b1e
Fix square brackets in benchmark that is supposed to be R5RS Scheme
...
This issue was uncovered by a change to the r5rs package in
racket/r5rs@ecbe26bb8b .
2017-05-18 14:39:26 -07:00
Ryan Culpepper
81cb99038c
add note about spurious test failure
2017-05-18 12:54:26 -04:00
Ryan Culpepper
c082f130cb
support string, bytes (bindings from racket) as stxclass refs
...
add compile-time table as alternative to stxclass binding
2017-05-18 12:54:26 -04:00
Ryan Culpepper
ce9b309dbc
defstxclass uses #:kind "syntax class" for better labeling
2017-05-18 12:54:26 -04:00
Dan Feltey
544b7a2721
Merge pull request #1696 from dfeltey/chaperone-vector-start-typo
...
Fix typo for chaperone-vector* error messages
2017-05-17 15:15:36 -05:00
Daniel Feltey
ab2b36175b
Add vectorof first-order test cases
...
Previously none of the test cases would execute the `check-vectorof` function's
`first-order?` case in the implementation of `vectorof` contracts.
2017-05-17 13:31:45 -05:00
Daniel Feltey
1bdaf0b231
Fix typo for chaperone-vector* error messages
2017-05-17 12:50:05 -05:00
Daniel Feltey
8bc9cef7a9
Fix typo in vector contract implementation leading to wrong error message
2017-05-15 17:33:24 -05:00
Robby Findler
f2a29515d1
adjust invariant-assertion error message to avoid blame
...
closes #1681
2017-05-13 11:12:25 -05:00
Georges Dupéron
5904cea99a
Small changes to the documentation
...
* Fixed typo in the docs for serialization (serializable-struct/version → serializable-struct/versions)
* Fixed typo in scribble documentation (head pattern → a-pattern)
* Made the order of the argument descriptions match the order of the arguments in the documentation for import and export
2017-05-12 16:01:29 -05:00
Leif Andersen
cd1e56bfaf
Improve docs for FFI custodian API. ( #1684 )
...
Improve docs for FFI custodian API.
The docs were unclear on when an object goes from weakly to strongly
held.
Also add a missing space
2017-05-12 16:32:25 -04:00
Matthew Flatt
f43234e1cb
add prop:authentic
and (struct .... #:authentic ....)
...
An authentic structure type is one whose instances cannot be
impersonated or chaperoned. The intended use of `prop:authentic` is to
annotate a library-private data structure where impersonators are
never needed internally for the data structure, and the declaration
lets the compiler produce less code and fewer branches by omitting
impersonator support.
2017-05-12 12:40:57 -06:00
Robby Findler
65beb4de4c
fix cons/dc's predicate
2017-05-12 11:26:49 -05:00
Robby Findler
8f34b702ab
improve flat-contract test suite so that it checks
...
the predicate-ness of the contracts
2017-05-12 11:26:49 -05:00
Matthew Butterick
7908be8ce9
Fix spelling errors ( #1687 )
...
“cooresponds” → “corresponds” x2
2017-05-11 10:08:26 -04:00
Matthew Flatt
e6793c4598
fix variable-reference->module-path-index
on primitive refs
2017-05-09 20:28:25 -06:00
Matthew Flatt
26c4dd6909
add #%unsafe
exports to implement ffi/unsafe/atomic
...
Export functions through the usual `#%unsafe` primitive module,
instead of using the FFI to get at unsafe operations.
2017-05-09 09:32:34 -06:00
Matthew Flatt
e68e4bd6f6
minor configure --help
format repairs
2017-05-09 09:32:34 -06:00