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
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
Niko Matsakis
03e64254e9
do not store database_key
in the slot
2019-07-02 06:49:24 -04:00
Niko Matsakis
7988b5e295
switch to the "random LRU" strategy
2019-07-02 06:49:22 -04:00
Niko Matsakis
d80b3dd879
integrate lru logic into derived table
2019-07-02 06:49:02 -04:00
Niko Matsakis
e9f91f03a5
roll our own lru list
...
We could use e.g. intrusive-collections but from reading the docs and
surveying the source it wasn't *obvious* to me that it had the right
semantics.
2019-07-02 06:48:59 -04:00
Niko Matsakis
4e5a23b9d7
rewrite derived table to use Slot
(LRU not yet supported)
2019-07-02 06:48:32 -04:00
Niko Matsakis
848233c59c
Merge pull request #174 from matklad/no-volatile
...
Replace volatile query type with report_untracked_read fn
2019-06-26 06:32:25 -04:00
Aleksey Kladov
caa8dcfb06
Update src/runtime.rs
...
Co-Authored-By: Niko Matsakis <niko@alum.mit.edu>
2019-06-26 13:28:12 +03:00
Aleksey Kladov
6d60798eb8
Replace volatile query type with report_untracked_read fn
2019-06-26 13:10:44 +03:00
Niko Matsakis
3534d18c64
Merge pull request #178 from matklad/authors
...
Change authors to Salsa developers
2019-06-26 06:07:35 -04:00
Aleksey Kladov
10500c8a24
Change authors to Salsa developers
...
Salsa is a team effort, and builds on a mountain of pre-existing
knowledge!
2019-06-25 13:49:20 +03:00
Niko Matsakis
4084c2c6c2
Merge pull request #175 from matklad/doc-requires
...
Actually document salsa::requires
2019-06-21 00:12:56 -04:00
Aleksey Kladov
149b5faf8a
Actually document salsa::requires
2019-06-19 20:12:02 +03:00
Aleksey Kladov
c375b8fe09
Merge pull request #173 from matklad/release-0.12.3
...
publish v0.12.3
2019-06-12 13:16:03 +03:00
Aleksey Kladov
f34ae2dd0a
publish v0.12.3
...
- Allow to limit the number of values in a table by using LRU (#171 ).
RFC: https://github.com/salsa-rs/salsa-rfcs/pull/5
2019-06-12 12:57:04 +03:00
Niko Matsakis
efa4696ab7
Merge pull request #171 from matklad/lru
...
Add LRU to derived storage
2019-06-12 05:43:46 -04:00
Niko Matsakis
abbb92d6e0
Merge pull request #172 from matklad/AtomicU64
...
switch to AtomicU64
2019-06-12 05:11:46 -04:00
Aleksey Kladov
88fed8d6d6
Fix correctness bug when LRU evicted volatile query
2019-06-11 12:59:53 +03:00
Aleksey Kladov
7660277d8e
switch to atomic usize
2019-06-10 10:54:17 +03:00
Aleksey Kladov
0827c88259
use single lock for LRU
2019-06-09 16:47:51 +03:00
Aleksey Kladov
3d89c0d817
Add LRU to derived storage
...
LRU allows to bound the maximum number of *values* that are present in
the table.
2019-06-07 14:26:21 +03:00
Aleksey Kladov
f9468e2ac4
Merge pull request #170 from matklad/release-0.12.2
...
publish v0.12.2
2019-06-06 20:02:20 +03:00
Aleksey Kladov
bbae342b14
publish v0.12.2
...
- Don't remove query from storage if its dependency panics (#169 )
2019-06-06 18:34:12 +03:00
Niko Matsakis
8d0f5ffd95
Merge pull request #169 from matklad/strong-panic-safety
...
implement strong panic safety
2019-06-06 10:57:53 -04:00
Aleksey Kladov
fcc7058e9c
implement strong panic safety
...
Previosly, panicking query would remove in-progress memos from the
table.
However, we use panic for cancellation, so it's reasonable to **not**
remove the old result after panic. This is also known as string
exception safety guarantee: not only database is in *some* consistent
state after a panic, it is in the same state it was before the panic!
2019-06-01 23:19:15 +03:00
Aleksey Kladov
7dd31a46f8
Merge pull request #168 from matklad/release-0.12.1
...
publish v0.12.1 (second try)
2019-05-30 12:59:21 +03:00
Aleksey Kladov
ee88fdc08b
publish v0.12.1 (second try)
...
* Introduce `salsa::transparent` query type(#163 )
* Improve salsa proc macro (#160 , #162 )
* Update parking lot to 0.8.0 (#166 )
* Add `salsa::requires` attribute for private deps (#165 )
2019-05-30 12:57:11 +03:00
Niko Matsakis
e9c787e2b6
Merge pull request #165 from matklad/requires
...
allow private requirements in query groups
2019-05-30 11:49:41 +02:00
Aleksey Kladov
ccc01cc189
fix test doc comment
2019-05-30 12:32:24 +03:00
Aleksey Kladov
2485cb69a0
Merge pull request #167 from matklad/release-0.12.1
...
publish v0.12.1
2019-05-30 11:57:08 +03:00
Aleksey Kladov
df92fb794e
publish v0.12.1
...
- Introduce `salsa::transparent` query type(#163 )
- Improve salsa proc macro (#160 , #162 )
- Update parking lot to 0.8.0 (#166 )
2019-05-30 11:45:56 +03:00
Aleksey Kladov
9b2d754ea6
Merge pull request #166 from matklad/pl
...
⬆️ parking_lot
2019-05-30 11:42:52 +03:00