On 1 February 2011 09:28, Andreas Raab andreas.raab@gmx.de wrote:
On 1/31/2011 9:08 PM, Igor Stasenko wrote:
On 31 January 2011 19:21, Andreas Raabandreas.raab@gmx.de wrote:
Huh? Are you saying that Pharo contains different primitives than Squeak? If not, I somewhat fail to see the problem.
I don't feel ok knowing that VM depends on right combination of classes in Sound package, since there is no clear separation between plugin and language side implementation.
I'm not entirely sure what you're saying here. What's used from the sound package is generated primitives; it's not that there is explicit plugin code anywhere. The same holds for the Graphics and some other packages. And, FWIW, you do not *need* the sound package to generate the VM; you do without it if you're willing to forego the generated primitives (and if there is some dependency in VMMaker that does indeed *require* the sound package, then we should remove the dependency).
Yes, VMMaker depends on Sound package. And yes, we need to reconcile this dependency into some nicer form.
Take a ADPCMCodec for example. It having primitives in its private[Decode/Encode][Mono/Stereo] methods.
If i remove ADPCMCodec from image/package, i can no longer load VMMaker, because ADPCMCodecPlugin having direct reference to ADPCMCodec and taking primitives from it. It would be nice to move all such primitives to plugin, so VMMaker will not have dependency from arbitrary image-side code, (which btw is optional and could be(not) present in image, or use different class names, but use original VM primitives or any combination of them)..
Pharo could diverge to the point that it could not load a Squeak's Sound package anymore.
Well, let's be a bit realistic. The scenario you are describing sounds excruciatingly unlikely because if Pharo can no longer load Smalltalk code I think it will have much bigger problems than the sound plugin.
By unable to load, i mean unable to load cleanly. If you have unresolved globals, like missing superclass - you can still force to load the code, but what you get as result? Any please tell me why VMMaker should depend on arbitrary image-side code, instead of having a well maintained separate set of packages , which clearly defining what is 'VM' and its plugins.
As i said, since there is no clear separation about what belongs to VM/plugin and what belongs image side, the only means how to maintain this code is either freeze it for ages, or throw it out completely.
So, it won't be able to load VMMaker or even if it do, then generated VM code will be different depending on image you using. What i want to achieve is to make VMMaker be image agnostic, so it could be loaded cleanly into any image and produce same code as it was years ago using different image.
That's a nice goal but already untrue. For example, later versions of VMMaker cannot be loaded into pre-3.9 images. So the goal that VMMaker can be loaded into "any" image is already untrue and really not necessary. I'd say your time would be better spent on improving the test suite for the VM so that we can ensure that VMs we care about have the right properties.
Clarification: being able to load latest VM into latest image(s) namely: squeak and pharo. This is my goal. I don't like that VMMaker can only be loaded/work in some old 3.8 image(s), and impossible to use with latest and greatest images we are developing :)
The automation, which i slowly crawling & doing aims exactly for this purpose: - it takes the _latest_ available image and tries to load VMMaker there
in this way, we will keep VMMaker in sync with development mainline, because if something will go wrong, we will know about it immediately.
Another approach is : 'don't care' .. then we could end up with situation, when to generate VM you should use some years old crappy image, and to run that image, you will need years old crappy VM , which runs on years old crappy OS.. and which in own turn runs on years old crappy hardware.. So... make your choice. :)
Cheers, - Andreas