@solidjs/signals 2.0.0-rc.7 → 2.0.0-rc.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dev-shared.js +6357 -0
- package/dist/dev.attribution.js +2485 -0
- package/dist/dev.js +2851 -7027
- package/dist/observe/affects.js +129 -0
- package/dist/observe/attribution.js +7 -0
- package/dist/observe/boundaries.js +641 -0
- package/dist/observe/core/action.js +177 -0
- package/dist/observe/core/async.js +846 -0
- package/dist/observe/core/attribution-costs.js +66 -0
- package/dist/observe/core/attribution-feedback.js +282 -0
- package/dist/observe/core/attribution-hooks.js +82 -0
- package/dist/observe/core/attribution-queries.js +28 -0
- package/dist/observe/core/attribution.js +2095 -0
- package/dist/observe/core/constants.js +248 -0
- package/dist/{types-cjs/core/context.d.cts → observe/core/context.js} +37 -12
- package/dist/observe/core/core.js +1789 -0
- package/dist/observe/core/dev.js +293 -0
- package/dist/observe/core/effect.js +195 -0
- package/dist/observe/core/error-hooks.js +71 -0
- package/dist/observe/core/error.js +80 -0
- package/dist/observe/core/external.js +98 -0
- package/dist/observe/core/graph.js +155 -0
- package/dist/observe/core/heap.js +147 -0
- package/dist/observe/core/invariants.js +45 -0
- package/dist/observe/core/lanes.js +205 -0
- package/dist/observe/core/optimistic.js +585 -0
- package/dist/observe/core/owner.js +322 -0
- package/dist/observe/core/scheduler.js +1428 -0
- package/dist/observe/core/verdict.js +669 -0
- package/dist/observe/index.js +59 -0
- package/dist/observe/map.js +484 -0
- package/dist/{types-cjs/signals.d.cts → observe/signals.js} +311 -317
- package/dist/observe/store/index.js +40 -0
- package/dist/observe/store/next/optimistic.js +660 -0
- package/dist/observe/store/next/projection.js +255 -0
- package/dist/observe/store/next/reconcile.js +375 -0
- package/dist/observe/store/next/store.js +2327 -0
- package/dist/observe/store/next/target.js +51 -0
- package/dist/observe/store/store.js +325 -0
- package/dist/observe/store/storePath.js +103 -0
- package/dist/observe/store/utils.js +1023 -0
- package/dist/prod/attribution.js +41 -0
- package/dist/prod/boundaries.js +128 -76
- package/dist/prod/core/action.js +65 -37
- package/dist/prod/core/async.js +324 -172
- package/dist/prod/core/constants.js +57 -1
- package/dist/prod/core/context.js +3 -3
- package/dist/prod/core/core.js +1003 -364
- package/dist/prod/core/dev.js +17 -1
- package/dist/prod/core/effect.js +76 -42
- package/dist/prod/core/error-hooks.js +71 -0
- package/dist/prod/core/external.js +4 -4
- package/dist/prod/core/graph.js +37 -37
- package/dist/prod/core/heap.js +61 -56
- package/dist/prod/core/lanes.js +107 -63
- package/dist/prod/core/optimistic.js +374 -93
- package/dist/prod/core/owner.js +62 -46
- package/dist/prod/core/scheduler.js +653 -286
- package/dist/prod/core/verdict.js +245 -127
- package/dist/prod/index.js +15 -5
- package/dist/prod/map.js +292 -141
- package/dist/prod/signals.js +29 -16
- package/dist/prod/store/next/optimistic.js +77 -55
- package/dist/prod/store/next/projection.js +31 -20
- package/dist/prod/store/next/reconcile.js +87 -84
- package/dist/prod/store/next/store.js +718 -401
- package/dist/prod/store/next/target.js +32 -10
- package/dist/prod/store/store.js +12 -14
- package/dist/prod/store/utils.js +950 -130
- package/dist/types/attribution.d.ts +20 -0
- package/dist/types/attribution.prod.d.ts +22 -0
- package/dist/types/boundaries.d.ts +10 -1
- package/dist/types/core/action.d.ts +12 -5
- package/dist/types/core/async.d.ts +1 -1
- package/dist/types/core/attribution-costs.d.ts +35 -0
- package/dist/types/core/attribution-feedback.d.ts +133 -0
- package/dist/types/core/attribution-hooks.d.ts +147 -9
- package/dist/types/core/attribution-queries.d.ts +10 -0
- package/dist/types/core/attribution.d.ts +216 -182
- package/dist/types/core/constants.d.ts +56 -0
- package/dist/types/core/core.d.ts +190 -2
- package/dist/types/core/dev.d.ts +246 -28
- package/dist/types/core/effect.d.ts +8 -1
- package/dist/types/core/error-hooks.d.ts +71 -0
- package/dist/types/core/index.d.ts +4 -1
- package/dist/types/core/invariants.d.ts +4 -0
- package/dist/types/core/lanes.d.ts +39 -5
- package/dist/types/core/scheduler.d.ts +153 -0
- package/dist/types/core/types.d.ts +32 -9
- package/dist/types/index.d.ts +10 -3
- package/dist/types/map.d.ts +2 -0
- package/dist/types/signals.d.ts +8 -0
- package/dist/types/store/index.d.ts +2 -0
- package/dist/types/store/next/optimistic.d.ts +1 -1
- package/dist/types/store/next/store.d.ts +11 -5
- package/dist/types/store/next/target.d.ts +37 -10
- package/dist/types/store/utils.d.ts +178 -0
- package/package.json +21 -17
- package/dist/node.cjs +0 -10541
- package/dist/node.dev.cjs +0 -13724
- package/dist/types-cjs/affects.d.cts +0 -47
- package/dist/types-cjs/boundaries.d.cts +0 -175
- package/dist/types-cjs/core/action.d.cts +0 -64
- package/dist/types-cjs/core/async.d.cts +0 -23
- package/dist/types-cjs/core/attribution-hooks.d.cts +0 -127
- package/dist/types-cjs/core/attribution.d.cts +0 -495
- package/dist/types-cjs/core/constants.d.cts +0 -159
- package/dist/types-cjs/core/core.d.cts +0 -185
- package/dist/types-cjs/core/dev.d.cts +0 -136
- package/dist/types-cjs/core/effect.d.cts +0 -30
- package/dist/types-cjs/core/error.d.cts +0 -56
- package/dist/types-cjs/core/external.d.cts +0 -15
- package/dist/types-cjs/core/graph.d.cts +0 -28
- package/dist/types-cjs/core/heap.d.cts +0 -24
- package/dist/types-cjs/core/index.d.cts +0 -13
- package/dist/types-cjs/core/invariants.d.cts +0 -59
- package/dist/types-cjs/core/lanes.d.cts +0 -54
- package/dist/types-cjs/core/optimistic.d.cts +0 -6
- package/dist/types-cjs/core/owner.d.cts +0 -124
- package/dist/types-cjs/core/scheduler.d.cts +0 -236
- package/dist/types-cjs/core/types.d.cts +0 -204
- package/dist/types-cjs/core/verdict.d.cts +0 -2
- package/dist/types-cjs/index.d.cts +0 -10
- package/dist/types-cjs/map.d.cts +0 -69
- package/dist/types-cjs/package.json +0 -3
- package/dist/types-cjs/store/index.d.cts +0 -18
- package/dist/types-cjs/store/next/optimistic.d.cts +0 -25
- package/dist/types-cjs/store/next/projection.d.cts +0 -8
- package/dist/types-cjs/store/next/reconcile.d.cts +0 -10
- package/dist/types-cjs/store/next/store.d.cts +0 -121
- package/dist/types-cjs/store/next/target.d.cts +0 -166
- package/dist/types-cjs/store/store.d.cts +0 -143
- package/dist/types-cjs/store/storePath.d.cts +0 -58
- package/dist/types-cjs/store/utils.d.cts +0 -74
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { NOT_PENDING, unwrapOverride, STATUS_UNINITIALIZED, REACTIVE_DIRTY, REACTIVE_CHECK, CONFIG_HAS_LANE, OVERRIDE_UNDEFINED, STATUS_PENDING, EFFECT_RENDER, REACTIVE_MANUAL_WRITE, REACTIVE_OPTIMISTIC_DIRTY, EFFECT_USER } from "./constants.js";
|
|
1
|
+
import { NOT_PENDING, unwrapOverride, STATUS_UNINITIALIZED, REACTIVE_DIRTY, REACTIVE_CHECK, CONFIG_HAS_LANE, OVERRIDE_UNDEFINED, STATUS_PENDING, CONFIG_DERIVED_OVERRIDE, CONFIG_OPTIMISTIC, CONFIG_OVERRIDE_SUPERSEDED, EFFECT_RENDER, CONFIG_AUTHORITATIVE_OBSERVED, REACTIVE_MANUAL_WRITE, REACTIVE_OPTIMISTIC_DIRTY, LANE_RUN, EFFECT_USER } from "./constants.js";
|
|
2
2
|
|
|
3
|
-
import { ext, latestReadActive, currentOptimisticLane
|
|
3
|
+
import { ext, hasActiveOverride, stale, enterStagedRead, latestReadActive, currentOptimisticLane } from "./core.js";
|
|
4
4
|
|
|
5
5
|
import { NotReadyError } from "./error.js";
|
|
6
6
|
|
|
7
7
|
import "./invariants.js";
|
|
8
8
|
|
|
9
|
-
import { resolveTransition, getOrCreateLane,
|
|
9
|
+
import { resolveTransition, getOrCreateLane, activeLanes, signalLanes, laneHeld, findLane, resolveLane, readsHeldCommitted, assignOrMergeLane } from "./lanes.js";
|
|
10
10
|
|
|
11
|
-
import { GlobalQueue, activeTransition, globalQueue, clock, insertSubs, schedule } from "./scheduler.js";
|
|
11
|
+
import { GlobalQueue, activeTransition, globalQueue, origin, clock, insertSubs, schedule, sourceObserved, currentTransition, queuePendingNode } from "./scheduler.js";
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* The optimistic write engine, moved out of core.ts/scheduler.ts. Everything
|
|
@@ -24,60 +24,122 @@ import { GlobalQueue, activeTransition, globalQueue, clock, insertSubs, schedule
|
|
|
24
24
|
* once the gate holds — the same late-binding contract as verdict.ts.
|
|
25
25
|
*/
|
|
26
26
|
/** The optimistic half of setSignal, fired when `_overrideValue !== undefined`. */ function optimisticWrite(e, n) {
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
if (typeof n === "function") n = n(
|
|
30
|
-
const
|
|
27
|
+
const i = e.o?.Ce !== NOT_PENDING;
|
|
28
|
+
const t = i ? unwrapOverride(e.o?.Ce) : e.Qe;
|
|
29
|
+
if (typeof n === "function") n = n(t);
|
|
30
|
+
const r = !!(e.S & STATUS_UNINITIALIZED) ||
|
|
31
31
|
// A dirty node's _value is stale (its queued recompute hasn't run — e.g.
|
|
32
32
|
// a latest() shadow marked by the previous landing's companion snap), so
|
|
33
33
|
// equality against it must not swallow the write. Without this, a sync
|
|
34
34
|
// push returning the shadow to that stale value was dropped, the snap
|
|
35
35
|
// recompute then committed the parent's old value, and the banner showed
|
|
36
36
|
// the previous transition's target (#3041 follow-up).
|
|
37
|
-
!!((e.
|
|
38
|
-
if (!
|
|
37
|
+
!!((e.ue ?? 0) & (REACTIVE_DIRTY | REACTIVE_CHECK)) || !e.Fe || !e.Fe(t, n);
|
|
38
|
+
if (!r) {
|
|
39
39
|
// Same-value write with an active override still entangles the current
|
|
40
|
-
// action's transition — the hold must outlast all overlapping actions
|
|
41
|
-
|
|
40
|
+
// action's transition — the hold must outlast all overlapping actions —
|
|
41
|
+
// and renews the override's PROVENANCE: the newer action re-asks the
|
|
42
|
+
// question, so an older action's answer arriving later is stale to it
|
|
43
|
+
// too (#3331; a same-value re-prediction otherwise let the first
|
|
44
|
+
// action's slow source supersede and restart the downstream flight).
|
|
45
|
+
if (i) {
|
|
42
46
|
const n = resolveTransition(e);
|
|
43
47
|
if (n && activeTransition !== n) globalQueue.initTransition(n);
|
|
48
|
+
if (origin > e.o.vt) e.o.vt = origin;
|
|
44
49
|
}
|
|
45
50
|
return n;
|
|
46
51
|
}
|
|
47
|
-
if (
|
|
52
|
+
if (i) globalQueue.initTransition(resolveTransition(e));
|
|
48
53
|
// No revert target is stashed: while the override is active every reader
|
|
49
54
|
// sees it (A17), so authoritative arrivals commit silently into _value and
|
|
50
55
|
// reverting is just dropping the override — _value is already correct.
|
|
51
|
-
else globalQueue.m.
|
|
56
|
+
else globalQueue.m.rt.push(e);
|
|
52
57
|
// Stamp ownership on the node (post-merge, so entangled writers share the
|
|
53
58
|
// joint root). resolveTransition prefers this over the lane's _transition,
|
|
54
59
|
// which a shared subscriber can merge across transactions (#2912).
|
|
55
|
-
ext(e).
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
ext(e).Ft = activeTransition;
|
|
61
|
+
ext(e).Ct = clock;
|
|
62
|
+
// Provenance: the action asking. An answer an OLDER action's flight brings
|
|
63
|
+
// back is a stale question and holds silently to commit (#3331).
|
|
64
|
+
ext(e).vt = origin;
|
|
65
|
+
const u = getOrCreateLane(e);
|
|
66
|
+
ext(e).Ue = u;
|
|
67
|
+
// A fresh override re-masks: whatever truth is staged, this write is the
|
|
68
|
+
// value for the graph again until the source answers it (#3331).
|
|
69
|
+
e.T = (e.T | CONFIG_HAS_LANE) & -8912897;
|
|
59
70
|
// Literal undefined must not land raw: the slot doubles as the optimistic
|
|
60
71
|
// brand, and erasing it makes the write invisible and routes follow-up
|
|
61
72
|
// writes off the optimistic path into permanent commits (#2898).
|
|
62
|
-
ext(e).
|
|
73
|
+
ext(e).Ce = n === undefined ? OVERRIDE_UNDEFINED : n;
|
|
63
74
|
// syncCompanions only pokes _pendingSignal/_latestValueComputed — with
|
|
64
75
|
// neither companion present the call is a guaranteed no-op.
|
|
65
|
-
(e.o?.
|
|
66
|
-
if (e.
|
|
76
|
+
(e.o?.je !== undefined || e.o?.xe !== undefined) && GlobalQueue.me !== null && GlobalQueue.me(e, n);
|
|
77
|
+
if (e.ce !== undefined) e.Pe = clock;
|
|
67
78
|
// §12e: computed-only slot
|
|
68
79
|
insertSubs(e, true);
|
|
69
80
|
schedule();
|
|
70
81
|
return n;
|
|
71
82
|
}
|
|
72
83
|
|
|
84
|
+
/**
|
|
85
|
+
* Lanes stage (#3479): a lane pass's publish for a memo. An optimistic
|
|
86
|
+
* derivation is an override — the speculative result lives in the override
|
|
87
|
+
* slot, `_value` stays the committed truth. The whole optimistic frame is then
|
|
88
|
+
* in one place: the lane's readers and untracked reads see it (A17), a render
|
|
89
|
+
* effect off the held lane sees the committed frame whole (readsHeldCommitted,
|
|
90
|
+
* #3460) — the source's shadow AND its derivations — where a speculative
|
|
91
|
+
* `_value` beside a committed shadow tore it. The node joins the
|
|
92
|
+
* transaction's optimistic nodes on its first speculative publish; the revert
|
|
93
|
+
* drops the override and re-derives it from the truth (a derived override has
|
|
94
|
+
* no truth of its own — see resolveOptimisticNodes, endOptimism).
|
|
95
|
+
*/ function laneOverride(e, n, i) {
|
|
96
|
+
// The wake-only channel (#3009, see recomputeLane): a plain write to a
|
|
97
|
+
// latest()-tracked source rides a companion-sourced lane with no
|
|
98
|
+
// transaction on either side only to wake the verdict companions. Nothing
|
|
99
|
+
// is speculative — the pass commits directly, as any plain write does.
|
|
100
|
+
i = findLane(i);
|
|
101
|
+
if (!i.Ge && !activeTransition && i.an.o?.Ht !== undefined) {
|
|
102
|
+
e.Qe = n;
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
if (!hasActiveOverride(e)) {
|
|
106
|
+
// It reverts with the lane's transaction (a landing runs outside any
|
|
107
|
+
// flush, where the ambient batch would revert it at its own end); an
|
|
108
|
+
// orphan lane's falls to the batch, adopted with it (initTransition) as a
|
|
109
|
+
// write's is. No `_overrideOwner`: a derived override is a plain member,
|
|
110
|
+
// its transaction its lane's (resolveTransition), and it merges lanes
|
|
111
|
+
// through itself as any shared reader does (assignOrMergeLane). No
|
|
112
|
+
// provenance stamp either: not an intent, any truth supersedes it.
|
|
113
|
+
(i.Ge ? currentTransition(i.Ge) : globalQueue.m).rt.push(e);
|
|
114
|
+
}
|
|
115
|
+
// A lane pass's output is a derivation — also over a WRITTEN guess it
|
|
116
|
+
// corrects (a `createOptimistic(fn)` re-derived from fresh upstream data):
|
|
117
|
+
// the guess is gone, the slot holds fn's answer, and the revert promotes it
|
|
118
|
+
// rather than dropping to a stale `_value` and re-asking downstream (the
|
|
119
|
+
// next user write re-arms the guess: optimisticWrite clears the bit). No
|
|
120
|
+
// `_overrideTime` stamp: that marks a user WRITE unflushed until the flush
|
|
121
|
+
// that carries it (A28) and shields it from same-tick supersession — a pass's
|
|
122
|
+
// result is neither (a pulled ownerless memo publishes outside any flush).
|
|
123
|
+
// A fresh lane frame ends a supersession in force: the pass just dropped
|
|
124
|
+
// the staged truth it pointed at (recompute, INV-11 corollary) — left set,
|
|
125
|
+
// the flag served a `_value` never committed (fuzzer latest-1 #2481).
|
|
126
|
+
e.T = (e.T | CONFIG_DERIVED_OVERRIDE) & ~CONFIG_OVERRIDE_SUPERSEDED;
|
|
127
|
+
e.o.Ce = n === undefined ? OVERRIDE_UNDEFINED : n;
|
|
128
|
+
}
|
|
129
|
+
|
|
73
130
|
/**
|
|
74
131
|
* transitionComplete's override blockage: a settling transition stays open
|
|
75
132
|
* while one of its optimistic nodes holds an active override that is still
|
|
76
|
-
* pending on real (non-affects-sentinel) async.
|
|
133
|
+
* pending on real (non-affects-sentinel) async. A derived override's flight is
|
|
134
|
+
* the lane's own work, never authoritative — it does not hold the settle.
|
|
135
|
+
* Neither is a companion's (#3494): the `latest()` shadow backfilled under the
|
|
136
|
+
* owner's transaction (A28 (3)) is an observation of the flight, and a
|
|
137
|
+
* mainline `latest(details)` after the flight's last reader unmounted held the
|
|
138
|
+
* released write until the orphaned request landed.
|
|
77
139
|
*/ function transitionBlocked(e) {
|
|
78
|
-
for (let n = 0; n < e.
|
|
79
|
-
const
|
|
80
|
-
if (hasActiveOverride(
|
|
140
|
+
for (let n = 0; n < e.rt.length; n++) {
|
|
141
|
+
const i = e.rt[n];
|
|
142
|
+
if (!(i.T & CONFIG_DERIVED_OVERRIDE) && i.o?.Ht === undefined && hasActiveOverride(i) && "S" in i && i.S & STATUS_PENDING && i.o?._ instanceof NotReadyError) {
|
|
81
143
|
return true;
|
|
82
144
|
}
|
|
83
145
|
}
|
|
@@ -89,33 +151,226 @@ function resolveOptimisticNodes(e) {
|
|
|
89
151
|
// notifications) may push fresh optimistic nodes; only this batch settles
|
|
90
152
|
// now, so iterate a fixed window and splice it out at the end.
|
|
91
153
|
const n = e.length;
|
|
92
|
-
for (let
|
|
93
|
-
const n = e[
|
|
94
|
-
if (n.o !== null) n.o
|
|
154
|
+
for (let i = 0; i < n; i++) {
|
|
155
|
+
const n = e[i];
|
|
156
|
+
if (n.o !== null) n.o.Ue = undefined;
|
|
95
157
|
// Revert is a pure drop: there is no revert target to commit —
|
|
96
158
|
// override-covered authoritative values hold in _pendingValue and
|
|
97
159
|
// elevate on their OWN transition's schedule (A18 as re-ruled 2026-07-07).
|
|
98
160
|
if (!(n.S & STATUS_PENDING)) n.S &= ~STATUS_UNINITIALIZED;
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
161
|
+
const t = n.o?.Ce;
|
|
162
|
+
// A derived override (lanes stage, #3479) has no truth of its own: the
|
|
163
|
+
// slot disarms — the memo is plain again — and the override PROMOTES to
|
|
164
|
+
// `_value`. Not superseded, nothing it derives from told it otherwise
|
|
165
|
+
// (a source override that reverts to a differing truth dirties it just
|
|
166
|
+
// above — sources join this list before their derivations — and its
|
|
167
|
+
// recompute then replaces the promotion), so by the graph's invariant
|
|
168
|
+
// the override IS what a recompute from the truth yields. Re-deriving
|
|
169
|
+
// instead re-asked an async member's flight and held the transaction on
|
|
170
|
+
// it — a waterfall after the reveal.
|
|
171
|
+
const r = n.T & CONFIG_DERIVED_OVERRIDE;
|
|
172
|
+
ext(n).Ce = r && !(n.T & CONFIG_OPTIMISTIC) ? undefined : NOT_PENDING;
|
|
173
|
+
// A superseded override's subscribers already re-derived from the truth
|
|
174
|
+
// when it arrived (#3331) — the drop changes nothing they read. Everyone
|
|
175
|
+
// else learns of the correction here: this drop IS their notification.
|
|
176
|
+
const u = (n.T & CONFIG_OVERRIDE_SUPERSEDED) !== 0;
|
|
177
|
+
n.T &= -8912897;
|
|
178
|
+
if (!u && t !== NOT_PENDING && n.Qe !== unwrapOverride(t)) {
|
|
179
|
+
if (r) n.Qe = unwrapOverride(t); else insertSubs(n, true);
|
|
180
|
+
}
|
|
181
|
+
n.Ge = null;
|
|
182
|
+
if (n.o !== null) n.o.Ft = null;
|
|
104
183
|
}
|
|
105
184
|
// Settlement checkpoint (#2838): companions caught in this batch (or owned
|
|
106
185
|
// by a node in it) re-derive from committed state, so verdicts survive the
|
|
107
186
|
// transition that produced them (A19 — pending is a property of the data).
|
|
108
|
-
for (let
|
|
109
|
-
const n = e[
|
|
110
|
-
if (n.o?.
|
|
111
|
-
const
|
|
112
|
-
if (
|
|
187
|
+
for (let i = 0; i < n; i++) {
|
|
188
|
+
const n = e[i];
|
|
189
|
+
if (n.o?.je || n.o?.xe) GlobalQueue.En(n);
|
|
190
|
+
const t = n.o?.Ht;
|
|
191
|
+
if (t && (t.o?.je === n || t.o?.xe === n)) GlobalQueue.En(t);
|
|
113
192
|
}
|
|
114
193
|
e.splice(0, n);
|
|
115
194
|
}
|
|
116
195
|
|
|
196
|
+
/**
|
|
197
|
+
* A18 supersession (#3331): the node's own source arrived with a value that
|
|
198
|
+
* differs from its active override. "Knowing otherwise" ends the optimism for
|
|
199
|
+
* the graph at once: the override stays only as the DISPLAYED value (untracked
|
|
200
|
+
* reads, the applied frame) until the owning transaction commits, while
|
|
201
|
+
* tracked readers see the staged truth and re-derive from it as that
|
|
202
|
+
* transaction's held work — so async downstream restarts now, not at the
|
|
203
|
+
* revert (no waterfall).
|
|
204
|
+
*
|
|
205
|
+
* The lane's job for this node is over: a lane applies an optimistic view
|
|
206
|
+
* ahead of its transaction, and there is no optimistic view left — the
|
|
207
|
+
* corrected cascade is plain transaction-held work (staged memos, effect runs
|
|
208
|
+
* in the stashable queues). Demote the node and every cascade member that
|
|
209
|
+
* rides this lane; the caller then notifies on the plain channel. Runners the
|
|
210
|
+
* lane still holds for demoted effects (the optimistic frame that never got to
|
|
211
|
+
* apply) defer to the regular queue in runEffect. In a lane merged with a
|
|
212
|
+
* still-optimistic source, members shared with that source lose their lane
|
|
213
|
+
* too and simply wait for the transaction — less optimistic, never torn.
|
|
214
|
+
*
|
|
215
|
+
* A later arrival EQUAL to the override (an earlier action's answer superseded
|
|
216
|
+
* this one's; now this one's answer confirms it) ends the supersession: the
|
|
217
|
+
* graph re-derives from the override, which is the truth again. Notifies the
|
|
218
|
+
* subscribers in both cases. A plain matching confirmation (no supersession
|
|
219
|
+
* in force) is A17-silent for ordinary subscribers and wakes only an
|
|
220
|
+
* authoritative-view reader (until()'s predicate, refresh()'s waiter) that
|
|
221
|
+
* observed this node past its override — "authoritative arrival equal to the
|
|
222
|
+
* override" is exactly the acknowledgment it waits for (#3164, #3303). The
|
|
223
|
+
* wake hook is installed by the setters of that bit; optional here because
|
|
224
|
+
* the bit only implies the optimistic engine was consulted.
|
|
225
|
+
*/ function supersedeOverride(e, n) {
|
|
226
|
+
const i = !e.Fe || !e.Fe(n, unwrapOverride(e.o.Ce));
|
|
227
|
+
if (!i) {
|
|
228
|
+
if (!(e.T & CONFIG_OVERRIDE_SUPERSEDED)) {
|
|
229
|
+
if (e.T & CONFIG_AUTHORITATIVE_OBSERVED) GlobalQueue.Zt?.(e);
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
e.T &= ~CONFIG_OVERRIDE_SUPERSEDED;
|
|
233
|
+
} else {
|
|
234
|
+
// Provenance (#3331): an answer brought back by an OLDER action than the
|
|
235
|
+
// one that wrote this override answers a question the user has since
|
|
236
|
+
// changed. It is staged like any other landing and reveals if it is
|
|
237
|
+
// still the truth when the transaction commits, but it does not move the
|
|
238
|
+
// graph now — a slow source must not leak back in over a newer intent.
|
|
239
|
+
// 0 is mainline (no action): always the current question.
|
|
240
|
+
if (origin && origin < e.o.vt) return;
|
|
241
|
+
e.T |= CONFIG_OVERRIDE_SUPERSEDED;
|
|
242
|
+
const n = e.o?.Ue;
|
|
243
|
+
if (n) {
|
|
244
|
+
const i = findLane(n);
|
|
245
|
+
const t = [ e ];
|
|
246
|
+
while (t.length) {
|
|
247
|
+
const e = t.pop();
|
|
248
|
+
const n = e.o?.Ue;
|
|
249
|
+
if (!n || findLane(n) !== i) continue;
|
|
250
|
+
e.o.Ue = undefined;
|
|
251
|
+
i.ye.delete(e);
|
|
252
|
+
for (let n = e.u; n !== null; n = n.Ne) t.push(n._e);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
insertSubs(e);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* The flush's pre-verdict step once the action bodies have ended (#3427).
|
|
261
|
+
* The bodies were the optimism's justification; with them over, the
|
|
262
|
+
* overrides still in force revert at the settle — unless the transaction is
|
|
263
|
+
* still waiting on AUTHORITATIVE work: an override node's own source in
|
|
264
|
+
* flight (`transitionBlocked` — that answer supersedes or confirms on
|
|
265
|
+
* arrival), or a held flight that does not derive from an override (a plain
|
|
266
|
+
* write's load the action asked for). Through that window the optimistic
|
|
267
|
+
* world stands: a co-written "saving" flag stays rendered until the page it
|
|
268
|
+
* covers lands (A17 — the optimistic world is one).
|
|
269
|
+
*
|
|
270
|
+
* The flights that DO derive from an override — routed through a live lane —
|
|
271
|
+
* are obsolete: their input is the guess that is about to revert, and nobody
|
|
272
|
+
* will read their answer. With nothing authoritative left, each override's
|
|
273
|
+
* truth is already here (the staged value an A17-silent landing left, else
|
|
274
|
+
* the committed value) and supersedes it now, exactly as an arriving
|
|
275
|
+
* differing truth does (A18, #3331): the graph re-derives from it as this
|
|
276
|
+
* transaction's held work — a lane-derived memo re-asks with the truth, its
|
|
277
|
+
* other changed inputs included — and the transaction settles when THAT
|
|
278
|
+
* lands. Before this the settle first waited for the obsolete flight,
|
|
279
|
+
* revealed the obsolete optimistic frame when it landed, and only then
|
|
280
|
+
* started the correction — a waterfall with a flash in the middle. Returns
|
|
281
|
+
* whether it superseded anything (the caller re-runs the heap).
|
|
282
|
+
*
|
|
283
|
+
* The optimistic world is one, so it ends early only when all of it can. An
|
|
284
|
+
* optimistic STORE edit cannot yet: its truth is the base layer under an
|
|
285
|
+
* overlay that `_clearOptimisticStores` folds off at settlement, with no
|
|
286
|
+
* tracked/displayed split — superseding its tracking signals alone would
|
|
287
|
+
* re-derive readers against a still-displayed overlay (and a memo reading
|
|
288
|
+
* both a signal and the store would ask a mixed question). A transaction
|
|
289
|
+
* holding one keeps the settle-then-revert order throughout. Companions
|
|
290
|
+
* (`_parentSource` set) are optimistic nodes too — a verdict written through
|
|
291
|
+
* the optimistic path so it flushes ahead of the hold — but they answer for
|
|
292
|
+
* their owner and snap at settlement (`_snapCompanions`), not here.
|
|
293
|
+
*/ function endOptimism(e) {
|
|
294
|
+
if (!e.he || e.pe.length || !e.rt.length || e.dn.size || transitionBlocked(e)) return false;
|
|
295
|
+
for (const n of e.oe.keys()) if (sourceObserved(e, n, e) && n.o?.ae?.has(n) && !resolveLane(n)) return false;
|
|
296
|
+
let n = false;
|
|
297
|
+
for (const i of e.rt) {
|
|
298
|
+
if (!hasActiveOverride(i) || i.o.Ht ||
|
|
299
|
+
// A derived override re-derives when its source's is superseded.
|
|
300
|
+
i.T & (CONFIG_OVERRIDE_SUPERSEDED | CONFIG_DERIVED_OVERRIDE) || i.S & STATUS_UNINITIALIZED) continue;
|
|
301
|
+
const e = i.ve !== NOT_PENDING ? i.ve : i.Qe;
|
|
302
|
+
if (!i.Fe || !i.Fe(e, unwrapOverride(i.o.Ce))) {
|
|
303
|
+
supersedeOverride(i, e);
|
|
304
|
+
// Judged by the mark, not the call: a provenance refusal (an older
|
|
305
|
+
// action's window is still open) leaves the node for a later pass.
|
|
306
|
+
if (i.T & CONFIG_OVERRIDE_SUPERSEDED) n = true;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
return n;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
/** read()'s value for a tracked reader of a superseded node: the truth —
|
|
313
|
+
* staged, or already committed (a mainline landing commits at the head of
|
|
314
|
+
* its flush, ahead of the heap run, and the override drops only at the
|
|
315
|
+
* batch's end; in between the graph must not fall back to the override it
|
|
316
|
+
* has left) — or the displayed override for a stale (render) reader of some
|
|
317
|
+
* OTHER transaction, the same visibility a foreign transaction's staged
|
|
318
|
+
* write has. */
|
|
319
|
+
/**
|
|
320
|
+
* A tracked read of an active override (read()'s override arm). Lanes mirror
|
|
321
|
+
* transitions (#3460): a render effect OFF the override's held lane — re-run
|
|
322
|
+
* by a sync write, or mounted mid-hold — sees the committed value, as a stale
|
|
323
|
+
* reader of a held transaction does, and publishes now; the lane's release
|
|
324
|
+
* re-runs it (readsHeldCommitted). The lane defers the override's own readers'
|
|
325
|
+
* runs, so the committed value is what is on screen — the override is the
|
|
326
|
+
* visible value only once the lane has revealed (or, demoted at body-end,
|
|
327
|
+
* A18). Otherwise the override displays, unless the node's own source
|
|
328
|
+
* answered with a DIFFERENT value (A18 supersession, #3331): the optimism is
|
|
329
|
+
* over for the graph — a tracked reader sees the staged truth — while the
|
|
330
|
+
* override remains the DISPLAYED value for untracked reads (and for a stale
|
|
331
|
+
* reader of some other transaction).
|
|
332
|
+
*/ function overrideRead(e, n) {
|
|
333
|
+
if (stale && readsHeldCommitted(e, n)) return e.Qe;
|
|
334
|
+
if (!(e.T & CONFIG_OVERRIDE_SUPERSEDED)) return unwrapOverride(e.o?.Ce);
|
|
335
|
+
// The owning transaction: `_overrideOwner` (#2912), not the stamp — an
|
|
336
|
+
// override written directly inside an action never passes the adoption
|
|
337
|
+
// loop that stamps `_transition`, and a body-end supersession (#3427)
|
|
338
|
+
// stages nothing that would queue it. Without the owner a stale reader of
|
|
339
|
+
// a body-ended node read the committed truth beside a display still
|
|
340
|
+
// showing the override.
|
|
341
|
+
const i = resolveTransition(e);
|
|
342
|
+
if (stale && i && activeTransition !== i) return unwrapOverride(e.o?.Ce);
|
|
343
|
+
// A superseded read is a staged read (A29) whether the truth is staged or
|
|
344
|
+
// already committed: the pass that derives from it derives from the
|
|
345
|
+
// owning transaction's world (the override is still displayed by it).
|
|
346
|
+
enterStagedRead(e, i);
|
|
347
|
+
return e.ve !== NOT_PENDING ? e.ve : e.Qe;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* An authoritative store landing on an override-covered node — a derived
|
|
352
|
+
* optimistic store's own truth arriving over a tentative edit through the
|
|
353
|
+
* projection-write channel (setSignal under projectionWriteActive). The
|
|
354
|
+
* store twin of asyncWrite's override branch: the truth stages for its
|
|
355
|
+
* transaction's commit whatever its relation to the committed value (a
|
|
356
|
+
* landing equal to committed still differs from the override), companions
|
|
357
|
+
* learn of it, and supersedeOverride decides the rest — A18 supersession with
|
|
358
|
+
* action provenance, or an A17-silent confirmation (#3331). Before this the
|
|
359
|
+
* landing took setSignal's plain path: a differing truth staged silently
|
|
360
|
+
* under the override and the graph never moved until the commit.
|
|
361
|
+
*/ function landOnOverride(e, n) {
|
|
362
|
+
const i = e.ve === NOT_PENDING ? e.Qe : e.ve;
|
|
363
|
+
if (typeof n === "function") n = n(i);
|
|
364
|
+
if (e.ve === NOT_PENDING) queuePendingNode(e);
|
|
365
|
+
e.ve = n;
|
|
366
|
+
GlobalQueue.me?.(e, n);
|
|
367
|
+
supersedeOverride(e, n);
|
|
368
|
+
schedule();
|
|
369
|
+
return n;
|
|
370
|
+
}
|
|
371
|
+
|
|
117
372
|
function runQueue(e, n) {
|
|
118
|
-
for (let
|
|
373
|
+
for (let i = 0; i < e.length; i++) e[i](n | LANE_RUN);
|
|
119
374
|
}
|
|
120
375
|
|
|
121
376
|
/**
|
|
@@ -123,32 +378,32 @@ function runQueue(e, n) {
|
|
|
123
378
|
* laneHeld).
|
|
124
379
|
*/ function runLaneEffects(e) {
|
|
125
380
|
for (const n of activeLanes) {
|
|
126
|
-
if (n.
|
|
127
|
-
const
|
|
128
|
-
if (
|
|
129
|
-
n.
|
|
130
|
-
runQueue(
|
|
381
|
+
if (n.cn || laneHeld(n)) continue;
|
|
382
|
+
const i = n.fn[e - 1];
|
|
383
|
+
if (i.length) {
|
|
384
|
+
n.fn[e - 1] = [];
|
|
385
|
+
runQueue(i, e);
|
|
131
386
|
}
|
|
132
387
|
}
|
|
133
388
|
// Optimistic patch applications ride the same visibility slot as lane
|
|
134
389
|
// effects (in-flight DOM updates); no-op unless patches registered.
|
|
135
|
-
if (e === EFFECT_RENDER) GlobalQueue.
|
|
390
|
+
if (e === EFFECT_RENDER) GlobalQueue.In?.();
|
|
136
391
|
}
|
|
137
392
|
|
|
138
393
|
function cleanupCompletedLanes(e) {
|
|
139
394
|
for (const n of activeLanes) {
|
|
140
|
-
const
|
|
141
|
-
if (!
|
|
142
|
-
if (!n.
|
|
143
|
-
if (n.
|
|
144
|
-
if (n.
|
|
395
|
+
const i = e ? n.Ge === e : !n.Ge;
|
|
396
|
+
if (!i) continue;
|
|
397
|
+
if (!n.cn) {
|
|
398
|
+
if (n.fn[0].length) runQueue(n.fn[0], EFFECT_RENDER);
|
|
399
|
+
if (n.fn[1].length) runQueue(n.fn[1], EFFECT_USER);
|
|
145
400
|
}
|
|
146
|
-
if (n.
|
|
147
|
-
n.
|
|
148
|
-
n.
|
|
149
|
-
n.
|
|
401
|
+
if (n.an.o?.Ue === n) if (n.an.o !== null) n.an.o.Ue = undefined;
|
|
402
|
+
n.ye.clear();
|
|
403
|
+
n.fn[0].length = 0;
|
|
404
|
+
n.fn[1].length = 0;
|
|
150
405
|
activeLanes.delete(n);
|
|
151
|
-
signalLanes.delete(n.
|
|
406
|
+
signalLanes.delete(n.an);
|
|
152
407
|
}
|
|
153
408
|
}
|
|
154
409
|
|
|
@@ -162,30 +417,44 @@ function cleanupCompletedLanes(e) {
|
|
|
162
417
|
// this is only reachable under a lane, which implies the engine.
|
|
163
418
|
if (e.S & STATUS_UNINITIALIZED) return true;
|
|
164
419
|
// Per-lane suspension: only throw if in same lane as pending async
|
|
165
|
-
// AND the node doesn't have an active override (overrides are the
|
|
166
|
-
// downstream in the lane should read the override, not
|
|
167
|
-
|
|
420
|
+
// AND the node doesn't have an active WRITTEN override (overrides are the
|
|
421
|
+
// visible value, downstream in the lane should read the override, not
|
|
422
|
+
// throw). A derived override (#3479) is a previous speculative answer, not
|
|
423
|
+
// an intent: the re-ask pending behind it suspends like any lane async.
|
|
424
|
+
const n = e.o?.Ue;
|
|
168
425
|
if (!n) return false;
|
|
169
|
-
return findLane(n) === findLane(currentOptimisticLane) && !hasActiveOverride(e);
|
|
426
|
+
return findLane(n) === findLane(currentOptimisticLane) && (!hasActiveOverride(e) || (e.T & CONFIG_DERIVED_OVERRIDE) !== 0);
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* read()'s reveal carve-out asks whether a pending node is routed through a
|
|
431
|
+
* LIVE lane: a lane-derived flight's inputs are already revealed through the
|
|
432
|
+
* lane (the override, or latest()'s fresh value), so a stale reader of another
|
|
433
|
+
* transaction must hold on the flight rather than show the node's committed
|
|
434
|
+
* value beside them (#3334). Exact, not sticky: `resolveLane` clears a lane
|
|
435
|
+
* reference the engine has since retired, so a node that was once lane-routed
|
|
436
|
+
* and is now pending under a plain hold is judged by that hold alone.
|
|
437
|
+
*/ function laneLive(e) {
|
|
438
|
+
return resolveLane(e) !== undefined;
|
|
170
439
|
}
|
|
171
440
|
|
|
172
441
|
/**
|
|
173
442
|
* read()'s entanglement gate: a reader recomputing under an optimistic lane
|
|
174
443
|
* that reads a pending mid-transition write sees the committed value; the sub
|
|
175
444
|
* is recorded for replay at commit.
|
|
176
|
-
*/ function gatedRead(e, n,
|
|
177
|
-
if (latestReadActive || e.
|
|
445
|
+
*/ function gatedRead(e, n, i) {
|
|
446
|
+
if (latestReadActive || e.ve === NOT_PENDING || e.ce || n !== e && !(n.ue & REACTIVE_MANUAL_WRITE)) {
|
|
178
447
|
return false;
|
|
179
448
|
}
|
|
180
|
-
activeTransition.
|
|
449
|
+
activeTransition.ct.add(i);
|
|
181
450
|
return true;
|
|
182
451
|
}
|
|
183
452
|
|
|
184
453
|
/**
|
|
185
454
|
* read()'s value selection under a lane: return the committed `_value` for
|
|
186
455
|
* optimistic/lane-assigned signals, stale-mode reads, and pending owners.
|
|
187
|
-
*/ function laneReadsCommitted(e, n,
|
|
188
|
-
if (e.o?.
|
|
456
|
+
*/ function laneReadsCommitted(e, n, i) {
|
|
457
|
+
if (e.o?.Ce !== undefined || !!e.o?.Ue || !!(n.S & STATUS_PENDING)) {
|
|
189
458
|
// The committed view hides a staged in-flight value that will promote
|
|
190
459
|
// silently (commitPendingNode never re-notifies). gatedRead records plain
|
|
191
460
|
// signals for replay at commit; async memos are excluded from it by the
|
|
@@ -193,11 +462,17 @@ function cleanupCompletedLanes(e) {
|
|
|
193
462
|
// already settled (laneAsyncSettled keeps _optimisticLane) served its
|
|
194
463
|
// committed value to a reader that never re-ran after the landing, so a
|
|
195
464
|
// pending-gated branch stayed one value behind permanently (#3041
|
|
196
|
-
// follow-up). Record the reader under the same replay contract
|
|
197
|
-
|
|
465
|
+
// follow-up). Record the reader under the same replay contract — when
|
|
466
|
+
// the commit will actually change what it read: a staged value equal to
|
|
467
|
+
// the committed one (a lane recompute already published it, INV-11)
|
|
468
|
+
// promotes to the same view, and a replay would only re-run effects
|
|
469
|
+
// against an unchanged frame (#3330). An override-covered node's revert
|
|
470
|
+
// notifies its own subscribers when the truth differs (resolveOptimistic
|
|
471
|
+
// Nodes), so the reader is recorded only for the staged-vs-committed gap.
|
|
472
|
+
if (e.ve !== NOT_PENDING && e.ve !== e.Qe) (activeTransition ?? globalQueue.m).ct.add(i);
|
|
198
473
|
return true;
|
|
199
474
|
}
|
|
200
|
-
if (n === e && stale &&
|
|
475
|
+
if (n === e && stale && i.o?.Ht !== e) {
|
|
201
476
|
// The committed view can hide a staged write (a lane member — even just
|
|
202
477
|
// an isPending companion flip — puts the reader "under a lane"). The
|
|
203
478
|
// staged value commits with no re-delivery (commitPendingNode never
|
|
@@ -209,7 +484,7 @@ function cleanupCompletedLanes(e) {
|
|
|
209
484
|
// into the transaction (#3041 follow-up: a pending-gated branch that
|
|
210
485
|
// first read its async source during the landing flush stayed one value
|
|
211
486
|
// behind permanently); with none, into the ambient batch.
|
|
212
|
-
if (e.
|
|
487
|
+
if (e.ve !== NOT_PENDING) (activeTransition ?? globalQueue.m).ct.add(i);
|
|
213
488
|
return true;
|
|
214
489
|
}
|
|
215
490
|
return false;
|
|
@@ -232,18 +507,18 @@ function cleanupCompletedLanes(e) {
|
|
|
232
507
|
// recompute() runs plain: the value stages and commits with the flush.
|
|
233
508
|
// (el's own override slot excludes companions themselves; a lane merged
|
|
234
509
|
// into a real optimistic lane resolves to a non-companion source.)
|
|
235
|
-
if (!globalQueue.
|
|
236
|
-
if (e.o !== null) e.o
|
|
510
|
+
if (!globalQueue.Kt && !activeTransition && !n.Ge && n.an.o?.Ht !== undefined && e.o?.Ce === undefined) {
|
|
511
|
+
if (e.o !== null) e.o.Ue = undefined;
|
|
237
512
|
return false;
|
|
238
513
|
}
|
|
239
514
|
return n;
|
|
240
515
|
}
|
|
241
|
-
for (let n = e.
|
|
242
|
-
const
|
|
243
|
-
if (
|
|
244
|
-
const n = resolveLane(
|
|
516
|
+
for (let n = e.Se; n; n = n.de) {
|
|
517
|
+
const i = n.Ee;
|
|
518
|
+
if (i.ue & REACTIVE_OPTIMISTIC_DIRTY) {
|
|
519
|
+
const n = resolveLane(i);
|
|
245
520
|
if (n) {
|
|
246
|
-
e.
|
|
521
|
+
e.ue |= REACTIVE_OPTIMISTIC_DIRTY;
|
|
247
522
|
assignOrMergeLane(e, n);
|
|
248
523
|
return n;
|
|
249
524
|
}
|
|
@@ -257,9 +532,9 @@ function cleanupCompletedLanes(e) {
|
|
|
257
532
|
* companion is NOT refreshed here: its verdict never read _pendingAsync, and
|
|
258
533
|
* the source's own write/commit/settlement paths keep it current. */ function laneAsyncPending(e) {
|
|
259
534
|
const n = findLane(currentOptimisticLane);
|
|
260
|
-
if (n.
|
|
261
|
-
n.
|
|
262
|
-
ext(e)
|
|
535
|
+
if (n.an !== e) {
|
|
536
|
+
n.ye.add(e);
|
|
537
|
+
ext(e).Ue = n;
|
|
263
538
|
e.T |= CONFIG_HAS_LANE;
|
|
264
539
|
}
|
|
265
540
|
}
|
|
@@ -267,13 +542,13 @@ function cleanupCompletedLanes(e) {
|
|
|
267
542
|
/** recompute()'s success path: the node's async settled, clear it from its lane. */ function laneAsyncSettled(e) {
|
|
268
543
|
const n = resolveLane(e);
|
|
269
544
|
if (n) {
|
|
270
|
-
n.
|
|
545
|
+
n.ye.delete(e);
|
|
271
546
|
}
|
|
272
547
|
}
|
|
273
548
|
|
|
274
549
|
function trackOptimisticStore(e) {
|
|
275
550
|
// After initTransition, globalQueue._batch IS activeTransition (same reference)
|
|
276
|
-
globalQueue.m.
|
|
551
|
+
globalQueue.m.dn.add(e);
|
|
277
552
|
schedule();
|
|
278
553
|
}
|
|
279
554
|
|
|
@@ -282,19 +557,25 @@ function trackOptimisticStore(e) {
|
|
|
282
557
|
* create optimistic state (verdict.ts at module top level, createOptimistic
|
|
283
558
|
* and createOptimisticStore at first call) BEFORE any optimistic node exists.
|
|
284
559
|
*/ function installOptimisticEngine() {
|
|
285
|
-
if (GlobalQueue.
|
|
286
|
-
GlobalQueue.
|
|
287
|
-
GlobalQueue.
|
|
288
|
-
GlobalQueue.
|
|
289
|
-
GlobalQueue.
|
|
290
|
-
GlobalQueue.
|
|
291
|
-
GlobalQueue.
|
|
292
|
-
GlobalQueue.
|
|
293
|
-
GlobalQueue.
|
|
294
|
-
GlobalQueue.
|
|
295
|
-
GlobalQueue.
|
|
296
|
-
GlobalQueue.
|
|
297
|
-
GlobalQueue
|
|
560
|
+
if (GlobalQueue.ln !== null) return;
|
|
561
|
+
GlobalQueue.ln = optimisticWrite;
|
|
562
|
+
GlobalQueue.On = resolveOptimisticNodes;
|
|
563
|
+
GlobalQueue.Nn = transitionBlocked;
|
|
564
|
+
GlobalQueue.Rn = cleanupCompletedLanes;
|
|
565
|
+
GlobalQueue._n = runLaneEffects;
|
|
566
|
+
GlobalQueue.we = supersedeOverride;
|
|
567
|
+
GlobalQueue.Tn = endOptimism;
|
|
568
|
+
GlobalQueue.en = overrideRead;
|
|
569
|
+
GlobalQueue.Ve = laneOverride;
|
|
570
|
+
GlobalQueue.un = landOnOverride;
|
|
571
|
+
GlobalQueue.tn = gatedRead;
|
|
572
|
+
GlobalQueue.$t = laneSuspends;
|
|
573
|
+
GlobalQueue.Xt = laneLive;
|
|
574
|
+
GlobalQueue.Bt = laneReadsCommitted;
|
|
575
|
+
GlobalQueue.st = recomputeLane;
|
|
576
|
+
GlobalQueue._t = laneAsyncPending;
|
|
577
|
+
GlobalQueue.ft = laneAsyncSettled;
|
|
578
|
+
GlobalQueue.Dn = trackOptimisticStore;
|
|
298
579
|
}
|
|
299
580
|
|
|
300
581
|
export { installOptimisticEngine };
|