test: preserve stable frames after collecting lazy driver helpers
Verify Tessera GUI / verify (push) Failing after 9m29s
Verify Tessera GUI / verify (push) Failing after 9m29s
This commit is contained in:
@@ -548,3 +548,6 @@ Source paint now uses a resumable read-only VM call with the same 256-instructio
|
||||
|
||||
|
||||
Layout and paint drivers now prepare one occurrence at a time. Their fixed-size outer bytecode repeats on the same VM frame; a short-lived helper retains only the current call, its bounds/arguments and collector. The helper is released before the next occurrence. Layout keeps bottom-up measure, top-down arrange and the same settling loop. Paint advances even intrinsic method classification through VM quanta. The weak occurrence list and native scratch/output data remain proportional to the actual tree, but preparation no longer allocates managed callables/Bounds for the whole tree before the first slice. All helpers share the original read-only scope and cumulative instruction/frame limits. Weak-list copying, structural extraction, settling and final projection remain bounded atomic native work.
|
||||
|
||||
|
||||
ui.stats().dependencyInvalidations counts observed layout/paint dependency version mismatches. lastInvalidDependency records the phase, object kind/identity and old/current versions without rendering its fields or retaining it. An input changing its globals is an expected invalidation; compare idle document versions before diagnosing a refresh loop.
|
||||
|
||||
@@ -1505,6 +1505,8 @@ Source paint now uses a resumable read-only VM call with the same 256-instructio
|
||||
|
||||
Layout and paint drivers now prepare one occurrence at a time. Their fixed-size outer bytecode repeats on the same VM frame; a short-lived helper retains only the current call, its bounds/arguments and collector. The helper is released before the next occurrence. Layout keeps bottom-up measure, top-down arrange and the same settling loop. Paint advances even intrinsic method classification through VM quanta. The weak occurrence list and native scratch/output data remain proportional to the actual tree, but preparation no longer allocates managed callables/Bounds for the whole tree before the first slice. All helpers share the original read-only scope and cumulative instruction/frame limits. Weak-list copying, structural extraction, settling and final projection remain bounded atomic native work.
|
||||
|
||||
ui.stats().dependencyInvalidations counts observed layout/paint dependency version mismatches. lastInvalidDependency records the phase, object kind/identity and old/current versions without rendering its fields or retaining it. An input changing its globals is an expected invalidation; compare idle document versions before diagnosing a refresh loop.
|
||||
|
||||
## UI host object
|
||||
|
||||
Positional arguments only:
|
||||
|
||||
@@ -3221,6 +3221,27 @@ page.render(block)
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn collecting_lazy_helpers_does_not_invalidate_stable_layout_or_paint() {
|
||||
for source in [
|
||||
include_str!("../examples/flex-constraints.endor"),
|
||||
include_str!("../examples/source-paint.endor"),
|
||||
] {
|
||||
let (mut session, initial) = ReplSession::load(source, "app.main", 281, 1).unwrap();
|
||||
session
|
||||
.bridge
|
||||
.reclaim(&mut session.candidate.vm, &mut session.candidate.roots)
|
||||
.unwrap();
|
||||
assert!(session.refresh_document().unwrap().is_none());
|
||||
assert_eq!(
|
||||
session.documents[&crate::window::MAIN_WINDOW]
|
||||
.frame
|
||||
.layout_version,
|
||||
initial.frame.layout_version
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn layout_and_paint_prepare_keep_only_current_occurrence_managed_helpers() {
|
||||
for copies in [160, 640] {
|
||||
|
||||
Reference in New Issue
Block a user