Taking waveform as an example, we have
"type" : "idle", "generate" : "jswrap_waveform_idle",
how could I recognize that this belongs somehow to class Waveform ?
You can't really - but when you get to that stage I think we need to think about blacklisting entire C files, not functions. If you blacklist individual init/kill/idle functions you're basically guaranteed to break something.
Lets start a discussion ;-)
blacklisting C files looks dangerous to me.
I could imagine to blacklist jswrap*.c files, but even that, at least for me, is like a mine field.
May be we could add some more defines to remove blocks of software, like waveform
My idea was to use wildcard to remove idle/init/kill which belong to a class
We could add class to wrapper with type idle
It could be set for waveform, and would be empty for pipe.
Going through your list, I tried to get an overview what init idle and kill are used for
I think blacklisting whole files is one of the safest ways to work since we try and keep all the code reasonably modular - Waveform especially should work really well if the file is just left out of the build.
But maybe defines are the way forward - as you note I think Waveform is the only thing where you can't disable it some other way so rather than trying to build some complex addition, we could just change that.
However I do wonder how much flash memory will be saved by disabling it - not much I imagine.
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem