----- Original Message ----- From: "Bert Freudenberg" bert@freudenbergs.de To: "The general-purpose Squeak developers list" squeak-dev@lists.squeakfoundation.org Sent: Wednesday, October 31, 2007 10:16 AM Subject: Re: Thoughts on a concurrent Squeak VM
On Oct 31, 2007, at 17:57 , Rob Withers wrote:
----- Original Message ----- From: "Andreas Raab" andreas.raab@gmx.de To: "The general-purpose Squeak developers list" <squeak- dev@lists.squeakfoundation.org> Sent: Wednesday, October 31, 2007 9:37 AM Subject: Re: Thoughts on a concurrent Squeak VM
Rob Withers wrote:
What about using C++? There would be some degradation of performance. However, there would be the benefit of structuring the VM classes, of not having to add VM as an argument everywhere, and it may even be possible to subclass Thread so we know where the thread-local storage is.
For the VM internally, I don't really care. Since this is generated code there is really no difference to me. For plugins it is not feasible to use C++ since name mangling not standardized so you can't link reliably to C++ APIs.
That's true that it's internal to the VM so it shouldn't matter. I suppose the benefi of structuring the classes was more of an in image issue with me. Even using C, we could separate off the primitives into a Primitives class and compile with ObjectMemory, Interpreter, and Primitives so they are all generated in the same file. Then we would just need to make sure the InterpreterSimulator knew about the Primitives class. The same issue as would apply if ObjectMemory and Interpreter were no longer part of the same hierarchy.
It makes sense that primitives would have a problem with name mangling, so named primitives can't be in C++ classes...indexed could be, though, as long as the primitive table were initialized with the mangled names.
I don't see any point in switching to C++.
I'm convinced. It was a little hard to let go since I like an OO representation, but as Andraes observed, the VM being generated means I don't really need to look at it too closely. For me it is more about the class representation of the VM in the image. Interpreter is a busy class and some of it's methods could be broken out in separate Squeak classes.
cheers, Rob