Commit graph

69 commits

Author SHA1 Message Date
Niko Matsakis
c040b0c673 fix gc and volatile tests 2019-03-22 16:24:37 -04:00
Niko Matsakis
9689d4471b revert take_while changes, which were just .. wrong 2019-03-22 04:58:47 -04:00
Niko Matsakis
c8b30c52e1 nit: change filter to take_while to make clear we stop early
i.e., we never proceed after we find *something* that is dirty.
2019-03-13 05:30:03 -04:00
Aleksey Kladov
e3c07b010a fast-path no-op gc as well 2019-01-29 19:41:15 +03:00
Aleksey Kladov
f9cae4f2eb just clear the table if we are goining to collect everything 2019-01-29 17:30:43 +03:00
Niko Matsakis
1002d7e70a
Merge pull request #138 from matklad/flexible-gc
Make GC API more orthogonal and flexible
2019-01-28 04:51:02 -05:00
memoryruins
ebd4990bde remove UncheckedMutQueryStorageOps 2019-01-27 17:52:53 -05:00
Aleksey Kladov
9387fd2f4d more orthogonal naming 2019-01-27 17:14:57 +03:00
Aleksey Kladov
d01d6ed511 Make GC API more orthogonal and flexible
Now, the effect of GC is a "product" of three parameters:

* what values are affected (everything/everything except used)
* are we removing values
* are we removing deps

SweepStrategy::default is now a no-op GC.
2019-01-26 21:38:15 +03:00
Niko Matsakis
3d1f9dac2d
Merge pull request #122 from matklad/debug
allow to peek at values via debug query interface
2019-01-25 05:13:27 -05:00
Niko Matsakis
1528746267 adopt key, group key, and database key terminology 2019-01-24 06:33:02 -05:00
Aleksey Kladov
a5349b8330 remove debug keys in favor of entries 2019-01-23 14:23:26 +03:00
Aleksey Kladov
a3bbba6187 allow to peek at values via debug query interface 2019-01-22 23:33:45 +03:00
Aleksey Kladov
f07643d232 runtime is unwind-safe iff storage is unwind-safe 2019-01-11 10:04:09 +03:00
Aleksey Kladov
add15d83ea add panic hooks
To implement cancellation via unwinding, one needs to throw `Canceled`
value in `if_current_revision_is_canceled` and `on_propagated_panic`.
2019-01-10 12:15:37 +03:00
Niko Matsakis
d6990133b4 add debug logs 2019-01-04 08:39:59 -05:00
Niko Matsakis
2e4ff9a26e remove use of upgradable reads from derived queries 2018-12-24 10:10:22 -05:00
Kevin Leimkuhler
bc60b09fc7 Refactor overwrite_placeholder into PanicGuard 2018-11-01 16:53:08 -07:00
Kevin Leimkuhler
461ab22822 Change uses of fork to snapshot 2018-11-01 11:26:16 -07:00
Kevin Leimkuhler
83482293c6 Use Event API and add docs 2018-11-01 11:26:16 -07:00
Kevin Leimkuhler
5bface5bb9 Ensure parallel panic safety and add test 2018-11-01 11:26:16 -07:00
Niko Matsakis
252132f9b4 remove the start_query function, which is no longer needed 2018-10-31 13:31:29 -04:00
Niko Matsakis
2e3f8b1a3d name the field runtime_id 2018-10-30 21:00:33 -04:00
Niko Matsakis
59ab0bd7a2 introduce simple callbacks that can be used to build better logging 2018-10-30 20:19:25 -04:00
Niko Matsakis
79e24cfa55 fix typo 2018-10-30 14:40:58 -04:00
Niko Matsakis
abeebfedc8 improve the error message here 2018-10-30 14:40:58 -04:00
Niko Matsakis
1c2b4d8d43 be more careful when updating after a dependency check 2018-10-30 14:40:58 -04:00
Aleksey Kladov
0f4d1e8320 Panic in PanicGuard if it's not explicitly forgotten 2018-10-29 15:53:11 +03:00
Niko Matsakis
c21ea47cfc introduce SweepStrategy 2018-10-25 05:48:37 -04:00
Niko Matsakis
317281528a adjust locking strategy to be more minimal 2018-10-25 05:48:37 -04:00
Niko Matsakis
7f1d1995aa introduce ability to ask a table what keys it has 2018-10-25 05:48:37 -04:00
Niko Matsakis
649b1a6f99 introduce a sweep routine 2018-10-25 05:48:37 -04:00
Niko Matsakis
d429926ddd treat constants more uniformly
We used to ignore constant inputs entirely. We now track them, but if we
find that a value is constant, we discard ITS inputs.  This means that
-- if we track dependencies -- we have an "outer rim" of constant
values.

Also take the opportunity to reshuffle how derived inputs represent
their state.
2018-10-25 05:48:36 -04:00
Niko Matsakis
1ab8d1a64e refactor ChangedAt into a struct
There are really two orthogonal things going on here.
2018-10-25 05:47:45 -04:00
Niko Matsakis
03751d3d5c convert Tracked to a struct variant 2018-10-25 05:47:45 -04:00
Kevin Leimkuhler
7198902ebd Simplify map write to exclusive write access 2018-10-24 11:00:44 -07:00
Kevin Leimkuhler
917ca42f04 Panic safely in a single threaded context 2018-10-23 21:54:14 -07:00
Niko Matsakis
2cf73b45c1 rename freeze_revision to start_query 2018-10-19 06:00:15 -04:00
Kevin Leimkuhler
7b20806417 Initial removal of Eq bound on Q::Val 2018-10-18 15:29:15 -07:00
Niko Matsakis
089f489df6
Merge pull request #55 from matklad/illigal-state
Refactor out some illegal states
2018-10-17 04:27:08 -04:00
Aleksey Kladov
5abd02097d Refactor out some illegal states
It's impossible to have an `InProgress` state here, so let's ensure
that!
2018-10-16 12:48:01 +03:00
Aleksey Kladov
4401e88fba Hide public impl detail in the plumbing module 2018-10-16 11:24:51 +03:00
Niko Matsakis
de934274d1 block on other threads in maybe_changed_since 2018-10-15 11:55:01 -04:00
Niko Matsakis
cf72c98946 extract register_with_in_progress_thread helper 2018-10-15 11:49:14 -04:00
Niko Matsakis
29831a7430 remove ErrorDetected variant from ProbeState 2018-10-15 09:31:25 -04:00
Niko Matsakis
a8fd113636 merge read_probe and probe 2018-10-15 09:30:08 -04:00
Niko Matsakis
be983aacdf extract read_upgrade into a separate helper
And use it from `maybe_changed_since` where it makes sense.
2018-10-15 08:53:52 -04:00
Niko Matsakis
2ba9c97815 rewrite to thread a Vec<Receiver> to signal waiters
This is both more precise and the logic is simpler.
2018-10-15 08:28:55 -04:00
Niko Matsakis
373e1158f3 only acquire a read-lock when verifying inputs
We no longer use a placeholder.
2018-10-15 05:32:24 -04:00
Niko Matsakis
04288dadef track whether a query is in progress more accurately 2018-10-15 05:24:36 -04:00