On 01-06-2013 15:17, Diggory wrote:
On Saturday, 1 June 2013 at 11:50:23 UTC, bearophile wrote:
As example the very small but fast virtual machine written in GNU C++
from the International Contest on Functional Programming 2006:

http://codepad.org/iibBeWKw

It's faster than the same code without computed gotos.

Bye,
bearophile

Would be cool if there was a platform independent way in D to construct
a sequence of "call" instructions in memory. Then it would be possible
to write a JIT compiler in the exact same style as that example.

At that point, you just want a simple in-memory assembler. Think asmjit.


It would be relatively easy to add to phobos although you'd have to be
careful about DEP. Hmm, perhaps I will try writing something like this...

Probably a bit too domain-specific (not to say it isn't useful).

--
Alex Rønne Petersen
a...@alexrp.com / a...@lycus.org
http://alexrp.com / http://lycus.org

Reply via email to