Is there an /OPT:REF for spin? + OBEX Suggestion
RockyD
Posts: 17
I have a two part suggestion / question. First, I could not seem to find the C++ linker equivalent of /OPT:REF for Spin. This would eliminate references to functions that are never referenced.
Second, my suggestion for the Object Exchange would be to expand some of the objects into larger libraries while utilizing an /OPT:REF like functionality.
I have been adding some small helper functions to my copy of FullDuplexSerial. Such as a function that will give me the amount of bytes stored in the receive buffer. And, also a function that writes to the transmit buffer, but will not wait for space to empty out (it just returns immediately with the number of bytes written).
I thought for a second that it would be great if objects like FullDuplexSerial had a more comprehensive library associated with it. But, then I realized that all of these helper functions would take up valuable memory. That got me thinking about an ability to remove unreferenced functions. Then you only pay for what you use.
Rocky
Second, my suggestion for the Object Exchange would be to expand some of the objects into larger libraries while utilizing an /OPT:REF like functionality.
I have been adding some small helper functions to my copy of FullDuplexSerial. Such as a function that will give me the amount of bytes stored in the receive buffer. And, also a function that writes to the transmit buffer, but will not wait for space to empty out (it just returns immediately with the number of bytes written).
I thought for a second that it would be great if objects like FullDuplexSerial had a more comprehensive library associated with it. But, then I realized that all of these helper functions would take up valuable memory. That got me thinking about an ability to remove unreferenced functions. Then you only pay for what you use.
Rocky
Comments
Regarding overloading objects like FullDuplexSerial, I believe would be better to slim them down, eliminating dec and its ilk, in favor of using similar functions in Simple_Numbers or other formatting objects. It seems like every I/O object has to have its own version of dec, hex, etc., when one central object can handle those functions just as well without the redundancy.
-Phil