Commit graph

545 commits

Author SHA1 Message Date
Niko Matsakis
ae9ab75384
Merge pull request #183 from matklad/no-clone
remove needless clone
2019-08-15 07:01:34 -04:00
Niko Matsakis
b272cc1321
Merge pull request #180 from nikomatsakis/durability
Durability
2019-08-15 07:01:00 -04:00
Niko Matsakis
b26a690ff3 remove an unnecessary &mut 2019-08-15 06:50:10 -04:00
Niko Matsakis
969a9c2fc8 re-use the database-key instead of recreating it 2019-08-15 06:39:17 -04:00
Niko Matsakis
4cae741768 inline probe_memoized_value 2019-08-15 06:36:37 -04:00
Aleksey Kladov
4c09786285
Merge pull request #184 from matklad/or_default
tiny simplification
2019-07-05 17:49:28 +03:00
Niko Matsakis
485df37e6f make durability helper panic on an undefined key 2019-07-05 06:06:29 -04:00
Niko Matsakis
d4f7e4b2b4 improve comment 2019-07-05 06:05:18 -04:00
Niko Matsakis
346ce6bc16 remove set_common helper and merge into set 2019-07-05 06:01:55 -04:00
Niko Matsakis
06ad8c7930 merge set and set_with_durability in plumbing trait 2019-07-05 06:01:17 -04:00
Niko Matsakis
8d30df0a0f log durability 2019-07-05 06:00:21 -04:00
Niko Matsakis
e4b822cca4 s/verify_value/mark_value_as_verified/ 2019-07-05 05:59:21 -04:00
Niko Matsakis
87f8517d75 remove max_durability in favor of Durability::MAX 2019-07-05 05:58:23 -04:00
Niko Matsakis
e4cca9b8ff disallow (and remove) dead-code 2019-07-05 05:58:10 -04:00
Niko Matsakis
6252430a91
Update src/input.rs
Co-Authored-By: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-07-05 05:52:36 -04:00
Aleksey Kladov
519bde621c tiny simplification 2019-07-05 10:39:59 +03:00
Aleksey Kladov
1faa9d6016 remove needless clone 2019-07-04 15:20:27 +03:00
Niko Matsakis
5221e95ac4 correct out of date comments and typos 2019-07-04 06:32:08 -04:00
Niko Matsakis
e190a291f5
Update src/debug.rs 2019-07-03 06:28:09 -04:00
Niko Matsakis
ac93c950be make interned keys have durability high 2019-07-02 08:22:25 -04:00
Aleksey Kladov
76f153e35e
Merge pull request #179 from matklad/bump-rand
⬆️ rand
2019-07-02 15:21:09 +03:00
Niko Matsakis
9d474363fc s/next_revision/synthetic_write/
Also write some docs explaining its side-effects.
2019-07-02 07:49:01 -04:00
Niko Matsakis
a0a6bac5af modify public API to set_foo_with_durability 2019-07-02 07:49:01 -04:00
Niko Matsakis
09c9bd9761 adjust public api from is_constant to durability 2019-07-02 07:49:01 -04:00
Niko Matsakis
880b29a640 move durability to its own module and make part of public API 2019-07-02 07:49:01 -04:00
Niko Matsakis
8b7808c6ae eliminate a built-in notion of constant durability 2019-07-02 07:49:01 -04:00
Niko Matsakis
ccb85989bc rename durability_last_changed_revision to last_changed_revision
The old name was really awkward.
2019-07-02 07:49:01 -04:00
Niko Matsakis
e796af2e7a update comment on durability_last_changed_revision 2019-07-02 07:49:01 -04:00
Niko Matsakis
25ce7ab47b move revisions into a vector indexed by durability 2019-07-02 07:49:01 -04:00
Niko Matsakis
c756d98fbb move revision code to its own module, introduce AtomicRevision
pure refactoring
2019-07-02 07:49:01 -04:00
Niko Matsakis
86dfdd1fda permits things to become *more* durable without a "change"
This will be important if we want to automatically upgrade the
durability of inputs.
2019-07-02 07:49:01 -04:00
Niko Matsakis
7bf4f9dc4f silence rng deprecation warning 2019-07-02 07:49:01 -04:00
Niko Matsakis
5bbd500c64 switch internally from IsConstant to Durability 2019-07-02 07:49:01 -04:00
Niko Matsakis
21a70b6eb0 use a newtype'd IsConstant for better readability
Random bool constants are just so gauche.
2019-07-02 07:49:01 -04:00
Niko Matsakis
e480e08013 simplify slot constant tracking 2019-07-02 07:49:01 -04:00
Niko Matsakis
30714022fd kill the ChangedAt struct
It didn't seem like it was buying us much.
2019-07-02 07:49:01 -04:00
Niko Matsakis
0a5b6b0451 permit constants to be modified
We now track the last revision in which constants were modified. When
we see a constant query result, we record the current revision as
well. Then later we can check if the result is "still" constant. This
lets us cut out a lot of intermediate work.
2019-07-02 07:49:01 -04:00
Aleksey Kladov
89237e85f7 ⬆️ rand 2019-07-02 14:40:43 +03:00
Niko Matsakis
636e48d45d
Merge pull request #176 from nikomatsakis/arc-all-the-things
introduce slots
2019-07-02 06:58:45 -04:00
Niko Matsakis
ed2bd527e8 use a fixed seed 2019-07-02 06:49:24 -04:00
Niko Matsakis
7bd9e0120f use a proper standard deviation to compare oracle + approx LRU 2019-07-02 06:49:24 -04:00
Niko Matsakis
2750830694 remove outdated comment 2019-07-02 06:49:24 -04:00
Niko Matsakis
e7d704dd8b convert DatabaseSlot to unsafe trait
The unsafe impl now asserts that the `DatabaseSlot` implementor type
is indeed `Send+Sync` if `DB::DatabaseData` is `Send+Sync`. Since our
query keys/values are a part of database-data, this means that `Slot`
must be `Send+Sync` if the key/value are `Send+Sync`. We test this
with a function that will cause compliation to fail if we accidentally
introduce an `Rc<T>` etc.
2019-07-02 06:49:24 -04:00
Niko Matsakis
579e093213 generate a DatabaseData tuple that collects all the key, values 2019-07-02 06:49:24 -04:00
Niko Matsakis
3224c322e8 switch to a NonZeroU64 so that Option<Revision> is one word 2019-07-02 06:49:24 -04:00
Niko Matsakis
4f8c4720d4 change Revision to start from 1 2019-07-02 06:49:24 -04:00
Niko Matsakis
9d550a9343 track dependencies via direct links to slots 2019-07-02 06:49:24 -04:00
Niko Matsakis
50cb001b41 introduce slots to the interner 2019-07-02 06:49:24 -04:00
Niko Matsakis
85848e1bbf complete mysterious comments 2019-07-02 06:49:24 -04:00
Niko Matsakis
11aba6ad2b introduce slots to input storage 2019-07-02 06:49:24 -04:00