OpenSpin 1.00.77 Now with Unused Method Removal
Roy Eltham
Posts: 3,000
Get it here: https://github.com/parallaxinc/OpenSpin/releases
The new Unused Method Removal feature is now working. It will remove unused Spin methods, and even whole unused objects. Even if it removes a whole object, the CON's in it will still be usable (e.g. object#conValue). It doesn't remove unused DAT sections unless the entire object is unused (no spin methods are ever called).
The only Spin methods it has trouble removing are ones called by coginit or cognew. Those will be left in even if the function containing the coginit/cognew is removed. It's something that may be addressed in a future update, but for now it's a pretty minor limitation.
It's reasonably solid now, but still needs more testing. Please check it out.
Edit: changed title version to 1.00.77
The new Unused Method Removal feature is now working. It will remove unused Spin methods, and even whole unused objects. Even if it removes a whole object, the CON's in it will still be usable (e.g. object#conValue). It doesn't remove unused DAT sections unless the entire object is unused (no spin methods are ever called).
The only Spin methods it has trouble removing are ones called by coginit or cognew. Those will be left in even if the function containing the coginit/cognew is removed. It's something that may be addressed in a future update, but for now it's a pretty minor limitation.
It's reasonably solid now, but still needs more testing. Please check it out.
Edit: changed title version to 1.00.77
Comments
I'll be trying to get it transpiled to JS for the web ASAP.
Ran a couple of tests from the command line on my Mac OS X system!
Looks like SimpleIDE does not pass this as a "Spin Compiler Option" if I manually enter "-u" into the Compiler option field, though, so SimpleIDE will need an update to use this feature. (Hmm, PropellerIDE, as well!)
dgately
It uses a fair bit more memory (mostly static), sorry.
dgately,
Brett helped with testing early on, so I suspect he'll have PropellerIDE working with it soon.
https://github.com/dbetz/propeller-load
I published an updated version (1.00.77) with a bug fix for the Unused Method Removal feature.