Commit Graph

3745 Commits

Author SHA1 Message Date
Asumu Takikawa
33978615f1 Add struct inheritance in type-environment
Use it to start adding types for a subset of
typed/racket/sandbox

original commit: b56eb4302282952bce152351ea7facbc6d73ebfc
2014-11-10 17:29:34 -05:00
Vincent St-Amour
1030f59a07 Fix interaction between early exits, filters and the optimizer.
Closes PR14828.

original commit: 517e22eee8ee87eb7048996c5a610edf426d073c
2014-11-07 15:55:49 -05:00
Vincent St-Amour
2d4c58ad3a Document surprising control flow.
original commit: 629b3119b85f7f08e12821d9d84b8028be0053f9
2014-11-07 15:11:47 -05:00
Vincent St-Amour
1e6eb14bde Fix comment.
original commit: 424e896da5e0133a214f863359e6956e85f2dd0d
2014-11-07 15:11:05 -05:00
Vincent St-Amour
0414e6e557 Document another TR optimizer bug found via random testing.
original commit: 547d52fe2728dba06a0d6d6d80a19a812ae21027
2014-11-06 13:47:27 -05:00
Asumu Takikawa
afa370a4b7 Remove an unnecessary syntax-parse expression
Not sure why this was there

original commit: c51a87dc366e9f76e99f03314c815147889c52e0
2014-11-05 17:03:52 -05:00
Asumu Takikawa
3eaa43a93e Fix expected type in test
original commit: 8137163b7fb630de6b2d13c787144e562aa2a4aa
2014-11-05 16:28:32 -05:00
Asumu Takikawa
ef993d3c61 Unbreak TR's top-level
A recent change I made broke optimizations at the top-level

original commit: 54dfd50b89122fd73d73977ff81b393f620c2785
2014-11-05 16:28:32 -05:00
Ryan Culpepper
9bf47d500e update typed/openssl protocol type
original commit: 96cefe88c4485d1242ae361522b59371709fbc3d
2014-11-05 13:40:59 -05:00
Vincent St-Amour
b50ecd0aca Compile the math library as part of the TR test suite.
original commit: 1d09fbde371c8475e8a1ce3dd9cc66e0f3ee95dc
2014-11-05 11:02:20 -05:00
Asumu Takikawa
fef047b54e Simplify contract generation code
Don't export type->contract except for testing. This
discourages direct use of type->contract in favor of
using the change-contract-fixup approach.

Also consolidate most of the contract-related syntax
properties into a single property containing a prefab
struct instance.

original commit: b374902bf3dd24e06f64017aa3d89e29ec6ffd42
2014-11-04 18:17:22 -05:00
Asumu Takikawa
541dcded61 Avoid direct use of type->contract in with-type
Eliminates the last remaining use of type->contract
outside of the type-contract.rkt file. This allows
all contract generation to go through a single point
of control.

original commit: 7b6ae09a2dcf04a5755f6f9256ff82369cc52403
2014-11-04 18:17:21 -05:00
Asumu Takikawa
809554a5a6 Change contract on change-contract-fixups
The context should provide a flattened list of syntax
to the function.

original commit: 4d806fb02dd18c6f067d84806eb8ca93051da0d2
2014-11-04 18:17:21 -05:00
Vincent St-Amour
481067f6cb Fix other bugs in type of expt.
Found using the new random testing.

original commit: ff0c101a648d2981231ebdb886aba8504094bd95
2014-11-04 18:12:14 -05:00
Vincent St-Amour
dd7884fd49 Fix type of expt.
Add expt to random testing.

Haven't seen one of those bugs in a while. Thank you Redex.

Closes PR14823.

original commit: 8b8130c38e211128f735a640f199213c80580f71
2014-11-04 18:12:14 -05:00
Asumu Takikawa
a4a2ccacc3 Eliminate special cases for top-level contract gen
Use the same mechanism as require/typed for doing all
contract gen for make-predicate, cast, etc. Also don't
special-case contract generation for top-level require/typed.

original commit: 1c5202ade74c922e7f3870c7bc3e505357a3ed85
2014-11-04 15:24:33 -05:00
Asumu Takikawa
b6d98917f5 Adjust contract generation for provides in TR
Use the same mechanism as ordinary require/typed to generate
contracts for provide forms.

original commit: 34076af389b717cb9840b960adb9a8761bd05db7
2014-11-04 12:57:52 -05:00
Sam Tobin-Hochstadt
aba90ebcff Fix require/typed/provide in no-check context.
Closes PR 14821.

