Vincent St-Amour
fe900e0d7a
More cons lifting.
2016-01-27 14:41:00 -06:00
Vincent St-Amour
870b8d4137
More cons lifting.
...
Could not lift all of those completely.
2016-01-27 14:40:59 -06:00
Vincent St-Amour
5dc368585f
Lift some blame and neg-party consing.
...
To avoid doing it every time the contract is checked.
2016-01-27 14:40:59 -06:00
Stephen Chang
9419778b1e
add some tests for impersonated hash tables
2016-01-27 14:51:18 -05:00
Robby Findler
c34d37d265
break list contracts out into their own file
...
which required moving and/c (and integer-in) out of
misc.rkt files to avoid cyclic dependencies
2016-01-27 08:16:39 -06:00
Stephen Chang
86a9c2e493
fix return type of hash_table_index
2016-01-26 10:26:51 -05:00
Stephen Chang
e8d34dd156
add hash-iterate-pair and hash-iterate-key+value
...
- cuts in-hash and in-hash-pairs iteration time in half
- refactor hash_table_index
- add tests
- bump version
closes #1224
2016-01-26 10:14:40 -05:00
Robby Findler
7563f5a812
refresh the popular keys
2016-01-25 23:55:41 -06:00
Robby Findler
6723c64487
dont use unsafe-{chaperone,impersonator}-procedure when {chaperone,impersonator}-procedure* might be involved
2016-01-25 23:54:12 -06:00
Vincent St-Amour
39a1b81b6a
Tests for option contract instrumentation.
2016-01-25 16:36:04 -06:00
Gustavo Massaccesi
5644b901d0
Avoid unnecessary closures in arrow-val-first
...
This code uses call-with-values and case-lambda to check the number of
values that returns the original function inside the contract.
The case-lambda create new closures because they have references
to local variables.
In these case, it's possible to avoid the creation of closure saving the
results in temporal variables, that are used later outside the case-lambda.
2016-01-25 17:18:00 -03:00
Robby Findler
f669eb4af5
add a second argument to list*of
...
to control what the last piece of the list is more explicitly
2016-01-25 07:58:49 -06:00
Robby Findler
b0d9653cbe
adjust the plus-one arity functions to exploit procedure-return-arity
2016-01-25 07:58:49 -06:00
Matthew Flatt
9e69f341b3
fix unsafe-chaperone-procedure
and ...-procedure*
side channel
...
Also, clarify in docs that `unsafe-chaperone-procedure` cannot
really work with an argument created via `chaperone-procedure*`.
2016-01-24 21:45:21 -08:00
Vincent St-Amour
767fd3fa3a
Tests for object/c and dynamic-object/c instrumentation.
...
Instrumentation which was already there from object-contract.
2016-01-22 16:10:37 -06:00
Vincent St-Amour
9d990b65dc
Add instrumentation to class/c.
...
Method contracts are taken care of by the function combinators.
So only field contract instrumentation is necessary.
2016-01-22 15:30:07 -06:00
Alexis King
95c0dfce38
Include racket/base for-label for the contracts intro in the guide
2016-01-21 20:18:54 -06:00
Alexis King
3620bae6da
Fix check-version from version/check
...
Use get-pure-port to more robustly handle HTTP and to avoid prematurely
closing the output port.
2016-01-21 20:18:48 -06:00
Alexis King
f52d43e600
Add for/stream and for*/stream comprehensions to racket/stream
...
Closes #664
2016-01-21 20:18:39 -06:00
Leif Andersen
34cfe48355
Add examples to make-require-transformer
2016-01-21 17:53:37 -05:00
Robby Findler
10c934aec0
restore the contract profile marks
...
commit bea67c0
dropped a bit too much of the contract wrapper
2016-01-21 06:57:42 -06:00
Leif Andersen
f7298cdb29
scheme_rename -> scheme_reload
2016-01-20 23:03:16 -05:00
Robby Findler
bea67c0a39
When we know that the procedure getting a contract is "simple enough",
...
drop the tail call fanciness
"simple enough", for now, means that it is a struct selector, predicate,
constructor, or mutator. Perhaps we will learn more about such simple
procedures where this is safe some other way.
This commit speeds up this program:
#lang racket/base
(require racket/contract/base)
(struct s (x))
(define f (contract (-> any/c integer?) s-x 'pos 'neg))
(define an-s (s 1))
(time
(for ([x (in-range 10000000)])
(f an-s)))
by about 1.9x
2016-01-20 21:38:32 -06:00
Robby Findler
126c090579
special case any/c when it appears syntactically in the argument to ->
...
Skip calling the domain projection in that case and, if all of the
arguments are any/c then also skip putting the contract continuation mark
This appears to give about a 20% speed up on this program:
#lang racket/base
(require racket/contract/base)
(define f
(contract
(-> any/c integer?)
(λ (x) 1)
'pos 'neg))
(time
(for ([x (in-range 4000000)])
(f 1)))
2016-01-20 21:08:15 -06:00
Alex Knauth
f130a5ea48
Link to reference from reader extensions guide
2016-01-20 20:36:52 -06:00
Adrien Tateno
4949eb3374
exn-message misspelled as exn-messgae
2016-01-20 16:51:29 -06:00
Vincent St-Amour
7c4aaa20a8
Document with-contract-continuation-mark
.
2016-01-20 16:51:28 -06:00
Stephen Chang
fa96375742
fix in-vector segfault; document corner cases
...
closes #15227
2016-01-19 16:37:07 -05:00
Stephen Chang
0f39ee9b72
fix ni-range docs; add for tests
2016-01-19 14:22:02 -05:00
Stephen Chang
60845b2098
fix broken for tests in racket-test-core
2016-01-19 11:56:46 -05:00
Stephen Chang
8331e28c49
Merge pull request #1208 from stchang/fast-in-hash
...
add :do-in fast path for in-hash
2016-01-19 10:52:10 -05:00
Matthew Flatt
86f0d75a96
JIT: fix fast path for property-only chaperones
...
The recently added fast path for property-only chaperones did not
propagate the original object in the case that the property-only
chaperone wraps a `chaperone-procedure*` chaprerone.
Merge to v6.4
2016-01-19 06:51:25 -05:00
Vincent St-Amour
ad0f94c054
Additional test case from Robby.
2016-01-18 22:23:08 -06:00
Vincent St-Amour
4fd60fed11
Instrument id table contracts.
2016-01-18 22:23:07 -06:00
Vincent St-Amour
d5ae7125e5
Add instrumentation to sequence/c.
2016-01-18 22:23:07 -06:00
Vincent St-Amour
451ef1d37e
Add instrumentation for tail-marks-match?.
2016-01-18 22:23:07 -06:00
Vincent St-Amour
b8af007d94
Instrument stream/c.
2016-01-18 22:23:07 -06:00
Vincent St-Amour
74c423bb24
Add instrumentation to set/c.
2016-01-18 22:23:06 -06:00
Vincent St-Amour
a48b559324
Instrument async-channel/c.
2016-01-18 22:23:06 -06:00
Vincent St-Amour
c726cf6ffc
More instrumentation tests.
2016-01-18 22:23:06 -06:00
Vincent St-Amour
2f6f403ce8
Fix and improve ->i instrumentation.
2016-01-18 22:23:06 -06:00
Vincent St-Amour
d0c48de685
Add instrumentation to struct property contracts.
2016-01-18 22:23:06 -06:00
Vincent St-Amour
1661eeda18
Front-load some work in struct/dc instrumentation.
2016-01-18 22:23:05 -06:00
Vincent St-Amour
b00d7782ca
Instrumentation for parametric->/c.
2016-01-18 22:23:05 -06:00
Vincent St-Amour
143267f1e9
Remove now-redundant instrumentation of vector contracts.
...
Now covered by instrumentation at contract entry points.
2016-01-18 22:23:05 -06:00
Vincent St-Amour
1277f0347a
Instrumentation for object-contract.
2016-01-18 22:23:05 -06:00
Vincent St-Amour
e5738b8ee6
Add missing instrumentation to misc.rkt.
2016-01-18 22:23:04 -06:00
Vincent St-Amour
72418fba03
Instrument higher-order hash/c.
2016-01-18 22:23:04 -06:00
Vincent St-Amour
d34cd06b90
Tests for instrumentation of contract entry points.
2016-01-18 22:23:04 -06:00
Vincent St-Amour
f3f5d9212a
Instrumentation at use site for provide/contract and flat contracts.
2016-01-18 22:23:04 -06:00