node-js 0.1.0

JavaScript as a fusevm frontend: a lexer/parser and compiler to fusevm::Chunk on a JsHost object heap, with no bespoke VM or JIT
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Recursion, closures, and arrow functions.
function fib(n) {
  return n < 2 ? n : fib(n - 1) + fib(n - 2);
}
const seq = [];
for (let i = 0; i < 15; i++) seq.push(fib(i));
console.log("fib:", seq.join(", "));

const makeCounter = () => {
  let count = 0;
  return () => ++count;
};
const c = makeCounter();
console.log(c(), c(), c());