Disable tree traversal optimization that is wrong due to lazy nodes.
See #3846 for more information.
This commit is contained in:
parent
2f13379dd1
commit
25e5ac48af
@ -150,7 +150,10 @@ fn perform_access(
|
|||||||
// the propagation can be skipped next time.
|
// the propagation can be skipped next time.
|
||||||
// It is a performance loss not to call this function when a foreign access occurs.
|
// It is a performance loss not to call this function when a foreign access occurs.
|
||||||
// It is unsound not to call this function when a child access occurs.
|
// It is unsound not to call this function when a child access occurs.
|
||||||
fn skip_if_known_noop(
|
// FIXME: This optimization is wrong, and is currently disabled (by ignoring the
|
||||||
|
// result returned here). Since we presumably want an optimization like this,
|
||||||
|
// we should add it back. See #3864 for more information.
|
||||||
|
fn update_last_foreign_access(
|
||||||
&mut self,
|
&mut self,
|
||||||
access_kind: AccessKind,
|
access_kind: AccessKind,
|
||||||
rel_pos: AccessRelatedness,
|
rel_pos: AccessRelatedness,
|
||||||
@ -613,10 +616,7 @@ pub fn perform_access(
|
|||||||
|
|
||||||
let old_state = perm.or_insert(LocationState::new_uninit(node.default_initial_perm));
|
let old_state = perm.or_insert(LocationState::new_uninit(node.default_initial_perm));
|
||||||
|
|
||||||
match old_state.skip_if_known_noop(access_kind, rel_pos) {
|
old_state.update_last_foreign_access(access_kind, rel_pos);
|
||||||
ContinueTraversal::SkipChildren => return Ok(ContinueTraversal::SkipChildren),
|
|
||||||
_ => {}
|
|
||||||
}
|
|
||||||
|
|
||||||
let protected = global.borrow().protected_tags.contains_key(&node.tag);
|
let protected = global.borrow().protected_tags.contains_key(&node.tag);
|
||||||
let transition = old_state.perform_access(access_kind, rel_pos, protected)?;
|
let transition = old_state.perform_access(access_kind, rel_pos, protected)?;
|
||||||
|
Loading…
Reference in New Issue
Block a user