@isograph/pico 0.0.0-main-5f205c00
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/LICENSE-MIT +7 -0
- package/README.md +152 -0
- package/dist/index.cjs +1154 -0
- package/dist/index.d.cts +176 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +176 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +1139 -0
- package/dist/index.mjs.map +1 -0
- package/docs/contracts.md +45 -0
- package/docs/correctness.md +233 -0
- package/docs/design.md +97 -0
- package/docs/disposing-nodes.md +171 -0
- package/docs/lifetimes.md +25 -0
- package/docs/performance.md +85 -0
- package/package.json +49 -0
- package/src/batch/batch.ts +133 -0
- package/src/batch/flush.ts +30 -0
- package/src/batch/notifications.ts +39 -0
- package/src/disposal/age-drain.ts +124 -0
- package/src/disposal/cleanup.ts +171 -0
- package/src/disposal/older-than-updates.ts +132 -0
- package/src/disposal/schedule.ts +78 -0
- package/src/disposal/take.ts +52 -0
- package/src/disposal/update-counter.ts +9 -0
- package/src/graph/edges.ts +167 -0
- package/src/graph/marking.ts +310 -0
- package/src/graph/nodes.ts +196 -0
- package/src/graph/read.ts +150 -0
- package/src/graph/recompute.ts +127 -0
- package/src/graph/refresh.ts +232 -0
- package/src/index.ts +18 -0
- package/src/retention/retain.ts +133 -0
- package/src/state.ts +39 -0
package/src/state.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export const UNCOMPUTED = 0;
|
|
2
|
+
export const DIRTY = 1;
|
|
3
|
+
export const MAYBE_DIRTY = 2;
|
|
4
|
+
export const CLEAN = 3;
|
|
5
|
+
|
|
6
|
+
export const DEPENDENTS_NOT_NECESSARILY_ALL_DIRTY = 0;
|
|
7
|
+
export const DEPENDENTS_KNOWN_TO_BE_ALL_DIRTY = 1;
|
|
8
|
+
|
|
9
|
+
export const NO_CALLBACK = 0;
|
|
10
|
+
export const HAS_CALLBACK = 1;
|
|
11
|
+
|
|
12
|
+
export const NO_FLAGS = 0;
|
|
13
|
+
/**
|
|
14
|
+
* A bit of `traversalFlags`, read only while the node is `MAYBE_DIRTY`: marking reached
|
|
15
|
+
* the node only beyond a node with a callback that it put on the flush queue, so a
|
|
16
|
+
* node with a callback above it may be `MAYBE_DIRTY` and on no flush queue.
|
|
17
|
+
*/
|
|
18
|
+
export const MARKED_BEYOND = 1;
|
|
19
|
+
/**
|
|
20
|
+
* During a newest-first cleanup scan, this bit marks nodes already seen so
|
|
21
|
+
* older queue entries can be dropped. The scan clears it before disposal.
|
|
22
|
+
*/
|
|
23
|
+
export const SCAN_SEEN = 2;
|
|
24
|
+
export const ALL_TRAVERSAL_FLAGS = 3; // MARKED_BEYOND | SCAN_SEEN
|
|
25
|
+
|
|
26
|
+
export const CHANGED = 0;
|
|
27
|
+
export const UNCHANGED = 1;
|
|
28
|
+
|
|
29
|
+
export const FLUSH_IDLE = 0;
|
|
30
|
+
export const FLUSH_RUNNING = 1;
|
|
31
|
+
|
|
32
|
+
export const SCHEDULE_NOT_PENDING = 0;
|
|
33
|
+
export const SCHEDULE_PENDING = 1;
|
|
34
|
+
|
|
35
|
+
export const DISPOSE_FROM_CLEANUP_QUEUE = 0;
|
|
36
|
+
export const DISPOSE_MARKED = 1;
|
|
37
|
+
|
|
38
|
+
export const DEFAULT_IDLE = 0;
|
|
39
|
+
export const DEFAULT_SCHEDULED = 1;
|