Commit Graph

4826 Commits

Author SHA1 Message Date
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