3 ms·
Agreed on principle but not sure it can be bootstrapped. What would you write, say, v8 in? Rust doesn't have any provisions against type confusion, JIT bugs, e
by millstone 8y ago
Agreed on principle but not sure it can be bootstrapped.
What would you write, say, v8 in? Rust doesn't have any provisions against type confusion, JIT bugs, etc, and v8 seems way too complex for a formal verification.
- zozbot123 8y agoDoes C/C++ have any provisions against type punning or JIT bugs? The fact that you have to use unsafe code for a lot of things in a JIT doesn't change the basic reality that Rust is safe by default, whereas C/C++ cannot be made memory-safe practically, except for small programs like seL4.
- mike_hearn 8y agoThat's extremely easy to answer. The answer is you'd write an interpreter for JavaScript in Java, use a partial evaluation framework also written in Java to convert it to a JIT compiler, and then run it on a multi-purpose optimising polyglot virtual machine that's also written in Java. Such a thing would be fully bootstrapped and fully managed. And usefully, it exists already. That's what happens if you run JavaScript on SubstrateVM using TruffleJS and Graal: https://www.graalvm.org/ https://www.graalvm.org/ The closest thing you find to unmanaged code is parts of the garbage collector, where "SystemJava" is used, a dialect that gives access to pointer arithmetic. But everything else including the JIT compiler itself is fully managed.
- afiori 8y agoIf I understand what you are describing this is how PyPy works.