Commit Graph

4753 Commits

Author SHA1 Message Date
Asumu Takikawa
d6b0c71a91 Fix up old TR tests that should fail now 2012-11-30 17:37:33 -05:00
Asumu Takikawa
3ed1d56b05 Add new tests for typed control 2012-11-30 17:37:33 -05:00
Matthew Flatt
cbe0831956 fix problem with re-expansion and renamed imports 2012-11-30 07:26:52 -07:00
Asumu Takikawa
d7163142be Forgot to add the test for commit b4dd3b5e1d
Relevant to PR 13209
2012-11-30 00:12:35 -05:00
Matthew Flatt
6bfc03d625 add tests for in-list', in-mlist', and `in-set' shortcut 2012-11-29 06:57:34 -07:00
Matthew Flatt
15cbfa1947 `raco pkg': fixes for package source inference and handling
Also, test additions and documentation adjustments.
2012-11-29 06:43:51 -07:00
Jens Axel Søgaard
07b8507ce9 Rename to bit-vector-popcount 2012-11-28 22:04:25 +01:00
Robby Findler
a5961dcf36 make the drr log follower show its results in a separate window 2012-11-27 22:56:44 -06:00
Jens Axel Søgaard
64f64a3607 Added bit-vector-count 2012-11-27 21:53:30 +01:00
Philippe Mechai
201534b7ad Added path->url tests for directory paths
This check that no regression was introduced with 733d95b.
2012-11-27 08:46:40 -07:00
Matthew Flatt
4ed45a6aef data/bit-vector: some adjustments for consistency
Change `bit-vector-count' to `bit-vector-length', add arguments
to `bit-vector-copy', use `racket/private/vector-wraps' (which
should be moved to a public place) to implement things like
`for/bit-vector'.
2012-11-27 07:26:39 -07:00
Jens Axel Søgaard
028d14a877 Initial import of bit-vectors 2012-11-27 07:26:39 -07:00
Matthew Flatt
c0abe85d30 make case' in r5rs' and r6rs' still use eqv?'
Also, make both `case' and `cond' disallow internal definitions,
instead of inheriting the `racket' behavior.
2012-11-26 19:49:36 -07:00
Jon Zeppieri
486e95049f change 'case' to use equal? 2012-11-26 17:58:04 -07:00
Nadeem Abdul Hamid
8f3343cd01 automatic parenthesis mode improvements
Handle close parentheses in a smarter way while in
auto-parens mode and be a little more smart about
inserting brace pairs in general.

In summary:

 - Add some "smart-skip" behavior to insert-close-paren,
   described in the documentation.
    - When auto-parens mode is enabled,
      the existing "balance-parens" keybinding invokes
      insert-close-paren with a smart-skip argument of
      'adjacent
    - A new "balance-parens-forward" keybinding invokes
      insert-close-paren with a smart-skip argument of
      'forward (whether or not auto-parens mode is
      enabled)

 - Enable basic smart-skip behavior for
   strings ("...") and |...| pairs, specifically, typing
   a double-quote or bar character when the cursor
   immediately precedes one causes the cursor to simply
   skip over the existing one

 - Tweak auto-insertion of block comment pairs; i.e.
   typing hash and a bar results in a properly balanced
   #||# pair. Also, when you type a bar character when
   the cursor immediately precedes a closing bar and
   hash of a comment, then the cursor skips over both
   characters (this seems better than having it just
   skip over the bar, and then having to introduce a
   new keybinding to detect when a hash is typed while
   the cursor is between a bar and a hash)

 - In strings and line/block comments, auto-parens mode
   no longer has any effect (you can still use the M+..
   keybindings to force insertion of a particular brace
   pair)

 - Detect when a character constant is being typed, and
   don't insert brace pairs if so; i.e. if the cursor
   is immediately after #\ , then typing any open parens,
   double quote, or bar, does _not_ result in the
   insertion of an open/close pair even in auto-parens
   mode

 - Add a bunch of tests related to auto-parens, matching
   pairs of braces, strings, comments, etc. to
   collects/tests/framework/racket.rkt
2012-11-25 21:57:52 -06:00
Robby Findler
5197649cb7 improve the interactivity of DrRacket's search
Changes the implementation of highlight-range so that it
only recomputes all of the new locations from the positions
when on-reflow is called (otherwise only computing the
relevant ones) and make the on-reflow callback chop itself
up, in case there are lots of highlighted ranges to avoid
tying up the event loop.

Changes searching so that it doesn't neccessarily compute
the entire search results in a single event callback
(but also make it start the computation more aggressively)

Overall, this changes the strategy from one that, for any potentially
long-running callback, just tried to push it off into the future, into
a strategy that tries to avoid long-running callbacks by breaking the
work up into chunks, but starting the first chunk immediately (in a
low-priority callback).

Also, misc other changes to make this work better and generally clean
things up.
2012-11-25 20:58:13 -06:00
Eli Barzilay
dd9d85feec Cleanup junk files in a bunch of racket tests. 2012-11-24 16:37:36 -05:00
Jay McCarthy
34d2c7b263 Removing usable of lib paths and collection paths in Web server re: Planet 2 extensions 2012-11-24 09:22:14 -07:00
Matthew Flatt
a73dc50224 break cross-reference info for document into pieces
For example, the cross-reference information for the
Reference is now broken into about 16 pieces, so that
resolving a cross-reference into the Reference doesn't
require loading all cross-reference information for
the Reference.

Every document is split into two pieces, so that the title
of a document is roughly in its own piece. That way,
re-building the page of all installed documentation can be more
scalable (after some further changes).
2012-11-23 18:44:51 -07:00
Matthew Flatt
9f5324b754 fix quoted submodule path in `all-from-out' 2012-11-23 08:30:01 -07:00
Matthew Flatt
4e0fac0477 JIT: fix allocation of came-lambda closures over flonums
Also, clean up code and assumptions related to fixnum-producing
functions and unboxing (not related to the bug).
2012-11-23 08:20:05 -07:00
Matthew Flatt
961f5e40bf fix untagged cpointer as place-channel message
(repair by Kevin)

Closes PR 13282
2012-11-23 08:20:05 -07:00
Robby Findler
475822b44a fix a bug in a syntax-case keywords spec
closes PR 13237 (turns out not to be planet-specific)
2012-11-22 13:54:32 -06:00
Robby Findler
98633665b3 extend data/queue library
- add enqueue-front!

- add queue-filter!

- use the predicates instead of the /c contracts

- make queue-length take constant time

- add some random tests

- note the running times of all of the operations in the docs

- make queues be sequences directly (and use make-do-sequence
  to implement in-queue instead of building a list)

- added non-empty-queue? (note extra hypen as compared
  to the past; this seems better since the function
  wasn't exported before and we already have other
  functions named "non-empty-<something>" but not
  others namedn "nonempty-<something>")
2012-11-21 11:10:02 -06:00
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