original commit: 2221fa279c0c0425ad0f3c221021827a5feccd42
2014-11-03 09:14:57 -05:00
Asumu Takikawa
de18a43b33 Update TR type for current-process-milliseconds
original commit: 03153d46ecebccab845797d1c1599a914ae26743
2014-11-03 01:25:15 -05:00
Asumu Takikawa
89f25ec981 Fix Editor<%> and Snip% types
original commit: f59b36a9511032be224108c31fc716e71124521f
2014-11-02 22:10:43 -05:00
Asumu Takikawa
f06ce2dbb7 Adjust type of log-level? for recent changes
original commit: 566668e0b9613c53a196e265f96722ddf73f753b
2014-11-01 21:48:18 -04:00
Asumu Takikawa
decd61de65 Fix type for window<%> for TR
Closes PR 14812

original commit: d6b3434cc611d2240483c66c4f8e7b3f326ef93e
2014-10-31 11:16:03 -04:00
Asumu Takikawa
26345f7e8e Fix ordering issue in typechecking inner calls
Closes PR 14810

original commit: b7eeaf7608ee3e46f6c8923957362920af3c61b6
2014-10-30 03:22:09 -04:00
Asumu Takikawa
d51769c39f Add suppport for weak boxes in TR
Closes PR 14771

original commit: 7829776f728432f6c3642c4282e4731500953ac1
2014-10-30 03:22:09 -04:00
Asumu Takikawa
18e484c116 Fix/add base-env types for Ref 14.4.3
original commit: 872e21eff13087f63cd0d366c17effe040a4aeee
2014-10-29 01:08:21 -04:00
Asumu Takikawa
e0d79e11c9 Send thunks to check-syntax for type tooltips
This avoids the cost of computing the printed types
to some degree. It still does have overhead (~5%) over
not computing anything related to tooltips because of
the cost of traversing the type table and computing
tooltip locations.

original commit: 64bc7d4e859e84ce044fd7f72043e26218553c58
2014-10-28 17:41:58 -04:00
Sam Tobin-Hochstadt
9e628b19f7 Add implies from typed-racket-lib to unstable-contract-lib.
Typed Racket, as of 8ea8c54eb, can add explicit require lines
to the expanded module, which can confuse the dependency
analyzer. An explicit implies declaration avoids the problem,
although I'm not sure that this is the right solution.

original commit: 8582d94507ae6b2c3c710b6e244a037461bef0f7
2014-10-28 15:12:32 -04:00
Sam Tobin-Hochstadt
ed1696b221 Avoid requires of contracts when they're not used.
This changes when various libraries that provide contract
support to possible contracted bindings to declare when
those bindings are needed.

Probably, each static-contract combinator should manually
add to the list, instead of having one fixed static list,
but this is a start.

Saves about 10ms in startup for an empty TR module on my
laptop.

Thanks to Robby for the idea.

original commit: 8ea8c54eb47faac7c0d8bcd868a9b12f8ea2e142
2014-10-28 12:04:49 -04:00
Asumu Takikawa
78d3d613fe Fix init order of choice%'s type
original commit: 6ad017a1e9bd042d41266fc81244682f87731ae2
2014-10-24 15:33:52 -04:00
Asumu Takikawa
a8719e9823 Avoid computing type tooltips twice
The logging code in tc-toplevel.rkt is sufficient to get
all the type tooltips.

original commit: 17cafe652e13049fc05540c4ae2bd6f93559244d
2014-10-24 01:00:30 -04:00
Asumu Takikawa
086aac734b Fix checking of (list ...) w/ union expected type
Closes PR 14758
Closes PR 14747

original commit: 5138614abacb7309213e772fe3701a8c9c882f37
2014-10-23 23:01:28 -04:00
Asumu Takikawa
1b8619bc14 Simplify TR class macro handling of names
Instead of using a syntax-property hack, just disarm the
expanded syntax (TR will do this later in the pipeline anyway).

original commit: 375abf3c2b26b76044a63c1e0d8bd16cc4f52a38
2014-10-23 00:48:05 -04:00
Asumu Takikawa
3399923ab8 Export disarm* with protect-out
original commit: 9e242fbaef72125708e51d1091bcd24a86823b6c
2014-10-23 00:47:41 -04:00
Asumu Takikawa
758d4a64b0 Fix typed private class fields with functions
A public method definition and a private field that contains
a function are hard to distinguish without traversing the entire
class body, which caused TR to fail to detect the private field
case. TR now uses more compile-time state to precisely
distinguish the cases.

Also fixes a related bug in which TR would incorrectly handle
multiple private fields defined with a single `define-values`.

