|
|
@ -194,6 +194,8 @@ export class Batch {
|
|
|
|
// if we didn't start any new async work, and no async work
|
|
|
|
// if we didn't start any new async work, and no async work
|
|
|
|
// is outstanding from a previous flush, commit
|
|
|
|
// is outstanding from a previous flush, commit
|
|
|
|
if (this.#async_effects.length === 0 && this.#pending === 0) {
|
|
|
|
if (this.#async_effects.length === 0 && this.#pending === 0) {
|
|
|
|
|
|
|
|
this.#commit();
|
|
|
|
|
|
|
|
|
|
|
|
var render_effects = this.#render_effects;
|
|
|
|
var render_effects = this.#render_effects;
|
|
|
|
var effects = this.#effects;
|
|
|
|
var effects = this.#effects;
|
|
|
|
|
|
|
|
|
|
|
@ -201,8 +203,6 @@ export class Batch {
|
|
|
|
this.#effects = [];
|
|
|
|
this.#effects = [];
|
|
|
|
this.#block_effects = [];
|
|
|
|
this.#block_effects = [];
|
|
|
|
|
|
|
|
|
|
|
|
this.#commit();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
flush_queued_effects(render_effects);
|
|
|
|
flush_queued_effects(render_effects);
|
|
|
|
flush_queued_effects(effects);
|
|
|
|
flush_queued_effects(effects);
|
|
|
|
|
|
|
|
|
|
|
@ -540,11 +540,12 @@ function flush_queued_effects(effects) {
|
|
|
|
var length = effects.length;
|
|
|
|
var length = effects.length;
|
|
|
|
if (length === 0) return;
|
|
|
|
if (length === 0) return;
|
|
|
|
|
|
|
|
|
|
|
|
for (var i = 0; i < length; i++) {
|
|
|
|
var i = 0;
|
|
|
|
var effect = effects[i];
|
|
|
|
|
|
|
|
|
|
|
|
while (i < length) {
|
|
|
|
|
|
|
|
var effect = effects[i++];
|
|
|
|
|
|
|
|
|
|
|
|
if ((effect.f & (DESTROYED | INERT)) === 0) {
|
|
|
|
if ((effect.f & (DESTROYED | INERT)) === 0 && is_dirty(effect)) {
|
|
|
|
if (is_dirty(effect)) {
|
|
|
|
|
|
|
|
var wv = write_version;
|
|
|
|
var wv = write_version;
|
|
|
|
|
|
|
|
|
|
|
|
// updating a derived for also increase the write version but that doesn't mean
|
|
|
|
// updating a derived for also increase the write version but that doesn't mean
|
|
|
@ -579,10 +580,9 @@ function flush_queued_effects(effects) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (; i < length; i += 1) {
|
|
|
|
while (i < length) {
|
|
|
|
schedule_effect(effects[i]);
|
|
|
|
schedule_effect(effects[i++]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|