Alex Knauth
43dc7632d4
don't provide Unit from typed/racket/base
2015-11-05 17:14:35 -05:00
Alex Knauth
390dc3a2b1
provide Unit from typed/racket/unit
2015-11-05 17:14:35 -05:00
Vincent St-Amour
2e100bcb33
Remove unsafety altogether.
...
The bytecode optimizer can do the same transformation.
2015-11-03 20:11:46 -06:00
Vincent St-Amour
2881cffdc2
Simplify unsafe op usage.
2015-11-03 18:27:20 -06:00
Vincent St-Amour
e4edf7a9ee
Remove tests made obsolete by safety improvements.
2015-11-03 18:04:44 -06:00
Vincent St-Amour
89a06cfae6
Fix bitwise-and on negative numbers.
...
Found using random testing.
2015-11-03 16:02:05 -06:00
Vincent St-Amour
58e97f83ea
Fix sign propagation for division.
...
Found using random testing.
2015-11-03 15:47:32 -06:00
Vincent St-Amour
207a12fa23
Fix the fix to compound pair optimimzations.
...
Previous version could drop code on the ground in some cases.
2015-11-03 14:35:32 -06:00
Vincent St-Amour
8f32aad3ee
Remove not-actually-unsafe unsafe operations.
2015-11-03 14:34:39 -06:00
Vincent St-Amour
5b57736af6
Guard some unsafe ops.
2015-11-03 14:32:23 -06:00
Vincent St-Amour
59b5cb7346
Remove unused dependency.
2015-11-03 14:25:49 -06:00
Vincent St-Amour
f14793c462
Remove potentially incorrect unsafe operation.
2015-11-03 14:11:49 -06:00
Vincent St-Amour
da97da5ff8
Fix type of expt when mixing floats and float complexes.
...
Found using random testing.
2015-11-02 19:31:00 -06:00
Vincent St-Amour
ca9306bb1d
Use more precise notion of "real argument" for multiplication too.
...
Found using random testing.
2015-11-02 19:31:00 -06:00
Vincent St-Amour
e47ffeb0e8
Fix interaction of sign and underflow in fl/.
...
Found using random testing.
2015-11-02 19:31:00 -06:00
Vincent St-Amour
a3d29d9e03
Align float-complex/float division with Racket more.
...
Found using random testing.
2015-11-02 19:30:59 -06:00
Sam Tobin-Hochstadt
ad0c69ea29
Make these definitions safe again.
...
As of this moment, the performance win on new-metrics.rkt for
using the unsafe version is about 1% (avg over 10 runs), which
isn't enough to make it worth the segfaults. I believe that
changes to the JIT since 2012 (when the unsafe ops were added)
have sped up struct access.
2015-11-02 14:49:25 -05:00
Sam Tobin-Hochstadt
cb35383143
Add test case for issue #215 .
2015-11-02 14:49:25 -05:00
Vincent St-Amour
ea6968f1d9
Don't attempt to unfold pair opts when we have no type info.
...
Fixes compilation of the `midi-readwrite` package.
2015-11-02 13:28:22 -06:00
Asumu Takikawa
ae0741aaa7
Use cond-contract forms instead of lazy-require
2015-10-31 04:15:06 -04:00
Asumu Takikawa
47ba1391f5
Add begin-for-cond-contract
2015-10-31 04:15:06 -04:00
Asumu Takikawa
0be2156521
Remove unused lazy-requires
2015-10-31 04:15:06 -04:00
Asumu Takikawa
15aa3d875f
Delete top-level hack that's no longer necessary
...
The trampolining implementation of the top-level solves this
without the dependency on rep/type-rep.rkt
2015-10-31 02:32:42 -04:00
Asumu Takikawa
a24852548a
Adjust expansion of contract submod redirection
...
The `local-expand` based trick defeats optimizations for the
contract system because of the extra `let-values` that's
introduced, so use `syntax-local-lift-require` instead.
This commit combined with the previous commit improves
the performance of the test at
typed-racket-test/performance/function-contract.
by a significant amount back to v6.1.1 performance.
Thanks to Robby for discovering the regression.
2015-10-29 17:50:18 -04:00
Asumu Takikawa
555571c268
Inline ->* contracts in type->contract generation
...
The contract generation process was aggressively optimizing
some contracts, leading to a pessimization when interacting
with the contract system's own optimizations.
This inlining addition undoes a small portion of the contract
generation in some cases to better cooperate with the contract
system's optimizations.
This commit alone doesn't solve the optimization problem.
But it does when combined with the next commit.
2015-10-29 17:50:18 -04:00
Asumu Takikawa
0d4b2fb3f7
Refactor define-values
for contract definition
...
This worked by accident and added an extraneous function
definition and call. Refactor to avoid that.
2015-10-29 17:50:18 -04:00
Daniel Feltey
d7ae7dbdd8
Fix incorrect serialization of signature environment
...
Closes #229
2015-10-29 01:35:33 -05:00
Andrew Kent
60c37ab2bf
conservatively label define-new-subtype as experimental for now
2015-10-27 19:32:29 -04:00
Asumu Takikawa
ac880411d4
Memoize the Un constructor for unions
...
This seems to speed up typechecking by 5-10% (depending
on the machine) on compiling the math library and on
the "new-metrics.rkt" test.
2015-10-24 21:39:43 -04:00
Asumu Takikawa
9b8b525d42
Make unit test less noisy
2015-10-24 04:13:47 -04:00
Sam Tobin-Hochstadt
c8ea37c64e
Add error message for incorrect use of Parameterof
.
...
Closes PR 14417.
2015-10-23 15:40:31 -04:00
Asumu Takikawa
2479dffde0
Fix #:opaque require clauses at the top-level
2015-10-21 17:23:24 -04:00
Asumu Takikawa
f1cb23062a
Add examples for typed/racket/unsafe docs
2015-10-21 14:26:53 -04:00
Asumu Takikawa
5fa40de546
Avoid ignoring class/unit forms at the top-level
...
Possibly a better long-term solution (for after the release)
is to not use the ignore property here and instead just use the
ignore table.
2015-10-21 13:33:30 -04:00
Asumu Takikawa
c3a59ee1c4
Use protect-out
for unsafe operations
...
Disallows usage in sandboxes and similar contexts
2015-10-20 18:00:35 -04:00
Sam Tobin-Hochstadt
6aa635d740
Fix equality handling on literals.
...
Repairs eb93a2b571
and closes #215 .
2015-10-20 15:56:07 -04:00
Asumu Takikawa
b5dc5585be
Fix part of GH issue #208
...
For private `define-values` in classes with multiple variables, don't
eagerly throw type errors in the synthesis step. Instead, wait
until the later checking step when the environment will be correctly
set up.
When the initial synthesis typecheck fails, yield type Any for
the environment. If the typecheck should really fail, this is ok. If
not, then the user can add a type annotation.
A better long-term strategy is to change the handling of environments
so that the type environment gets refined as definitions are checked.
This way all annotations that the user writes are factored into the
initial environment and unannotated variables will have their types
synthesized.
2015-10-20 14:06:32 -04:00
Vincent St-Amour
bbe3521530
Update history.
...
Please merge to 6.3.
2015-10-20 11:20:46 -05:00
Vincent St-Amour
d2a7fb31bc
Improve internal error checking.
2015-10-19 16:23:26 -05:00
Vincent St-Amour
59a61cc732
Fix tests.
2015-10-19 16:23:26 -05:00
Vincent St-Amour
22bfce117b
Add missing bits to type and ignore tables for make-object-related code.
2015-10-19 16:23:26 -05:00
Vincent St-Amour
36a40b8334
Ignore code that results from the expansion of keyword function call sites
...
...that also involve contracts.
That code was previously not marked as lifted by the contract system, and
thus was not ignored by TR. But TR was not giving it a type, which made the
optimizer unhappy, now that it looks at the types of everything.
2015-10-19 16:23:26 -05:00
Vincent St-Amour
4aed44370d
Ignore more code that has no types.
2015-10-19 16:23:26 -05:00
Vincent St-Amour
6245807b7c
Log uses of float vectors.
...
For OC to recommend using flvectors instead.
2015-10-19 16:23:26 -05:00
Vincent St-Amour
6ccb0939f8
Have optimizer skip more code that is not typechecked.
2015-10-19 16:23:26 -05:00
Asumu Takikawa
3149b0a305
Fix send
on a receiver with recursive type
...
Thanks to Matthias for finding the bug
2015-10-19 16:27:11 -04:00
Asumu Takikawa
638618ae40
Fix unsafe-require/typed for kw functions
2015-10-16 15:52:21 -04:00
Sam Tobin-Hochstadt
3d91ebeb4c
Increase timeout instead of removing it.
...
Having no timeout definition reverts to the default, which is 90 seconds.
2015-10-16 11:48:28 -04:00
Vincent St-Amour
b40cde6b67
Remove stray timeout.
...
The random tester has its own timeout, which doesn't cause drdr to error.
2015-10-16 10:20:32 -05:00
Asumu Takikawa
30ecfef309
Fix type of system-type
...
Closes GH issue #210
2015-10-10 14:59:49 -04:00