Closes PR 14788

original commit: 670c8576851cb21e910778f913270a0752e7ede4
2014-10-23 00:20:07 -04:00
Vincent St-Amour
85bd67a8b0 Prune argument types too in error messages.
Closes PR 12907.

original commit: 9c30da7682a96a5fbb7f4dd6afebafb8006d8274
2014-10-22 13:58:42 -04:00
Asumu Takikawa
192f85b684 Add contracts and omit an unused definition
original commit: 200f1cdb45b69674ed9ba91e68855d323fb7a3b6
2014-10-21 10:14:50 -04:00
Asumu Takikawa
905058e07c Greatly reduce size of class static contracts.
This helps generate contracts for GUI classes using less
time and memory.

original commit: dc578cdbc0496fe5bdfd2238981e8e3ac206756b
2014-10-21 10:14:50 -04:00
Asumu Takikawa
573f6506b3 Use a new approach to generating Name contracts
This handles contract generation for recursive or
mutually recursive Name types in the static contract
framework.

Instead of just generating recursive-sc static contracts,
it memoizes the recursive contract within a single
type->contract call by indirecting through a table.

When static contracts are instantiated, the table is
consulted for computing contract kind information and for
generating the actual contracts for the recursive names.

original commit: 608dfcf3356fb4957331dc7c140b9ac176d36991
2014-10-21 10:14:50 -04:00
Asumu Takikawa
55c8541c82 Add a test for generating GUI contracts for TR
original commit: 3d4f7906c8ebd1e17337f8b6a39a51749c109bb8
2014-10-21 10:14:49 -04:00
Asumu Takikawa
744152b0d8 Fix TR docs on #:implements in Class types
Please merge to v6.1.1

original commit: 3b006df29d3b74428fbc2e3a33a53f36fb400753
2014-10-21 00:57:46 -04:00
Asumu Takikawa
38ceb044cd Fix TR treatment of parent row in class types
This bug manifested in having extraneous class
members in a type for a class whose superclass
expression was a mixin application.

original commit: c1a27951a38733419702b6647b97f1547ed24ae3
2014-10-20 18:18:39 -04:00
Asumu Takikawa
eb79b59d1e Fix type for stx->list in typed/syntax/stx
Please merge to v6.1.1

original commit: 125d993c64bd71ec83109717e029f0e7da4699e3
2014-10-20 17:39:17 -04:00
Asumu Takikawa
1b8539dfbe Work around a type alias bug in framework types
The type alias analysis is unable to detect a rare kind
of type dependency and as a result initializes type aliases
in an order that doesn't work. Adding the extra `Class`
boilerplate here accommodates the analysis.

Please merge to v6.1.1

original commit: 4a32fa15515494bca418a655bd80a03adfc29442
2014-10-20 15:56:23 -04:00
Vincent St-Amour
544a8cc2a1 Fix types for foldl and foldr with 3 lists.
Thanks to Jack Firth for the report.

original commit: 9030680e312c54522bdd801c6113400535c1965a
2014-10-20 15:44:45 -04:00
Asumu Takikawa
24673c7642 Add typed/net/git-checkout
original commit: 7d241e92143dc4327c71ec1bb1246bb81afe14b4
2014-10-20 02:53:40 -04:00
Asumu Takikawa
5f0b741571 Fix a bug in typechecking kw function application
Mandatory kw arguments in function types could confuse
the typechecker when the function had the
`syntax-procedure-converted-arguments-property` property
set.

original commit: a70588ac4fa27fc7c69b8901be8f129802db05d7
2014-10-20 02:50:24 -04:00
Asumu Takikawa
469f501a70 Fix types for init arguments in framework
Please merge to v6.1.1

original commit: 96310d823eeb2b6836707f31e937dd2f90557cd4
2014-10-19 21:14:45 -04:00
Asumu Takikawa
f4cc45a9d1 Remove types for interfaces from TR framework.
We don't yet support types for interface values.

Please merge to v6.1.1

original commit: ca79eceb60b3f42d9bdb279b48441647632b8f23
2014-10-19 21:14:38 -04:00
AlexKnauth
5ac4e056ac add types for Stx-Null, Stx-Pairof, and Stx-Listof
original commit: 92f5b37ae231ef4521de91b2724041e0ff928f98
2014-10-18 12:25:28 -04:00
AlexKnauth
e086110009 add comments about (Syntaxof Syntax-E)
original commit: 3d88e7c6630806275bcfdab33d379c43a59094d8
2014-10-18 12:25:28 -04:00