Commit Graph

30177 Commits

Author SHA1 Message Date
Carl Eastlund
a651591a15 Added gen:set, mutable and weak sets, and custom set types.
Sets are now implemented as a generic interface, and lists count as sets.  Most
of the set functions have been added as methods, including mutable versions of
imperative update methods.
2013-07-25 13:49:00 -04:00
Carl Eastlund
da1fe888a7 Added dict-copy operation; renamed dict-supports(?|/c) to dict-implements(?|/c).
Similar to hash-copy or string-copy, dict-copy creates a new, mutable copy of
the given dictionary.  Added as a method of gen:dict.
2013-07-25 13:48:59 -04:00
Carl Eastlund
5c1728dce4 Added define-custom-hash-types and make-custom-hash-types.
The definition form and function consume an equality predicate and optional hash
code functions and key predicate, and produce predicates and constructor
functions for hash table-based dictionaries using the given equality and hash
functions.  Immutable, mutable, and weak dictionaries are defined.
2013-07-25 13:48:59 -04:00
Carl Eastlund
81bcd73aa7 Extended the gen:dict interface; also added some dict and hash operations.
- Added hash-empty?, hash-clear, and hash-clear! for hash tables.
- Added dict-empty?, dict-clear, and dict-clear! for dictionaries.
- Made all dict functions exported by racket/dict into generic methods; turned
  the existing implementations into fallbacks.
2013-07-25 13:48:59 -04:00
Carl Eastlund
97b78ace5b Added #:dispatch option for clauses in #:defaults and #:fast-defaults.
The #:dispatch option specifies a second, less strict predicate for a #:defaults
or #:fast-defaults clause.  The main predicate is still used for the generics
group's type predicate, but the dispatch predicate is used in choosing which
method implementation to use.  The #:dispatch option is useful when the dispatch
predicate is disjoint from all other instances, is significantly cheaper to run
than the main predicate, and the full checks can be meaningfully deferred in
method implementations.

Specifically, this is useful in the implementation of iteration for
association-list dictionaries.  The dict-iterate-{next,key,value} functions do
not need to test (andmap pair? dict) if the given dict is eq? to the one stored
in the given iterator.  The dispatch predicate, list?, is much cheaper.
2013-07-25 13:48:59 -04:00
Carl Eastlund
d9890b843a Changes to define-generics: added #:defined-predicate; improved generated code.
The #:defined-predicate option is like #:defined-table, but it defines a
two-argument predicate that only processes the requested method name and doesn't
allocate a hash table each time it is called.

Method implementations provided via #:fallbacks, #:defaults, and #:fast-defaults
are now called directly by method procedures rather than stored in a vector and
extracted by index.  This should hopefully improve inlining for methods.
2013-07-25 13:48:59 -04:00
Carl Eastlund
1f267d479c Added #:fast-defaults option to define-generics.
For datatypes that are disjoint with structs that might implement the generic,
this adds a "fast path" implementation that doesn't need to test for struct
properties.
2013-07-25 13:48:59 -04:00
Carl Eastlund
7deb4ad025 Separated prop:dict from gen:dict.
This work is in preparation for widening the interface of gen:dict with
operations like dict-for-each, dict-update, etc., each with a fallback
implementation.  The property prop:dict, with its documented, fixed-length
vector representation, cannot be extended, whereas a generic with optional
methods can be.
2013-07-25 13:48:58 -04:00
Carl Eastlund
f7f15e1113 Added a #:derive-property option to define-generics.
The define-generics form can now derive existing struct properties, so that any
instance of the new generics group is also an instance of the struct property.
2013-07-25 13:48:58 -04:00
Matthew Flatt
a5d724dda4 file/tar: limit pipe size between tar and gzip
Otherwise, tar is likely to get ahead of gzip and use much
more memory.
2013-07-25 10:11:05 -06:00
Matthew Flatt
949ea16cbf distro-build: improve failure reporting 2013-07-25 10:06:41 -06:00
Eric Dobson
265603ed69 Make Bottom generalize to Any instead of Integer. 2013-07-23 23:49:51 -07:00
Eric Dobson
5d2c9a67e8 Make tc-literal deal with complicated expected types better.
Also fixes bug in literal heterogeneous vector typing.

