Skip to content

Commit 1a8456e

Browse files
committed
Remove extra page indirection in Table
By manually erasing the concrete slot types and dealing with the vtable ourselves
1 parent f1e99c2 commit 1a8456e

File tree

4 files changed

+169
-175
lines changed

4 files changed

+169
-175
lines changed

src/input.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -190,12 +190,7 @@ impl<C: Configuration> IngredientImpl<C> {
190190
&'db self,
191191
db: &'db dyn crate::Database,
192192
) -> impl Iterator<Item = &'db Value<C>> {
193-
db.zalsa()
194-
.table()
195-
.pages
196-
.iter()
197-
.filter_map(|(_, page)| page.cast_type::<crate::table::Page<Value<C>>>())
198-
.flat_map(|page| page.slots())
193+
db.zalsa().table().slots_of::<Value<C>>()
199194
}
200195

201196
/// Peek at the field values without recording any read dependency.

src/interned.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -259,12 +259,7 @@ where
259259
&'db self,
260260
db: &'db dyn crate::Database,
261261
) -> impl Iterator<Item = &'db Value<C>> {
262-
db.zalsa()
263-
.table()
264-
.pages
265-
.iter()
266-
.filter_map(|(_, page)| page.cast_type::<crate::table::Page<Value<C>>>())
267-
.flat_map(|page| page.slots())
262+
db.zalsa().table().slots_of::<Value<C>>()
268263
}
269264

270265
pub fn reset(&mut self, revision: Revision) {

0 commit comments

Comments
 (0)