"compiled"; Error: NewExpression is not implemented yet #1211
Replies: 3 comments
-
Posted at 2018-10-02 by @allObjects Works as designed and implemented... AND as documented on page https://www.espruino.com/Compilation :
New is not implemented for various reasons... |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-10-03 by Robin Wed 2018.10.03 Too many Windows containing reference documentation open and observed the contents under the wrong Caveats heading. Good catch @allObjects |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-10-03 by @gfwilliams I should add that the process of creating typed arrays can be quite slow (as Espruino has to search for a contiguous area of free memory) so if you want to get the best performance out of compiled code you're best off allocating them once, when the device initialises. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2018-10-02 by Robin
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.Beta Was this translation helpful? Give feedback.
All reactions