Commit Graph

14555 Commits

Author SHA1 Message Date
Robby Findler
2ba641e05b PR 10748
svn: r18026
2010-02-09 01:00:27 +00:00
Sam Tobin-Hochstadt
2276cb10d5 Fix subtyping for keywords.
svn: r18025
2010-02-08 23:03:55 +00:00
Jon Rafkind
e5fd8a904c document latest generator functionality
svn: r18022
2010-02-08 19:47:41 +00:00
Robby Findler
4e92d54b28 possible fix to module lang test suite
svn: r18020
2010-02-08 19:44:01 +00:00
Ryan Culpepper
c1373f8214 syntax/parse:
allow forward references from conventions
  fix progress comparison bug

svn: r18019
2010-02-08 18:39:56 +00:00
Sam Tobin-Hochstadt
89eb249b00 fix dumb typo
svn: r18018
2010-02-08 18:21:43 +00:00
Sam Tobin-Hochstadt
55a48ca594 Fix a number of bugs reported by eli
svn: r18017
2010-02-08 18:17:15 +00:00
Matthew Flatt
13b5f7e095 fix recently introduced optimizer bug (affected the kanren test)
svn: r18016
2010-02-08 17:51:00 +00:00
Robby Findler
49702f8f59 moved temp files into the temp directory
svn: r18015
2010-02-08 17:40:46 +00:00
Ryan Culpepper
0f08499e54 syntax/parse: started support for backtracking into syntax classes
incomplete, need to separate descriptions from failure handlers

svn: r18013
2010-02-08 09:47:52 +00:00
Eli Barzilay
9791384b79 Welcome to a new PLT day.
svn: r18012
2010-02-08 08:50:26 +00:00
Eli Barzilay
a08f9b3d42 Welcome to a new PLT day.
svn: r18011
2010-02-07 08:50:34 +00:00
Carl Eastlund
86f0d92c26 Updated documentation for unstable/srcloc; added it for unstable/location.
svn: r18010
2010-02-06 22:44:07 +00:00
Carl Eastlund
5069f3b37e Merged from branch: ^/branches/cce/plt+contract-props+r17680
Added new implementation of contract structure properties.  Contracts are now
based on prop:contract, and flat contracts are based on prop:flat-contract.  The
flat contract property inherits prop:contract (flat contracts are contracts) and
prop:procedure (flat contracts are predicates).

A value is now a contract if it has prop:contract, or if it is a flat contract.
A value is now a flat contract if it has prop:flat-contract, or if it is a
procedure of one argument (assumed to be a predicate), or if it is one of the
constants allowed as a flat contract (e.g. booleans, numbers, strings, symbols,
regular expressions).

The old custom contract systems (proj-prop and friends, make-proj-contract and
friends) have been supplanted by the new properties, constructors for the
properties' associated values, and "simple-contract" and "simple-flat-contract"
constructors for one-off contracts.  These forms are all documented in the
reference.  Documentation of the legacy bindings has been removed, though as
many of them as possible are still exported to give legacy code time to migrate.

This commit includes all the changes to the contract system, plus replacement of
all uses of the legacy bindings (proj-prop, proj-get, make-proj-contract,
several others) in other collections.

svn: r18009
2010-02-06 20:40:03 +00:00
Carl Eastlund
fe40d3e888 Merged changes from trunk.
svn: r18007
2010-02-06 19:23:24 +00:00
Matthias Felleisen
2c602a08c4 svn: r18006 2010-02-06 19:05:35 +00:00
Robby Findler
75a60162b0 another attempt to get the drscheme gui test suite in shape to be run by drdr
svn: r18004
2010-02-06 17:13:49 +00:00
Mike Sperber
43e74725bf Synch German string constants with latest.
svn: r18003
2010-02-06 16:05:32 +00:00
Eli Barzilay
ecb9961bc0 Welcome to a new PLT day.
svn: r18002
2010-02-06 08:50:38 +00:00
Sam Tobin-Hochstadt
bf77c690f4 fix let/ec: and let/cc:
svn: r18000
2010-02-05 23:00:07 +00:00
Carl Eastlund
17f83a5a54 Corrected contract of datum->syntax source locations.
svn: r17997
2010-02-05 20:49:10 +00:00
Kevin Tew
ce7c7eac7b Removed unused parameters to grab_continuation
svn: r17996
2010-02-05 17:28:00 +00:00
Kevin Tew
ccbe173d08 Places GC fixes
svn: r17995
2010-02-05 17:06:13 +00:00
Kevin Tew
46b61873aa Move lazy global initialization to init_fun
svn: r17994
2010-02-05 17:06:05 +00:00
Eli Barzilay
44445c3210 Welcome to a new PLT day.
svn: r17992
2010-02-05 08:50:44 +00:00
Carl Eastlund
f9ae636aea Oops, got the types of char->integer and integer->char backwards.
svn: r17991
2010-02-05 06:24:44 +00:00
Carl Eastlund
f2852257bb Added types for char->integer and integer->char.
svn: r17990
2010-02-05 05:22:49 +00:00
Carl Eastlund
578637c691 Added types for missing hash table operations.
svn: r17989
2010-02-05 04:49:49 +00:00
Eli Barzilay
0725ba7608 Reformat
svn: r17988
2010-02-05 03:22:26 +00:00
Eli Barzilay
2cc4429c62 When constructing code, use the `object-name' of the input port *only*
if it's coming from a file -- not when it's a string.  In that case, use
`#f' for the name, so other code (specifically, `input->code') will use
'program.

