Re: [Pharo-project] test crashing the cog vm
On Mar 22, 2011, at 3:53 PM, Alexandre Bergel wrote:
I am not saying that this is feasible with the current VM. But I am doubtful that the bytecode verification can only be done in the VM. If something get wrong, why not to raise a primitiveFailed, as 1/0 will do?
Because checking all these things at runtime will make interpretation slow.
But could not it be at compile time?
Yes. That is called a "bytecode verifier". Now if that would be in the image, you would not gain anything as what you verify is changable. (and the verifier itself, too).
I am not expert in VM. But something that I learnt from all over these years, is that if we copy what other people do, then we will just have a pale copy. Innovation begins by doing what other think it is impossible to do. Smalltalk has classes as object, whereas Java and C++ took a different stance. Smalltalk has the debugger and the profiler in the image; again, java people have a different opinion. Now, if someone say that bytecode verification can only be done in the VM, I am skeptic.
It can only be done in the VM if what you have is a standard smalltalk system. Marcus -- Marcus Denker -- http://www.marcusdenker.de INRIA Lille -- Nord Europe. Team RMoD.
participants (1)
-
Marcus Denker