Commit Graph
3 Commits
Author SHA1 Message Date
faumaray 1ba60d5d6a Build: gate reflection-only tests on VOID_HAS_CXX26_REFLECTION (refs #38) 2026-12-03 17:29:04 +03:00
faumaray 692f5ba5b2 feat(Data): add exact 64-bit signed/unsigned JSON numbers and checked conversion (M-DATA-02) 2026-11-24 03:25:17 +03:00
faumarayandClaude Fable 5 8a6065539a Add Async lock-free infrastructure and reflection JSON serializer
Async (Void::Async):
- MpscQueue<T>: unbounded Vyukov multi-producer/single-consumer queue.
  Wait-free push (XCHG + store, no CAS loop); consumer-owned reclamation so
  no hazard pointers and no ABA. The transient mid-link empty window is
  documented; try_pop/empty are re-poll hints.
- Executor/ManualExecutor: minimal scheduling bridge for Coro::Task with
  lock-free post() from any thread and single-thread run_one()/drain();
  schedule_on() awaitable and spawn() for detached task launch with a
  self-destroying wrapper frame.

Data (Void::Json):
- Reflect.hpp: P2996 to_json/from_json for aggregate structs (field-name
  keys; arithmetic/bool/string/enum-by-name/vector/optional/string-map/
  nested aggregates), tolerant deserialization (unknown fields ignored,
  missing fields keep defaults, mismatches report dotted field paths).
- Versioned envelopes {"__version", "data"} with StateTraits<T> and
  MigrationChain for stepwise schema upgrades - groundwork for plugin
  hot-reload state transfer.
- Member to_json/from_json customization wins over reflection and is the
  only path on compilers without <meta> (Reflectable is false there).

Verified with GCC 16.1 (-freflection): 25 new tests including an
8-producer x 100k MPSC stress with per-producer FIFO assertion, coroutine
frame lifetime checks, and a 3-step v1->v3 migration; suite green under
ASan+UBSan.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 18:57:15 +03:00