Ibraheem Ahmed
30f1813f44
rewrite Views
to be Miri compatible
2024-10-03 17:10:35 -04:00
Micha Reiser
a20b894cc2
Merge pull request #579 from gvozdvmozgu/fix-default-attribute-error-message
...
Book / Book (push) Has been cancelled
Test / Test (false, beta) (push) Has been cancelled
Test / Test (false, stable) (push) Has been cancelled
Test / Test (true, nightly) (push) Has been cancelled
Test / Miri (push) Has been cancelled
Test / Benchmarks (push) Has been cancelled
Book / Deploy (push) Has been cancelled
fix error message to correctly reference `#[default]` instead of `#[id]`
2024-09-27 06:48:02 +00:00
Andrey Nikolaev
bd2c0036dc
fix error message to correctly reference #[default]
instead of #[id]
2024-09-26 15:57:31 -07:00
Niko Matsakis
4a7c955255
Merge pull request #573 from dhruvmanila/dhruv/recreate-panic
...
Book / Book (push) Has been cancelled
Test / Test (false, beta) (push) Has been cancelled
Test / Test (false, stable) (push) Has been cancelled
Test / Test (true, nightly) (push) Has been cancelled
Test / Miri (push) Has been cancelled
Test / Benchmarks (push) Has been cancelled
Book / Deploy (push) Has been cancelled
Fix panic when recreating tracked struct that was deleted in previous revision
2024-09-22 11:44:04 +00:00
Niko Matsakis
8094e0ce65
longer, more detailed comment
2024-09-22 07:43:28 -04:00
Niko Matsakis
acc34396c6
Merge branch 'master' into dhruv/recreate-panic
2024-09-22 07:37:00 -04:00
Niko Matsakis
198c43fb10
Merge pull request #575 from nikomatsakis/refactor-accumulators
...
Refactor accumulators
2024-09-22 11:32:34 +00:00
Micha Reiser
7e8720a2ad
Clippy
2024-09-21 16:36:35 +02:00
Micha Reiser
a5396a9142
Add comments
2024-09-21 16:34:42 +02:00
Niko Matsakis
b5af1d89d6
pacify the merciless clippy
2024-09-21 08:24:31 -04:00
Niko Matsakis
3687e48c85
rework accumulator to store values in memos
...
We used to store values in a central map,
but now each memo has an `AccumulatorMap`
that maps accumulated values (if any).
The primary goals of this change are
* forward compatible with speculative execution
because it puts more data into tables;
* step towards a refactoring to stop tracking
outputs in the same array as inputs and thus
to simplify how we do versioning. We will no
longer need to walk the function's outputs
and refresh their versions and so forth because
they are stored in the function memo and so
they get refreshed automatically when the memo
is refreshed.
2024-09-21 07:02:44 -04:00
Niko Matsakis
2caa5ccf87
return lifetime-extended memo, not value
...
Change the core operation to be `refresh_memo`.
This is a nice refactoring on its own but it
will also support the refactoring of how
we manage accumulator values.
2024-09-21 06:40:05 -04:00
Niko Matsakis
dcb0eb242e
refactor extend_memo_lifetime
to return memo
...
This is a step towards refactoring `fetch`
to return the memo itself and not the value.
2024-09-21 06:29:01 -04:00
Niko Matsakis
2528045540
remove read of "entity table"
...
We used to have the concept of "resetting"
a tracked struct, which removed all instances.
We don't have that concept anymore.
Therefore we don't need to record a read on the
tracked struct table itself.
2024-09-16 06:17:19 -04:00
Niko Matsakis
d7df2cd4bb
change disambiguator_map to FxHashMap
...
There is no need for IndexMap here,
we don't iterate or care about indices.
2024-09-16 06:16:23 -04:00
Niko Matsakis
34a8edb461
allocate values in a closure
...
This will allow us to store the id
in the struct itself.
2024-09-16 06:00:33 -04:00
Micha Reiser
2d55e83845
Remove deleted entries from tracked_struct_ids
2024-09-13 15:19:40 -04:00
Dhruv Manilawala
eba970e485
Add tests that panics when recreating a new salsa revision
2024-09-13 11:31:33 -04:00
Carl Meyer
2af849b9a9
Merge pull request #569 from carljm/durability-test
...
Book / Book (push) Has been cancelled
Test / Test (false, beta) (push) Has been cancelled
Test / Test (false, stable) (push) Has been cancelled
Test / Test (true, nightly) (push) Has been cancelled
Test / Miri (push) Has been cancelled
Test / Benchmarks (push) Has been cancelled
Book / Deploy (push) Has been cancelled
add test for high-durability dependency validation
2024-08-29 18:05:05 +00:00
David Barsky
9542a461b9
Merge pull request #571 from salsa-rs/davidbarsky/push-wpynvwnqotst
...
chore: fix clippy lints
2024-08-29 17:54:14 +00:00
David Barsky
df78f298ee
chore: fix clippy lints
2024-08-29 13:50:01 -04:00
Carl Meyer
403ab25c33
add test for high-durability dependency validation
2024-08-28 13:33:40 -07:00
Niko Matsakis
884a30cf9d
Merge pull request #567 from MichaReiser/reduce-set-cloning
...
Book / Book (push) Has been cancelled
Test / Test (false, beta) (push) Has been cancelled
Test / Test (false, stable) (push) Has been cancelled
Test / Test (true, nightly) (push) Has been cancelled
Test / Miri (push) Has been cancelled
Test / Benchmarks (push) Has been cancelled
Book / Deploy (push) Has been cancelled
Reduce cloning of sets in `ActiveQuery` and `QueryRevisions`
2024-08-28 09:37:11 +00:00
Micha Reiser
74a4de43dc
Keep using an Arc<Slice>
2024-08-22 09:30:07 +02:00
Micha Reiser
8175c77cc5
Reduce cloning of sets in ActiveQuery
and QueryRevisions
2024-08-22 09:23:21 +02:00
Niko Matsakis
f608ff8b24
Merge pull request #566 from MichaReiser/const-query
...
Book / Book (push) Has been cancelled
Test / Test (false, beta) (push) Has been cancelled
Test / Test (false, stable) (push) Has been cancelled
Test / Test (true, nightly) (push) Has been cancelled
Test / Miri (push) Has been cancelled
Test / Benchmarks (push) Has been cancelled
Book / Deploy (push) Has been cancelled
Fix const queries with custom `Db` trait
2024-08-20 20:32:27 +00:00
Micha Reiser
3f93415313
Fix const query with custom database trait
2024-08-20 21:49:30 +02:00
Micha Reiser
4609fd0043
Add failing test
2024-08-20 21:34:38 +02:00
Niko Matsakis
d5018d5614
Merge pull request #564 from nikomatsakis/tables
...
Tables
2024-08-20 14:26:48 +00:00
Niko Matsakis
02036ff446
pacify the merciless cargo fmt
2024-08-20 10:09:49 -04:00
Niko Matsakis
8ad967ea1e
fix the remaining clippy items
2024-08-20 10:09:49 -04:00
Niko Matsakis
8b8dd53197
apply cargo clippy --fix
2024-08-20 10:09:49 -04:00
Niko Matsakis
3e5559408a
pacify the merciless cargo fmt
2024-08-20 10:09:49 -04:00
Niko Matsakis
d7af1a85fb
simplify Id
traits, make new crate-private
...
`Id` values are used in a very tailored way now, no reason
to let people construct arbitrary ones.
2024-08-20 10:09:49 -04:00
Niko Matsakis
6401563755
store memoized fn results attached to the salsa struct
2024-08-20 10:09:49 -04:00
Niko Matsakis
8b058be74f
introduce Memo trait
2024-08-20 10:09:49 -04:00
Niko Matsakis
3dabb0ddc8
make memos take read-lock (and infallible return)
...
We want to ensure that accessing the memos only occurs
in revision R after the struct is created.
2024-08-20 10:09:49 -04:00
Niko Matsakis
8833a7168b
remove "constant" functions
...
The goal here is that ALL `Id` values come from a `Table`
2024-08-20 10:09:49 -04:00
Niko Matsakis
31257ba758
store ingredient index for each memo ingredient
2024-08-20 10:09:49 -04:00
Niko Matsakis
c251001da6
remove the _mut
accesors from Table (unused)
2024-08-20 10:09:49 -04:00
Niko Matsakis
f12874fe62
store fn to create Arc<dyn Any>
instead of drop
...
This will allow us to invoke callbacks when deleting
a memo with `Arc<dyn Any>` values.
2024-08-20 10:09:49 -04:00
Niko Matsakis
d8ae590428
extend justfile testing
2024-08-20 10:09:49 -04:00
Niko Matsakis
703f312eae
port input to use Table
2024-08-20 10:09:49 -04:00
Niko Matsakis
2f8e78f431
add unused db
argument to event method
2024-08-20 10:09:49 -04:00
Niko Matsakis
403755548b
give each function ingredient a memo ingredient index
2024-08-20 10:09:49 -04:00
Niko Matsakis
9d93fdbdc2
allow fetching memo table from a given id
2024-08-20 10:09:49 -04:00
Niko Matsakis
b5540f1122
add memo_table method to Slot
trait
...
This returns the memos attached to a given slot.
Not all slots have affiliated memos, so return an `Option`.
2024-08-20 10:09:49 -04:00
Niko Matsakis
db8d64faa6
introduce Slot trait
2024-08-20 10:09:49 -04:00
Niko Matsakis
33a99da476
introduce memo table (first draft)
2024-08-20 10:09:49 -04:00
Niko Matsakis
c16c60c70a
introduce MemoIngredientIndex
2024-08-20 10:09:49 -04:00