Niko Matsakis
689751b243
wire up salsa struct seletion, test it
...
We now delete entities and data associated with them!
Neat!
2022-08-16 17:55:32 -04:00
Niko Matsakis
66ffae1bb9
generalize push
to always have a &mut route
...
We also track whether reset is required at the ingredient level.
For tracked struct fields, we were not using `push_mut`,
and I think that was an oversight.
The plan is to do a "dependent ingredient" interlinking pass
once the database is constructed.
2022-08-16 17:55:32 -04:00
Niko Matsakis
60cdce22e9
track "dependent functions"
2022-08-16 17:55:32 -04:00
Mihail Mihov
5fe3c08cb7
Pass the runtime to InputFieldIngredient
's fetch
2022-08-13 13:04:19 +03:00
Mihail Mihov
11b23c942b
Return old value in input setter methods
2022-08-13 13:04:19 +03:00
Mihail Mihov
ec141aceba
Replace inputs' FunctionIngredients with InputFieldIngredients
2022-08-13 13:04:19 +03:00
Niko Matsakis
d80d5308f1
fix annoying formatting problem
2022-08-13 01:28:01 -04:00
Niko Matsakis
b8643a5f70
distinguish fields from other specified values
...
And make `QueryOrigin` finer grained while we are at it.
2022-08-13 01:21:45 -04:00
Niko Matsakis
e2763aba88
change approach: eagerly verify, don't remove
...
This approach is more compatible with our overall "pull" result,
and it also means we can get more re-use.
2022-08-13 01:21:45 -04:00
Niko Matsakis
2652f66fc9
messy commit: refactor + add mark_validated_output
...
I realized I can do this better:
* require that outputs are DatabaseKeyIndex, fewer unwraps,
more clearly justified
* when we validate result of tracked fn, also validate its outputs
(this is incompletely implemented, would ideally be separated
into its own commit, but I'm short for time)
The last step will allow us to keep the memoized results for
assigned values and means we don't have to eagerly clear them.
If we see an "assigned value" that is not verified in the current
revision, it can simply be considered dirty.
We can still delete them when entities are deleted, but they're
less special.
2022-08-13 01:21:45 -04:00
Niko Matsakis
37e7eeb3fd
delete stale output values
...
This fixes the behavior of `specify_tracked_fn_in_rev_1_but_not_2`,
mostly, though I realize now that it is suboptimal.
2022-08-13 01:21:45 -04:00
Niko Matsakis
0e96d4c1e7
replace edges with origin
...
We now track whether the value was ASSIGNED or DERIVED.
2022-08-13 01:21:45 -04:00
Niko Matsakis
a58bc82883
create remove_stale_output
method on ingredients
...
but we are not doing anything in it, yet
2022-08-13 01:21:45 -04:00
Niko Matsakis
c0ac7447c9
track both inputs/outputs for each query
...
Rename QueryInputs to QueryEdges.
Modify its fields to track both inputs and outputs.
The size of the struct doesn't actually change,
as the separator comes out of padding.
2022-08-13 01:21:45 -04:00
Niko Matsakis
604c182d7b
record when specify is called by a user
...
Pre-declared fields do not need to be recorded,
as they are always specified.
2022-08-13 01:21:45 -04:00
Niko Matsakis
5046ba1e6d
Revert "record when specify is called by a user"
...
This reverts commit 787480ffab
.
2022-08-12 14:28:27 -04:00
Niko Matsakis
cb0b53caa7
Revert "track both inputs/outputs for each query"
...
This reverts commit 49ccac5d3d
.
2022-08-12 14:28:26 -04:00
Niko Matsakis
eabb55632e
Revert "create remove_stale_output
method on ingredients"
...
This reverts commit 8b7324dca8
.
2022-08-12 14:28:20 -04:00
Niko Matsakis
8b7324dca8
create remove_stale_output
method on ingredients
...
but we are not doing anything in it, yet
2022-08-11 12:15:17 -04:00
Niko Matsakis
49ccac5d3d
track both inputs/outputs for each query
...
Rename QueryInputs to QueryEdges and modify its fields
to track both inputs and outputs. The size of the struct
doesn't actually change, the separator comes out of padding.
2022-08-11 00:28:34 -04:00
Niko Matsakis
787480ffab
record when specify is called by a user
...
We don't need to record it for pre-declared fields,
as they are always specified.
2022-08-10 03:55:04 -04:00
Niko Matsakis
85d88b8df0
give each function a SalsaStruct assoc type
2022-08-10 00:42:32 -04:00
Niko Matsakis
940ed006cf
add SalsaStructInDb impls for inputs, interned
...
Now all types have them.
2022-08-10 00:42:32 -04:00
Niko Matsakis
25e085fbdc
add a SalsaStructInDb trait
...
Not currently used anywhere,
but will be implemented by all salsa structs.
2022-08-10 00:42:32 -04:00
Niko Matsakis
fc5e05fae0
introduce newtype wrappers for each salsa struct
...
This way they have separate namespaces for their inherent methods.
2022-08-10 00:42:32 -04:00
Niko Matsakis
ac837e2cdc
rename set
method to specify
...
That's the method name we use when exposing this to users.
2022-08-10 00:42:32 -04:00
Niko Matsakis
9229b1a23a
rename Ingredients to Routes
...
The old name makes it sound like it contains the
actual ingredients, but really it just contains
the routes we use to find them at runtime.
2022-08-10 00:42:32 -04:00
XFFXFF
9fb5f7a366
add some comments
2022-08-09 08:43:44 +08:00
XFFXFF
045f5186b3
modify tracked_fn macro to use it
2022-08-08 08:57:29 +08:00
XFFXFF
0f907dd3cd
add recovery_fn option
2022-08-08 07:32:39 +08:00
Niko Matsakis
fa2d24a0be
squash (some) warnings
2022-08-05 14:32:12 -04:00
Niko Matsakis
66f1f1c50c
rename salsa-entity to salsa-2022
2022-08-05 13:20:14 -04:00