Commit Graph

5079 Commits

Author SHA1 Message Date
Robby Findler
ac7c37812b fix dequeue! to actually not hold onto queue elements
(the comments on line 11-13 said that it did this already,
but it didn't)

also add a test case to be sure that it stays this way
2012-11-21 11:10:02 -06:00
Vincent St-Amour
95d51fc892 Add new versions of for/hash: and co that the typechecker can handle.
Based on Eric Dobson's implementation.

Closes PR13248. Closes PR13249.
2012-11-20 17:45:15 -05:00
Vincent St-Amour
e2007abd7a Heterogenous -> heterogenEous.
Found by Ray Racine.
2012-11-20 17:06:51 -05:00
Vincent St-Amour
d994ba1914 Fix types of variable arity functions to work with 0-argument return values.
Closes PR13218.
2012-11-20 16:15:20 -05:00
Matthew Flatt
8a77d87a30 add file/unzip
Based on Dave Herman's "zip.plt" Planet package.
2012-11-20 10:12:27 -07:00
Joe Gibbs Politz
e264e41488 Add check-match to rackunit
check.rkt:
  Added the actual check-match macro.

test.rkt:
  Just a provide statement

check-test.rkt:
  7 additional tests for check-match, and a macro to help create tests

check.scrbl:
  Documentation and examples for check-match
2012-11-20 13:02:31 -05:00
Matthew Flatt
0f47069f98 add file/untgz 2012-11-19 17:01:01 -07:00
Matthew Flatt
3a76581a36 add file/untar 2012-11-19 17:01:00 -07:00
Vincent St-Amour
6a7b971cd6 Only generate ->* contracts when arguments are really optional arguments.
Closes PR13274.
2012-11-19 17:35:07 -05:00
Vincent St-Amour
bdfd7f8d6f Add -d0 flag to Chicken benchmarks.
Recommended by Mario Goulart.
2012-11-19 17:35:07 -05:00
Vincent St-Amour
29cfc48c5e Fix citation disabiguation when authors differ. 2012-11-19 17:35:07 -05:00
Matthew Flatt
702df4b07a racket/gui/dynamic: make gui-dynamic-require' pull from racket/gui/base'
It was pulling from `scheme/gui/base', instead. The one from `scheme/gui/base'
is now different and still pulls from `scheme/gui/base'.

This could break some programs that accidentally depended on `scheme/gui/base'
exports from `gui-dynamic-require', but it's more likely to fix problems.
2012-11-19 08:13:48 -07:00
Matthew Flatt
d90fbaeff4 scheme/gui/base: fix module-attach problem in `make-gui-base-namespace'
The `scheme/base' module had become unreachable from the `mred' module.
While that normally would be a good thing, it lead to troublesome
multiple instantiations of `scheme/base' that caused problems for
attaching further modules to the namespace.
2012-11-19 07:56:48 -07:00
Matthew Flatt
be4ce3ed66 skip some unneeded fixnum tests in JIT-generated code 2012-11-18 10:31:20 -07:00
Matthew Flatt
c3cd089758 fix error message for `map', etc. on arity mismatch
Closes PR 13244
2012-11-16 14:10:32 -07:00
Robby Findler
12e8332c55 move follow-log.rkt to tests/drracket 2012-11-16 07:26:38 -06:00
Matthew Flatt
a89963d0a8 remove unneeded "info.rkt"
It's not needed, and it also overrides the enclosing `omit-compiled-paths'
specification, which in turn triggers a failure of the "zo-path.rkt" test.
2012-11-15 07:03:24 -07:00
Matthew Flatt
ed89b32de4 fix argument checking of semi-inlined `continuation-mark-set-first'
Closes PR 13256
2012-11-15 07:03:24 -07:00
Robby Findler
8a45494872 make drracket's test util use a relative path for things
inside the same collection so this file can (when other
things aren't too different) be used in a version of racket
that doesn't generally have the tests
2012-11-15 07:49:04 -06:00
Robby Findler
bfa6f374ff test that you can use flat-named-contract with a contract
that already has a name (and get the new name)

closes PR 8050 -- this PR was fixed at some point in
the past; this commit just adds a test case
2012-11-15 07:49:03 -06:00
Matthew Flatt
719ada1baa fix benchmark on empty input 2012-11-15 06:18:05 -07:00
Matthew Flatt
bdf1c3e165 bytecode compiler: generalize local-type tracking for unboxing
Track fixnum results in the same way as flonum results to enable
unboxing, if that turns out to be useful. The intent of the change,
though, is to support other types in the future, such as "extnums".

The output `raco decompile' no longer includes `#%in', `#%flonum',
etc., annotations, which are mostly obvious and difficult to
keep in sync with the implementation. A local-binding name now
reflects a known type, however.

The change includes a bug repair for he bytecode compiler that
is independent of the generalization (i.e., the new test case
triggered the old problem using flonums).
2012-11-14 19:37:01 -07:00
Matthew Flatt
447db085dc benchmark improvement
Hash to a box, because finding and updating a box is faster than
updating a hash-table entry.
2012-11-14 19:17:42 -07:00
Matthew Flatt
91a5347d5b JIT: push alternate target-register handling into inlined code
This change streamlines generated code slightly.

New release checklist item: double-check by building with
TEST_ALTERNATE_TARGET_REGISTER.
2012-11-14 19:17:42 -07:00
Ryan Culpepper
ab88a2a9bd add table-based db tests
Allows testing for mysql char type (see previous commit comment)
2012-11-14 20:40:52 -05:00
Ryan Culpepper
4cdcfd6a3b improve db tests 2012-11-14 18:30:03 -05:00
Jay McCarthy
f5995ec0cc Removing default from 'raco pkg create' 2012-11-12 12:03:40 -07:00
Jay McCarthy
a2b1d4186b Requiring -a on 'raco pkg update' to update all packages 2012-11-12 12:03:40 -07:00
Robby Findler
9ad93eaa2d update drracket tests to the new name of
the top radio button in the language dialog
 # Please enter the commit message for your changes. Lines starting
2012-11-11 20:13:25 -06:00
Matthew Flatt
6b16679b39 fix `lazy-require' in phase levels other than 0
The `lazy-require' form expands to `define-runtime-module-path-index',
whch doesn't work right at phase levels other than 0. Work around the
problem by generating a submodule to hold the
`define-runtime-module-path-index' form.

This repair fixes `raco exe' on certain uses of `match', which in turn
uses `lazy-require' at compile time.

Also, use `register-external-module' to generate appropriate
dependencies on lazily loaded modules.
2012-11-11 09:38:16 -07:00
Matthew Flatt
a6cfe3d5fb fix `resolve-module-path-index' when w.r.t. is submodule
A submodule path on the w.r.t. path was incorrectly (in most
cases) added to the resolved path.
2012-11-11 09:38:15 -07:00
Matthew Flatt
9c4cfdecc4 fix problem with require' inside begin-for-syntax'
The dependency wasn't recorded under the right phase.
2012-11-11 09:38:15 -07:00
Matthew Flatt
4ca7e6bc77 ffi/unsafe: fixes related to `define-cstruct' and properties
Fix the binding context for property and property-value
expressions. Propagate wrappers (and therefore properties)
to cstruct subtypes.
2012-11-11 09:38:15 -07:00
Matthew Flatt
b223ad2d90 x86_64 JIT: use 32-bit jumps until forced to allocate far away
The JIT was pessimistically using 64-bit jumps for long branches
or any jump between code that is allocated at different times.
Normally, though, code allocation stays within the same 32-bit
range of the heap, so stick to 32-bit jumps until forced by
allocation addresses to use 64-bit jump targets.
2012-11-11 09:38:15 -07:00
Asumu Takikawa
90f6f1b300 Adjust benchmark test driver for TR 2012-11-10 19:28:56 -05:00
Asumu Takikawa
7c5db431a0 Add typed version of collatz benchmark 2012-11-10 19:28:56 -05:00
Asumu Takikawa
b4a98af319 Fix whitespace in test 2012-11-10 12:03:47 -05:00
Asumu Takikawa
d22532db16 Fix Custodian type 2012-11-10 11:12:06 -05:00
Claire Alvis
2f426943f0 Implementation of #:defaults keyword for define-generics 2012-11-09 20:14:56 -05:00
Asumu Takikawa
daca1c0d5b Fix a free variance bug
Commit ffe45ecce had introduced a regression with some
polymorphic functions imported between typed modules due to
miscommunicated variance information.
2012-11-09 01:43:57 -05:00
Jay McCarthy
fae660b0e4 Release Planet 2 (beta)
This was developed in a different repository, so the history will be
archived there:

https://github.com/jeapostrophe/galaxy
2012-11-08 06:16:42 -07:00
Matthew Flatt
7b04571fac racket/gui: add `get-current-mouse-state' 2012-11-07 14:37:39 -07:00
Danny Yoo
5c6498b355 Fix for PR 13234. xexpr-core: added more test cases to
correct-xexpr?.  Inverted the logic and replaced the
continuation-passing style with simpler test-for-error logic.  Also
corrected typo in attribute symbol checker that could otherwise lead
to a contract error.  (taking the cadr of a non-cadrable value)
2012-11-07 11:46:32 -07:00
Eli Barzilay
672910f27b Lots of bad TAB eliminations.
I started from tabs that are not on the beginning of lines, and in
several places I did further cleanings.

If you're worried about knowing who wrote some code, for example, if you
get to this commit in "git blame", then note that you can use the "-w"
flag in many git commands to ignore whitespaces.  For example, to see
per-line authors, use "git blame -w <file>".  Another example: to see
the (*much* smaller) non-whitespace changes in this (or any other)
commit, use "git log -p -w -1 <sha1>".
2012-11-07 11:22:20 -05:00
Matthew Flatt
891932074c adjust run length of short R5RS benchmarks 2012-11-07 07:46:26 -07:00
Matthew Flatt
ab5bbb5b37 flatten simple `define-values' within a module
This flattening is useful for the definition of `assq', for example.
2012-11-07 07:46:25 -07:00
Matthew Flatt
8033900674 add ad hoc optimization of car' to unsafe-car', etc.
In `(if (pair? x) E1 E2)', convert `(car x)' in E1 to
`(unsafe-car x)', and similarly for `(cdr x)'. Also,
`(begin (car x) (cdr x))' converts to `(begin (car x)
(unsafe-cdr x))' since `(car x)' implies a `pair?' test
on `x'.
2012-11-07 07:46:25 -07:00
Jay McCarthy
b778e4e03c enabling shared in plai with some shameless copying of kernel code 2012-11-06 19:53:03 -07:00
Eli Barzilay
14d8c8b5a5 Newlines at EOFs. 2012-11-06 14:07:15 -05:00
Stevie Strickland
7acfc80d79 Fix bogus method name in interface contract errors.
Closes PR 13238
2012-11-05 18:54:57 -05:00
Matthew Flatt
25f142299b fix propagation of "multiple result" flag when optimizing `begin0' 2012-11-05 16:15:48 -07:00
Asumu Takikawa
68dd17bf08 Make control contracts play nice with has-contract? 2012-11-05 18:08:10 -05:00
Matthew Flatt
bd0e6ae941 fix problems with chaperones, printing, and cycles 2012-11-05 10:48:46 -07:00
Matthew Flatt
f21280e24d fix problems with non-parallel places
The implementation of message passing in thread-simulated
places had not kept up with the parallel implementation.
2012-11-05 10:48:45 -07:00
Matthew Flatt
885382e12e benchmark tweaks and addition 2012-11-05 10:48:45 -07:00
Matthew Flatt
1126f02ddd change JIT inlining of `/' to be fast on a fixnum result 2012-11-04 17:20:11 -07:00
Robby Findler
f3a060ccc1 insert examples directly into drracket instead of simulating
typing them in, in the module language test suite

this speeds it up; going from 140 to 105 seconds on my (mac)
machine. (drdr was taking 240 or so seconds, tho)
2012-11-04 14:39:54 -06:00
Matthew Flatt
0c82f54912 racket/gui: add delete' to choice%' and `list-control<%>'
Closes PR 13230
2012-11-04 08:25:43 -07:00
Matthew Flatt
4c61dfc217 fix test to not depend on network connection 2012-11-04 06:09:21 -07:00
Robby Findler
4669b6bfed adjust tests for the new language dialog
(the names of the textbooks are no longer explicit
in the hierarchy of the languages so just specify
"Beginning Student", for example)
2012-11-03 15:49:33 -05:00
Robby Findler
5768009e3b Revise the language dialog to emphasize the teaching
languages and the 'in the source' language at the expense
of all other dialog-based languages
2012-11-03 13:54:48 -05:00
Robby Findler
e1760fa7c0 add find-labelled-windows 2012-11-03 13:54:48 -05:00
Matthew Flatt
f232e56623 tweak optimization tests
Use `racket/base' to speed up the test suite
2012-11-02 10:54:23 -06:00
Matthew Flatt
56a4691664 tweak test to hit a less bad overflow point 2012-11-02 10:34:17 -06:00
Asumu Takikawa
948e898406 Fix continuation mark chaperones
Failed to redirect correctly on `continuation-mark-set-first`
when the mark set argument was #f.
2012-11-02 11:26:40 -04:00
Robby Findler
95841b9303 lift the restriction that the port passed to open-input-text-editor
cannot change its revision number during reading

This restriction was enforced only for editors that have non
string-snip% snips. The restriction was in place because the
implementation strategy was to chain thru the snips in the editor
using (send snip next) and that isn't safe if the revision number
changes.

The lifting of the restriction is implemented by tracking the position
in the editor where the last snip ended and, if the revision number
changes, starting over trying to get a snip from that position. This
has the effect that, if the revision number never changes, the code
should behave the same as it was doing before (so hopefully any new
bugs I've introduced in this commit will only show up if the old
implementation would have raised an error)

Also, exploit the lifting of this restriction in the colorer so it
doesn't to restart the port during to coloring that happens along with
the parsing
2012-11-02 10:24:34 -05:00
Sam Tobin-Hochstadt
c1cace28ec This test always errors -- belongs in fail. 2012-11-01 21:14:50 -04:00
John Clements
1f02a0a8b8 exposed mapping for unreserved characters 2012-11-01 12:38:09 -07:00
Jon Rafkind
dc1b34479c [honu] move honu-syntax to syntax.rkt. allow each pattern to specify a syntax result 2012-11-01 11:22:55 -06:00
Jay McCarthy
6d101c9472 add a test for the patch 2012-11-01 11:13:02 -06:00
Matthew Flatt
0e4305fc45 fix problem with places and `struct-type-info'
Merge to v5.3.1
2012-11-01 07:19:53 -06:00
Sam Tobin-Hochstadt
0e71f2d5dc Fix accidental use of the wrong letrec-bound variable. 2012-10-31 21:18:44 -04:00
Matthew Flatt
8f73ebbc36 fix error-message code
Closes PR 13222
2012-10-31 12:17:49 -06:00
Matthew Flatt
08c659c5d5 fix a bug in `free-identifier=?'
The bug is related to macro-introduced `require' and rename on
export.
2012-10-31 08:03:47 -06:00
Matthew Flatt
195cbe832c fix problem with compiler's cross-module shape tracking 2012-10-30 17:47:15 -06:00
Matthew Flatt
8fab527ce3 fix problems with `would-be-future' 2012-10-30 17:28:37 -06:00
Matthew Flatt
d7bf677645 track import "shapes" as procedure or structure type
Shape information allows the linker to check the importing
module's compile-time expectation against the run-time
value of its imports. The JIT, in turn, can rely on that
checking to better inline structure-type predicates, etc.,
and to more directy call JIT-generated code across
module boundaries.

In addition to checking the "shape" of an import, the import's
JITted vs. non-JITted state must be consistent. To prevent shifts
in JIT state, the `eval-jit-enabled' parameter is now restricted
in its effect to top-level bindings.
2012-10-30 13:29:28 -06:00
Matthew Flatt
7cca723382 fix SRFI 1 testing of `unfold-right' 2012-10-29 07:56:57 -06:00
Stephen Chang
19f88c0f80 add heap sequencing fns to data/heap 2012-10-27 21:09:29 -04:00
Robby Findler
117fde6857 adjust the online check syntax frame/tab leak test case
so that it waits until online check syntax actually
finishes (otherwise, there actually is a leak;
the link is broken when the message comes back from the
other place)
2012-10-27 16:45:44 -05:00
Asumu Takikawa
0d30c43a68 Add call/cc contracts to prompt-tag/c 2012-10-27 11:06:17 -04:00
Robby Findler
24592a0800 adjust drracket gui test suite infrastructure so that
it waits for pending events to finish when looking for
new frames
2012-10-27 10:23:01 -05:00
Matthew Flatt
5f30cc87ea track information about `struct' bindings during compilation
This tracking allows the compiler to treat structure sub-type
declarations as generating constant results, and it also allows
the compiler to recognize an applications of a constructor or
predicate as functional.
2012-10-27 07:58:56 -06:00
Matthew Flatt
736e6efc2d recognize `struct' bindings as constant
The JIT takes advantage of known-constant bindings to avoid the
check that a variable is still bound to a structure predicate,
selector, or mutator; that makes the code short enough to really
inline. The inlined version takes about half the time of the
indirect version.

The compiler does not yet track bindings precisely enough to
recognize constants for sub-type declarations.
2012-10-27 06:53:21 -06:00
Jay McCarthy
f16e76ca32 second attempt at removing reliance on tcp. available has been greatly simplified because it relied on the behavior the thread.rktl test is actually testing 2012-10-26 15:26:39 -06:00
Sam Tobin-Hochstadt
c6dc1e6ece Improve contract generation in Typed Racket.
This fixes several issues:
 - `Parameter` generates impersonator contracts correctly
 - `Any` handling now copies immutable data when possible
 - `Any` now recognizes more atomic base types

Merge to 5.3.1.
2012-10-25 23:31:02 -07:00
Stevie Strickland
717cf332b6 Don't copy chaperoned immutable vectors. 2012-10-24 19:11:03 -07:00
Matthew Flatt
f43172128b fix syntax checking for `case'
Merge to v5.3.1
2012-10-24 13:18:53 -07:00
Matthew Flatt
1bf5fda869 fix `chaperone-prompt-tag' 2012-10-24 13:18:53 -07:00
Jay McCarthy
7b149b7f5a Revert "Change thread test to use fake tcp with same structure"
This reverts commit d39780a130.

Matthew says this test is really about TCP, so it should not be
changed. Although perhaps we can use a more basic TCP test to check if
this should be done.
2012-10-24 13:25:49 -06:00
Jay McCarthy
d39780a130 Change thread test to use fake tcp with same structure 2012-10-23 11:28:27 -06:00
Jay McCarthy
552fe0f755 Test localhost tcp before running echo server test 2012-10-23 11:28:27 -06:00
John Clements
f60d57a27f updated manual tests 2012-10-22 14:57:38 -07:00
Ryan Culpepper
8226899df3 db: fix finalization bug 2012-10-22 13:27:59 -04:00
Matthew Flatt
9708a01a0a ffi/unsafe: defend against some finalization bugs
Turn use of a finalized ffi callout into a reported error,
instead of a crash. Clarify the existence of the finalizer
in the docs. Fix error logging of the finalizer thread.

Merge to v5.3.1
2012-10-21 08:11:45 -06:00
Ryan Culpepper
6283ce733d add test for unsolved db crash 2012-10-20 18:28:20 -04:00
James Swaine
196dc3de11 FV: fix layout bug with timelines containing GC's, add GC
node to summary hierlist
2012-10-20 01:36:20 -05:00
James Swaine
797979f0ae FV: blocks/syncs on worker threads now show primitive name, etc.,
and connecting lines use different colors to show
connections between blocks on worker threads and corresponding ones
on runtime thread
2012-10-20 01:36:20 -05:00
Jay McCarthy
09dd60789a changing tests for environments where listen fails 2012-10-19 15:24:20 -06:00
James Swaine
9a0f19da59 Fix futures-disabled build errors introduced by changes to even? and odd? 2012-10-19 13:49:05 -05:00
Matthew Flatt
e59066debe bytecode validator: check "constant" annotations on variable references
Bytecode changes in two small ways to help the validator:
 * a cross-module variable reference preserves the compiler's
   annotation on whether the reference is constant, fixed, or other
 * lifted procedures now appear in the module body just before the
   definitions that use them, instead of at the beginning of the
   module body
2012-10-19 11:27:52 -06:00
Eli Barzilay
cbfb1fdb37 A whole bunch of missing newlines at EOFs (and a few other spaceages). 2012-10-19 06:47:24 -04:00
James Swaine
05e0836b88 Make odd? and even? future-safe 2012-10-18 21:22:11 -05:00
James Swaine
7c8f0ce093 FV: fix drawing code to handle truncated logs, tests 2012-10-18 14:00:04 -05:00
James Swaine
b94caa2d77 FV: refactoring, various layout/display fixes 2012-10-18 13:31:42 -05:00
Matthew Flatt
274d004546 racket/draw: fix problems with monochrome PNGs
Merge to v5.3.1
2012-10-18 10:01:20 -06:00
Robby Findler
975426f00c fix group-test
merge to release branch, please
2012-10-17 20:19:15 -05:00
Matthias Felleisen
f733f149f5 fix string-ith's error message; Closes PR 13197 2012-10-17 20:27:12 -04:00
Matthew Flatt
e1a6d2b07d fix raco exe' for module+' submodules
Closes PR 13116

Merge to v5.3.1
2012-10-17 16:28:41 -06:00
Matthew Flatt
bd146e2d8d fix planet `raco exe' tests
Merge ot v5.3.1
2012-10-17 16:28:41 -06:00
Matthew Flatt
04e8689a9b add another argument to `{chaperone,impersonate}-prompt-tag'
The new argument gets to chaperone/impersonate a guard at
the prompt, and it is applied when the continuation is applied ---
based on a wrapper on th prompt tag of the continuation (as opposed to
the prompt tag of the prompt).
2012-10-17 10:24:09 -06:00
Matthew Flatt
843c722146 add an argument to `{chaperone,impersonate}-prompt-tag'
The new argument gets to filter results that come from a
non-composable continuation that replaces one delimited
by a prompt using the chaperoned/impersonated prompt tag.
2012-10-16 15:11:50 -04:00
Matthew Flatt
755cd47cc5 make chaperone-of?' accept prop:equal+hash'
There appears to be no reason to block equality based on
`prop:equal+hash' when using `chaperone-of?'.
2012-10-16 12:17:42 -04:00
Matthew Flatt
79ada3b16e fix JIT bug in struct pred/get/set corner case
When thie JIT guesses that an identifier is bound to a
structure predicate, getter, setter, etc., but that guess
turns out to be wrong, and the call is in a tail position,
then preserve tail-call behavior.

(Changes include some setup to inline structure constructors.)
2012-10-15 06:05:33 -04:00
Vincent St-Amour
326e3ba33f Add test. 2012-10-14 16:55:36 -04:00
Neil Toronto
6f52be186b Added working for/vector:, for*/vector:, for/flvector:, for*/flvector:
Closes PR13185.
2012-10-14 16:28:41 -04:00
Eric Dobson
788b046549 Make expt type more correct.
Closes PR13170.
2012-10-14 15:44:54 -04:00
Vincent St-Amour
844e898a54 Generate ->* contracts for functions with both optional and keyword arguments. 2012-10-14 15:44:54 -04:00
Vincent St-Amour
149d8535eb More float conversion optimizations. 2012-10-14 15:35:50 -04:00
Asumu Takikawa
df594d3b3b Move define/match to racket/match 2012-10-14 14:39:36 -04:00
Matthias Felleisen
1ccedf5eb2 added checksum calculation 2012-10-14 14:32:54 -04:00
Matthew Flatt
33db9589a4 make `list-ref' future-safe even for large fixnum indices 2012-10-14 11:10:23 -04:00
Jay McCarthy
b6fc190c7a Adding support for byte counting rather than char counting in XML 2012-10-12 17:15:13 -06:00
Vincent St-Amour
758e4ff112 Only recommend dropping exactness in truly inexact contexts.
Please merge to release.
2012-10-12 14:42:16 -04:00
Jon Rafkind
59ec52dd8b [honu] remove debugging lines 2012-10-11 21:50:39 -06:00
Ryan Culpepper
678fc4d6f8 make macro stepper recover from jumps within expansion 2012-10-11 17:44:51 -04:00
Ryan Culpepper
07da9c0c3c fixed template tests 2012-10-11 17:37:57 -04:00
Jon Rafkind
8b627ed8fd [honu] xml example doesnt need its own < and > literals 2012-10-10 23:02:35 -06:00
Jon Rafkind
a3e2c2fae6 [honu] add xml example 2012-10-10 23:02:35 -06:00
Matthew Flatt
fcfff27c31 ffi/com: implement vardesc-based dispatch
The `title' property of IE9 triggers the new code, which wasn't
implemented before because I didn't have an example.
2012-10-05 12:26:14 -06:00
Sam Tobin-Hochstadt
962f2472e1 Revamp handling of Any as a contract.
The contract now has two major differences:
 - It raises an error when it would have to wrap.
 - It uses chaperones to delay errors as long as possible

In general, using `Any` as a type when exporting to untyped
code will now just work, unless the untyped code tries to
communicate values back to the typed side, in which case an
immediate error will be raised.

Much of the implementation comes from the membrane design
from [Strickland et al, OOPSLA 2012].
2012-10-05 12:39:11 -04:00
Jon Rafkind
8210acc696 [honu] add postfix keyword for unary definitions 2012-10-04 23:53:03 -06:00
Jon Rafkind
afdd5c4393 [honu] support postfix unary operators 2012-10-04 23:53:03 -06:00
Jon Rafkind
6c20513587 [honu] add binary_operator and unary_operator forms for plain expression-based operators 2012-10-04 23:53:02 -06:00
Matthew Flatt
b4b723df4e fix `in-directory'
Closes PR 13163
2012-10-04 06:40:36 -06:00
Sam Tobin-Hochstadt
86522a1804 This pattern of typed submodules exposes Racket bugs. 2012-10-03 12:24:16 -04:00
Matthew Flatt
64bac4e573 racket/draw: fix return value of load-file' from bitmap%' 2012-10-01 18:14:19 -06:00
Robby Findler
a4b79ccf66 adjust Check Syntax so that it tries to point to the
raw-module-path inside of a phaseless-spec (see
the #%require docs for the description of these).
Also, Rackety

in conjunction with commit 9047427 (and an earlier
commit in those files/dirs), this commit:
 closes PR 7815
 closes PR 10455
 closes PR 10788
2012-10-01 10:47:23 -05:00
Matthew Flatt
6a5f73d3d9 scriblib/autobib: more graceful failure when bib not rendered 2012-10-01 07:14:46 -06:00
Matthew Flatt
9047427e07 further improvements to source locations for `require' forms 2012-10-01 07:14:46 -06:00
Robby Findler
ce8d8eb763 fix the way check syntax traverses #%require expressions that it sees
(the way things currently stand, check syntax needs more information
 from the fully expanded form, but at least now it has a better chance
 to actually use that information, if it were there ...)

related to PR 7815
related to PR 10455
related to PR 10788
2012-09-29 22:09:02 -05:00
Matthew Flatt
14e276094a improve source correlation on `require' expansion 2012-09-29 08:59:10 -06:00
Sam Tobin-Hochstadt
cab90c16d5 Test for appropriate predicates for invariant structs. 2012-09-27 17:26:32 -04:00
Sam Tobin-Hochstadt
d066a5c1d2 Fix error message pattern for use of cons/c. 2012-09-27 16:39:16 -04:00
Eric Dobson
ffe45ecce4 Working covariant applications. 2012-09-27 16:22:22 -04:00
Eric Dobson
12233600c1 Fix -struct to use the right number of arguments to make-Struct. 2012-09-27 16:22:21 -04:00
Eric Dobson
745403a88e Make struct type contracts better 2012-09-27 16:22:21 -04:00
Eric Dobson
9e1cf579a4 Fix type->contract on structures. Now uses struct/c. 2012-09-27 16:22:21 -04:00
Ryan Culpepper
008d1f7f1b syntax/parse/experimental/template: quasitemplate, template/loc 2012-09-24 13:31:03 -04:00
Matthew Flatt
3fb12b4ff4 raco exe: handle failing submodule search correctly
An attempt to detect a submodule could trigger the original module
name resolver when the would-be enclosing module would be handled
by the embedding-specific resolver. When a submodule is not found
but its would-be enclosing module is embedded, then assume that
the default resolver wouldn't find the submodule, eithe --- and
therefore avoid a potential "collection not found" error.
2012-09-23 10:47:24 -05:00
Matthew Flatt
cb041850f4 scribble: decode a lone ` as a left "curly quote"
Also, add 'lsquo as allowed content.

Omitting the ` conversion in the first place was over-conservative.
There's a backward-compatibility issue with this addition (i.e., a
document might contain a backquote in a decoded context that is
meant to be rendered as a backquote), but the potential problems
seem minor.
2012-09-21 07:37:30 -06:00
Robby Findler
3f4b117c1a remove redunant arguments (they were the same as the default args, in 70-something places) 2012-09-20 18:46:40 -05:00
Robby Findler
a6d74c8e3b avoid the default handler for call-with-continuation-prompt in
favor of one that behaves much like it, but never escapes

closes PR 13121
2012-09-20 18:46:40 -05:00
Ryan Culpepper
ddcafbc6d1 syntax/parse/experimental/template: fix ellipses/depth rules again 2012-09-20 12:19:51 -04:00
Robby Findler
e6a25f65ca fix first-order test for struct/dc contracts
closes PR 13090
2012-09-19 15:41:56 -05:00
Robby Findler
21e0d9e031 make check syntax traverse (module* ...) expressions
closes PR 13095
2012-09-19 06:48:09 -05:00
Robby Findler
51d41c6cfe adjust check syntax so that it doesn't take over the right-click
menu, but instead cooperates with the existing protocol
(using keymap:add-to-right-button-menu)
2012-09-19 05:19:03 -05:00
Matthew Flatt
e81cd0d8d7 add `slideshow/code-pict' and code transformers
The `slideshow/code-pict' library is the same as `slideshow/code', but
it works in non-GUI settings. Only the `slideshow/code' library connects
the code font size to `current-font-size', though.

The `code' macro, `define-code', etc., now support "code transformers",
which are syntax bindings that trigger otherwise-unescaped transformations
in the code to typeset (which can make the code easier to read and
friendlier to auto-indentation).
2012-09-18 10:03:26 -06:00
Ryan Culpepper
35a0e50de4 syntax/parse/experimental/template: fixed bugs, added error tests 2012-09-17 18:11:44 -04:00
Ryan Culpepper
97954f7c37 fixed macro-stepper tests 2012-09-17 12:43:36 -04:00
Ryan Culpepper
9d34f0f147 db: added support for postgresql 9.2 types (json, ranges)
Other major changes:
 - pg code now uses only binary format
 - pg timestamptz now always UTC (tz = 0), added doc section
 - added contracts to most pg "can't-convert" errors
2012-09-17 12:29:17 -04:00
Ryan Culpepper
d70e80e837 racket/format: change ~r to accept #:notation argument
Another possibility would be
  #:exponential? (or/c boolean? (-> rational? boolean?))
but that violates the "everything's a boolean" convention.
2012-09-16 17:12:02 -04:00
Matthew Flatt
fc52248446 add #:break' and #:final' to `for' forms
Support for break clauses complicates expansion to `for/fold/derived';
a new `syntax/for-body' library provides a helper for macros that need
to split a `for'-style body into a prefix part and wrappable part.
2012-09-14 14:57:35 -06:00
Matthew Flatt
adb5c01ac4 racket/generator: add optional #:arity' clause to in-generator'
Allows the use of `in-generator' to produce multiple values in a
position other than immediately within `for' (where the arity
can be inferred).

Closes PR 11662
2012-09-14 13:02:55 -06:00
Matthew Flatt
ac5965a1dc racket/set: add set-first' and set-rest' 2012-09-12 17:57:03 -06:00
Matthew Flatt
906ddb7fbf Windows: avoid Unix-specific test 2012-09-12 11:19:51 -06:00
Matthew Flatt
f1671f2044 fix default logging levels for stderr and syslog 2012-09-11 13:18:18 -06:00
Matthew Flatt
4f351dd6b1 add `current-compiled-file-roots', PLTCOMPILEDROOTS, and -R/--compiled
The new parameter (and supporting environment variables and
command-line flags) can bytecode lookup to a tree other than
where a source file resides, so that sources and generated
compiled files can be kept separate. It also supports storing
bytecode files in a version-specific location (either with
the source or elsewhere).
2012-09-11 13:18:18 -06:00
Asumu Takikawa
3daec14cbb racket/generic: better error message in empty case
Closes PR 13048
2012-09-11 14:43:19 -04:00
Vincent St-Amour
5a24b57a95 Fix unstable/logging to work with the new logging system. 2012-09-11 13:48:14 -04:00
Matthew Flatt
d92b9cb404 add `define-logger' and filtering based on logger name
The `make-log-receiver' function now includes a logger-name
filter. This filter is implemented as a low enough level that
it affects `log-level?' tests to check whether a log message
needs to be constructed at all.

The -W and -L flags and PLTSTDERR and PLTSYSLOG environment variables
support filters of the form "<level> <level>@<name> ...", where
<level>@<name> specializes filtering of events for a logger whose
name matches <name> to show <level> and higher.
2012-09-07 08:16:38 -06:00
Matthew Flatt
b53e458e3f add `racket/format'
The new library is Ryan's `unstable/cat', but the names have been
changed. (The task of removing `unstable/cat' remains.)
2012-09-07 08:16:37 -06:00
Matthew Flatt
2f7d4b5eaf change a thread's initial prompt to use the default handler
The thread's initial prompt previously ignored its arguments.
2012-09-05 12:21:43 -06:00
Matthew Flatt
ba56fd72da racket/class: add dynamic-get-field' and dynamic-set-field!' 2012-09-04 15:28:18 -06:00
Matthew Flatt
8bd5dbf7cc ffi/unsafe: change `cast' to avoid pitfalls for you
The old `cast' didn't work right for a mismatch between
a pointer GCableness and the source or target types, and
it didn't work right for an GCable pointer with a non-zero
offset. While those pitfalls were documented, the first
of them definitely has been a source of bugs in code that
I wrote.

Also added `cpointer-gcable?'
2012-09-04 15:28:18 -06:00
Jay McCarthy
b68fb6f228 Obey contract in internal test 2012-09-01 12:48:14 -06:00
Robby Findler
4571afa6ab speed up the test-engine drracket tests some 2012-08-31 20:52:48 -05:00
Robby Findler
6ca79d56fa fix check-error so it compares the rewritten error messages,
not the raw error messages
2012-08-31 20:52:48 -05:00
Matthew Flatt
9cfcf8911c fix `in-directory' to properly propagate filesystem errors 2012-08-31 16:07:10 -06:00
Sam Tobin-Hochstadt
eed93825ab Track mutable variables across modules. 2012-08-31 17:45:11 -04:00
Sam Tobin-Hochstadt
ab5403d1ed Simplifying case-> to union is only safe for 1-argument functions.
Closes PR 13002.
2012-08-31 10:27:51 -04:00
Ryan Culpepper
70a2ced71a syntax/id-table: simplify use of chaperones 2012-08-29 20:44:04 -04:00
Ryan Culpepper
3ccc93590a syntax/id-table: more work on *-id-table/c 2012-08-29 20:43:24 -04:00
Eric Dobson
e7c7e14485 Added tests to idtbl/c and fixed revealed bugs. 2012-08-29 20:25:32 -04:00
Matthew Flatt
b61f3f751c port position-tracking clean-ups
Add `file-position*', which can return #f instead of raising
an exception when a port's position is unknown. Change
`make-input-port' and `make-output-port' to accept more
kinds of values as the initial position.

These changes make it possible to synchronize a port's
position with a `port-commit-peeked' action. It's ugly,
which I think reflect something broken about position
tracking in the port protocol (which seems difficult to fix
without breaking compaibility).
2012-08-28 16:04:41 -06:00
Asumu Takikawa
466b4e2c60 racket/generic: eliminate ctc dependency in private interface
Closes PR 13051
2012-08-28 17:54:35 -04:00
Matthew Flatt
763882f651 add port shortcut for `make-{input,output}-port'
Providing a port instead of a reading or writing procedure
redirects the read/write to the specified port. This shortcut
is kind of a hack, but the run-time system can easily streamline
the redirection when it's exposed this way.

Using the new redirection feature reduces overhead in
`with-output-to-bytes' and `pretty-print'.
2012-08-28 08:54:26 -06:00
Matthew Flatt
cb95a99d68 change `transplant-{input,output}-port' to propagate buffering
Affects derived functions, such as `dup-output-port' and
`relocate-output-port', and uses in `pretty-print'.
2012-08-27 19:44:06 -06:00
Matthew Flatt
704cb4bd01 make-output-port': fix enable-break?' argument to callbacks 2012-08-27 19:44:06 -06:00
John Clements
614ff235fc remove dependencies on mz-testing.rkt 2012-08-27 13:35:38 -07:00
Ryan Culpepper
7da5063782 db: added variations of concurrency test 2012-08-25 19:02:18 -04:00
Ryan Culpepper
7c395e9c7c db: updated to new error convention (mostly) 2012-08-25 19:02:18 -04:00
Ryan Culpepper
325293ceea added tests for racket/syntax 2012-08-24 18:14:40 -04:00
Matthew Flatt
bd8e1e8b1f fix JIT bug related to bad struct-field mutators
We can't disallow the creation of bad mutators without breaking
old code, but we can prevent the JIT from treating them like
good ones.

Closes PR 13062
2012-08-24 15:48:58 -06:00
Robby Findler
0fa2e6d7d5 adjust planet tests to use 'raco planet' command-line tool, not 'planet' 2012-08-24 07:41:05 -05:00
Robby Findler
1ad2c75531 add the ability to specify #:parent to struct/dc (and fix struct/c to use it)
closes PR 13049
2012-08-23 18:59:11 -05:00
Matthew Flatt
edd2035f88 racket/draw: fix set-clipping-rect' in record-dc%' 2012-08-23 09:42:34 -06:00
Asumu Takikawa
07119c371d Fix stream bug introduced by generics
Stream generic operations stopped working for lists
since the operations used only the generic dispatcher
instead of the real generic functions.

(Moral of this story: write more tests)
2012-08-22 18:15:25 -04:00
Sam Tobin-Hochstadt
b7f9c77069 Remove #:transparent to work around place message limitations. 2012-08-22 16:50:50 -04:00
Sam Tobin-Hochstadt
e207f5c67d Add -v option to TR tests.
Also, print errors from serialization and place message sending.
2012-08-22 16:50:50 -04:00
Eric Dobson
e9f209977b Fix typechecking of polymorphic structs with parent types.
Closes PR12998.
2012-08-22 16:50:49 -04:00
John Clements
a5ddd73000 removed vestigial mz-testing file 2012-08-22 10:14:13 -07:00
Sam Tobin-Hochstadt
26a57f6420 Use module registry trick to slightly speed up TR tests. 2012-08-22 11:13:07 -04:00
Sam Tobin-Hochstadt
e705d4d450 Parallelize running Typed Racket optimizer tests.
No speedup yet, though.
2012-08-21 17:47:30 -04:00
Asumu Takikawa
9a65f9aaf0 Delete trailing whitespace 2012-08-21 16:20:26 -04:00
Asumu Takikawa
965a74453f Add #:forall, #:∀ to contract-out 2012-08-21 16:20:26 -04:00
Asumu Takikawa
a5d1007696 racket/generic: allow impersonator contracts
This enables the use of polymorphic contracts with generic
interfaces and their instances.
2012-08-21 12:43:48 -04:00
Matthew Flatt
5e5e503859 scribble/manual: add #:normalize?' option to deftech' et al. 2012-08-20 17:37:24 -06:00
Jon Rafkind
5bf68d32d5 [honu] remove context argument 2012-08-20 16:25:38 -06:00
Sam Tobin-Hochstadt
1c275ffcc7 Don't use places for running single tests. 2012-08-20 14:45:50 -04:00
Jon Rafkind
dc3d06c7ae [honu] change -> to = 2012-08-20 12:28:15 -06:00
Jon Rafkind
62042beb50 [honu] wrap syntax with (semicolon ...) when a ; is present 2012-08-20 12:28:15 -06:00
Eric Dobson
533920480e Add tests for make-predicate and cast, also add support for the top-level.
Closes PR 12939.
Closes PR 12201.
2012-08-20 12:39:41 -04:00
Sam Tobin-Hochstadt
9e5060ef5b Make Typed Racket integration tests run in parallel.
Parallel speedup of approximately 4x when using 8 workers on a 12-core machine.

Closes PR 12911.
2012-08-20 12:25:50 -04:00
Eric Dobson
09d32d35e0 Add promise support to type->contract.
Closes PR13024.
2012-08-20 10:10:17 -04:00
Robby Findler
40121d2531 improve the menu redundancy test so it reports when there are
multiple menu items with the same shortcut
2012-08-19 17:09:16 -05:00
Robby Findler
52f18ee370 adjust the expansion of class so that it tracks identifiers
that it drops from the expansion (like define/public) by
adding them to the origin syntax property (and sometimes
to disappeared-use; see the add-decl-props function
for details on those that aren't in the origin property)

this means that check syntax will now pick them up
so they'll show up in the blue boxes in drracket

Thanks Matthew, for some helpful advice and
comments on an initial version of the commit.
2012-08-17 17:24:03 -05:00
Asumu Takikawa
5a2c235739 Forge non-existent generic functions like write-proc
Closes PR 13014
2012-08-17 12:27:01 -04:00
Matthew Flatt
3150b31eb7 bytecode optimizer improvement
Generalize splitting of `(let-values ([(x ...) (values e ...)]) ....)'
to `(let ([x e] ...) ....)' for any `e', since it's always equivalent.
Right?

(The old requirements on the `e's seem to be needed only for
`letrec-values' splitting and maybe mutable variables.)
2012-08-16 16:39:21 -06:00
Matthew Flatt
0452bd791d bytecode optimizer improvement
Treat unsafe functional operations (which never raise an
exception) as omitable, which means that simple `let-values'
combinations can be split into `let' bindings, etc.
2012-08-16 13:11:41 -06:00
Matthew Flatt
65588b156b fix `sqrt' on numbers with negative real and inexact-zero imag
Closes PR 13028
2012-08-16 04:46:01 -06:00
Matthew Flatt
b95b1b9366 Revert "Fixing Rackunit tests after alignment"
This reverts commit 4497c8ce5e,
because the tests were correctly reporting a bug that I
introduced.
2012-08-15 09:34:17 -06:00
Matthew Flatt
6e2bb58cce add a #:fill' clause to for/vector' et al. 2012-08-15 09:32:55 -06:00
Matthew Flatt
7b811bed1b for/vector' and for*/vector' repairs
Closes PR 13029, 13030
2012-08-15 07:41:50 -06:00
Jay McCarthy
4497c8ce5e Fixing Rackunit tests after alignment 2012-08-14 22:21:44 -06:00
Jay McCarthy
3ddaf5e32b Fixing Racklog cut error found by Erik Dominikus
Basically, Racklog (and all versions of schelog) implement ! by
causing the failure continuation of the entire relation being
returned. They did not also cause the unification caused by the
relation to be un-done.

However, it is not easy to separate un-doing the local changes because
the unification just returns a failure continuation too. I had to call
that fail continuation but use state to communicate to its target that
the next clause should not be visited.

I don't know if this is correct. My test suite contains a lot of cut
tests that still pass. Erik's test passes too. But I'm not confident
that this really works.
2012-08-14 21:34:02 -06:00
Eric Dobson
ac493a6f44 Replaced infer-dummy with lazy-require. 2012-08-14 16:04:51 -04:00
Sam Tobin-Hochstadt
ade36c36c6 Don't special-case applications with instantiations.
Closes PR 13006.
2012-08-14 15:45:47 -04:00
Eric Dobson
3b6168de7d Fix substitute and add test case. 2012-08-14 14:44:55 -04:00
Eric Dobson
2e3965e777 Make simple substitution happen all at once.
Closes pr12920.
2012-08-14 14:44:55 -04:00
Vincent St-Amour
af8fc1f26a Fix types of magnitude and angle.
Closes PR13025.
2012-08-14 14:37:18 -04:00
Eric Dobson
cac47c0427 Make TR debug printer work again. 2012-08-14 09:45:01 -04:00
Matthew Flatt
23bca99ba1 adjust `local-expand' to add 'submodule property 2012-08-13 17:11:20 -06:00
Matthew Flatt
b043da6ea6 SIGHUP and SIGTERM -> exn:break:hang-up' and exn:break:terminate'
The default uncaught-exception handler calls `exit' when it receives
one of the new exceptions.
2012-08-13 17:11:20 -06:00
Sam Tobin-Hochstadt
6ae2a9d884 Fix internal require of typed submodules. 2012-08-13 17:20:20 -04:00
Robby Findler
e6fc56a8b8 adjust the leak test so that it first runs with online
compilation disabled and then runs with it enabled
2012-08-13 10:31:54 -05:00
Matthew Flatt
bb3545ddf7 ffi/unsafe/custodian: #:atexit?' -> #:at-exit?' 2012-08-12 20:25:47 -06:00
Matthew Flatt
1800680c6b racket/gui: fix access of scrollbar values for canvas without a scrollbar 2012-08-12 20:17:29 -06:00
Matthew Flatt
42ef79c2ad add `ffi/unsafe/custodian' 2012-08-12 20:17:29 -06:00
Robby Findler
6588449aed enable online check syntax (change the default for
the preferences and use a new preferences symbol, so
everyone gets the new default)
2012-08-12 16:20:21 -05:00
James Swaine
3cd4efe201 Fix process id sorting in future visualizer 2012-08-11 09:21:29 -05:00
James Swaine
6271556e1d Add GC display to future visualizer 2012-08-11 01:00:51 -05:00
Matthew Flatt
b5f0c97762 fix arity error message for keyword-accepting methods
Internally, there's a `prop:method-arity-error' property that is
used for keyword-accepting methods. The same thing could be
accomplished with `procedure->method', but the new property avoids
a wrapper. It might be nice to expose the property from `racket/base',
but that creates trouble for generating arity errors for keyword-
requiring procedures (i.e., when such a procedure is wrapped), so
keep it provate for now.

Closes PR 12982
2012-08-10 12:59:36 -06:00
Eric Dobson
3876dfa841 Make generated flat contracts actually flat. 2012-08-10 10:39:44 -04:00
Matthew Flatt
4345045b52 fix parsing of complex numbers with special single flonums
Closes PR 12839
2012-08-10 07:49:17 -06:00
Matthew Flatt
9d6cb8e50e setup/pack: fix internal and contract errors
Part of the contract-error fix is an implementation change, and part
is a documentation change.

Closes PR 12904
2012-08-10 07:49:17 -06:00
Matthew Flatt
5f120373f1 atan: fix result for two inexact-zero arguments
Closes PR 12936
2012-08-10 07:49:16 -06:00
James Swaine
a3a55de00a Don't wait for future log messages if futures are disabled (future-visualizer) 2012-08-08 12:01:58 -05:00
Eric Dobson
21598297a7 Removed *Un from abbrev.rkt, replaced it with Un from union.rkt. 2012-08-07 15:50:50 -04:00
Eric Dobson
9ed360bb5e Removed convenience.rkt from typed racket. 2012-08-07 15:50:50 -04:00
Eric Dobson
56fd9e6321 Rearange type code, so that abbrev.rkt can depend on union.rkt.
Split out base-abbrev.rkt so that subtype is not dependent on abbrev.rkt.
Remove unused code in numeric-tower.rkt so that it is now a dependent of
abbrev.rkt, which allows the body of convenience.rkt to be merged back in.
Remove special casing for union.rkt and extraneous subtyping checks.
Remove union-maker.
2012-08-07 15:50:50 -04:00
Robby Findler
4a19ab40e8 add check for adjacent separators into tests 2012-08-07 12:51:52 -05:00
Matthew Flatt
d194fa6245 fix `regexp-match' variants given a long string and an output port 2012-08-07 05:21:33 -06:00
Matthew Flatt
0bd53a3549 compiler/zo-marshal: repair mashaling of import info in syntax 2012-08-06 15:32:27 -06:00
Matthew Flatt
02318ebcb3 fix test to work with relative executable path 2012-08-06 14:27:29 -06:00
Matthew Flatt
13d7a37eb6 re-align expt' and flexpt' to match C99 pow() spec
Also, improve precision of some complex results to avoid
excessive `+nan.0's.

Closes PR 12935
2012-08-06 13:00:36 -06:00
Vincent St-Amour
7494fccc4c Control number of attempts for TR random testing from the command line. 2012-08-06 12:48:41 -04:00
Eric Dobson
e6d4fb2ee2 Fill hole in recursive type soundness. Fixes PR 11372. 2012-08-06 12:31:07 -04:00
Robby Findler
8a0b6549a5 adjust the contract error messages to follow the error message
conventions in 9.2.1 of the reference (altho the messages do
not yet do the extra level of indenting when a field is too
long, nor are there any field names ending in ...)

Also, fix the docs for the #:stronger argument to
make-contract, make-chaperone-contract, and make-flat-contract
2012-08-05 20:09:09 -05:00
Robby Findler
34618708a6 give up on a (small) part of the repl test.
Specifically, it seems like about 20% of the time (in drdr),
running the program

  (let l()(l))

in DrRacket and then clicking the break button results in a state
where DrRacket's focus is not in the definitions window. I can't seem
to make this happen on my own machine and I'm not sure if this a
race-condition in the test suite or a real bug in DrRacket but it
seems minor enough (given all of the other focus-based testing that is
happening in this (and related) test suites) that I'm just going to
give up on this particular test.
2012-08-05 08:14:58 -05:00
Matthew Flatt
7c9e6d7193 improve port progress-evt guarantees; fix for `read-bytes-evt' et al.
A progress evt from a close input port must be initially ready,
and the primitive `peek-bytes-avail!' checks a progress evt
before checking whether the port is closed.

These changes resolve a race in `read-bytes-evt' and related evt
constructors.
2012-08-04 10:19:55 -06:00
Matthew Flatt
f28e8a02d0 fix 'disappeared-use prperty added by `syntax'
Effectively preserve `syntax-original?' of added identifiers.
2012-08-04 10:19:55 -06:00
Vincent St-Amour
aba046a92d Swap unsafe and chaperone-unsafe vector ops in the TR optimizer.
Closes PR12969.
2012-08-04 10:32:21 -04:00
Ryan Culpepper
1a77f4ee0e added recontract-out 2012-08-03 20:52:35 -04:00
Matthew Flatt
f11450d601 scribble/base: generalize `itemlist' to splice/coerce some arguments
Also, add a `spliceof' contract constructor to `scribble/decode'.
2012-08-03 13:43:23 -06:00
Vincent St-Amour
79c265ef89 Fix NaN handling of flexpt to be consistent with expt. 2012-08-03 14:21:44 -04:00
Vincent St-Amour
a6d5a98b61 Include NaN in all floating-point types.
Makes more closure properties hold, but weakens occurrence typing for
some comparisons involving flonums.
2012-08-03 14:21:44 -04:00
Kevin Tew
38e90b52c4 Fixes parallel raco make of relative paths including subdirectories
closes PR 12953
2012-08-03 09:15:22 -06:00
Robby Findler
2032aaf341 add a test case for check-expect expressions where the first position has an error
test case for commit 87a8f70148

related to PR 12943
2012-07-31 22:25:34 -05:00
Ryan Culpepper
6eb8da1f40 removed (unused) reference to not-break-exn? 2012-07-31 19:15:21 -04:00
Vincent St-Amour
800a328fe6 Fix documentation for packages and mutable lists.
As suggested by Matthew.
2012-07-31 17:12:30 -04:00
Kevin Tew
04839b39f8 [Distributed Places] fix failing drdr tests 2012-07-31 13:56:38 -06:00
Robby Findler
1a619bd047 add tooltips at the start and end of arrows indicating how many references
there are and how many definition sites there are (in check syntax)

also: Rackety
2012-07-30 21:46:22 -05:00
Matthew Flatt
b0f81b5365 racket/draw: use Cairo in a single-threaded way
This is a follow-up to commit ec6f3fd610. We're still
seeing crashes while rendering the "plot" documentation, and this
change seems to make things work on my machine.
2012-07-30 08:07:49 -06:00
Matthew Flatt
9b1db14328 ffi/com: fix clean-up of type descriptors
Merge to v5.3
2012-07-29 09:46:30 -06:00
Robby Findler
6e2fb2ac5e make the code that does the mixin checks work with define-local-member-name
closes PR 11279
closes PR 12397
2012-07-29 09:43:37 -05:00
Vincent St-Amour
dd02f5eeda Fix parametric require/typed in typed/racket/base.
Closes PR12951.

Please merge to release.
2012-07-29 09:02:58 -04:00
Ryan Culpepper
e10951024f syntax/parse: fix bug in specialized code for ellipsis patterns
The result of 'stx->list' is not always either a list or #f.

Merge to 5.3.
2012-07-28 17:37:06 -04:00
Eli Barzilay
1afc26c79b Fix test due to code refactoring, sort export lists in module descriptions. 2012-07-28 12:12:35 -04:00
Eli Barzilay
c2bea19d1b Adjust for new error mesage style.
(This is in part a temporary solution since the ",bt" command is now used
to show a backtrace as well as any "foo...:" hidden fields.)
2012-07-28 05:05:06 -04:00
Vincent St-Amour
52439d528b Move mutable list functions to the compatibility collect.
Mutable pair functions from racket/base are not moved.
2012-07-27 16:49:05 -04:00
Matthew Flatt
9d6f0e96ba fix for bytecode validator
Fix tchecking for a rest argument to a function that
is lifted by closure conversion so that one of its
arguments is a mutable local variable's location.

Also reject bytecode that would pass too many arguments
to a lifted function, since that would trigger an arity
error that might try to use a location as a value.

Merge to v5.3
2012-07-26 16:32:59 -06:00
Matthew Flatt
b208a104ec COM test updates 2012-07-26 16:32:59 -06:00
Matthew Flatt
100212cd53 another repair to `subprocess' test
Merge to v5.3
2012-07-26 10:53:56 -06:00
Matthew Flatt
87d24ece78 more on `port-commit-peeked' and EOFs
Continues/fixes commit 4c3dd00d49.
2012-07-26 10:39:24 -06:00
Matthew Flatt
1efc894ada toward fixed interaction between positions and peek-commits
When a `port-commit-peeked' succeeds, position information should
(appear to) be updated. This patch synchronizes commits and
position information for primitive ports, but synchronizing
them for user ports remains a problem.
2012-07-26 10:39:17 -06:00
Matthew Flatt
8c10dc1579 fix a `subprocess' test
Merge to v5.3
2012-07-26 08:47:06 -06:00
Matthew Flatt
70ef4e6e57 racket/port: possible repair for `read-bytes-evt'
Also restore and add some tests.

Merge to v5.3
2012-07-26 08:39:58 -06:00
Matthew Flatt
ca3272bd45 racket/port: fix `make-limited-input-port' handling of progress evts
Merge to v5.3
2012-07-25 21:37:58 -06:00
Matthew Flatt
71045e255c fix `for/vector' to really stop at size
Avoids an infinite loop for an infinite sequence, for example.
Also, expand via `for/fold/derived' to improve error reporting.
2012-07-25 20:07:23 -06:00
Vincent St-Amour
b1577bd307 Fix type for add-between. 2012-07-24 16:41:52 -04:00
Matthew Flatt
289ae98c8e add missing `super-new' from class100 conversion
Also, move relevant tests to a better place.

Merge to v5.3
2012-07-24 11:16:43 -05:00
Matthew Flatt
f7382b17c7 ad hoc optimization of `hash-ref'
Convert
 (hash-ref <hash> <key-expr> (lambda () <literal>))
to
 (hash-ref <hash> <key-expr> <literal>)
which is useful for making the `case' expansion fit
Typed Racket.
2012-07-23 21:41:49 -05:00
Matthew Flatt
22960b9c75 fix `subprocess' test
Merge to v5.3
2012-07-23 21:41:49 -05:00
Matthew Flatt
eb6a6e7136 new test cases for `case'
Trigger binary-search and hash-table modes.
2012-07-23 18:56:33 -05:00
Matthew Flatt
05495764ea errortrace: fix profiling for phase >= 2 code
Closes PR 25050

Merge to v5.3
2012-07-23 07:05:40 -05:00
Matthew Flatt
a0ba30d8e7 fix `syntax-local-get-shadower' for submodules
Closes PR 12926, 12928

Merge to v5.3
2012-07-22 21:43:20 -05:00
James Swaine
ca360cdaed Add test to track performance of code inside a future over time 2012-07-22 20:08:51 -05:00
James Swaine
6eed135d02 Fix "dancing flags" issue with timeline ticks in future visualizer 2012-07-22 20:03:36 -05:00
James Swaine
e4f50997ad Minor changes to future-visualizer/trace tests 2012-07-22 20:03:22 -05:00
James Swaine
5214995967 Add unit tests for future-visualizer/trace 2012-07-22 20:03:22 -05:00
Matthew Flatt
d95ec4d454 fixes for submodules and `variable-reference->namespace'
Closes PR 12925

Merge to 5.3
2012-07-22 11:54:46 -05:00
Sam Tobin-Hochstadt
4a90c6c1fe Ensure that structs don't overlap with simple values.
Reported by Ray Racine.

Please merge to release.
2012-07-20 13:01:32 -04:00
Ryan Culpepper
510d3937a7 change id-tables so iterators not invalidated by mutation of existing keys
id-table fixes

test for id-table
2012-07-20 10:59:50 -04:00
Asumu Takikawa
e14c5d61e9 Allow guards for impersonatable struct type properties 2012-07-19 22:46:14 -04:00
Matthew Flatt
d3677524b8 macro expander fix
Relevant to PR 12863

Merge to v5.3
2012-07-19 20:42:36 -05:00
Matthew Flatt
a45d13b52a another `namespace-attach-module' repair for submodules
Merge to v5.3
2012-07-19 16:50:25 -05:00
Matthew Flatt
d44aa13c15 test case to finish repair for `racket/gui/init' load handler
Test case for b111241afe.
2012-07-19 07:46:50 -05:00
Robby Findler
b342009e71 bring back drscheme/private/number-snip.ss since it may
appear in saved wxme format files

also, improve the testing support for testing snip loading
(before this, the testing infrastructure could let one test
"leak" into another one in a way that could mask failures)

please include in release branch
2012-07-19 07:29:42 -05:00
Robby Findler
ef5c2b825f fixed repl-test-misc.rkt for the error message changes
please include on the release branch
2012-07-19 06:26:43 -05:00
Eli Barzilay
6565538b09 Disable the #:before-first' and #:after-last' functionality in `add-between'.
Leave it working in splicing mode.  I prefer doing that over always
splicing them, since that would make a less uniform interface, so I
rather keep all options open.  There is no longer a `#:nothing' keyword,
which is the main point of this downgrade.

(See mailing list discussion on "no-argument" for the reason.)
2012-07-18 22:28:41 -04:00
Robby Findler
17594ec804 module lang test now up to date with error message changes
please include in release branch
2012-07-17 22:33:56 -05:00
Robby Findler
d8204b1624 adjusted the repl test suite for the new error messages
and the change to the racket/gui load-handler

(unfortunately, there is still another problem that keeps
the test suite from passing)

please merge to the release branch
2012-07-17 21:59:05 -05:00
Robby Findler
8744cd7811 bring the language test up to date with the latest error messages
include in the release branch, please
2012-07-17 21:58:56 -05:00
Matthew Flatt
5e4866e54c fill in one more corner of submodules and `namespace-attach-module'
When submodules are not independently loaded, then pull submodule
declarations along when attaching a module to a namespace.
2012-07-17 10:16:32 -06:00
Matthew Flatt
c8f4ac6ae4 submodules: make .zo path stick for consistent independent loading
When a module is loaded from bytecode and then the value of
`use-compiled-file-paths' changes, an attempt to load a submodule
would fail, because source isn't used if the main module is
already declared, and the bytecode code is not used according to
`use-compiled-file-paths'. Make the bytecode path stick when it
is used once, so that submodule loads succeed, and make it work
even with `namespace-module-attach'.

The module-attach part of this protocol requires a change to the
API of a module name resolver: the notification mode gets two
arguments, instead of one, where the second argument is an
environment.
2012-07-17 09:47:05 -06:00
James Swaine
b987be068e Move racket/future/visualizer, racket/future/trace --> future-visualizer, future-visualizer/trace 2012-07-16 12:23:46 -05:00
Matthew Flatt
a605183a0a more submodule repairs for `raco exe' 2012-07-16 10:02:13 -06:00
Eric Dobson
9dac995e36 Fix things broken by bad rebasing. 2012-07-15 19:21:26 -04:00
Eric Dobson
1df6165e9f Clean up of typechecking for heterogeneous vectors and structs. 2012-07-15 19:21:26 -04:00
Eric Dobson
779291c795 Remove special cases for - and fx- in tc-app.rkt. 2012-07-15 19:21:26 -04:00
Matthew Flatt
55a8445b0b allow test to run if GL is unavailable 2012-07-15 10:36:36 -06:00
Matthew Flatt
73e901a262 fix optimizer bug
The lambda-lifting transformation needs to iterate to a fixpoint
where each lambda's added arguments and order are known. The
check for whether something changed was formerly just the number
of added arguments, but that's not good enough, because a binding
might get lifted away while another one acquires an extra argument.
The right test is to check the count and original bindings for the
added arguments.

Closes PR 12910
2012-07-15 10:32:45 -06:00
Sam Tobin-Hochstadt
8c659d50ed Properly handle quoted constants with bad expected types.
Closes PR 12874.
2012-07-14 23:06:13 -04:00
Sam Tobin-Hochstadt
1dca82784b Handle arbitrary recursive contracts generated from Rec types. 2012-07-14 22:45:08 -04:00
Sam Tobin-Hochstadt
2aaeec4520 Improve type of values when applied to one argument.
Closes PR 12846.
2012-07-14 22:45:08 -04:00
Sam Tobin-Hochstadt
ccf79943ab Fix special case for expected unions of vectors.
Closes PR 12845.
2012-07-14 21:56:44 -04:00
Sam Tobin-Hochstadt
2500dad8f1 Don't shortcut simple letrec forms that aren't lambdas.
Closes PR 12841.
2012-07-14 21:36:56 -04:00
Sam Tobin-Hochstadt
9e097866bf Vector fixes.
- Allow indexing into a VectorTop, with result `Any`.
- Don't use special typing rules for applications when the operator
  has an annotation or instantiation.

Closes PR 12887.
Closes PR 12888.
2012-07-14 21:30:26 -04:00
Sam Tobin-Hochstadt
f40c7f11a6 Mutable data at typed boundaries can't have flat contracts.
Closes PR 12884.
2012-07-14 20:43:35 -04:00
Matthew Flatt
e430463ea4 another submodule expansion repair
Relevant to PR 12902
2012-07-13 09:38:44 -06:00
Matthew Flatt
f729c6441c racket/draw: fix gl-context<%> locking
The optional arguments for `call-as-current' for `gl-context<%>'
were not implemented, and the locking implementation didn't match
the documentation in other ways.
2012-07-13 07:45:21 -06:00
Sam Tobin-Hochstadt
2dd9a43d1b Fix tests for new type name declaration. 2012-07-12 17:41:12 -04:00
Asumu Takikawa
3158acd61d Fix unit test broken by mzlib movement 2012-07-11 21:38:42 -04:00
Asumu Takikawa
403aaac7d4 Moved some mzlib library implementations to racket
The libraries moved were:
  - mzlib/control      => racket/control
  - mzlib/date         => racket/date
  - mzlib/deflate      => file/gzip
  - mzlib/inflate      => file/gunzip
  - mzlib/port         => racket/port
  - mzlib/process      => racket/system
  - mzlib/runtime-path => racket/runtime-path
  - mzlib/shared       => racket/shared
  - mzlib/unit         => racket/unit
  - mzlib/unit-exptime => racket/unit-exptime
  - mzlib/zip          => file/zip

The old modules in mzlib are now pointers to the
new modules. These are all modules that were already
redirected in the documentation.
2012-07-11 18:26:10 -04:00
Matthew Flatt
f747c086d8 fix checking for `syntax-local-lift-require'
Closes PR 12894
2012-07-11 14:03:31 -06:00
James Swaine
91de1fae7c Remove unused test file 2012-07-11 09:17:49 -05:00
Robby Findler
dcdc2aea02 allow promises to be impersonated and thus allow impersonator contracts
related to PR 12861
2012-07-10 22:23:26 -05:00
Matthew Flatt
506b70f71f fix `variable-reference->module-source' for submodules
Unlike the `variable-reference->resolved-module-path', the module
source one doesn't include a submodule path.
2012-07-10 18:35:03 -06:00
Matthew Flatt
428711bf93 another submodule-expansion repair 2012-07-10 15:05:40 -06:00
Neil Toronto
392d7bfbad Added sequence typecheck tests
Added empty-sequence type (prints funny but works polymorphically; will submit bug report)
Loosened type of sequence-andmap (can't mimic andmap's predicate type)
2012-07-10 13:22:53 -07:00
Matthew Flatt
ffe39c5974 fix support code for some tests 2012-07-10 11:42:42 -06:00
Matthew Flatt
603e920538 syntax/location: fix and change `quote-submodule-{name,path}'
Paths are left as paths, instead of trying to convert them to strings
or byte strings. Submodule path elements should be unquoted -- in the
same form as a `submod' form. All extra parts are submodule path elements,
never module paths or ".".
2012-07-10 11:42:42 -06:00
Sam Tobin-Hochstadt
6bf141513f Revise type environment propagation to use submodules.
Each typed module now defines a submodule named `type-decl`.
This module performs the type environment initialization (along
with other environment updates) when invoked.  Additionall,
every typed module, when invoked, performs a for-syntax addition
to a list specifying the submodules that need invocation.
This invocation is then performed by the `#%module-begin` from
Typed Racket.

The `type-decl` module always goes at the beginning of the
expanded module, so that it's available at syntax-time for all
the other submodules.  This involved adding pre- and post-
syntaxes for the results of typechecking.

This allows significant runtime dependency reduction from the
main `typed/racket` and `typed/racket/base` languages (not yet
complete).
2012-07-10 12:49:27 -04:00
James Swaine
dbec8765e3 Futures visualizer - reorganize modules, expose formerly private stuff as public (and docs) 2012-07-10 10:55:19 -05:00
James Swaine
2b2070f7b2 Clean up code in futures visualizer
Remove mouseover display for creation graph nodes (for now)
2012-07-10 10:54:43 -05:00
Burke Fetscher
7972adc97a Futures visualizer - Various bug fixes 2012-07-10 10:54:43 -05:00
James Swaine
b6f71ec4be Add futures visualizer, improvements to futures logging 2012-07-10 10:54:42 -05:00
Matthew Flatt
48e154e3cb scriblib/autobib: first cut at configurable style
Adds `number-style' as an alternative to `author+date-style'.
2012-07-10 00:21:56 -06:00
Matthew Flatt
71fe28e5dc scriblib/autobib: fixes in docs and related to disambiguation
Fixed problems related to sorting, more than two references for
one citation, and "specific" additions like page numbers.

Also, removed a set of parentheses around disambiguated dates
in the bibliography, because I don't think they belong there.

The doc format was confused; for example, square brackets don't mean
optional in a syntactic form documentation, but instead mean square
brackets.
2012-07-10 00:21:56 -06:00
Vincent St-Amour
dba49db078 Fix type of andmap and ormap on empty lists.
Closes PR 12882.
2012-07-06 12:28:37 -04:00
Matthew Flatt
f71037c775 also improve JIT support for unboxed flonums in non-tail-call
Applies to non-tail calls to immediate functions, which can be
generated by a `for' or `let loop' pattern in a non-tail
position.
2012-07-06 08:07:10 -06:00
Robby Findler
467bde3a25 fixed promise/c so it creates chaperone contracts when its
argument is a chaperone contract

closes PR 12861
2012-07-04 18:41:55 -05:00
Matthew Flatt
aa68692b37 allow `begin' wrapper on a submodule to re-expand
Closes PR 12835
2012-07-02 10:02:41 -06:00
Matthew Flatt
3662aee60b *SL: fix `check-expect' syntax checking
Bug introduced during error-message conversion.
2012-07-01 09:25:12 -06:00
Matthew Flatt
67cbd52e24 fix benchmark driver for running an old version 2012-06-28 14:32:01 -06:00
Sam Tobin-Hochstadt
20e95f8d8e More refactoring and reduction of runtime dependencies. 2012-06-28 14:34:07 -04:00
Sam Tobin-Hochstadt
f075ecd36e File splitting, dependency reduction. 2012-06-28 14:34:07 -04:00
Matthew Flatt
0d1056dbed fix potential bad interaction of module caching and JIT assumption
The JIT wants to detect calls to functions bound to module-level
variables that are always instantiated to a procedure of a particular
arity, in which case it can avoid some checks.  The problem is that
bytecode and JITted code can be shared via the module cache across
namespaces that use different modules to implement a particular module
path or that enable the JIT differently.  In particular, starting with
one that has a procedure binding and then using one (in a different
namespace) that has a non-procedure binding could lead to a crash.

Defend against this possibility by never treating imported variables
as constant in that sense. The JIT detects imported variables through
a new import map in the prefix.

This change may slow code. My guess is that it will have no
performance impact in practice, due to cross-module inlining,
although I can construct a microbenchmark that slows by 20%.
2012-06-27 09:57:50 -06:00
Matthew Flatt
577cf4592e fix problems with references to bindings at higher phases 2012-06-27 09:57:50 -06:00
Matthew Flatt
edce1b0406 fix optimizer for impersonated continuation mark keys
The optimizer can no longer reduce
  (with-continuation-mark _id _v-expr _expr)
to just
  _expr
when _v-expr and _expr are simple enough, because _id
might be bound to a continuation mark key with an
impersonator that checks the result of _v-expr.

The loss of an optimization can have a significant affect on
errortrace of microbenchmarks, such as

 (for ([i (in-range 10000000)])
   i)
2012-06-27 09:57:50 -06:00
Vincent St-Amour
db6c2e7737 Update types of string-join and add-between. 2012-06-27 11:39:15 -04:00
Asumu Takikawa
095d47fc3d racket/contract: rename prompt/c & continuation-mark/c
The new names are `prompt-tag/c` and `continuation-mark-key/c`
to keep the names consistent with the values that are being
contracted. Also updated the HISTORY file.
2012-06-26 21:11:58 -04:00
Asumu Takikawa
fcab398081 racket/class: add send+ for functional style OO 2012-06-26 21:11:58 -04:00
Eli Barzilay
0c78194267 Adjust the keyword names for string-join' following the change to add-between'. 2012-06-26 13:45:16 -04:00
Asumu Takikawa
de5c756d2e Added continuation-mark/c 2012-06-26 13:39:36 -04:00
Asumu Takikawa
db6c37df92 Add proxy-able continuation mark keys and proxies
(with much help from Matthew on the JIT side)
2012-06-26 13:39:36 -04:00
Matthew Flatt
a6e263741a racket/list: adjust `add-between' keyword handling
Add a `#:nothing' argument so the no-value value can be
made explicit --- based on discussion with Eli, but pending
further review.

Also, renamed `#:first' to `#:before-first' and `#:last' to
`#:after-last' to be more clear, more parallel ro `#:before-last',
and avoid a collision with prominent function names.
2012-06-26 11:00:11 -06:00
Asumu Takikawa
552d6de953 racket/generics: add contract combinator
The generics library now generates a `name/c` macro
for a generic interface `name`. The combinator can be
used to contract instances (or constructors) of a
generic interface across standard contract boundaries.
2012-06-25 20:33:48 -04:00
Matthew Flatt
cb88590dfb fix interaction of `procedure-arity-includes?' and other things
A arity-reduced procedure-valued `prop:procedure' was not handled
correctly, for example.

A good candidate for random testing? I had the right kind of test in
place, but only for an arity of 1. It turns out that testing any other
arity would have exposed the problem, so now there are tests with
arity 0. If I had randomly generated procedures instead of manually
constructing `f0' through `f1:+' in "procs.rktl", then maybe I would
have more naturally generalized the arity testing, too. Then again,
I did already have relevant inputs, and it was the testing of inputs
that was too specific.

Closes PR 12870
2012-06-25 17:30:03 -06:00
Matthias Felleisen
b5b918ca4a restored object-name tests for the new doc system 2012-06-25 19:15:09 -04:00
Matthias Felleisen
92c62d7417 disabled name tests for htdp languages during documentation reorg 2012-06-25 19:15:08 -04:00
Sam Tobin-Hochstadt
88ff5fee69 Minor refactorings.
- Remove tracing requires.
 - Use lists instead of sets in a few environments.
 - Small cleanups.
2012-06-25 18:07:45 -04:00
Jay McCarthy
bc72ddd88a New error message 2012-06-25 15:59:17 -06:00
Sam Tobin-Hochstadt
ccb724155a scheme -> racket 2012-06-25 13:39:07 -04:00
Vincent St-Amour
972df7c89e Add #:unless to the for: macros. 2012-06-25 13:38:51 -04:00
Vincent St-Amour
b1ad108759 Update type of string-join for its new keyword arguments.
Closes PR12866.
2012-06-25 13:05:46 -04:00
Matthew Flatt
c11527494e racket/port: fix problems with `read-bytes!-evt'
See PR 12860; some of problem related to the PR were "fixed" by
adjusting the guarantees that are specified in the documentation.

Another problem was that non-consecutive bytes could be returned.
2012-06-24 07:38:09 -06:00
Matthew Flatt
5433d2302a fix some error-message tests 2012-06-23 05:21:52 -07:00
Matthew Flatt
4323096a46 change contract on second' of date' to allow only 1 leap second 2012-06-23 02:04:55 -07:00
Eli Barzilay
f0d856ab7a Extend string-join' in a similar way to add-between'.
(This is actually the extension that made me do the other too.)
2012-06-23 04:44:20 -04:00
Eli Barzilay
728687d9dc Extend `add-between'.
New keywords: `#:first', `#:before-last', `#:last', and `#:splice?'.
2012-06-23 04:44:20 -04:00
Vincent St-Amour
ee142047f8 Add type for range, and extend in-range's. 2012-06-22 17:53:43 -04:00
Eli Barzilay
7ec9975736 Move regexp-replaces' from ffi/unsafe' to `racket/private/string'.
* The old function was removed completely, people will get it from
  `racket/base' anyway.

* I also removed its documentation.  I thought about leaving a note in,
  but if `define-ffi-definer' is the preferred style, then this should
  be done when there's a way to make `define-ffi-definer' use it.  (Eg,
  some new #:keyword that adds a way to change the defined name.)

* Note that the function is added to `racket/private/string' and not to
  `racket/string' because the latter deals only with strings, and the
  new function accepts byte strings too.  It might be better to start a
  new `racket/regexp' module for these functions.
2012-06-22 14:27:14 -04:00
Eli Barzilay
7b4772e120 Extend `regexp-replace*' to accept a start/end-position.
Note that this pushes the `ipre' argument to the end.
2012-06-22 12:00:48 -04:00
Eli Barzilay
7d6e79023c Random pickiness.
Spaces at EOFs, indentation, etc.
2012-06-22 12:00:48 -04:00
Matthew Flatt
d253b89ba8 racket/port: fix read-bytes-evt' and read-string-evt'
As the documentation says, it's supposed to be ok to use the
same evt multiple times or in multiple threads, but an internal
buffer was allocated incorrectly, so that multiple/concurrent
uses could go wrong.

Closes PR 12860
2012-06-22 09:48:00 +08:00
Matthew Flatt
1dc0072d03 further error message convention refinements
Add extra intitial-message lines, use "..." on a field name
to indicate that it could reasonably be hidden by default,
and refine some existing messages.
2012-06-22 09:47:59 +08:00
Matthew Flatt
40c892ff80 futures: future-local handling of stack overflow
Includes the addition of 'overflow and 'start-overflow-work
events, whcih are effectively specializations of 'sync and
'start-work to expose overflow handling.

Also, fix a bug related to a potential GC during mark-stack
restore from a lightweight continuation.
2012-06-21 07:14:50 +08:00
Matthew Flatt
9af2a331ca another ASL error-message repair 2012-06-21 07:14:49 +08:00
Robby Findler
f38024d4ed fix struct/c for the case that the selectors are not available at the use site.
closes PR 12854
2012-06-20 11:23:20 -05:00
Robby Findler
c0b928c758 Added @literal-algol{} and started an algol60 test suite (apologies
if there already was one that I didn't find). Also fixed syntax
error raising procedure.

closes PR 12859
2012-06-20 10:28:53 -05:00
John Clements
c01e8c1564 refactored to reduce stepper dependencies 2012-06-19 23:51:59 -07:00
Eli Barzilay
4c2940a6d9 Simplify away uses of "-t" in `drdr:command-line'.
In some cases use `module+' to make the code run nicely without a "-m".

(And some other minor tweaks.)
2012-06-19 12:52:22 -04:00
Asumu Takikawa
0e4f9fcd97 racket/gui: fixed by-position widget initialization
This was broken in the class100 port. The init arguments
previously handled by the class100*/kw macro need to be
explicitly passed down.

Also, an (init-rest) is needed at the leaves of the class
hierarchy to ensure that internal super init args don't
leak via error messages. (the class100 macro always
inserts these)

Added a test file so similar breakage is detectable in the
future.
2012-06-19 12:37:35 -04:00
Eli Barzilay
2c19677358 Make some .rktl tests run with "racket".
With this commit, all of the leftover mentions of gracket in
`drdr:command-line' are things that pop up windows.
2012-06-19 03:18:23 -04:00
Eli Barzilay
b8034828d0 Sort the mess with aligned-pasteboard tests.
1. Lots of #lang-ization, other racketizations, code improvements, etc.

2. Some files that were not working now do.

3. "collects/tests/aligned-pasteboard" had some files that were near
   duplicates of "collects/mrlib/private/aligned-pasteboard/tests".
   I've removed the former since in a few places it looked like an older
   version (eg, there were bogus references to a non-existent
   "utils.rkt").  The former has more files that are in runnable
   condition now.

4. There are plenty of tests that look like they're failing, but it
   wasn't shown since they just return #f, and when they were running
   with a "-f" these results weren't displayed.

5. I have no idea about the code, this is all just reshuffling and minor
   editing.
2012-06-19 01:42:20 -04:00
Vincent St-Amour
24b6ecf2a6 Extend time-apply to work with procedures with more than 2 arguments. 2012-06-17 23:04:47 -04:00
Sam Tobin-Hochstadt
39e014bc55 Handle submodules in Typed Racket. 2012-06-16 22:08:06 +08:00
Asumu Takikawa
ab0d3d6492 Fix TR optimizer test
(round to avoid FPU sensitivity)
2012-06-14 18:22:42 -04:00
Asumu Takikawa
5d232f3748 racket/control: add aliases and update %/fcontrol
Added alises for call-with-continuation-prompt,
abort-current-continuation, and call-with-composable-continuation.
Also allow % and fcontrol to take an optional prompt tag argument.
2012-06-14 17:33:43 -04:00
Vincent St-Amour
c4613cf9ab Unbox exp on complex numbers. 2012-06-14 17:17:03 -04:00
Matthew Flatt
a871574318 make #%plain-module-begin' transformer detect module*' in stop list 2012-06-13 17:07:06 +08:00
Asumu Takikawa
a181011b55 Check for proxied prompt tags when needed
Fixes a bug where some control operators would
not recognize proxied prompt tags (non-proxied were fine)
2012-06-11 21:04:45 -04:00
Asumu Takikawa
5aa76c27a9 Support multiple values for control proxy functions 2012-06-11 18:18:37 -04:00
Asumu Takikawa
1cce922d97 Add prompt tag contracts using control proxies 2012-06-11 18:18:37 -04:00
Asumu Takikawa
d527426cac Prototype implementation of control proxies 2012-06-11 18:18:37 -04:00
Matthew Flatt
82943df351 another *SL error-message repair 2012-06-12 06:02:57 +08:00
Jon Rafkind
fc96cb258c [honu] assignment operators cooperate with the dot operator 2012-06-11 13:07:52 -06:00
Robby Findler
c9693ab910 adjust the drracket language test suite for the new error messages 2012-06-11 14:04:05 -05:00
Vincent St-Amour
c4743724cd Restore testing of sqrt and log. 2012-06-09 22:07:43 -04:00
Neil Toronto
8f840bd07b Fixed erroneously imprecise type for +nan.f literal (now Single-Flonum-Nan)
Types for nan?, infinite?, pi.f, exact-round, exact-floor, exact-ceiling,
exact-truncate, degrees->radians, radians->degrees

Extended tc-random-testing: generates exact integers and rationals now

Fixed types of sinh, cosh and tanh to account for underflow and NaNs
2012-06-09 17:46:04 -06:00
Neil Toronto
ddeda70b20 Added to HISTORY.txt
Added (report-errs) to tests/racket/math.rktl
2012-06-09 17:46:04 -06:00
Vincent St-Amour
a89bd99e2a Fix printing of single-precision floats.
If there's already an exponent separator, replace it with f.

Closes PR12836.
2012-06-09 19:35:37 -04:00
Matthew Flatt
5caa114564 fix `print-syntax-width' for +inf.0
Closes PR 12837
2012-06-10 06:58:06 +08:00
Matthew Flatt
fbb6a294f3 local-expand' allows a stop list to have only module*'
That is, when the sto plist contains only `module*', core
forms are not implicitly added to the stop list.
2012-06-08 16:08:55 +08:00
Robby Findler
41a890df03 fix bug in the ->i parser (picked up the wrong identifier; wrote #'id when
id wasn't really around anywhere)

closes PR 12829
2012-06-07 10:45:18 -05:00
Vincent St-Amour
0b7eaf56ca Fix generation of random floats in TR random testing. 2012-06-06 18:26:51 -04:00
Vincent St-Amour
3e9b527bd0 Fix comment. 2012-06-06 18:26:51 -04:00
Matthew Flatt
255e3cbe2e another *SL error-rewriting fix
Arity errors no include supplied arguments, but strip them
away for *SL messages.
2012-06-06 13:25:14 +08:00
Neil Toronto
a713ca8a8b Added nan?, infinite?, degrees->radians, radians->degrees, exact-round, exact-floor, exact-ceiling, exact-truncate to racket/math
Altered TR's random arithmetic testing to generate single-flonums and very small flonums; fails now because of erroneous types

Fixes to sgn, sinh, cosh, and tanh:
 * preserve single-flonum-ness
 * correct zero sign (-0.0) for negative return values that are smaller than epsilon
 * correct behavior with NaN and infinite inputs
2012-06-05 22:40:44 -06:00
Matthew Flatt
e44c0809e8 rewrite contract error messages for *SL
The rewrite involves parsing contract expressions and constructing
replacement prose.
2012-06-05 17:53:27 +08:00
Sam Tobin-Hochstadt
2b9912ea9f Repair failing test case (wrong expected value). 2012-06-04 17:02:19 -04:00
Sam Tobin-Hochstadt
cbbd889621 = can equate values with different types.
Closes PR 12804.
2012-06-03 10:50:18 -04:00
Matthew Flatt
cc0b887106 adjust *SL error-message rewriting 2012-06-03 11:09:32 +08:00
Sam Tobin-Hochstadt
865a2cdcbd Support definitions of keyword functions in Typed Racket.
Caveats:
 - keyword function definitions do not define static
   bindings, thus limiting optimization opportunities
 - can't use `define:`, `lambda:`, etc with keywords
 - error messages sometimes expose the implementation
 - the optimizer skips most of the generated code for
   keyword functions definitions (user-level code is
   optimized)
2012-06-02 18:22:07 -04:00
Jon Rafkind
244f1cccb7 [honu] fix the pattern form and use quote-syntax to prevent syntaxes from being interpolated too early 2012-06-02 15:33:55 -06:00
Jon Rafkind
2b5e5c5b57 [honu] combine string-append and the evaluator 2012-06-02 15:33:54 -06:00
Jon Rafkind
d688621a18 [honu] use sandbox evaluator to test honu code 2012-06-02 15:33:54 -06:00
Robby Findler
058504afbd adjust datalog so that syntax objects are not used as source location
information representation.

This should make datalog work better with compiled files and it
should also avoid an O(n^2) problem in the way it expands
2012-06-02 08:04:45 -05:00
Matthew Flatt
85a2267e6c ffi/unsafe: new error message convention at primitives
Also, fix FFI procedures to preserve names: change `ptr-ref' with
`_fpointer' on an `ffi-obj' value to return the `ffi-obj'
value, so that the name in the `ffi-obj' value can be used
by `_cprocedure'.

Closes PR 12645
2012-06-01 19:03:43 -07:00
Sam Tobin-Hochstadt
a377c42357 Use the new syntax properties for checking keyword functions.
Previously, some hacks were used to obtain the internal
identifiers that implemented keyword functions directly, and
give them types at startup.  Now, the primary "function"
(eg, `sort`) is given a type, and when used, the residual
syntax properties are used to find `sort` from the real
functions, and then the type of the real function is computed
from the type of `sort`.

Some creativity was required in the types of functions which
take optional arguments that when present, alter the return type,
such as `regexp-match*` and `file->list`.
2012-06-01 18:37:02 -04:00
Eric Dobson
262ecc3da9 Redefine Boolean as (U #t #f).
Closes PR 12815.
2012-06-01 10:26:10 -04:00
Robby Findler
64e4a43c9c fix easter egg test suite for the new error messages 2012-06-01 07:16:14 -05:00
Robby Findler
7118547c58 adjusted the module-language, pretty-big and r5rs parts of
the drracket language test for the new error messages
2012-06-01 02:36:54 -05:00
Eric Dobson
c2d9f7ed9a Attach struct info to constructor for polymorphic TR structs.
Closes PR 12806
2012-05-31 13:09:26 -04:00
Robby Findler
f721c0427d adjust the timeouts to two drracket tests and add a little syncronization help in a third 2012-05-31 10:56:13 -05:00
Matthew Flatt
f10a258dcb ffi/unsafe: fix arithmetic overflow and representation
Thanks to Tobias Hammer for the report and initial repairs.
2012-05-31 09:21:25 -06:00
Eric Dobson
735b84b083 Add support for multiple provides of the same identifier in TR.
Closes PR 12807.
2012-05-31 10:02:03 -04:00
Robby Findler
77811e0e95 Adjust how the drracket repl iterates over expressions to make it more
like textual-read-eval-print-loop

There is still a difference, however, because drracket's REPL has a
notion of multiple expressions that are submitted simultaneously that
textual-read-eval-print-loop doesn't. For example, if you type this at
the prompt:

  (car) (+ 1 2)

then textual-read-eval-print-loop will print out the error and then 3,
but drracket will print only the error (ditto if (car) were replaced
by a continuation abort).

This difference is, IMO, a good thing, since it lets you use a single
interaction to do multiple things, but stops as soon as there is an
error. (It is also how drracket has behaved for a long time.)

closes PR 12790
2012-05-30 22:31:55 -05:00
Robby Findler
efd6772e9a adjust repl-test and the module language test for the new error message format 2012-05-30 22:31:54 -05:00
Matthew Flatt
e8645598d7 futures: fix bug related to tail calls 2012-05-30 16:20:36 -06:00
Jay McCarthy
38ae869d66 Fixing error introduced by 9e7548de 2012-05-29 13:39:37 -06:00
Matthew Flatt
26269c329e racket/base: add some missing predicates
The new predicates are `progress-evt?' `thread-cell-values?',
`prefab-key?', `semaphore-peek-evt?', and `channel-put-evt?'.
These were used internally, and now they appear in contract
error messages.
2012-05-29 11:01:52 -06:00
Matthew Flatt
6fded4bac1 syntax/free-vars: fix quadratic behavior
(Forgot to fix the "FIXME" before committing last time.)
2012-05-28 20:22:31 -06:00
Matthew Flatt
ee93e35260 syntax/free-vars: deterministic result order
Closes PR 12798
2012-05-28 20:15:43 -06:00
Jay McCarthy
211e869fe1 Supporting methods in web-server/dispatch 2012-05-28 14:13:19 -06:00
Jay McCarthy
8b035f3c73 Fixing PR12779 2012-05-28 11:52:56 -06:00
Matthew Flatt
99635ab091 change `impersonate-struct' to require evidence that a field is mutable
When supplying an accessor to redirect, either the corresponding field
must be accessible through the current inspector, or a mutator for
the same field must be redirected, too.

Stevie realized that we need this constraint; otherwise, impersonators
can implement mutator-like behavior even when the mutator is otherwise
secret.
2012-05-27 15:37:45 -06:00
Matthew Flatt
73ce5a4767 racket/serialize: fix for submodules
Closes PR 12795
2012-05-27 14:39:51 -06:00