remove EFFECT_HAS_DIRTY_CHILDREN

pull/13282/head
Rich Harris 2 years ago
parent 5746aabfad
commit 7d8d3c033d

@ -9,7 +9,6 @@ export const DISCONNECTED = 1 << 8;
export const CLEAN = 1 << 9; export const CLEAN = 1 << 9;
export const DIRTY = 1 << 10; export const DIRTY = 1 << 10;
export const MAYBE_DIRTY = 1 << 11; export const MAYBE_DIRTY = 1 << 11;
export const EFFECT_HAS_DIRTY_CHILDREN = 1 << 12;
export const INERT = 1 << 13; export const INERT = 1 << 13;
export const DESTROYED = 1 << 14; export const DESTROYED = 1 << 14;
export const EFFECT_RAN = 1 << 15; export const EFFECT_RAN = 1 << 15;

@ -22,8 +22,7 @@ import {
BLOCK_EFFECT, BLOCK_EFFECT,
ROOT_EFFECT, ROOT_EFFECT,
LEGACY_DERIVED_PROP, LEGACY_DERIVED_PROP,
DISCONNECTED, DISCONNECTED
EFFECT_HAS_DIRTY_CHILDREN
} from './constants.js'; } from './constants.js';
import { flush_tasks } from './dom/task.js'; import { flush_tasks } from './dom/task.js';
import { add_owner } from './dev/ownership.js'; import { add_owner } from './dev/ownership.js';
@ -589,7 +588,7 @@ export function schedule_effect(signal) {
if ((flags & BRANCH_EFFECT) !== 0) { if ((flags & BRANCH_EFFECT) !== 0) {
if ((flags & CLEAN) === 0) return; if ((flags & CLEAN) === 0) return;
set_signal_status(effect, EFFECT_HAS_DIRTY_CHILDREN); effect.f ^= CLEAN;
} }
} }
@ -621,7 +620,6 @@ function process_effects(effect, collected_effects) {
// Skip this branch if it's clean // Skip this branch if it's clean
if (is_active && (!is_branch || !is_clean)) { if (is_active && (!is_branch || !is_clean)) {
if (is_branch) { if (is_branch) {
// Can only be a branch effect with EFFECT_HAS_DIRTY_CHILDREN
set_signal_status(current_effect, CLEAN); set_signal_status(current_effect, CLEAN);
} }
@ -845,7 +843,7 @@ export function untrack(fn) {
} }
} }
const STATUS_MASK = ~(DIRTY | MAYBE_DIRTY | CLEAN | EFFECT_HAS_DIRTY_CHILDREN); const STATUS_MASK = ~(DIRTY | MAYBE_DIRTY | CLEAN);
/** /**
* @param {Signal} signal * @param {Signal} signal

Loading…
Cancel
Save