|
|
@ -275,10 +275,9 @@ export function increment(source) {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @param {Value} signal
|
|
|
|
* @param {Value} signal
|
|
|
|
* @param {number} status should be DIRTY or MAYBE_DIRTY
|
|
|
|
* @param {number} status should be DIRTY or MAYBE_DIRTY
|
|
|
|
* @param {boolean} partial should skip async/block effects
|
|
|
|
|
|
|
|
* @returns {void}
|
|
|
|
* @returns {void}
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
export function mark_reactions(signal, status, partial = false) {
|
|
|
|
export function mark_reactions(signal, status) {
|
|
|
|
var reactions = signal.reactions;
|
|
|
|
var reactions = signal.reactions;
|
|
|
|
if (reactions === null) return;
|
|
|
|
if (reactions === null) return;
|
|
|
|
|
|
|
|
|
|
|
@ -298,17 +297,13 @@ export function mark_reactions(signal, status, partial = false) {
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (partial && (flags & (EFFECT_ASYNC | BLOCK_EFFECT)) !== 0) {
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (status === DIRTY || (flags & DIRTY) === 0) {
|
|
|
|
if (status === DIRTY || (flags & DIRTY) === 0) {
|
|
|
|
// don't make a DIRTY signal MAYBE_DIRTY
|
|
|
|
// don't make a DIRTY signal MAYBE_DIRTY
|
|
|
|
set_signal_status(reaction, status);
|
|
|
|
set_signal_status(reaction, status);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ((flags & DERIVED) !== 0) {
|
|
|
|
if ((flags & DERIVED) !== 0) {
|
|
|
|
mark_reactions(/** @type {Derived} */ (reaction), MAYBE_DIRTY, partial);
|
|
|
|
mark_reactions(/** @type {Derived} */ (reaction), MAYBE_DIRTY);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
schedule_effect(/** @type {Effect} */ (reaction));
|
|
|
|
schedule_effect(/** @type {Effect} */ (reaction));
|
|
|
|
}
|
|
|
|
}
|
|
|
|