If so (within an order of magnitude, I'm not fussy), then that's awesome - I hadn't realised that things were so efficient.
If so (within an order of magnitude, I'm not fussy), then that's awesome - I hadn't realised that things were so efficient.
eg,
interpret(['.maxstack 8', 'ldstr "Hello World!"', 'call void window.alert', 'ret']);
I know cappucino (http://cappuccino.org/) works with a JavaScript language interepreter, so there are mature products out there heading along these lines.
http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-E...
summary version - there's not a lot to be gained by doing that(at least from a Goog perspective).
Compiling to a human-readable format can be pretty straightforward. You can skip some steps entirely (e.g. register selection), and modern tools make it easy to ignore others (lexing & parsing) for quite a while. Don't think about it as "compiling", if you think that's a scary hard thing. Think of it as "reading in a couple kinds of simple structures and converting them to text". Like a templating engine.
Figure out what kind of operations you want to support, how to map them into small chunks of Javascript, and go for it. You can pass hand-written JSON, XML, sexps, dicts, etc. to the compiler in a REPL and worry about parsing and other stuff later.