Commit graph

18 commits

Author SHA1 Message Date
Admin
ff604e53a3 splash: string-compare early-out in deep_eq, thread stack prealloc, bench additions
- deep_eq returns false immediately when both sides are string-like and
  the bit-compare failed (strings are interned, so bit-equality IS string
  equality) — trims the type-check chain on the hot failed-compare path
  of string-tag dispatch (a.kind == "...")
- pre-reserve thread stacks (value stack, scopes, calls, mes, loops)
- splash_bench: string_cmp workload, arith_hostmode (instruction limit +
  run budget installed, the game-host configuration; measured: the two
  per-instruction counters cost ~nothing, branch prediction hides them),
  BENCH_ONLY profiler filter

Tried and rejected: batching consecutive value-pushes in run_core into
one dispatch iteration — the scan overhead outweighed the per-value
limit/budget checks it skipped (they were already free); reverted.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-11 15:59:05 +02:00
Admin
0cd882f793 splash optimisation work
Interpreter perf pass on platform/script, semantics-preserving:

- ValueMap hybrid small-map: object maps linear-scan a vec below 16
  entries and spill to a HashMap above (scopes/call-args/small objects
  never hash)
- compound scope assigns (+=, -=, ...) locate their slot with ONE
  proto-chain walk instead of a read walk plus a write walk
- for-loop iterations clear and reuse the iteration scope in place when
  nothing captured it (closure capture -> REFFED -> fresh scope); loop
  scopes no longer copy the parent scope vec
- 'for i in a..b' captures end/step at loop entry when the range object
  is un-REFFED; stored (mutable) ranges keep live per-iteration lookups
- trap error-queue + trap.on polled via one Cell<u8> bitfield per
  instruction instead of a RefCell borrow + Option<enum> Cell read
- ADD checks the number fast path before the string check

Measured (splash_bench, medians of 3 A/B runs): array_iter -27%,
method_call -21%, array_index -21%, for-range loops -19%, object_churn
and field r/w -8..9%, fib -7%, sandbox-style composite tick -6%.

Adds platform/script/test/src/bin/splash_bench.rs (run with
cargo run -p makepad-script-test --bin splash_bench --release,
BENCH_ONLY=<name> loops one workload for profilers) and parity asserts
for the touched edges: mid-loop range end/step mutation stays live on
stored ranges, closures pin their iteration's scope, selective capture
does not leak across reused scopes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-10 13:07:40 +02:00
Admin
d41b6e43ec Arcade M0r: parity-neutral sim internals cleanup
- Entity lookup O(log n): shared entity_index_sorted helper, single
  push_entity spawn path with ascending-id assert + per-tick sorted
  debug_assert — the sorted-Vec invariant is now enforced, not hoped
- WorldSnapshot captures next_id: failed-eval rollback can no longer mint
  colliding ids under surviving entities (review defect fixed)
- game.log buffered (1s/16KiB/eval-boundary flush), agent RPC poll gated
  on one .agent dir-mtime stat — no per-tick file I/O left
- Camera rig authoritative on GameWorld (orbit/chase state); widget keeps
  only device-input accumulation; mailbox drain order unchanged
- Per-tick cumulative script budget: with_instruction_limit reports
  consumption (incl. trap-wipe subtlety), gamemaker tick holds ONE 500k
  pool across on_tick + timers + touch events
- Tape probe verified BYTE-IDENTICAL vs pre-cleanup reference

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 23:34:45 +02:00
Admin
0ebe270c20 Script VM GC campaign: isolate GC, host-transient release, cross-VM resource handle fix
- Escape barrier: every checked store funnel tags stored objects REFFED
  (stored => REFFED structural), ret==args guards at native completion,
  fn-arg bind-time barrier (closure-captured scopes retained args untagged
  -> latent use-after-free under eager release)
- vm.release_transient() for host per-call objects; *_unchecked pushes are
  the releasable-container path; call_with_scope native branch no longer
  leaks one scope object per Rust->native vm.call()
- pump_widget_async: dead-isolate reclaim every pump + needs_gc-gated
  round-robin mark/sweep — isolate heaps were never collected before
- res.rs: resource path cache was Cx-global and cached handle VALUES across
  VMs, so isolate heaps held main-heap handle indices (exposed by the first
  isolate mark pass ever to run). Now: data shared globally, handles minted
  per-heap, cache keyed (heap_key, path), per-heap detach on GC
- vm.gc() no longer shrink_to_fits every run; explicit gc_and_compact()
- script-test: GC campaign suite (flat-heap tick loops, retained-input
  survival, escaped-scope capture, isolate churn collection)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 22:27:27 +02:00
Admin
59b7d2712f gamemaker: full engine round — chase camera rig, racing-game APIs, script stdlib math, real error line numbers
Engine (examples/gamemaker): chase camera rig (camera({chase}) — ease-behind
with mouse-wins/recenter authority), writable camera + look deltas, spatial
queries (raycast/overlap_sphere/ground_normal), save/load, sustained tones,
rot_y + collide:false spawnables, HUD slots/bars, terrain noise shaping +
height bands, per-shape instanced render batching with static slabs (3.2x),
error push-loop into the agent chat, unknown-verb/option diagnostics with
game.splash:line:col positions, streaming tail-statement finalization, quiet
toolbar UI, Shh voice hush, fable voice.

Platform: runtime vector methods (.length/.normalized/.dot/.cross), scalar+
vector lerp, TAU; ScriptVm error capture sink; window frame capture API; four
headless-JIT fixes (scalar casts, mat4 mul, Id-arg expansion, commuted
scalar-vec ops) with regression test stages. Widgets: single-line TextInput
baseline centering, TextFlow inline-code baseline alignment, glass button
corner_radius uniform. Voice/ggml Metal backends: debug logs behind
GGML_METAL_TRACE. splashgame.md: the runtime-loaded game API contract.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-10 14:20:03 +02:00
admin
b94ab6e985 splash md for calculator 2026-05-27 07:39:41 +02:00
Admin
d134df9f06 xr llama and slug 2026-04-01 12:19:03 +02:00
Admin
695403ef72 xr otw 2026-03-12 15:51:30 +01:00
Admin
6679035b4a hiccup 2026-03-11 10:19:58 +01:00
Admin
cf22b515c8 fix script mods 2026-03-08 18:20:07 +01:00
Admin
8c5987039d fix shader compiler 2026-03-06 18:49:24 +01:00
Admin
ed062cb224 fix shader compiler state clobber 2026-03-06 17:21:17 +01:00
Admin
bb331d0eb3 split f32 + uniformbuffers 2026-03-06 17:21:17 +01:00
Admin
c8ab367b14 little glitches in script engine 2026-02-24 23:32:56 +01:00
Admin
aae121f31d fix gc issues 2026-02-24 21:40:08 +01:00
Admin
ac73635921 image search 2026-02-12 21:56:41 +01:00
Admin
81db1516d9 todo app 2026-02-12 19:58:49 +01:00
Admin
8e6702c56b First 2.0 2026-02-12 14:52:33 +01:00