You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
authored
decoder: remove dead stub-immediate path, fix stale docstrings (#127)
* decoder: remove dead stub-immediate path, fix stale docstrings
`stubImmediateCount` unconditionally returns `none` (all GC ops are decoded for
real now), which makes the `some n => consumeStubAtoms …` branch that calls it
statically unreachable and `consumeStubAtoms` dead. This removes both and folds
the branch to its only reachable arm (`.ok rest`), keeping the live
`consumeBrOnCastImmediates` case untouched — behaviour is unchanged.
It also refreshes several comments that no longer match the decoder: the
top-of-file and `parseModule` docstrings (type/table/memory/global/elem/data/tag
content is fully parsed now, not discarded), the `parsePlainOp` catch-all
(floats and SIMD are modelled; the fallback only stubs still-unmodelled proposals
like atomics), and the `isMemOp` comments (memory ops emit real load/stores).
* decoder+array: correct import docstrings, generalize slice callee bridge
Address code-review findings on the decoder cleanup and the new slice corpus:
- Wat.lean: the module-header and `parseModule` docstrings claimed non-func
imports are "dropped"; they are in fact parsed into `globals`/`tables`/`memory`
and recorded in `importedGlobals`/`importedTables`/`importedMemories`. Reword to
match. Also remove the now-unreachable `br_on_cast` arm in the `parsePlainOp`
fallback (handled by an explicit arm) and its orphaned `consumeBrOnCastImmediates`.
- Array trunk: add chunk-generic `unSliceBodyTerminates`; `isEmptyBodyTerminates`
and the new symmetric `lenBodyTerminates` are one-line instances, so the `len`
callee bridge no longer hand-rolls the `of_returns_wp` glue. Drop the now-unused
op-specific `lenBodyWp`/`isEmptyBodyWp` (subsumed by the generic `unBodyReturnsWp`).
- RustArray/Spec.lean: bridges first, internal specs reuse them at `initialStore`
(matching RustArrayTests) instead of duplicating the callee term.
- Add `open_slice_export` macro factoring the uniform export-proof head; apply to
all six slice export proofs.
Verified: codelib and programs both `lake build` clean.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Marcelo Fornet <mfornet94@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments