Skip to content

Commit 7acdc0d

Browse files
committed
docs(signals): undo an accidental reformat of unrelated docs
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LVm3wseHt9wRTY8LfPiHmQ
1 parent 8378501 commit 7acdc0d

7 files changed

Lines changed: 475 additions & 502 deletions

File tree

‎packages/signals/docs/BITWISE_OPERATIONS.md‎

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Bitwise Operations in the Reactive System
22

33
## Overview
4-
54
`@solidjs/signals` uses bitmasks in a few different places:
65

76
- reactive node dirtiness and lifecycle flags
@@ -14,7 +13,6 @@ The definitions live in `src/core/constants.ts`. The old `ERROR_BIT` / `LOADING_
1413
## Current Flag Groups
1514

1615
### Reactive flags
17-
1816
These track scheduler and node lifecycle state:
1917

2018
```typescript
@@ -33,7 +31,6 @@ export const REACTIVE_LAZY = 1 << 9;
3331
These flags are mostly used by the scheduler and heap-driven recomputation logic.
3432

3533
### Status flags
36-
3734
These track async and error state on computations:
3835

3936
```typescript
@@ -46,7 +43,6 @@ export const STATUS_UNINITIALIZED = 1 << 2;
4643
These are the flags boundary queues and async propagation care about.
4744

4845
### Configuration flags
49-
5046
These describe a node's static identity (mostly fixed at creation) and are packed into a single `_config` field on every Owner / Computed / Signal:
5147

5248
```typescript
@@ -65,7 +61,6 @@ Most bits are immutable once set. The exceptions:
6561
- `CONFIG_AUTO_DISPOSE` is set at creation when the node has no parent (unowned) **or** when `lazy: true`. Infrastructure factories (`effect`, `trackedEffect`, `boundaryComputed`, `mapArray`, `repeat`, `createSignal(fn)`, `createOptimistic(fn)`, projection nodes) clear it after creation so they live for their owner's lifetime instead of being torn down when their subscriber count hits zero. Both autodispose paths — the `unlinkSubs` zero-subscriber path and the `read()` no-observer tail — gate on this single bit.
6662

6763
### Effect kinds
68-
6964
These are numeric tags, not bitmasks:
7065

7166
```typescript
@@ -102,7 +97,6 @@ node._statusFlags &= ~STATUS_UNINITIALIZED;
10297
## Where Status Masks Are Used
10398

10499
### Boundary propagation
105-
106100
Boundary-wrapped computeds remember which statuses should continue propagating upward:
107101

108102
```typescript
@@ -113,7 +107,6 @@ node._queue.notify(node, node._propagationMask, flags, actualError);
113107
For example, loading boundaries are built around `STATUS_PENDING`, while error boundaries are built around `STATUS_ERROR`.
114108

115109
### Queue notification
116-
117110
Queue notification takes both:
118111

119112
- `mask`: which statuses this queue cares about
@@ -126,7 +119,6 @@ notify(node, mask, flags, error?)
126119
That allows a boundary queue to intercept one status, strip it from further propagation, and optionally forward the remaining ones.
127120
128121
### Reactive scheduling
129-
130122
Reactive flags are used to decide whether a node goes into the dirty heap, zombie heap, or needs optimistic-lane handling:
131123
132124
```typescript
@@ -135,12 +127,12 @@ const queue = sub._flags & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
135127
136128
## Typical Combinations
137129
138-
| Combination | Meaning |
139-
| ---------------- | -------------------------------- | -------------------------------------------------------------- |
140-
| `STATUS_PENDING` | async work is still unresolved |
141-
| `STATUS_ERROR` | computation is in an error state |
142-
| `STATUS_PENDING | STATUS_ERROR` | queue code is examining both async and error propagation |
143-
| `REACTIVE_DIRTY | REACTIVE_OPTIMISTIC_DIRTY` | node needs recomputation and carries optimistic-lane semantics |
130+
| Combination | Meaning |
131+
| --- | --- |
132+
| `STATUS_PENDING` | async work is still unresolved |
133+
| `STATUS_ERROR` | computation is in an error state |
134+
| `STATUS_PENDING | STATUS_ERROR` | queue code is examining both async and error propagation |
135+
| `REACTIVE_DIRTY | REACTIVE_OPTIMISTIC_DIRTY` | node needs recomputation and carries optimistic-lane semantics |
144136
145137
## Notes
146138
@@ -151,4 +143,4 @@ const queue = sub._flags & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
151143
## Related Documentation
152144
153145
- See [QUEUE_NOTIFICATION_SYSTEM.md](./QUEUE_NOTIFICATION_SYSTEM.md) for how status masks move through queues.
154-
- See [QUEUE_EXECUTION_CONTROL.md](./QUEUE_EXECUTION_CONTROL.md) for how dirty heaps, lanes, and effect queues are drained.
146+
- See [QUEUE_EXECUTION_CONTROL.md](./QUEUE_EXECUTION_CONTROL.md) for how dirty heaps, lanes, and effect queues are drained.

0 commit comments

Comments
 (0)