svn: r17987
2010-02-05 03:22:23 +00:00
Eli Barzilay
a4954b774d Use optional arguments instead of `case-lambda'.
svn: r17986
2010-02-05 03:22:21 +00:00
Eli Barzilay
536d0266df Use unsafe operations in `sort'. It has been running in safe mode for a
while with no errors reported, and this change is done now when there's
time before the next release.

svn: r17985
2010-02-05 03:22:17 +00:00
Eli Barzilay
2368290cdb Test now that the generator is not in a running state when it's called.
The previous problem was just a bug.

svn: r17984
2010-02-05 03:22:15 +00:00
Eli Barzilay
d5822a3ee5 Remove the special case hack for getting zero values at the end of a
generator.  This will make this:

  (generator (yield 1) (yield))

also repeat #<void> when it's done which will be very confusing.  Better
just add a note in the docs on (generator (yield 1)) returning no values
when it's done.

Also, remove some of the `case-lambda' optimizations...

svn: r17983
2010-02-05 03:22:12 +00:00
Eli Barzilay
3a08648dab Added a `running' state, which is visible only from inside the
generator.  (Also considered making it an error when the generator is
called while it is running, but that doesn't allow (yield (yield X))
fun.)

svn: r17982
2010-02-05 03:22:09 +00:00
Eli Barzilay
2f62cb192e Allow using `yield' with any number of arguments which will be returned
as multiple values.  (These `case-lambda's are for making it fast, which
is probably stupid given how slow this is anyway.)

svn: r17981
2010-02-05 03:22:07 +00:00
Eli Barzilay
f1dcf49d38 Added `generator-state', implemented using a local state (which also
simplifies the code that raises an error from the last change).

svn: r17980
2010-02-05 03:22:04 +00:00
Eli Barzilay
505034ea26 The generator function can now be used to send values to the generator.
For example,

  (define g (generator (yield (yield (yield 1)))))
  (list (g) (g 2) (g 3) (g 4) (g) (g))

evaluates to '(1 2 3 4 4 4).  This is something that Python does (as a
generator.send method), which might be useful for using generators as
co-routines, and it is actually easy to implement since sending values
is exactly what we get when the generator call is actually calling the
saved continuation.  So most of the change is dealing with the
technicalities of throwing an error when the generator is called with
some arguments, when that's done after it's terminated (at the stage
where it's repeating the last value for ever).

A few tests added for this.

svn: r17979
2010-02-05 03:22:01 +00:00
Eli Barzilay
18c8e41fac Make it possible for the last expression in the body of a generator to
return any number of values.  They will be collected and used as the
repeat-forever result of calling the generator again.

Note: there's an exception for using no values -- instead of returning
no values forever, use void, since no values can be more surprising, and
it can happen when someone uses something like

  (generator (yield 1) (yield 2) (yield 3))

since the result of `yield' is (values).  (This will change in a
following commit, but even then it will be popular since people will
usually invoke the generator with no arguments which leads to the zero
values.  Could be solved if you use (g (void)) -- but that's awkward, I
think.)

svn: r17978
2010-02-05 03:21:59 +00:00
Eli Barzilay
5c54f3a5ac Use readline-input' for the port name, since readline' makes error
messages confusing.

svn: r17977
2010-02-05 03:21:56 +00:00
Eli Barzilay
c88a5a6856 A bunch of additional typos
svn: r17976
2010-02-05 03:21:52 +00:00
Eli Barzilay
8b09485c3c Two more "langauge" typos
svn: r17975
2010-02-05 03:21:45 +00:00
Carl Eastlund
2e3ea3d0de Merged latest changes from the trunk.
svn: r17974
2010-02-05 02:41:24 +00:00
Matthias Felleisen
dda81dc80d fixed bug 10733
svn: r17973
2010-02-05 01:11:05 +00:00
Matthew Flatt
3812f8ca72 improve inling to support ((let (....) (lambda ....)) arg ...) patterns; allow nested 'let's for local flonum binding (which fixes a problem where unsafe flonum operations could end up much slower than safe ones)
svn: r17972
2010-02-05 00:16:06 +00:00
Sam Tobin-Hochstadt
318833f422 Add supertypes for mutable types, so that predicates work correctly.
svn: r17971
2010-02-04 23:39:15 +00:00
Robby Findler
1b39d29640 clean up temporary files
svn: r17970
2010-02-04 20:31:51 +00:00
Matthew Flatt
0a6f85a49c fix JIT bug related to capturing flonum locals
svn: r17968
2010-02-04 18:11:32 +00:00
Matthew Flatt
a27dcaa3ac use fpsetmask for freebsd
svn: r17966
2010-02-04 12:44:58 +00:00
Eli Barzilay
a3c9b87652 Welcome to a new PLT day.
svn: r17965
2010-02-04 08:50:37 +00:00