Commit Graph

14480 Commits

Author SHA1 Message Date
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
Carl Eastlund
3eb1e46eeb Merged a few more changes from the trunk.
svn: r17964
2010-02-04 03:26:31 +00:00
Carl Eastlund
137f9a3279 Fixed bugs in contract construction examples.
svn: r17963
2010-02-04 02:17:15 +00:00
Matthias Felleisen
823bbd18c9 opaque iworld structure
svn: r17962
2010-02-03 22:49:12 +00:00
Carl Eastlund
a4a25ba1e9 Wrote documentation for new contract interface. Still needs proofreading, etc.
svn: r17961
2010-02-03 21:02:02 +00:00
Carl Eastlund
2e64069d14 Re-disabled legacy (contract ...) form.
svn: r17960
2010-02-03 17:08:26 +00:00
Stevie Strickland
8bc420da4c The contract on sequencer:make requires arguments that conform to
dispatcher/c, which #f does not.

svn: r17958
2010-02-03 16:39:18 +00:00
Carl Eastlund
73407bed63 Merged a few more changes from the trunk (which I think will affect planet package compatibility).
svn: r17957
2010-02-03 16:11:05 +00:00
Robby Findler
0bda2f0e18 moved the debugging options in the details part of the module panel so they are side-by-side, which should make the dialog more likely to fit on a netbook screen
svn: r17955
2010-02-03 15:34:11 +00:00
Carl Eastlund
d7a7409fe0 Merged changes from the trunk.
svn: r17954
2010-02-03 15:15:11 +00:00
Ryan Culpepper
ffa97036a8 macro-stepper: removed drscheme,etc dep on macro-debugger
(changed capability to normal symbol constant)

svn: r17953
2010-02-03 14:43:23 +00:00
Eli Barzilay
c581b6b575 Welcome to a new PLT day.
svn: r17951
2010-02-03 08:50:28 +00:00
Robby Findler
76f41c2a1c fixed a bug and added some race-condition insurance
svn: r17946
2010-02-02 21:32:20 +00:00
Robby Findler
e74e46d9ca drdr-ized the rest of the drscheme test suite
svn: r17945
2010-02-02 21:06:07 +00:00
Ryan Culpepper
8d2f32efed syntax/parse:
fixed bug: splicing-stxclass immediately within ellipses
  added tests, docs for local-conventions

svn: r17944
2010-02-02 19:48:08 +00:00
Robby Findler
319a4a7ef0 fixed a bug revealed by drdr (but stil cant make this bad case happen on my machine, frustratingly
svn: r17942
2010-02-02 18:01:55 +00:00
Matthew Flatt
8dc290d077 change future-thread count to 16
svn: r17941
2010-02-02 17:19:47 +00:00
Matthew Flatt
db1533fa78 fix Scribble rendering problem with 'aux tables hidden within compound paragraphs (so some inherited-method tables didn't appear in the GUI docs)
svn: r17940
2010-02-02 17:19:29 +00:00
Eli Barzilay
e02335e425 Welcome to a new PLT day.
svn: r17939
2010-02-02 08:50:29 +00:00
Ryan Culpepper
82e1e3308f syntax/parse:
fixed docs bug in ...+
  fixed bug in rep constraint messages

svn: r17938
2010-02-02 07:22:35 +00:00
Ryan Culpepper
cb7600607b syntax/parse:
added nested ~or ellipsis-head patterns
  added ~between, ...+
  cleaned up declenvs
  fixed kernel-literals (include template phase binding)
  pattern variables may not start with ~ (tilde)
  first cut of syntax-class-possible-errors

svn: r17937
2010-02-02 02:28:32 +00:00
Carl Eastlund
87712b0dd2 Clarified the recursive behavior of datum->syntax on hash tables and prefab structs.
svn: r17936
2010-02-02 01:33:39 +00:00
Jon Rafkind
a1d5573613 move bindings to different modules
svn: r17934
2010-02-01 22:57:42 +00:00
Carl Eastlund
79f537d50c Updated the macro stepper to detect steppable languages via a "capability".
svn: r17932
2010-02-01 20:39:46 +00:00
Robby Findler
8aac682691 hierlist now has the scrollbar
svn: r17931
2010-02-01 19:52:05 +00:00
Jay McCarthy
2e4c8e102a pr10727
svn: r17930
2010-02-01 19:51:06 +00:00