Closes PR 13842.
2013-07-23 22:33:31 -07:00
Eric Dobson
e75f3dea7a Make breaks actually break out of running all the TR tests. 2013-07-23 22:33:31 -07:00
Eric Dobson
6195de66a6 Make for: not allow multiple annotations. 2013-07-23 22:33:31 -07:00
Matthew Flatt
aeb3372faf more safe-dereference repairs for DWARF native stack trace (on ARM) 2013-07-23 20:38:23 -06:00
Matthew Flatt
a31e9b29e0 no dprintf() macro in libunwind to avoid collisions on some platforms 2013-07-23 19:59:00 -06:00
Matthew Flatt
245a688c2e fix for inotify() use with places and futures disabled 2013-07-23 19:46:10 -06:00
Matthew Flatt
9f0c5b1487 fix x86_64 DWARF-based stack trace
Commit 5917d4c added a guard on some pointer dereferences, but
the guard is too strict for DWARF. Allow reading of TEXT segments,
etc.
2013-07-23 17:20:20 -06:00
Asumu Takikawa
b27f2217c9 Increase timeout & set random prop on generics benchmark 2013-07-23 14:56:00 -04:00
John Clements
beae23fea2 Oops don't mention file reorg in stepper HISTORY.txt
Please merge to 5.3.6 release
2013-07-23 14:08:41 -04:00
John Clements
b23d8ed2b4 updated HISTORY
Merge to 5.3.6 release.
2013-07-23 13:37:08 -04:00
Sam Tobin-Hochstadt
d40e7ac4c4 Re-enable reasonable Travis setup. 2013-07-23 00:27:50 -04:00
Sam Tobin-Hochstadt
9f659c7df3 Add comment. 2013-07-23 00:06:02 -04:00
Matthew Flatt
cba5bb7729 distro-build: allow missing "man" directory (for Windows) 2013-07-22 21:15:41 -06:00
Carl Eastlund
7d1e0d4332 Added a benchmark file for performance of gen:dict and gen:stream generics. 2013-07-22 22:24:18 -04:00
Carl Eastlund
e6d2e2e6c2 Avoid extraneous output from tests/generic/fallbacks. 2013-07-22 22:24:18 -04:00
Carl Eastlund
59ee9a227e Improved the error messages from generic interface contracts.
Previously, a failure during the first-order checks would print out the name of
the full contract for all the methods, while describing the value for just one
method.  This is both misleading, and incredibly verbose.  The new version
prints out just the relevant contract.
2013-07-22 22:24:18 -04:00
Carl Eastlund
a3c2d25d4f Removed the false statement that all dictionaries are two-valued sequences. 2013-07-22 22:24:17 -04:00
Matthew Flatt
0eb29a4dcf fix `raco setup' package-dependency check when PLaneT package is installed 2013-07-22 18:32:40 -06:00
Matthew Flatt
5457f72391 show package for each module in documentation
The package is normally determined automatcially, but
the `defmodule' form also supports a `#:packages' option.
2013-07-22 18:32:39 -06:00
Matthew Flatt
5d35d63ec5 quick: fixup for slideshow' vs. pict' 2013-07-22 16:42:19 -06:00
Matthew Flatt
f85221afca adjust ".plt" S-expression matching to accept more old archives 2013-07-22 16:34:21 -06:00
Matthew Flatt
682916c8fe raco pkg show: include only non-auto by default 2013-07-22 16:20:14 -06:00
Matthew Flatt
92f2d7d386 remove bogus cross-phase-persistent declaration
Also fix and improve source-location reporting.
2013-07-22 15:31:18 -06:00
Matthew Flatt
3e53fd3a93 create "man1" directory before trying to put a man page there 2013-07-22 14:22:26 -06:00
Matthew Flatt
d7d1739d4f configure installation of man pages 2013-07-22 13:21:09 -06:00
Matthew Flatt
2247ce6266 Make `syntax-procedure-{alias,converted-arguments}-property' cross-phase 2013-07-22 12:51:38 -06:00
Matthew Flatt
9f4420b07a allow gensym' and string->uninterned-symbol' in cross-phase persistent 2013-07-22 12:51:37 -06:00
Matthew Flatt
9e2cf2ab37 add `#%declare', require declaration of cross-phase persistent modules 2013-07-22 12:51:37 -06:00
Robby Findler
e1f4547ea9 adjust backward-containing-sexp so that it returns #f
when there is no containing paren

it used to return the beginning of the region (usually 0)

(this adjusts backward-containing-sexp to agree with the docs)
2013-07-22 11:50:24 -05:00
Robby Findler
7b01d2920a fix spacing in contract error message 2013-07-22 10:42:47 -05:00
Robby Findler
bf73928892 parallelize the contract tests
(unfortunately, the speedup is not that great)
2013-07-22 10:42:47 -05:00
Max New
72544723b5 Memoized redex dependent enumeration. 2013-07-22 06:31:55 -05:00
Max New
88c5cf6f0e Split redex enumeration code into multiple files. 2013-07-22 06:31:55 -05:00
Matthew Flatt
df891791b4 avoid a compiler warning 2013-07-21 21:57:25 -06:00
Matthew Flatt
c2f88ffc50 fix a test prop 2013-07-21 21:57:01 -06:00
Matthew Flatt
aa60d32ea3 update pkg manage GUI for extra scopes 2013-07-21 20:31:42 -06:00
Matthew Flatt
1708fb43b4 fix some tests 2013-07-21 19:55:10 -06:00
Matthew Flatt
8c239a6370 fix sandbox permissions on "links.rktd" files 2013-07-21 19:54:59 -06:00