undo name change for now, to minimise diff

pull/12073/head
Rich Harris 6 months ago
parent 4c7cd8ba15
commit b779acc375

@ -4,7 +4,7 @@ import {
current_effect,
remove_reactions,
set_signal_status,
update_reaction,
execute_reaction_fn,
destroy_effect_children,
increment_version
} from '../runtime.js';
@ -84,7 +84,7 @@ export function update_derived(derived) {
var previous_updating_derived = updating_derived;
updating_derived = true;
destroy_derived_children(derived);
var value = update_reaction(derived);
var value = execute_reaction_fn(derived);
updating_derived = previous_updating_derived;
var status = (derived.f & UNOWNED) !== 0 && derived.deps !== null ? MAYBE_DIRTY : CLEAN;

@ -5,7 +5,7 @@ import {
current_reaction,
destroy_effect_children,
dev_current_component_function,
update_effect,
execute_effect,
get,
is_destroying_effect,
is_flushing_effect,
@ -106,7 +106,7 @@ function create_effect(type, fn, sync) {
try {
set_is_flushing_effect(true);
update_effect(effect);
execute_effect(effect);
effect.f |= EFFECT_RAN;
} finally {
set_is_flushing_effect(previously_flushing_effect);
@ -267,7 +267,7 @@ export function legacy_pre_effect_reset() {
var effect = token.effect;
if (check_dirtiness(effect)) {
update_effect(effect);
execute_effect(effect);
}
token.ran = false;
@ -479,7 +479,7 @@ function resume_children(effect, local) {
// If a dependency of this effect changed while it was paused,
// apply the change now
if (check_dirtiness(effect)) {
update_effect(effect);
execute_effect(effect);
}
var child = effect.first;

@ -13,7 +13,7 @@ import {
set_signal_status,
untrack,
increment_version,
update_effect,
execute_effect,
inspect_effects
} from '../runtime.js';
import { equals, safe_equals } from './equality.js';
@ -123,7 +123,7 @@ export function set(source, value) {
if (DEV) {
for (const effect of inspect_effects) {
update_effect(effect);
execute_effect(effect);
}
inspect_effects.clear();

@ -259,7 +259,7 @@ function handle_error(error, effect, component_context) {
* @param {import('#client').Reaction} reaction
* @returns {V}
*/
export function update_reaction(reaction) {
export function execute_reaction_fn(reaction) {
const previous_dependencies = current_dependencies;
const previous_untracked_writes = current_untracked_writes;
const previous_reaction = current_reaction;
@ -381,7 +381,7 @@ export function destroy_effect_children(signal, remove_dom = true) {
* @param {import('#client').Effect} effect
* @returns {void}
*/
export function update_effect(effect) {
export function execute_effect(effect) {
var flags = effect.f;
if ((flags & DESTROYED) !== 0) {
@ -409,7 +409,7 @@ export function update_effect(effect) {
}
execute_effect_teardown(effect);
var teardown = update_reaction(effect);
var teardown = execute_reaction_fn(effect);
effect.teardown = typeof teardown === 'function' ? teardown : null;
effect.version = increment_version();
@ -479,12 +479,12 @@ function flush_queued_effects(effects) {
var effect = effects[i];
if ((effect.f & (DESTROYED | INERT)) === 0 && check_dirtiness(effect)) {
update_effect(effect);
execute_effect(effect);
// Effects with no dependencies or teardown do not get added to the effect tree.
// Deferred effects (e.g. `$effect(...)`) _are_ added to the tree because we
// don't know if we need to keep them until they are executed. Doing the check
// here (rather than in `update_effect`) allows us to skip the work for
// here (rather than in `execute_effect`) allows us to skip the work for
// immediate effects.
if (effect.deps === null && effect.first === null && effect.dom === null) {
if (effect.teardown === null) {
@ -570,7 +570,7 @@ function process_effects(effect, collected_effects) {
if ((flags & RENDER_EFFECT) !== 0) {
if (!is_branch && check_dirtiness(current_effect)) {
update_effect(current_effect);
execute_effect(current_effect);
// Child might have been mutated since running the effect
child = current_effect.first;
}

Loading…
Cancel
Save