How do I use it?
Simply get your function working as you want it to,
and then add the string "compiled"; to the very front of it:
foo(a,b) {
"compiled";
}
But am faced with:
1v99 (c) 2018 G.Williams
>WARNING: Function marked with "compiled" uploaded in source form
---------------------------------------------------
COMPILER MESSAGE
---------------------------------------------------
Error: NewExpression is not implemented yet
---------------------------------------------------
=undefined
>
Is this supported for class functions?
1v99 on an authentic Pico
EDIT Tue 2018.10.02
After many divide and conquer attempts;
"NewExpression" seems to refer to:
var ary = new Uint8ClampedArray(16);
and not "compiled"; despite the function actually working as expected.
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.
Mon 2018.10.01
Just attempted
"compiled";
just after the function name line inside a class, as in the example.https://www.espruino.com/Compilation
But am faced with:
Is this supported for class functions?
EDIT Tue 2018.10.02
After many divide and conquer attempts;
"NewExpression" seems to refer to:
var ary = new Uint8ClampedArray(16);
and not
"compiled";
despite the function actually working as expected.