Matthew Flatt
baab09fc1b
drop the uglier half of the Mac OS X thread-local variable hack; thread GC state through mark functions (to avoid overhead of thread-local accesses); fix some procedure-arity bugs and work toward fixing chaperones and some other procedure operations on keyword procedures
...
svn: r18661
2010-03-29 15:06:47 +00:00
Matthew Flatt
73807aef24
chaperones (v4.2.5.3)
...
svn: r18650
2010-03-28 01:10:33 +00:00
Stevie Strickland
290a73b56b
Check and unwrap instead of grabbing the property value, then using it to
...
unwrap.
svn: r18610
2010-03-24 21:32:32 +00:00
Eli Barzilay
40444fc087
Stupid $%^#*&!*ing typo. It has been in this code since the major code
...
reorganization that was included in v4.2.3. Cost me most of the night to
track down.
svn: r18592
2010-03-21 10:00:58 +00:00
Stevie Strickland
dde2011ec7
Add ->dm and case->m, which are the implicit method versions of ->d and
...
case->.
This should be included in the release.
svn: r18579
2010-03-18 21:28:41 +00:00
Kevin Tew
dedb261ea8
[Places] place-channels are syncable events, place-channel-send/recv, #t and #f are now communicated
...
svn: r18578
2010-03-18 16:53:16 +00:00
Kevin Tew
e9693b7d9d
[Places] channels can send fixnums, strings, lists, and vectors
...
svn: r18576
2010-03-18 16:42:05 +00:00
Sam Tobin-Hochstadt
e1eb4a4b93
Fix bug in match reported by jay.
...
svn: r18563
2010-03-17 18:21:09 +00:00
Carl Eastlund
d9b7609e1e
Fixed splicing-syntax-parameterize to splice require and provide forms.
...
svn: r18551
2010-03-16 23:04:46 +00:00
Stevie Strickland
5145638ac5
Since we're handling initialization and the result of this wrapper is a
...
real (sub)class, we need this to be #f.
svn: r18544
2010-03-15 09:19:50 +00:00
Stevie Strickland
924842d9e9
* Fix inits so that we either call the previous class/c wrapper's init
...
or let continue-make-super take control if we were the first wrapper
* Fix up handling of init/contract sorting so that things are performed
at the right phase (at least if we're going to treat names as symbols).
* Fix up new tests so that all contract layers are tested.
svn: r18540
2010-03-15 08:29:22 +00:00
Stevie Strickland
7ec061cdbf
* Factor out zipping of inits/contracts of the init closure
...
* Add tests for higher-order behavior
svn: r18538
2010-03-15 07:37:25 +00:00
Stevie Strickland
f9e404afbc
* Fix bug in #:name for init contracts
...
* Apply appropriate projections to init arguments.
svn: r18537
2010-03-15 07:25:54 +00:00
Stevie Strickland
2f9717ca72
Start on the init function. First step -- just replace it if we have init
...
contracts, but don't add any checking (yet).
svn: r18536
2010-03-15 07:05:31 +00:00
Stevie Strickland
9640ea4e2c
Sort the init contract forms.
...
svn: r18535
2010-03-15 07:03:54 +00:00
Stevie Strickland
1bd29dd7e9
Okay, we're going to add back init contracts, which I'd somewhat done before.
...
In this version, we're not going to have any reasonable first-order checks as
to whether or not the class actually accepts the initialization arguments that
are being contracted. I'm also just going to handle by-name at first, since
that's all I originally discussed in the paper.
svn: r18534
2010-03-15 06:49:49 +00:00
Sam Tobin-Hochstadt
3edf8cdac6
Fix `match-lambda**'. Patch from Madoka Machitani.
...
svn: r18525
2010-03-12 14:16:43 +00:00
Stevie Strickland
40b35a2b73
Now that we have a way of marking procedures as methods at runtime,
...
fix up all projection applications and uncomment out the tests for
appropriate method arity errors.
svn: r18504
2010-03-10 04:07:00 +00:00
Matthew Flatt
a94e6f2ea9
fix (_bytes o n) as an FFI result type
...
svn: r18502
2010-03-10 02:18:05 +00:00
Matthew Flatt
4673b36dcf
adjust inlining heuristics again
...
svn: r18479
2010-03-06 03:44:07 +00:00
Stevie Strickland
bf60da75e1
Refactor out new has-contract?/value-contract functionality so that it's
...
the responsibility of the (higher-order) contract to add the contract
(plus possibly more in the future) to the wrapped value.
svn: r18469
2010-03-04 21:10:44 +00:00
Sam Tobin-Hochstadt
80fcee2577
Fix PR 10806.
...
svn: r18464
2010-03-04 13:45:25 +00:00
Robby Findler
07f280419a
added has-contract? and get-contract
...
svn: r18460
2010-03-04 03:58:33 +00:00
Stevie Strickland
5fe0a790c1
Change how contracts for multiple values are handled to be a little cleaner
...
syntactically.
svn: r18458
2010-03-04 00:04:07 +00:00
Stevie Strickland
f2788561d3
Add the ability to contract more than one value returned from a with-contract
...
block in expression position.
svn: r18456
2010-03-03 21:54:18 +00:00
Jay McCarthy
eec0ff66c6
Adding a custom printer similar to hasheq's for sets
...
svn: r18450
2010-03-03 18:01:04 +00:00
Stevie Strickland
77f2555b9c
Remove now-redundant object? check in is-a?
...
svn: r18448
2010-03-03 17:04:41 +00:00
Stevie Strickland
3fb2e1d9ae
Check that we have an object before trying to unwrap it in class-field-*.
...
svn: r18443
2010-03-03 14:39:44 +00:00
Stevie Strickland
f37f81cdb2
Maintain source locations appropriately.
...
svn: r18422
2010-03-01 23:47:31 +00:00
Sam Tobin-Hochstadt
83cdaac011
Allow `path-up' to take multiple paths.
...
svn: r18415
2010-03-01 21:27:03 +00:00
Stevie Strickland
16dbb0edc1
Fix bug in field mutation on contracted objects.
...
svn: r18390
2010-02-27 20:59:40 +00:00
Eli Barzilay
cd076ae512
Fix bad assumption that paths can be turned to require specs (which breaks on
...
Windows).
svn: r18388
2010-02-27 20:20:25 +00:00
Stevie Strickland
54b81b3bdb
Fix bug introduced by last commit.
...
svn: r18385
2010-02-27 18:04:47 +00:00
Stevie Strickland
9f17622e1a
Cleanups here, moving some of the other parts to syntax-parse.
...
svn: r18383
2010-02-27 17:41:43 +00:00
Stevie Strickland
7dacfaea85
Add with-contract for expression positions.
...
svn: r18372
2010-02-27 01:05:03 +00:00
Stevie Strickland
e54f1c3a5e
scheme/contract => scheme/contract/base
...
svn: r18371
2010-02-27 01:03:55 +00:00
Sam Tobin-Hochstadt
7accc0bd7d
Need to unwrap objects at two other points:
...
* When the C++ code uses direct access on objects (look for check_valid)
* In the functions returned by class-field-accessor/mutator
svn: r18344
2010-02-25 23:42:13 +00:00
Carl Eastlund
8b93f081bc
Renamed make-set{,eq,eqv} to set{,eq,eqv} for uniformity with list, vector, etc.
...
svn: r18338
2010-02-25 19:46:36 +00:00
Stevie Strickland
1f10c4e422
Have external field accessors/mutators just redirect to the old object
...
themselves. Also, have all objects carry the prop:unwrap property.
svn: r18330
2010-02-24 23:32:44 +00:00
Stevie Strickland
af0387e3a6
Fuck you, C, and the flea-bitten, mange-covered, syphilis-ridden horse you
...
rode in on.
svn: r18318
2010-02-24 16:35:30 +00:00
Stevie Strickland
60b6c81f9f
Okay, updates to all this crapola. Going to try and see what happens if I
...
only attach prop:unwrap to wrapped objects.
svn: r18313
2010-02-23 23:56:08 +00:00
Stevie Strickland
f60645da2c
ARGHGHGHGHGHGHGHGGHGH
...
svn: r18308
2010-02-23 21:43:08 +00:00
Stevie Strickland
e1cd160a40
Now that the C code is back at a compile-ready point, I'll check in.
...
svn: r18306
2010-02-23 20:57:22 +00:00
Stevie Strickland
472ef1e873
Other cleanups.
...
svn: r18303
2010-02-23 15:59:22 +00:00
Stevie Strickland
1eeb27fc30
Small fixes in make-wrapper-class/object.
...
svn: r18302
2010-02-23 15:58:00 +00:00
Stevie Strickland
6583b0b77c
My first foray into the C side of things.
...
svn: r18299
2010-02-23 14:55:24 +00:00
Stevie Strickland
09425bc801
Keep the original class in the supers list. Also, copy over the no-super-init?
...
flag.
svn: r18296
2010-02-23 12:51:27 +00:00
Stevie Strickland
e4f7f0032e
Get rid of the loop that's no longer a loop, and also add in the necessary
...
object unwrapping.
svn: r18288
2010-02-23 04:13:09 +00:00
Stevie Strickland
978a9586f5
We no longer need the #:error thing here, because we've fixed object-contract
...
for real now.
svn: r18286
2010-02-23 04:02:03 +00:00
Stevie Strickland
14ab0175c3
Okay, expanding field accesses and mutations to basically inline the
...
unwrapping operation helps a bit, especially with inherited fields.
Unfortunately, as one might expect, TANSTAAFL applies here. In order
to make sure that we keep the contracted objects around as much as
possible to make sure there are no holes, we end up making local and
inherited field access codes 2-3x more than they did before. However,
this is still something on the order of 5x faster than external
access. But blah.
CONTRACTS ARE NOT FREE. Just ask your local lawyer.
svn: r18285
2010-02-23 03:15:43 +00:00
Stevie Strickland
53381bbf03
Remove unwrapping in find-method/who until I figure out what I actually need
...
to do.
Also fix up is-a? and subclass? so that they should work the same when
contracts are removed from a program.
svn: r18282
2010-02-23 01:15:11 +00:00
Stevie Strickland
f1b0bfdd79
Yeah, accessors need arguments.
...
svn: r18281
2010-02-23 00:46:47 +00:00
Stevie Strickland
cfdb9dd39b
Time to unveil object/c.
...
svn: r18280
2010-02-23 00:43:25 +00:00
Stevie Strickland
ab2561e08a
Now we don't need to recur down to unwrap something, but if we get a wrapped
...
primitive object in a method send, we need to unwrap all objects for its
method.
svn: r18279
2010-02-23 00:40:59 +00:00
Stevie Strickland
2af44afb17
Now I see -- I was handling local fields in an incorrect manner. We don't
...
want later projections to affect local accesses or mutations -- so we just
have to add the unwrap check in case it's a wrapped object.
svn: r18277
2010-02-22 22:43:47 +00:00
Stevie Strickland
0e3af71176
So now object-contract works again, but we seem to have introduced a bug
...
in the class/c inherit-field form, so now time to fix that.
svn: r18276
2010-02-22 22:26:27 +00:00
Stevie Strickland
a3a1d0d9c7
Fix shadowing in make-wrapper-class. Now delay lookup for
...
accessors/mutators used for internal field access. This fixes public
fields, but not private fields. Next should fix that up.
Will definitely need to benchmark all this delay though.
svn: r18275
2010-02-22 22:10:30 +00:00
Stevie Strickland
d820493feb
First cut of converting object-contract to share a common base that
...
object/c will also use.
svn: r18274
2010-02-22 21:55:32 +00:00
Stevie Strickland
815dd80923
Sync up to catch my fix.
...
svn: r18270
2010-02-22 20:58:53 +00:00
Stevie Strickland
11b8fd4204
Fix vector creation for internal field access.
...
svn: r18269
2010-02-22 20:57:36 +00:00
Stevie Strickland
c2fcdbba65
Class Contracts Phase 2: Object/c Boogaloo
...
This isn't just a copy of trunk r18264 -- it has a slight difference in how
local field accessors and mutators are handled that will eventually play a
larger role.
svn: r18265
2010-02-22 19:09:42 +00:00
Carl Eastlund
1d6111c532
Renamed simple-contract and simple-flat-contract to make-contract and make-flat-contract.
...
svn: r18259
2010-02-22 02:51:16 +00:00
Stevie Strickland
a0769da5ea
Add the contract shorthands for -> and ->* to use for methods where we don't
...
care about properties of this.
svn: r18248
2010-02-21 02:54:06 +00:00
Stevie Strickland
ffa34e1f7d
Add augride, which is like augment but enables the contract writer to give
...
subclasses an idea of whether a method can be augmented (augment) or whether
a method augmentation can be overridden (augride).
svn: r18240
2010-02-21 00:17:42 +00:00
Stevie Strickland
f72ca7bb1b
Now inherit works (and tests!)
...
svn: r18237
2010-02-20 22:54:11 +00:00
Stevie Strickland
370792b881
Refactoring done, and I think that's actually cleaned up things a bit. Now
...
to handle inherit.
svn: r18236
2010-02-20 22:44:53 +00:00
Stevie Strickland
b589c3c230
More preparation to move all the int-method/dynamic-proj expansion into
...
class/c-proj instead of compose-class.
svn: r18235
2010-02-20 22:00:45 +00:00
Stevie Strickland
66ce493ede
Adding original class field (we'll see what this is for in a sec.)
...
svn: r18234
2010-02-20 21:48:00 +00:00
Stevie Strickland
a0fdeff509
First order checks.
...
svn: r18233
2010-02-20 21:34:57 +00:00
Stevie Strickland
a4d6252d16
Start inherit contracts (which are useful for mixins). Tests, plus parsing.
...
svn: r18232
2010-02-20 21:28:20 +00:00
Stevie Strickland
a169105ed0
Sync up to trunk, because keeping up to date is the right thing to do (and
...
hopefully it'll get rid of the issues in tests/future/future.ss).
svn: r18228
2010-02-20 19:36:15 +00:00
Matthew Flatt
e38e8d88e0
basic set library
...
svn: r18222
2010-02-20 13:00:48 +00:00
Stevie Strickland
c59805ab9e
Syncing up to trunk before I go to bed, so setup-plt can run while I
...
sleep.
svn: r18220
2010-02-20 10:59:49 +00:00
Stevie Strickland
cd4aa4c6f6
Forgot about the no-contract forms, so needed to add tests for those, also.
...
svn: r18218
2010-02-20 10:40:50 +00:00
Stevie Strickland
7830d55b42
Okay, that does it for augment, which means I'm done with coding. Now just
...
documentation and benchmarking, then this can go on trunk.
svn: r18217
2010-02-20 10:09:37 +00:00
Stevie Strickland
67d47e0a1d
Fixes in override ctcs and test suite. I thought I ran it, so I find it
...
weird that I found these on a subsequent run when adding some quick augment
tests to start the next batch. (Oh, those are included also.)
svn: r18215
2010-02-20 09:40:41 +00:00
Stevie Strickland
b5e2d5f93e
Okay, now override contracts are done, so only augments remain.
...
svn: r18214
2010-02-20 09:30:40 +00:00
Stevie Strickland
3c1004fd05
Okay, we should be fixed up in compose-class, now we just need to start
...
handling the projections in class/c-proj.
svn: r18213
2010-02-20 09:14:14 +00:00
Stevie Strickland
28046b832b
Another step towards it -- here we're extending the int-methods vector
...
appropriately on subclassing after a contract boundary. Next is adding
in the projections.
svn: r18211
2010-02-20 08:43:54 +00:00
Stevie Strickland
a7017afe5a
Step 1: Cut a ...
...
Wait, no. Here we add the dynamic idxs, which will get incremented whenever
we pass through a contract boundary with an override (or later, augment)
contract.
svn: r18210
2010-02-20 08:21:09 +00:00
Stevie Strickland
90d8d3763a
Forgot to put this here.
...
svn: r18208
2010-02-20 06:36:28 +00:00
Stevie Strickland
ead01c9232
There's an app... err, function for that.
...
svn: r18207
2010-02-20 05:32:13 +00:00
Stevie Strickland
98e3695a20
Also change some old code to use vector-copy! as appropriate.
...
svn: r18206
2010-02-20 05:25:36 +00:00
Stevie Strickland
7b7d70a993
I should just use vector-copy! where applicable.
...
svn: r18205
2010-02-20 05:20:15 +00:00
Stevie Strickland
aaf9a5aeac
Apply the inherit-field projections appropriately.
...
svn: r18204
2010-02-20 04:18:49 +00:00
Stevie Strickland
fcee6788d7
Parsing and first order checks for internal field access contracts.
...
svn: r18203
2010-02-20 04:02:59 +00:00
Stevie Strickland
d87794a8d2
External field contracts FTW!
...
svn: r18202
2010-02-20 03:52:47 +00:00
Stevie Strickland
1688a6c3f7
Change how fields are accessed in prep for contract wrapping.
...
svn: r18201
2010-02-20 01:35:46 +00:00
Stevie Strickland
30864fc1d0
I dunno why, but this reads much better to me.
...
svn: r18200
2010-02-20 00:08:49 +00:00
Stevie Strickland
95438db40f
Add set-field!. Because it's useful, because we have get-field, so why
...
not it, and because it's an easy way to later test external field contracts.
svn: r18199
2010-02-19 23:55:39 +00:00
Robby Findler
7aa6ea4c76
PR 10645
...
svn: r18193
2010-02-19 19:43:14 +00:00
James Swaine
9170687148
moved futures random tests into /collects/tests/future
...
svn: r18192
2010-02-19 19:26:55 +00:00
Stevie Strickland
e9264b1fac
Syncing up before class.
...
svn merge ^/trunk
svn: r18188
2010-02-19 16:43:03 +00:00
Stevie Strickland
6777fc31a3
Rewrite this a little to make it clear that we're now only checking the
...
super class's beta-methods vector to make sure this is even an overrideable
method.
svn: r18181
2010-02-19 04:59:05 +00:00
Stevie Strickland
55d39b0035
It was a good thing I decided to add some super/inner mixed examples here,
...
because it pointed out a bug in my implementation where we weren't getting
the right version of the super method (which gets the projection).
svn: r18180
2010-02-19 04:40:10 +00:00
Stevie Strickland
5cc68fdd0f
In some ways, I'm still trying to decide exactly what some of these forms mean.
...
For example, if we're in the java part of a beta-java chain, can we still add
an inner contract? If so, it should affect each java-style overriding method
until we reach the next beta-style augmenting method.
It can just be confusing, because one might thing that inner in a
contract => needs an augmenting method in the subclass, super => needs
an overriding method in the subclass. The latter is true, since only
the next immediate method can reach the super class's implementation,
but inner jumps to the next augmenting method, so the former isn't
necessarily true.
svn: r18179
2010-02-19 04:27:44 +00:00
Stevie Strickland
b59955bc01
Ah, that'd be the issue. THE TESTS WERE WRONG. All's well, and I've even
...
added a couple more tests to make sure we apply the projections in the right
order.
svn: r18176
2010-02-19 00:34:27 +00:00
Stevie Strickland
2b92ea9225
Start inner projections work. Next, test cases, then I'll fix the test
...
cases by implementing the rest.
svn: r18174
2010-02-18 23:54:56 +00:00
Stevie Strickland
da7473b867
TEST DRIVEN DEVELOPMENT.
...
svn: r18173
2010-02-18 23:35:58 +00:00
Stevie Strickland
301ac0e5f3
The simplest of all the contract features to handle.
...
svn: r18169
2010-02-18 23:17:48 +00:00