On Thu, Feb 13, 2014 at 2:01 AM, Stefan Marr <smalltalk@stefan-marr.de>wrote:
Hi Ron:
On 13 Feb 2014, at 10:38, Ron Teitelbaum <Ron@USMedRec.com> wrote:
I think the bigger question is whether you actually want to adopt those things.
That the vm stays in sync should be a core requirement for our communities.
I am with you on that Ron. But I need a technical solution to manage those things. Good intensions are one thing, but how do we do that?
I would implement isPharo/isSqueak/isNewspeak in VMClass. These can answer e.g. the value of a class variable. hence, below...
Examples: [https://github.com/pharo-project/pharo-vm/pull/18/commits]
primitiveUpdateGZipCrc32 - self cCode:'' inSmalltalk:[zipCrcTable := CArrayAccessor on: GZipWriteStream crcTable]. + self cCode:'' inSmalltalk:[zipCrcTable := CArrayAccessor on: CRC crc32Table].
primitiveUpdateGZipCrc32 self cCode:'' inSmalltalk:[zipCrcTable := CArrayAccessor on: (self isPharo ifTrue: [CRC] ifFalse: [GZipWriteStream]) crcTable].
primitiveGetAttribute
- attribute := Smalltalk getSystemAttribute: attr. + attribute := Smalltalk vm getSystemAttribute: attr.
This is just my code base being a little out of date. Smalltalk vm getSystemAttribute: works in Squeak. I'll update my code.
CogVMSimulator>> initialize - 'Display has not yet been installed' asDisplayText form. + 'Display has not yet been installed' asMorph imageForm.
This needs to be isPharo.
ioRelinquishProcessorForMicroseconds - Processor activeProcess == Project uiProcess ifTrue: + Processor activeProcess == UIManager default uiProcess ifTrue:
Ditto, until Squeak changes?
And so far, I only fixed trivial things. Still need to figure out what is going wrong with more recent Pharo images.
But fab that the simulator is receiving attention on Pharo (and Tty's work with events is great too). Now if there could be an automatic job to export whatever git state is the current official Pharo VM to a Monticello VMMaker package I'll be very much happier. Also for this discussion should we continue to cross-post or is vm-dev an adequate forum? Answers from Pharoites please... I have to admit that I'm a bit troubled by how often subjects that are clearly vm-centric are raised on pharo-dev. To Pharoites perceive vm-dev as a squeak thing? If so, may I suggest pharo-vm-dev? If not, can the Pharo community make an effort to direct vm discussion towards vm-dev in future?
Best regards Stefan
-- Stefan Marr INRIA Lille - Nord Europe http://stefan-marr.de/research/
-- best, Eliot