Expand description
Removes manual memoization using useMemo and useCallback APIs.
For useMemo: replaces Call useMemo(fn, deps) with Call fn()
For useCallback: replaces Call useCallback(fn, deps) with LoadLocal fn
When validation flags are set, inserts StartMemoize/FinishMemoize markers.
Analogous to TS Inference/DropManualMemoization.ts.
Functionsยง
- collect_
maybe_ memo_ dependencies - Collect loads from named variables and property reads into
maybe_deps. Returns the variable + property reads represented by the instruction value. - drop_
manual_ memoization - Drop manual memoization (useMemo/useCallback calls), replacing them with direct invocations/references.