WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
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
DCE: Make OptionalArgs tracking immutable (Optional Task)
OptionalArgs.t is now fully immutable with no mutation of declarations.
Key changes:
- OptionalArgs.t: removed mutable fields
- apply_call: pure function, returns new state
- combine_pair: pure function, returns pair of new states
- OptionalArgsState module in Common.ml for computed state map
- compute_optional_args_state: returns immutable OptionalArgsState.t
- DeadOptionalArgs.check: looks up state from map
Architecture:
- Declaration's optionalArgs = initial state (what args exist)
- OptionalArgsState.t = computed state (after all calls/combines)
- Solver uses OptionalArgsState.find_opt to get final state
This completes the pure analysis pipeline - no mutation anywhere.
0 commit comments