• 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

    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.

About

Avatar for Robin @Robin started