Tachyon JS VM
2011/10/31 Maxime Chevalier-Boisvert <maximechevalierb at gmail.com>:
Hello, I recently presented a paper about Tachyon, a research (meta-circular) JavaScript VM implementation at DLS 2011. Sam Tobin-Hochstadt suggested that I join this list and mention our effort, to get in touch with other JS implementers, and perhaps get some feedback/suggestions or contributions. Tachyon is a JavaScript VM written in (extended) JavaScript. It uses a pure JIT targetting x86/x86-64. We aim to eventually support the full ES5 spec. We have support for most of it, but we're still missing important features such as a GC, floating-point support and exceptions. Tachyon's development is funded in part by Mozilla.
Could you explain how this differs from other meta-circular interpreters like Narcissus? Is it correct to say that this is not a tree-interpreter like Narcissus, but a JavaScript to native compiler written in JS.
If it's not a tree-interpreter, then running inside a JVM that has ephemerons doesn't help you on the GC front? Does the native code generated fit within the NaCL alignment restrictions?
When you say you don't have exceptions, does that mean you lack anything related to protected regions? try...finally
Could you explain how this differs from other meta-circular interpreters like Narcissus? Is it correct to say that this is not a tree-interpreter like Narcissus, but a JavaScript to native compiler written in JS.
Like Narcissus, it is implemented in JavaScript, but it has no interpreter. It compiles JavaScript to native x86 code. This requires some JavaScript extensions to be able to allocate executable memory blocks and write to them.
If it's not a tree-interpreter, then running inside a JVM that has ephemerons doesn't help you on the GC front? Does the native code generated fit within the NaCL alignment restrictions?
We're not running within a JVM. The goal is for Tachyon to eventually run on top of its own runtime library, without any external VM. For now, we've added some minor extensions to V8, which we use as our host VM.
I plan on implementing a simple stop-and-copy collector for Tachyon. My aim is to write this GC in JavaScript, as much as possible. We could "cheat" and use an off-the-shelf GC like Boehm's. I'm afraid that the allocation speed might be a little too slow for JavaScript, however.
When you say you don't have exceptions, does that mean you lack anything related to protected regions? try...finally
Code that contains throw/try/catch/finally will parse and run (so long as throws don't actually happen). We can't unwind the stack, for now. I don't anticipate it will be too tricky to implement, but the backend needs to be modified to integrate meta-information w.r.t. exception handlers.
2011/10/31 Maxime Chevalier-Boisvert <maximechevalierb at gmail.com>:
If it's not a tree-interpreter, then running inside a JVM that has ephemerons doesn't help you on the GC front? Does the native code generated fit within the NaCL alignment restrictions?
We're not running within a JVM. The goal is for Tachyon to eventually run on
Sorry, slip of the keyboard. s/JVM/JS implementation/
We can't directly (re)use the host GC because Tachyon runs inside its own heap (memory region) and uses its own object representation, which the host VM can't directly interact with.
I'm not sure what the NaCL alignment restrictions are. If it's a question of aligning machine code to specific boundaries or avoiding certain machine instruction combinations, we could surely make that happen. We generate machine code block on-the-fly, and we intend to do things like code-patching, however, which might be problematic for NaCL.
On Oct 31, 2011, at 1:38 PM, Mike Samuel wrote:
2011/10/31 Maxime Chevalier-Boisvert <maximechevalierb at gmail.com>:
Hello, I recently presented a paper about Tachyon, a research (meta-circular) JavaScript VM implementation at DLS 2011. Sam Tobin-Hochstadt suggested that I join this list and mention our effort, to get in touch with other JS implementers, and perhaps get some feedback/suggestions or contributions. Tachyon is a JavaScript VM written in (extended) JavaScript. It uses a pure JIT targetting x86/x86-64. We aim to eventually support the full ES5 spec. We have support for most of it, but we're still missing important features such as a GC, floating-point support and exceptions. Tachyon's development is funded in part by Mozilla.
Could you explain how this differs from other meta-circular interpreters like Narcissus? Is it correct to say that this is not a tree-interpreter like Narcissus, but a JavaScript to native compiler written in JS.
I was asking Mike privately why he asked about this, and he answered that the "meta-circular" term suggested to him that there's a Tachyon interpreter or tower of evaluators.
en.wikipedia.org/wiki/Meta-circular_evaluator
I'm not an expert on "meta-circular" terminology, just curious to learn.
I guess that's perhaps what people are more familiar with, but I don't think the term "meta-circular" should be limited to interpreters. I was using it in the same way as the Klein project (SELF in SELF) did. Perhaps the term "self-hosted" is more descriptive. The goal is for Tachyon to compile itself, and to eventually use Tachyon for the development of Tachyon, with the aim of simplifying the design, and perhaps eventually have Tachyon optimize itself. At the very least, I've found that this is a good case of "eating your own dog food". It has certainly helped me better understand the JS semantics.
Hello,
I recently presented a paper about Tachyon, a research (meta-circular) JavaScript VM implementation at DLS 2011. Sam Tobin-Hochstadt suggested that I join this list and mention our effort, to get in touch with other JS implementers, and perhaps get some feedback/suggestions or contributions.
Tachyon is a JavaScript VM written in (extended) JavaScript. It uses a pure JIT targetting x86/x86-64. We aim to eventually support the full ES5 spec. We have support for most of it, but we're still missing important features such as a GC, floating-point support and exceptions. Tachyon's development is funded in part by Mozilla.
For those who may bee interested, here are the slides from our DLS11 talk: pointersgonewild.files.wordpress.com/2011/10/dls-talk.pdf
And if you're really interested, here's our paper: www.iro.umontreal.ca/~dufour/pubs/dls2011.pdf
Tachyon is open source (BSD license) and available on github. Feedback is welcome, but please bear in mind that it's a work in progress: T, Tachyon-Team/Tachyon
achyon-Team/Tachyon Tachyon-Team/Tachyon
Have a nice day,