feat: resume layout calls in VM instruction slices and expose slice statistics
Verify Tessera GUI / verify (push) Failing after 8m59s

This commit is contained in:
2026-10-23 01:00:49 +08:00
parent 33f94da927
commit 09c3902d84
8 changed files with 62 additions and 10 deletions
+21
View File
@@ -3889,6 +3889,27 @@ page.render(block)
);
}
#[test]
fn layout_slices_preserve_all_shared_occurrences() {
let children = std::iter::repeat_n("item", 40)
.collect::<Vec<_>>()
.join(", ");
let source = format!(
"class Wide: Row {{\n function measure(self: Wide, mount: Mount, constraints: Constraints): MeasureResult {{ return MeasureResult(340, 60) }}\n}}\nitem = RectBlock(2, 20)\npage = Page()\npage.render(Wide(0, 0, {children}))"
);
let (mut session, initial) = ReplSession::load(&source, "app.main", 269, 1).unwrap();
initial.validate().unwrap();
assert!(initial.frame.mounts.len() >= 41);
assert!(source_measure_stat(&mut session, "layoutSlices") > 1);
assert_eq!(
session
.execute("item.mounts().at(39).bounds().x", "app.main")
.unwrap()
.value,
"78"
);
}
#[test]
fn nested_flex_refreshes_natural_height_when_cross_width_changes() {
let (mut session, initial) = ReplSession::load(