Commit Graph

105 Commits

Author SHA1 Message Date
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
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
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
35afebaea3 Change object-contract to use find-method/who (already exported for Typed
Scheme) to look for the appropriate method to wrap, which makes Robby's
object-contracts appropriately translucent during contract wrapping.

svn: r18102
2010-02-16 19:58:07 +00:00
Matthew Flatt
2200ef17f5 fix problem with expansion to lambda in class form; better certficate transparency in splicing-let forms
svn: r17436
2009-12-30 12:35:21 +00:00
Stevie Strickland
fb85388288 Add this%, which is the class counterpart of the object reference "this".
svn: r17359
2009-12-19 20:56:40 +00:00
Stevie Strickland
c993533814 Change from (module ...) -> #lang and also move any mzscheme -> scheme/base.
svn: r16563
2009-11-05 17:18:54 +00:00
Jon Rafkind
f99c5f276c print value of the super class in error messages
svn: r16482
2009-10-30 17:50:15 +00:00
Matthew Flatt
f51f8c8b7f avoid generating unnecessary struct-accessor and -mutator names
svn: r14566
2009-04-20 13:14:40 +00:00
Matthew Flatt
4b3626c156 fix inverted argument default for editor<%> read-from-file method; better Check Sytax results on packages; added syntax/flatten-begin library
svn: r14548
2009-04-17 22:50:19 +00:00
Matthew Flatt
09320cea1c tiny object-instantiation perf. tweak
svn: r14534
2009-04-16 21:24:42 +00:00
Matthew Flatt
709ad23400 performance improvements: class local-field access uses accessor with index built in (so the index is checked once); JIT partially inlines struct-field mutation
svn: r14530
2009-04-16 19:01:20 +00:00
Matthew Flatt
ee084ad7ff adjust special scheme/class keywords to effectively declare themselves as expression forms (PR 10135): merge to 4.1.5
svn: r14137
2009-03-17 00:45:29 +00:00
Matthew Flatt
6aea96cb5c improve name of class field accessors/mutators
svn: r13150
2009-01-15 13:49:04 +00:00
Matthew Flatt
1642a84e69 add equal?/recur; implement equal? for image-snip% via properties
svn: r12950
2008-12-29 22:36:53 +00:00
Matthew Flatt
0cd2537a82 add equal<%> ad interface*
svn: r12946
2008-12-28 15:05:02 +00:00
Matthew Flatt
89d0801d7a change quote-syntax to include a certificate for the enclosing module, enable certificate checking of phase-1 bindings, and fix some other problems with certificates
svn: r12714
2008-12-05 22:45:04 +00:00
Matthew Flatt
6e9ccd3f43 better checking of case where a local name is used before it is defined (in an int-def context)
svn: r12659
2008-12-01 12:54:16 +00:00
Matthew Flatt
a0f91d905e revised internal-definitions context and a basic 'define-package' form
svn: r12579
2008-11-24 19:52:41 +00:00
Matthew Flatt
ad75c8aa58 fix problems in lex-rename simplification; other tiny improvements and doc repairs
svn: r12380
2008-11-10 22:50:54 +00:00
Matthew Flatt
72055191b4 add printable<%>
svn: r11705
2008-09-12 22:50:09 +00:00
Matthew Flatt
1a8b6cb824 fix mistakes in augment corrections; fix runtime-path handling of lib paths
svn: r11577
2008-09-08 19:44:32 +00:00
Matthew Flatt
74addc1b71 fix checking of augment on a method that is overridable but was formerly augmentable
svn: r11574
2008-09-08 14:41:56 +00:00
Eli Barzilay
7d50e61c7f * Newlines at EOFs
* Another big chunk of v4-require-isms
* Allow `#lang framework/keybinding-lang' for keybinding files
* Move hierlist sources into "mrlib/hierlist", leave stub behind

svn: r10689
2008-07-09 07:18:06 +00:00
Matthew Flatt
e25e7a1098 keyword in methods and apply; procedure-reduce-keyword-arity
svn: r9396
2008-04-22 18:00:04 +00:00
Matthew Flatt
021d4d7527 new hash function names and ops (3.99.0.23)
svn: r9209
2008-04-08 21:42:38 +00:00
Matthew Flatt
307ca18d31 doc make-generic and add 'generic?'
svn: r9164
2008-04-04 12:13:19 +00:00
Sam Tobin-Hochstadt
bb5fe5e47c Provide find-method/who and do-make-object, for Typed Scheme.
svn: r8841
2008-03-01 23:09:23 +00:00
Eli Barzilay
b1a08edd5a use new require specs in many places
svn: r8774
2008-02-23 09:42:03 +00:00
Robby Findler
3cf6ed4673 mostly finished the contract library changes
svn: r8195
2008-01-03 18:10:43 +00:00
Robby Findler
9a0498b44d moved class, contracts, serialize, and traits into scheme/ and changed the class and contract interface so that contracts no longer depend on the class system (instead its the other way around)
svn: r8017
2007-12-15 18:46:55 +00:00