(x)
| 232 | |
| 233 | // --- coerce parsed Stalker values to NativePointer -------------------------- |
| 234 | function np(x) { |
| 235 | if (x == null) return null; |
| 236 | if (typeof x === "string") return ptr(x); |
| 237 | return x; // already a NativePointer |
| 238 | } |
| 239 | |
| 240 | // --- per-thread stalk state ------------------------------------------------- |
| 241 | const stalked = new Map(); // tid -> { name, scope:Set<string>|null, count, dropped, startedAt } |