Luce packages
LuceLuce BaseLuciaOS

dymokomi/luce-js

Source of release 0.6.0

0.6.0 / tests / bench / method_calls.js

// Method calls through the prototype chain, with `this` field access.
class Acc {
    constructor() { this.v = 0; }
    add(x) { this.v += x; return this; }
    get() { return this.v; }
}
var a = new Acc();
for (var i = 0; i < 3000000; i++) a.add(1).add(2);
if (a.get() !== 9000000) throw new Error("method");