Commit Graph

786 Commits

Author SHA1 Message Date
Stevie Strickland
11b8fd4204 Fix vector creation for internal field access.
svn: r18269
2010-02-22 20:57:36 +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
Stevie Strickland
cc52bcd197 Start throwing in higher-order checks.
svn: r18168
2010-02-18 23:09:42 +00:00
Ryan Culpepper
b68494250f scheme/pretty: added quasisyntax reader macro
macro-debugger: added change layout menu items

svn: r18166
2010-02-18 22:53:11 +00:00
Stevie Strickland
ce04db35a0 Rename tests to be more specific, start inner tests, fix introduced bug.
svn: r18164
2010-02-18 22:27:34 +00:00
Stevie Strickland
a7d8507e3c Actually, these have slightly different conditions. super contracts require
an overrideable method (augride is okay), whereas override contracts require
a method which has never been augmentable (i.e. no pubments or overments).

svn: r18162
2010-02-18 22:11:01 +00:00
Stevie Strickland
87c5e94fc3 Filter out overrideable checks for both super and override contracts, add
check against final methods (and change check for augmentable ones).

svn: r18161
2010-02-18 22:06:41 +00:00
Stevie Strickland
126c3958b2 Add in different method tables for super calls and internal dynamic dispatch.
Eventually the latter will become a table to vectors of methods instead, but
until I start handling override/augment contracts, we can use the simplified
version.

svn: r18153
2010-02-18 19:50:59 +00:00
Stevie Strickland
b18283b626 Keeping up with trunk.
svn merge ^/trunk

svn: r18145
2010-02-18 04:34:09 +00:00
Stevie Strickland
eea685c1cf I didn't fix object-contract from mzlib/contract, just from scheme/contract.
I don't plan on fixing the former at the moment, so I'll just add back these
two accessors so that it's happy.

svn: r18144
2010-02-18 04:22:45 +00:00
Stevie Strickland
43613389a7 Add class/c and object/c forms, including first-order checks and basic
projections that only perform first-order checks.  To add full projections,
also need to change the class struct.

svn: r18143
2010-02-18 04:02:12 +00:00
Stevie Strickland
fa5ed2c160 Fix object-contract's first-order property to do some reasonable first-order
checking, instead of always failing.

svn: r18121
2010-02-17 19:09:49 +00:00