Niko Matsakis
8ca3ab56b5
update the mdbook documentation, introducing a diagram
2020-07-05 16:45:07 +00:00
Niko Matsakis
0a8c2038b5
RFC: remove link, linkcheck doesn't like it
2020-07-05 10:52:49 +00:00
Niko Matsakis
b1e3003c1e
RFC: describe new bounds
2020-07-05 10:52:47 +00:00
Niko Matsakis
0b82d24514
RFC: describe 'static requirement
2020-07-05 10:52:43 +00:00
Niko Matsakis
b59dcc9145
RFC: describe in_db
functions
2020-07-05 10:34:15 +00:00
Niko Matsakis
fad97eeb6a
remove the DB
parameter
...
This had two unexpected consequences, one unfortunate, one "medium":
* All `salsa::Database` must be `'static`. This falls out from
`Q::DynDb` not having access to any lifetimes, but also the defaulting
rules for `dyn QueryGroup` that make it `dyn QueryGroup + 'static`. We
don't really support generic databases anyway yet so this isn't a big
deal, and we can add workarounds later (ideally via GATs).
* It is now statically impossible to invoke `snapshot` from a query,
and so we don't need to test that it panics. This is because the
signature of `snapshot` returns a `Snapshot<Self>` and that is not
accessible to a `dyn QueryGroup` type. Similarly, invoking
`Runtime::snapshot` directly is not possible becaues it is
crate-private. So I removed the test. This seems ok, but eventually I
would like to expose ways for queries to do parallel
execution (matklad and I had talked about a "speculation" primitive
for enabling that).
* This commit is 99% boilerplate I did with search-and-replace. I also
rolled in a few other changes I might have preferred to factor out,
most notably removing the `GetQueryTable` plumbing trait in favor of
free-methods, but it was awkward to factor them out and get all the
generics right (so much simpler in this version).
2020-07-04 14:17:11 +00:00
Niko Matsakis
d64dfa1727
make for_each_query
dyn-safe
2020-07-04 14:17:11 +00:00
Niko Matsakis
0e5366df5d
move to QueryType.in_db(&db)
instead of db.query(QueryType)
...
This will be more compatible once we move to having queries have an
associated `DynDb` type. It also reads nicely.
2020-07-04 14:17:11 +00:00
Niko Matsakis
7a5b515279
make DatabaseStorageTypes have supertrait of Database
2020-07-04 14:17:11 +00:00
Niko Matsakis
12f54d66f4
move query/query-mut to DatabaseQueryExt
2020-07-04 14:17:11 +00:00
Niko Matsakis
28b642e8c0
make DB
?Sized
on execute_query_implementation
helper
2020-07-04 14:17:11 +00:00
Niko Matsakis
d1fe9950c5
simplify salsa_event
and make it dyn-safe
2020-07-04 14:17:11 +00:00
Niko Matsakis
67687376ed
implement the Storage<DB> change
2020-07-04 14:17:10 +00:00
Niko Matsakis
4bf46f5f24
RFC: describe new approach to runtime
2020-07-04 14:16:50 +00:00
Niko Matsakis
c6663f3dcb
return durability of modified data and remove SharedStateWriteGuard
...
Now the `with_incremented_revision` method signature does not
reference the database DB in any way.
2020-07-04 14:16:50 +00:00
Niko Matsakis
705a35d4b7
pass 'new revision' as an explicit argument
...
The goal is to eliminate the "shared state guard" argument, which
currently requires access to the database.
2020-07-04 14:16:50 +00:00
Niko Matsakis
d71a7a2751
make with_incremented_revision
dyn-safe
2020-07-04 14:16:50 +00:00
Niko Matsakis
b3ffaec3b0
remove salsa::requires
feature
2020-07-04 14:16:50 +00:00
Niko Matsakis
6e813441cb
RFC: update to mention that salsa::requires is removed
2020-07-04 14:16:50 +00:00
Niko Matsakis
cc7bc54409
RFC: adjust because DatabaseKeyIndex are not part of public API
2020-07-04 14:16:50 +00:00
Niko Matsakis
64f3eb96a1
remove GroupKey associated type
2020-07-04 14:16:50 +00:00
Niko Matsakis
1a07944efe
remove DatabaseKey associated type
2020-07-04 14:16:50 +00:00
Niko Matsakis
799ddce157
remove unused GroupData
associated type
2020-07-04 14:16:50 +00:00
Niko Matsakis
1b778760ae
track and report cycles using DatabaseKeyIndex
2020-07-04 14:16:50 +00:00
Niko Matsakis
7b5ac6e717
implement ability to get readable debug output for DatabaseKeyIndex
2020-07-04 14:16:50 +00:00
Niko Matsakis
5a1bf10ba6
add a query_name
associated constant
2020-07-04 14:16:50 +00:00
Niko Matsakis
b4c6e69faf
rewrite get_cycle_path
to push to a vector
2020-07-04 14:16:50 +00:00
Niko Matsakis
07623fb962
remove the DatabaseData
and associated unsafe code
2020-07-04 14:16:50 +00:00
Niko Matsakis
f7a14f2309
use DatabaseKeyIndex
instead of Dependency
2020-07-04 14:16:49 +00:00
Niko Matsakis
29b6b833d1
compute database-key-index for interned fields
2020-07-04 14:16:14 +00:00
Niko Matsakis
a45087a322
compute database-key-index for input slots
2020-07-04 14:16:14 +00:00
Niko Matsakis
ed1632d151
compute database-key-index for derived slots
2020-07-04 14:16:14 +00:00
Niko Matsakis
8664e7e43c
add database-key-index type
2020-07-04 14:16:14 +00:00
Niko Matsakis
206c086bac
thread group index to storage initializers
2020-07-04 14:16:14 +00:00
Niko Matsakis
9bd9f8b202
use new
with index to create group storage
2020-07-04 14:16:14 +00:00
Niko Matsakis
0da53151c5
RFC: update to use index triples
2020-07-04 14:16:14 +00:00
Niko Matsakis
d1347d8854
RFC 6: Dynamic databases
...
Update book/src/rfcs/RFC0006-Dynamic-Databases.md
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Update book/src/rfcs/RFC0001-Query-Group-Traits.md
Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>
Update book/src/rfcs/RFC0006-Dynamic-Databases.md
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
fix lint warnings on RFC
2020-07-04 14:16:14 +00:00
Niko Matsakis
59ec6482e1
update the template and randomly adapt RFC0001 only
2020-07-04 14:16:14 +00:00
Niko Matsakis
abe2011761
Merge pull request #235 from jonas-schievink/deps-size
...
Use a boxed slice to store dependencies
2020-07-04 10:15:29 -04:00
Jonas Schievink
786168fc99
Simplify collect call
2020-07-03 19:30:23 +02:00
Jonas Schievink
e2569e7afc
Use a boxed slice to store dependencies
2020-07-03 19:26:38 +02:00
Aleksey Kladov
43f6a82153
release v0.14.3
...
Support for targets without AtomicU64
2020-07-03 16:28:26 +02:00
Aleksey Kladov
9c7ac995d8
Make salsa buildable on power
...
rust-analyzer fails in rust-lang/rust repo on the power target,
because it doesn't have `AtomicU64`. So, lets just use `AtomicUsize`
as a revision number.
Semantically this is wrong, as we are not using revision to address
arrays, but, practically, it's a nice compromise to build on targets
without AtomicU64 and to have large revision numbers on most relevant
targets.
2020-07-03 16:27:19 +02:00
Niko Matsakis
bfafe50d8f
Merge pull request #233 from matklad/nompsc
...
Replace usage of `std::mpsc` with something more light-weight
2020-07-02 10:08:35 -04:00
Aleksey Kladov
a6b162aba1
Replace mpsc channels with hand-written future implementation
...
cargo llvm-lines shows that some amount of llvm lines is spend on
`std::mpsc`. Given that this is not the most loved standard library
module, and that our usage of mpsc is extremely limited, it seems
worth-while to implement oneshot channel using parking_lot.
2020-07-02 01:17:52 +02:00
Niko Matsakis
65626e35d1
Merge pull request #232 from Marwes/reduce_deps
...
feat: Prune unnecessary dependencies
2020-07-01 17:16:48 -04:00
Markus Westerlind
98eb60b1ff
Check without features on CI
2020-07-01 22:42:14 +02:00
Markus Westerlind
380306930b
feat: Prune unnecessary dependencies
...
Only AtomicCell is used from crossbeam and SmallRng from rand so we can
easily disable the default features
2020-07-01 22:42:07 +02:00
Niko Matsakis
5078c9b22d
Merge pull request #230 from lnicola/upgradable-lock
...
Remove workaround for parking_lot#101
2020-06-29 13:55:54 -04:00
Laurențiu Nicola
cfb4e18eba
Remove workaround for parking_lot#101
2020-06-27 13:59:29 +03:00