Commit Graph

1216 Commits

Author SHA1 Message Date
Ryan Culpepper
f49412add8 moved unstable/poly-c to racket/contract/parametric 2011-04-08 08:25:22 -06:00
Ryan Culpepper
73ab167522 created racket/syntax from parts of unstable/syntax 2011-04-07 09:47:20 -06:00
Vincent St-Amour
9c3bee03e7 Fix bounded-fixnum opts to only fire with the right number of arguments. 2011-04-01 14:56:17 -04:00
Vincent St-Amour
60cc8c4453 Fix type of sqr. 2011-03-21 16:06:37 -04:00
Vincent St-Amour
4ba3f1a6dd Fix type names. 2011-03-18 13:25:06 -04:00
Vincent St-Amour
3ebe9e78f9 Optimize add1 and sub1 on floats and fixnums. 2011-03-18 13:25:05 -04:00
Vincent St-Amour
d06bf0de91 Use subtype test, just in case. 2011-03-18 13:25:05 -04:00
Vincent St-Amour
17afa91c09 Provide the index? predicate. 2011-03-18 13:24:58 -04:00
Vincent St-Amour
1f0386b46c Improve TR's fixnum optimizations, using the new sub-fixnum types. 2011-03-18 10:25:22 -04:00
Vincent St-Amour
bde2ee0b8d Changes to the regular base type environment. 2011-03-18 10:25:22 -04:00
Vincent St-Amour
ee29d371c9 Updated TR's base type environment to use the new numeric types.
This ended up being an almost complete rewrite of the base environment.
Note: While the commit is dated Jan 27, the work was finished on Mar 2.
2011-03-18 10:25:21 -04:00
Vincent St-Amour
bf6379c363 Add a helper function to add filters en masse to express propositions
that are true about a function's arguments if the function returns.
2011-03-18 10:25:20 -04:00
Vincent St-Amour
88fac43d55 Add an Exact-Number type. 2011-03-18 10:25:20 -04:00
Vincent St-Amour
80a9027f1e Take the meet of constraints earlier in the inference process.
This avoids constraint explosions in some cases, notably when working
with polydots and plain variable arity functions at the same time.

However, this also weakens inference a bit (breaks it for
unholy-terror and related tests), but not in a way that affects any
practical use cases that I know of.
2011-03-18 10:25:19 -04:00
Vincent St-Amour
d0bab99535 Move subtype check in inference engine earlier, for performance reasons. 2011-03-17 18:43:59 -04:00
Vincent St-Amour
e450e2815b Share dotted variables to make inference faster. 2011-03-17 18:43:58 -04:00
Vincent St-Amour
bd301912c0 Remove duplicate constraints when taking their meet. 2011-03-17 18:43:58 -04:00
Vincent St-Amour
f8528ac892 Change type of make-sequence to reflect changes to its implementation. 2011-03-17 18:43:57 -04:00
Vincent St-Amour
fe8f1c3591 Fix contract. 2011-03-17 13:10:19 -04:00
David Van Horn
760a58b65d Fixes more spelling errors. 2011-02-04 19:44:13 -07:00
David Van Horn
c9519fd113 Fixed various spelling errors. 2011-02-03 17:42:33 -05:00
Vincent St-Amour
3c081d8fa7 Document the Path-String type. 2011-02-01 18:00:26 -05:00
Vincent St-Amour
1b3052748e Add a case-> type-constructor as a synonym for case-lambda. 2011-01-31 16:39:20 -05:00
Vincent St-Amour
d65438c9ea Remove some legacy bindings. 2011-01-31 16:39:19 -05:00
Vincent St-Amour
22391be437 Cleanup of exposed base types. 2011-01-31 16:39:19 -05:00
Vincent St-Amour
0f0a2625c6 Fix typechecking of single flonum literals, now that they are enabled by default. 2011-01-31 16:39:18 -05:00
Vincent St-Amour
f1c6c74284 Small-Float -> Single-Flonum 2011-01-31 16:39:18 -05:00
Vincent St-Amour
4ac36fd59b Added the new single-precision float function to TR. 2011-01-31 16:39:18 -05:00
Vincent St-Amour
b26531774b Update base-env-indexing to use the new types. 2011-01-31 16:39:15 -05:00
Vincent St-Amour
46f086282d Bytes are a sequence of the new Byte type. 2011-01-31 16:39:15 -05:00
Vincent St-Amour
5dbc752542 Edit TR's optimizer's docs to reflect that Float-Complex is the only
complex type that can be optimized.
2011-01-31 16:39:15 -05:00
Vincent St-Amour
768bb63361 Fix optimizer to work with new types. 2011-01-31 16:39:14 -05:00
Vincent St-Amour
a0a54b231d Fix TR tests. 2011-01-31 16:39:14 -05:00
Vincent St-Amour
e56663c943 Add a predicate field to base types, which makes checking for
subtyping of value types easier.

However, this means that base types can't be marshaled as before,
since these predicates can't be marshaled. Instead, we now marshal
base types as identifiers that refer to their base type object.
2011-01-31 16:39:13 -05:00
Vincent St-Amour
3e27ed607c Avoid generating large contracts for common numeric types. 2011-01-31 16:39:13 -05:00
Vincent St-Amour
d4c93cc12e TR's numeric tower is now built from unions of non-overlapping base types.
A lot of the work that was done by special-casing number types can now be
done by TR's handling of unions. This makes it easier to add more numeric
types to the tower and should make writing down types for numeric
primitives much less error-prone.

In addition, this commit adds several numeric types that will help get
tighter bounds on integer arithmetic, such as Index types. They will have
to be integrated to the base environment before they can be useful.
2011-01-31 16:39:13 -05:00
Vincent St-Amour
78c4809177 Make bare union constructor smarter. 2011-01-31 16:39:12 -05:00
Vincent St-Amour
4b3e621d0f Documented opt-lambda: and popt-lambda:. 2011-01-31 16:39:12 -05:00
Vincent St-Amour
2bd0145603 Generalize hash table literals and subtypes of symbol.
Closes PR 11670.
2011-01-26 14:23:19 -05:00
Eli Barzilay
5998ecc564 Abstract the initialization stuff into a separate function.
Make it available outside so in the future I can use it in the PL class
code.
2011-01-14 08:35:55 -05:00
Vincent St-Amour
7808be5e20 Fix portable-fixnum?. 2011-01-12 14:20:29 -05:00
Vincent St-Amour
cb723092e2 Fix portable fixnum size. 2011-01-05 14:42:31 -05:00
Sam Tobin-Hochstadt
25d2827d0d Document ordering in `case-lambda' types.
Closes PR 11394.
2010-12-13 07:26:31 -05:00
Vincent St-Amour
740b8308d7 Scheme -> Racket 2010-12-10 17:17:02 -05:00
Vincent St-Amour
f8c01299f9 Fix double application of format.
Closes PR 11524.
2010-12-10 16:59:12 -05:00
Vincent St-Amour
81ef5f9418 Typecheck body of letrec using original types instead of potentially undefined type. 2010-12-08 20:32:20 -05:00
Vincent St-Amour
53719600d8 Error if we get a type that may be undefined and we don't expect it. 2010-12-08 20:32:20 -05:00
Vincent St-Amour
b045153177 letrec: consider outside bindings safe. 2010-12-08 20:32:19 -05:00
Sam Tobin-Hochstadt
463ab0d309 Fix type of `-' 2010-12-08 19:31:57 -05:00
Sam Tobin-Hochstadt
e70ccafd7b Add `defined?' assertions to fix DrRacket. 2010-12-08 18:53:56 -05:00