>> 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? 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. >> You could have the necessary guards in the VM. > > Slow. I do not know. There are guards for arrays, message sent, primitive calls, ... And it is not that slow. Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
