What happens, if compile fails, will I get any error message ?
Yes, you should do. Also, if you console.log(myFunction) it should return that it's a native function, rather than a normal JS one.
Setting compile option on top of an object, will everything inside this object be compiled, or do I need to add compiled to all functions inside the object?
You'll need to add a compiled option for each function.
Does compiled option take more memory compared to not compiled ?
It depends on the function I think, but probably it will use more memory as most thumb instructions won't be as compact as the JS.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Yes, you should do. Also, if you
console.log(myFunction)
it should return that it's a native function, rather than a normal JS one.You'll need to add a compiled option for each function.
It depends on the function I think, but probably it will use more memory as most thumb instructions won't be as compact as the JS.