Is the code stored as strings in JsVars or is that external to JsVars?
It's inside JsVars. It'd be worth using trace(...) to peer inside some datastructures so you get a feel for it?
trace(...)
One string or one per line or ...?
One big string,
Is each statement recursive-descent-parsed each time it is executed?
Yes - there's no bytecode at all. It's slightly quirky, but it works and saves a lot of memory.
What does the compiler produce?
You mean this compiler?
Again, there's some info in there - but proper native code is stored in a String in RAM, and is executed directly from where it sits.
@Gordon started
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.
It's inside JsVars. It'd be worth using
trace(...)
to peer inside some datastructures so you get a feel for it?One big string,
Yes - there's no bytecode at all. It's slightly quirky, but it works and saves a lot of memory.
You mean this compiler?
Again, there's some info in there - but proper native code is stored in a String in RAM, and is executed directly from where it sits.