(Replying to PARENT post)
The compiler implements the "Operation offsets" optimization as described in the article. It is actually pretty straightforward. This function converts a map of offset => delta to x86-64 instructions: https://github.com/brianquinlan/brainfuck-jit/blob/master/bf...
and the function following it generates that table.
(Replying to PARENT post)
Some ProTip(tm): JITing Brainfuck doesn't fare a lot; for example, resetting the cell is an O(n) operation in BF, so JIT alone doesn't reduce this into O(1). Some kind of scalar evolution has to be implemented to reduce this O(n) factor. More sophiscated liveness and range analysis might be required to go further (esotope-bfc didn't get there, anyway).
(Replying to PARENT post)
Yo dawg, etc
(Replying to PARENT post)
(Replying to PARENT post)
(Replying to PARENT post)
It would be interesting to apply this to AI generated programs (http://www.primaryobjects.com/CMS/Article163)
(Replying to PARENT post)
NSFW text. ff/feckfeck/f* ckf* ck.
http://web.archive.org/web/20050318095341/http://www.chilliw...
http://web.archive.org/web/20050311055852/http://www.chilliw...
(Replying to PARENT post)