Eric Dobson
22daa0383f
Make TR optimizer tests reset the port line counting.
...
This means new logging lines should not change the numbering of all existing
logs making diffs much cleaner.
original commit: f1b52be26ad8635bfa1d6bfe49e8e36780577a92
2014-02-22 11:51:46 -08:00
Asumu Takikawa
4d9431279e
Fix DrRacket's insert-large-letters
...
This is a temporary fix in the sense that the typed/mred
wrapper that this relies on is incomplete. Once the typed
racket/gui bindings are merged, a more complete
insert-large-letters will be checked in.
Closes PR 14362
original commit: 2295f71dbeb21b8ba3231d25cafb070d0be585dc
2014-02-21 14:39:46 -05:00
Asumu Takikawa
c4bfa96216
Fix static contract generation for method case->s
...
original commit: 6710d08ff1dfe3283831773912f5f0a77dc01289
2014-02-21 14:38:45 -05:00
Asumu Takikawa
f0cff55467
Add more class/object functions to TR base-env
...
original commit: 19b785956f5e901c8177d8576f28013ce103c0bc
2014-02-21 14:11:14 -05:00
Asumu Takikawa
930c1f6c6b
Make typed case-lambda methods work
...
original commit: 30cd701cf0875cf16d5e114d97e5004ca243681e
2014-02-21 14:09:50 -05:00
Asumu Takikawa
86cb262c3c
Move typed class unit tests into a separate file
...
Export some helpers from typecheck-tests in a submodule
original commit: 5a3e0a76daedf7c2a457ba9c05a205c9c607e2e0
2014-02-21 13:59:34 -05:00
Asumu Takikawa
fc39560dc3
Support set-field! in Typed Racket
...
original commit: c623e662e0a95d992dd46d2b1ad8889566706952
2014-02-21 12:32:59 -05:00
Asumu Takikawa
492dea8408
Adjust type variable syntax for typed classes
...
This makes it consistent with other forms like the
new `lambda` form.
original commit: 8ce376f50368c4ac0266d02e3b0efb3f7e30f1df
2014-02-21 11:47:08 -05:00
Asumu Takikawa
3aff8d94e9
Fix type for first argument of dynamic-place
...
Closes PR 14363
original commit: 315034bbe54252ceed4400308072c09c52457d5f
2014-02-20 23:17:17 -05:00
Asumu Takikawa
8d97a5cbdd
Temporarily disable TR class unit test
...
This unit test is broken due to an issue with using
the : form for external names in classes. Since : checks
if the id is bound, it doesn't work if there is an internal
name different from the external name (since only the
internal one is in scope in the class body).
Haven't decided whether to put annotations on internal
identifiers instead or to not run the check for class
member names.
original commit: fe811e33aaf50fe68ad2ff14a7c46685a03e1f19
2014-02-20 23:14:23 -05:00
Asumu Takikawa
a7fd2a8f11
Expand on docs for TR class init/init-rest args
...
original commit: 8c83e1a08deac604fe4685a915cd010ad0a06db4
2014-02-20 18:00:44 -05:00
Asumu Takikawa
41cee0f69a
Reorganize docs on typed classes
...
Use subsections and put the special forms first
original commit: f856bce277988ae708a864e20a908247c14ec8e3
2014-02-20 17:33:45 -05:00
Asumu Takikawa
ffdb6752f3
Revise TR classes & docs based on feedback
...
original commit: 1c6c0855f788fb311db7a93b5e81bbcd6b24d03b
2014-02-20 16:50:28 -05:00
Asumu Takikawa
6cd8927abc
Move internal unit tests out into a separate file
...
original commit: e7e354f69ae4846b3d37cce58268a01d9ee6cca7
2014-02-20 16:50:28 -05:00
Asumu Takikawa
f2260843b0
Add support for positional init arguments for TR
...
This includes support for positional inits and also
init-rest along with make-object and instantiate.
original commit: 18182d16a615f5ecf7bed5428374010f609bb59e
2014-02-20 16:50:27 -05:00
Asumu Takikawa
7df37ff6a8
Use shorthand notation for classes in subtype tests
...
original commit: 0b1eec20b5a1ffb569c0e4332bb459ce47c864b9
2014-02-20 16:50:27 -05:00
Asumu Takikawa
aa15b72985
Fix integration test for new class type syntax
...
original commit: cd2ef502b013292b948e1ba7932f2d6b97871d76
2014-02-20 16:50:27 -05:00
Asumu Takikawa
07243dd154
Add static contract tests for classes
...
original commit: 39b237043d0d91058ac8cb041eb665f502b17590
2014-02-20 16:50:27 -05:00
Asumu Takikawa
10f04eb58e
Convert parse tests w/ classes to use abbreviations
...
original commit: dff2fa6de78917848c121cc60264176fe2e7b851
2014-02-20 16:50:27 -05:00
Asumu Takikawa
3786645026
Disallow non-aliases in #:implements
...
original commit: 92d5e4a8aecbb9b121652f1e38c9bee76db64e0f
2014-02-20 16:50:27 -05:00
Asumu Takikawa
3a63c8175e
Add abbreviation for classes and use in base-env
...
original commit: 98a2d248c0589e4b8d3663566adff7b66da6be6b
2014-02-20 16:50:27 -05:00
Asumu Takikawa
143c430632
Revise type for is-a?
...
original commit: 84e780174e0d827f6a4fc660f92525ca5bb71800
2014-02-20 16:50:27 -05:00
Asumu Takikawa
d70a59d5cb
Add ClassTop type
...
Still TODO are better error messages when a ClassTop
is encountered for subclassing or instantiation.
original commit: e26742e736f59ebb4beada50dd813105de89948d
2014-02-20 16:50:27 -05:00
Asumu Takikawa
6eb16b9f2f
Refactor part of class type system
...
original commit: afb141711406ed4f65de6f558afdd76f17524013
2014-02-20 16:50:27 -05:00
Asumu Takikawa
a7b4474b11
Add documentation for typed classes
...
original commit: 0a89b9b71817403ef9e24da59e48fa6368eca1c1
2014-02-20 16:50:27 -05:00
Asumu Takikawa
e93058db54
Check for unsupported class clauses and error
...
original commit: 66c1b10c189c06739b3c85fbb568b0d0859dee7d
2014-02-20 16:50:27 -05:00
Asumu Takikawa
b08abc4f48
Update type->contract for new class representation
...
original commit: 661a3714342c8268c8986ef1fbd7438bb3930e1a
2014-02-20 16:50:27 -05:00
Asumu Takikawa
c87dfbdf18
Rewrite class tests as standard TR typecheck tests
...
original commit: 02391fae9d5778a3d6b6659930d13ac3df22b588
2014-02-20 16:50:27 -05:00
Asumu Takikawa
24d2f84103
Allow depth subtyping with #:implements
...
original commit: bd5ec395c264971fe9c8f0ed2fbe5130cc406c56
2014-02-20 16:50:27 -05:00
Asumu Takikawa
72dd536f96
Parse-type fix for Instance types
...
original commit: 00bb21964247ebb774c2db4709b567adf16cc51a
2014-02-20 16:50:27 -05:00
Asumu Takikawa
fef7b7b508
Fix timing in class type-checking
...
(make sure the timing goes away if the flag is off)
original commit: ee3e83856c6f6973c29ada0c809a5ecb50d871aa
2014-02-20 16:50:26 -05:00
Asumu Takikawa
d78535d187
Add subtyping tests for classes/objects
...
original commit: 8331d8c8a2e994a2c961e18977d9563a3f92ba8d
2014-02-20 16:50:26 -05:00
Asumu Takikawa
3222baafbd
Simplify typechecking for some field initializers
...
This seems to speed up type-checking for some
initializers. The caveat is that it's slightly less
paranoid about type-checking the expansion.
original commit: 03c74a16ff0c9f8707361e0818b37c99ae5d00d9
2014-02-20 16:50:26 -05:00
Asumu Takikawa
546a52843d
Simplify type expression
...
original commit: 80d21e106c8aeed582de2bedfd4fbd586a3a16c4
2014-02-20 16:50:26 -05:00
Asumu Takikawa
6d6bf8f553
Avoid type-checking type annotation clauses
...
original commit: e52256b7f08e5e4bb5846fd5bbfc2032b46ea45e
2014-02-20 16:50:26 -05:00
Asumu Takikawa
566b4d3dfb
Make subtyping checks on objects faster
...
original commit: c8e5423e557cf5976bdb0050b72979b9fb9c76a4
2014-02-20 16:50:26 -05:00
Asumu Takikawa
97c6350e87
Fix augment type printing
...
original commit: e80c4d72fb3ef7ee86915d17d5c6d5e1837bc800
2014-02-20 16:50:26 -05:00
Asumu Takikawa
c07f80cc07
Allow polymorphic method types
...
original commit: 7d7f23589f31eab49cec51e63c40d7065b0e2596
2014-02-20 16:50:26 -05:00
Asumu Takikawa
d298da507f
Add internal timing support for classes
...
original commit: 45b8e17687d925fa282220d03c73ed09a47ab2c7
2014-02-20 16:50:26 -05:00
Asumu Takikawa
65dc0c6374
Adjust local expansion to account for local macros
...
original commit: 7cc9b0ef12dd4eacf36c2bf619e1687da0ca689f
2014-02-20 16:50:26 -05:00
Asumu Takikawa
5b6fcb01dc
Increase named-based sharing of class types
...
This change makes serialized types much smaller when large
class types are used for type aliases. This shrunk the zo file
for the gui-types module from 12MB to 220KB.
If large zo files are a problem elsewhere, this may be worth
doing for more types.
original commit: 54bc1732da258f4d1f979fde24c793790b8c50ba
2014-02-20 16:50:26 -05:00
Asumu Takikawa
02f61dbd05
Add support for in-line class polymorphism
...
original commit: 37c1730bb3db2007d6ff25455103f7f0ea95b69f
2014-02-20 16:50:26 -05:00
Asumu Takikawa
dd208670d5
Reorganize functions for type parameters
...
This refactoring saves some lines and reduces the ridiculous
number of arguments for some helper functions. (using a hash
table instead of arguments) This will help for adding type
parameter name scoping later.
original commit: 3c044e23fda47897b77676f5c9d8c9434754581e
2014-02-20 16:50:26 -05:00
Asumu Takikawa
3022f91b48
Add support for separate augment/pubment interfaces
...
Now a class may have a pubment method that has a different
type for being directly called and for being specialized
for inner calls. This is actually necessary to type-check
interesting uses of pubment/augment.
Note that if a class does not provide a type annotation
for the augmentation interface, it will be assumed to be
the same as the pubment type.
original commit: 8ca8eb164205df1850ce677d3e37053712565ed8
2014-02-20 16:50:26 -05:00
Asumu Takikawa
bd47f1e634
Refactor class type-checker
...
original commit: f8212063b798f866fc91862942b54baaae7194eb
2014-02-20 16:50:26 -05:00
Asumu Takikawa
aa3f6c7b9b
Use lists as sets for type-checking classes
...
original commit: dbf9459e99465e73bd9adaa6a907e5516107b284
2014-02-20 16:50:26 -05:00
Asumu Takikawa
8b56ec986e
Improve error messages for superclass checks
...
Also add a test for the inherit-field case for this
original commit: ed94d35105d43b087eab1814f939e86c593364f9
2014-02-20 16:50:25 -05:00
Asumu Takikawa
b7f41e65d7
Add support for inherit-field
...
original commit: c16ace02fa15ab1a1ca7e17fe66c666d44ccf23a
2014-02-20 16:50:25 -05:00
Asumu Takikawa
211f4f4db5
Fix a private/augment method issue
...
original commit: e25b24986fc2c141a0abd8a4f6f4245f94d1f379
2014-02-20 16:50:25 -05:00
Asumu Takikawa
8e7bfb9ad8
For classes, always check expected type against synthesized
...
This also enables depth subtyping for class types, which
was needed to get the tests to pass
original commit: 008e18a6b44e2a363c706bb1994ccee6c56dec98
2014-02-20 16:50:25 -05:00