The general principle is that the VM insulate almost every OS specific
feature: the image sees the same virtual machine.
So you can save a 32bits image on an OS, and restart it on another.
The images effectively share the same code base whatever the OS.
There might be a plugin or two which are not present on all platforms
though.
If FFI is used then a few more differences will generally creep in image
side
That means that some OS dependent subclasses will care of implementation
details at image side.
An image carries the implementation for all platforms, but only one is
active at a time.
See senders of os osVersion osName platformName

For Squeak, the image code base is the same for 32 and 64bits and I presume
it's also the case for Pharo.
But you cannot save on 32 bits and restart on 64bits et vice et versa.
There are again very few implementation details that are present at image
side.
For example SmallInteger maxVal changes, there are also instances of
SmallFloat64 on a 64bits image, but this should be mostly transparent.
See wordSize and senders for discovering a few parts of the image sensitive
to the word size... (on Squeak, FFI/Alien, image segments, ...).

Concerning the underlying OS, , so it's again the same code base, you can
save an image on an OS and restart it on another.
For the VM, as Guile said, there are more changes, because there you will
find a lot more implementation details.
Since the VM is implemented in (mostly) in Smalltalk, if you load VMMaker
then you will see abstract superclass, and 32/64 bits specializations for
some part of the VM.

2018-04-11 8:51 GMT+02:00 Guillermo Polito <guillermopol...@gmail.com>:

> VMs share most of the code. At least the basic interpreter, primitives and
> garbage collector.
> But there are some platform specificities such as how some plugins are
> managed.
> Also there are different JIT backends, one per platform.
> I don't know if a VM comes shipped with all of them or just the one needed.
>
> For more details, better ask the vm-dev mailing list.
>
> On Wed, Apr 11, 2018 at 12:39 AM, Benoit St-Jean via Pharo-dev <
> pharo-dev@lists.pharo.org> wrote:
>
>>
>>
>> ---------- Forwarded message ----------
>> From: Benoit St-Jean <bstj...@yahoo.com>
>> To: Pharo Development List <pharo-dev@lists.pharo.org>, "Peter Uhnák" <
>> i.uh...@gmail.com>
>> Cc:
>> Bcc:
>> Date: Tue, 10 Apr 2018 22:39:16 +0000 (UTC)
>> Subject: Re: [Pharo-dev] Images, VMs and 32 vs 64bit
>> Thanks!
>>
>> I don't really care about the image format, my question was more oriented
>> towards the code itself.  As I don't have a Mac, I was curious as to
>> whether there would be code differences between platforms, VMs and 32 vs
>> 64bit distributions, code-wise!
>>
>>
>> -----------------
>> Benoît St-Jean
>> Yahoo! Messenger: bstjean
>> Twitter: @BenLeChialeux
>> Pinterest: benoitstjean
>> Instagram: Chef_Benito
>> IRC: lamneth
>> Blogue: endormitoire.wordpress.com
>> "A standpoint is an intellectual horizon of radius zero".  (A. Einstein)
>>
>>
>> On Tuesday, April 10, 2018, 6:29:33 p.m. EDT, Peter Uhnák <
>> i.uh...@gmail.com> wrote:
>>
>>
>> > images for different platforms (Mac, Linux, Windows)
>>
>> yes
>> It is the responsibility of the VM to contain the differences. Note that
>> there's some "platform-specific" code, but the image contains the code for
>> all platforms at once.
>> Generally speaking you can code on one platform, copy the image files to
>> another and continue your work (although doing this can cause trouble, as
>> e.g. some file paths may now point to non-existing locations).
>> You can download the images independently of the platform too (e.g. Pharo
>> 6 images: http://files.pharo.org/image/60/ )
>>
>> > VMs (32bit, 64bit)
>>
>> yes?
>> the files are different, but I don't know if there's code difference, or
>> if the images are just built with different memory layouts
>>
>> Peter
>>
>> On Wed, Apr 11, 2018 at 12:13 AM, Benoit St-Jean via Pharo-dev <
>> pharo-dev@lists.pharo.org> wrote:
>>
>>
>>
>> ---------- Forwarded message ----------
>> From: Benoit St-Jean <bstj...@yahoo.com>
>> To: Pharo Development List <pharo-dev@lists.pharo.org>
>> Cc:
>> Bcc:
>> Date: Tue, 10 Apr 2018 22:13:18 +0000 (UTC)
>> Subject: Images, VMs and 32 vs 64bit
>> I was wondering if images for different platforms (Mac, Linux, Windows)
>> and VMs (32bit, 64bit) are, code-wise, the same?  By "the same", I mean do
>> they all have the exact same code base or some classes/methods are in some
>> and not in others or different?
>>
>> -----------------
>> Benoît St-Jean
>> Yahoo! Messenger: bstjean
>> Twitter: @BenLeChialeux
>> Pinterest: benoitstjean
>> Instagram: Chef_Benito
>> IRC: lamneth
>> Blogue: endormitoire.wordpress.com
>> "A standpoint is an intellectual horizon of radius zero".  (A. Einstein)
>>
>>
>>
>>
>
>
> --
>
>
>
> Guille Polito
>
> Research Engineer
>
> Centre de Recherche en Informatique, Signal et Automatique de Lille
>
> CRIStAL - UMR 9189
>
> French National Center for Scientific Research - *http://www.cnrs.fr
> <http://www.cnrs.fr>*
>
>
> *Web:* *http://guillep.github.io* <http://guillep.github.io>
>
> *Phone: *+33 06 52 70 66 13
>

Reply via email to