wip: miri stress tets

This commit is contained in:
Jonathan Kelley committed 2021-12-18 23:03:59 -05:00
1 parent 1c516aba6a
commit 934de21dd6
16 files changed
+641 -335

No files matched your search

+11 -10
View File
@@ -471,16 +471,16 @@ impl<'bump> DiffState<'bump> {
);
// Run the scope for one iteration to initialize it
if self.scopes.run_scope(new_idx) {
// Take the node that was just generated from running the component
let nextnode = self.scopes.fin_head(new_idx);
self.stack.create_component(new_idx, nextnode);
self.scopes.run_scope(new_idx);
// todo: subtrees
// if new_component.is_subtree_root.get() {
// self.stack.push_subtree();
// }
}
// Take the node that was just generated from running the component
let nextnode = self.scopes.fin_head(new_idx);
self.stack.create_component(new_idx, nextnode);
// todo: subtrees
// if new_component.is_subtree_root.get() {
// self.stack.push_subtree();
// }
// Finally, insert this scope as a seen node.
self.mutations.dirty_scopes.insert(new_idx);
@@ -735,7 +735,8 @@ impl<'bump> DiffState<'bump> {
// React doesn't automatically memoize, but we do.
let props_are_the_same = old.comparator.unwrap();
if (self.force_diff || !props_are_the_same(new)) && self.scopes.run_scope(scope_addr) {
if self.force_diff || !props_are_the_same(new) {
self.scopes.run_scope(scope_addr);
self.diff_node(
self.scopes.wip_head(scope_addr),
self.scopes.fin_head(scope_addr),