From eliot.miranda at gmail.com Wed Jul 1 16:33:52 2020 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed, 1 Jul 2020 09:33:52 -0700 Subject: [Vm-dev] Sista byte code documentation In-Reply-To: References: Message-ID: Hi Vanessa, one very important facet of the extensions design is not sufficiently explicit in the InstructionStream methods, or in EncoderForSistaV1's class comment, which says only this: "N.B. Extension bytecodes can only come before extensible bytecodes, and only if valid (one cannot extend a bytecode extensible by Ext A with an Ext B). An extensible bytecode consumes (and zeros) its extension(s). Hence the hidden implicit variables holding extensions are always zero except after a valid sequence of extension bytecodes." In a real bytecode interpreter the implications are as follows: 0. an Interpreter should use *static* variables for extA and extB and initialize them to zero. For example, they *do not* need to be initialized on every method activation. 1. an interpreter can, and should, entirely ignore extA and extB in all bytecodes other than those that take extensions. So for example the vast majority of one-byte bytecodes do not read extA or extB. 2. It is an error for a code generator to emit extension bytecodes before any bytecode that does not take extensions. Further, it is an error for a code generator to emit extA before a bytecode that only takes extB extensions and vice verse. 3. it is the responsibility of any bytecode that consumes extensions to reset the extA and/or extB variables to zero after it has consumed their values Given these constraints extensions are very cheap: - they are written to only on initialization, when creating extension values via the extension bytecodes, and after being consumed by a bytecode that takes extensions - they are read only by bytecodes that take extensions, so high dynamic-frequency single-byte bytecodes pay no penalty for the 3extensions design Note that these constraints are not possible to observe in InstructionStream because there is no where (cheap and convenient) to store the extA and extB values. Hence the crude implementation in *interpretNextSistaV1InstructionFor:* On Tue, Jun 30, 2020 at 4:29 PM Eliot Miranda wrote: > Hi Vanessa, > > Clément pointed you to good sources. The most concise guide to > implementing them is however in the standard trunk image itself in the > "decoding - private - sista v1" category of InstructionStream. > To support multiple bytecode sets CompiledCode maintains a flag bit in its > header word that selects one of two bytecode sets, represented as > BytecodeEncoder subclasses in the CompiledCode class > vars PrimaryBytecodeSetEncoderClass & SecondaryBytecodeSetEncoderClass. A > CompiledCode answers the relevant class via CompiledCode>>encoderClass > which tests the bit and answers the relevant class. Then double > dispatching is used to invoke the relevant bytecode set decode: > > *InstructionStream methods for instruction decode* > *interpretNextInstructionFor:* client > "*Send to the argument, client, a message that specifies the type of the > next instruction.*" > > ^self method encoderClass interpretNextInstructionFor: client in: self > > *EncoderForV3PlusClosures class methods for instruction stream support* > *interpretNextInstructionFor:* aClient *in:* anInstructionStream > "*Double-dispatch through the encoder to select the correct instruction > set decoder.*" > ^anInstructionStream interpretNextV3ClosuresInstructionFor: aClient > > *EncoderForSistaV1 class methods for instruction stream support* > *interpretNextInstructionFor:* aClient *in:* anInstructionStream > "*Double-dispatch through the encoder to select the correct instruction > set decoder.*" > ^anInstructionStream interpretNextSistaV1InstructionFor: aClient > > which gets us back to the decoders in InstructionStream. In particular, > *InstructionStream methods for decoding - private - sista v1* > *interpretNextSistaV1InstructionFor:* client > "*Send to the argument, client, a message that specifies the next > instruction.*" > > | byte div16 offset method extA extB savedPC | > method := self method. > "*For a table of the bytecode set, see EncoderForSistaV1's class comment.* > " > "*consume and compute any extensions first.*" > extA := extB := 0. > savedPC := pc. > [byte := self method at: pc. > pc := pc + 1. > byte >= 16rE0 and: [byte <= 16rE1]] whileTrue: > [| extByte | > extByte := self method at: pc. > pc := pc + 1. > byte = 16rE0 > ifTrue: > [extA := (extA bitShift: 8) + extByte] > ifFalse: > [extB := (extB = 0 and: [extByte > 127]) > ifTrue: [extByte - 256] > ifFalse: [(extB bitShift: 8) + extByte]]]. > div16 := byte // 16. > offset := byte \\ 16. > "*We do an inline quasi-binary search on each of the possible 16 values > of div16*" > ... all the one byte codes elided... > "*2 byte and 3 byte codes*" > byte < 248 ifTrue: > [^self interpretNext2ByteSistaV1Instruction: byte for: client extA: extA > extB: extB startPC: savedPC]. > ^self interpretNext3ByteSistaV1Instruction: byte for: client extA: extA > extB: extB startPC: savedPC > > > and then all remaining implementation is in Context. > > On Mon, Jun 29, 2020 at 9:34 PM Vanessa Freudenberg > wrote: > >> >> Eliot / Clément / Everyone - >> >> What’s the best documentation for the new byte codes? >> >> I found the 2014 paper, and Clèment’s thesis, and I don’t think either is >> detailed enough to implement them correctly. Just wondering if there’s >> anything else I could peruse other than the VM source code. >> >> Cheers! >> Vanessa >> >> >> > > -- > _,,,^..^,,,_ > best, Eliot > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Thu Jul 2 18:03:19 2020 From: notifications at github.com (Eliot Miranda) Date: Thu, 02 Jul 2020 11:03:19 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] `CompiledMethod someInstance includes: 40` segfaults reproducibly (#512) In-Reply-To: References: Message-ID: Fixed in VMMaker.oscog-eem.2761 -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/512#issuecomment-653148233 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Thu Jul 2 18:03:20 2020 From: notifications at github.com (Eliot Miranda) Date: Thu, 02 Jul 2020 11:03:20 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] `CompiledMethod someInstance includes: 40` segfaults reproducibly (#512) In-Reply-To: References: Message-ID: Closed #512. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/512#event-3508214603 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Thu Jul 2 19:00:56 2020 From: notifications at github.com (Fabio Niephaus) Date: Thu, 02 Jul 2020 12:00:56 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] `CompiledMethod someInstance includes: 40` segfaults reproducibly (#512) In-Reply-To: References: Message-ID: Thank you! :) -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/512#issuecomment-653172391 -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits at source.squeak.org Thu Jul 2 22:16:57 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Thu, 2 Jul 2020 22:16:57 0000 Subject: [Vm-dev] VM Maker: VMMaker.oscog-eem.2767.mcz Message-ID: Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2767.mcz ==================== Summary ==================== Name: VMMaker.oscog-eem.2767 Author: eem Time: 2 July 2020, 3:16:42.814429 pm UUID: cc785150-6e35-4dc6-9517-baa9c6b38577 Ancestors: VMMaker.oscog-eem.2762 Slang: Allow the CogCompilers/Cogit files to specify preampleCCode. =============== Diff against VMMaker.oscog-eem.2762 =============== Item was changed: ----- Method: CCodeGenerator>>emitCHeaderOn: (in category 'C code generator') ----- emitCHeaderOn: aStream "Emit the initial part of a source file on aStream, comprising the version stamp, the global struct usage flags, the header files and preamble code." | headerClass | headerClass := [vmClass coreInterpreterClass] on: MessageNotUnderstood do: [:ex| vmClass]. aStream nextPutAll: (self fileHeaderVersionStampForSourceClass: headerClass); cr; cr. self emitGlobalStructFlagOn: aStream. self addHeaderFileFirst: '"sq.h"'. "Additional header files; include C library ones first." self emitHeaderFiles: (headerFiles select: [:hdr| hdr includes: $<]) on: aStream. "Additional header files; include squeak VM ones last" self emitHeaderFiles: (headerFiles reject: [:hdr| hdr includes: $<]) on: aStream. + self maybePutPreambleFor: vmClass on: aStream. - vmClass isInterpreterClass ifTrue: - [self maybePutPreambleFor: vmClass on: aStream]. aStream cr! Item was changed: ----- Method: CCodeGenerator>>maybePutPreambleFor:on: (in category 'C code generator') ----- maybePutPreambleFor: aClass on: aStream + (aClass class whichClassIncludesSelector: #preambleCCode) ifNotNil: + [:actualMetaclass | - aClass preambleCCode ifNotNil: - [:preamble| | actualClass | - actualClass := aClass class whichClassIncludesSelector: #preambleCCode. aStream ensureCr; cr; + nextPutAll: '/* '; print: actualMetaclass; nextPutAll: '>>preambleCCode */'; cr; + nextPutAll: actualMetaclass soleInstance preambleCCode; cr; + nextPutAll: '/* end '; print: actualMetaclass; nextPutAll: '>>preambleCCode */'; cr]! - nextPutAll: '/* '; print: actualClass; nextPutAll: '>>preambleCCode */'; cr; - nextPutAll: preamble; cr; - nextPutAll: '/* end '; print: actualClass; nextPutAll: '>>preambleCCode */'; cr]! From commits at source.squeak.org Thu Jul 2 22:44:12 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Thu, 2 Jul 2020 22:44:12 0000 Subject: [Vm-dev] VM Maker: VMMaker.oscog-eem.2768.mcz Message-ID: Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2768.mcz ==================== Summary ==================== Name: VMMaker.oscog-eem.2768 Author: eem Time: 2 July 2020, 3:43:57.327061 pm UUID: 750410d6-9496-478f-9928-bc5eaefee4d3 Ancestors: VMMaker.oscog-eem.2767 Slang: make good on the previous commit. =============== Diff against VMMaker.oscog-eem.2767 =============== Item was changed: ----- Method: CCodeGenerator>>maybePutPreambleFor:on: (in category 'C code generator') ----- maybePutPreambleFor: aClass on: aStream + "Only emit preambleCCode if the method is implemented and it answers something non-nil." (aClass class whichClassIncludesSelector: #preambleCCode) ifNotNil: [:actualMetaclass | + aClass preambleCCode ifNotNil: + [:preambleCCode| + aStream + ensureCr; cr; + nextPutAll: '/* '; print: actualMetaclass; nextPutAll: '>>preambleCCode */'; cr; + nextPutAll: preambleCCode; cr; + nextPutAll: '/* end '; print: actualMetaclass; nextPutAll: '>>preambleCCode */'; cr]]! - aStream - ensureCr; cr; - nextPutAll: '/* '; print: actualMetaclass; nextPutAll: '>>preambleCCode */'; cr; - nextPutAll: actualMetaclass soleInstance preambleCCode; cr; - nextPutAll: '/* end '; print: actualMetaclass; nextPutAll: '>>preambleCCode */'; cr]! Item was added: + ----- Method: Cogit class>>preambleCCode (in category 'translation') ----- + preambleCCode + ^(self activeCompilerClass class whichClassIncludesSelector: #preambleCCode) ifNotNil: + [self activeCompilerClass preambleCCode]! From commits at source.squeak.org Thu Jul 2 23:00:54 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Thu, 2 Jul 2020 23:00:54 0000 Subject: [Vm-dev] VM Maker: VMMaker.oscog-eem.2769.mcz Message-ID: Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2769.mcz ==================== Summary ==================== Name: VMMaker.oscog-eem.2769 Author: eem Time: 2 July 2020, 4:00:41.031314 pm UUID: 8584994c-74f4-4d95-a8e2-39f0121be986 Ancestors: VMMaker.oscog-eem.2768 Slang: And include the Monticello description for the Cogit's activeCompilerClass if it differs from Cogit's. =============== Diff against VMMaker.oscog-eem.2768 =============== Item was added: + ----- Method: Cogit class>>monticelloDescription (in category 'translation') ----- + monticelloDescription + "Answer the Monticello version of the packlage containing the receiver. + Override to include the package of the activeCompilerClass if it differs." + | description accDescription | + description := CCodeGenerator monticelloDescriptionFor: self. + accDescription := CCodeGenerator monticelloDescriptionFor: self activeCompilerClass. + ^(description allButFirst: (description indexOf: Character space)) + = (accDescription allButFirst: (accDescription indexOf: Character space)) + ifTrue: [description] + ifFalse: [description, String cr, accDescription]! From noreply at github.com Fri Jul 3 01:03:03 2020 From: noreply at github.com (Eliot Miranda) Date: Thu, 02 Jul 2020 18:03:03 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 4d6559: CogVM source as per VMMaker.oscog-eem.2769/ClosedV... Message-ID: Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: 4d655995bef9e63a3c3ed05411efecec37ca7ab3 https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/4d655995bef9e63a3c3ed05411efecec37ca7ab3 Author: Eliot Miranda Date: 2020-07-02 (Thu, 02 Jul 2020) Changed paths: R build.linux64ARMv8/pharo.cog.spur/apt-get-libs.sh R build.linux64ARMv8/pharo.cog.spur/build/mvm R build.linux64ARMv8/pharo.cog.spur/plugins.ext R build.linux64ARMv8/pharo.cog.spur/plugins.ext.all R build.linux64ARMv8/pharo.cog.spur/plugins.int M nsspur64src/vm/cogit.h A nsspur64src/vm/cogitARMv8.c M nsspur64src/vm/cogitX64SysV.c M nsspur64src/vm/cogitX64WIN64.c M nsspur64src/vm/cointerp.c M nsspur64src/vm/cointerp.h M nsspur64src/vm/gcc3x-cointerp.c M nsspursrc/vm/cogit.h M nsspursrc/vm/cogitARMv5.c M nsspursrc/vm/cogitIA32.c M nsspursrc/vm/cogitMIPSEL.c M nsspursrc/vm/cointerp.c M nsspursrc/vm/cointerp.h M nsspursrc/vm/gcc3x-cointerp.c M spur64src/vm/cogit.h A spur64src/vm/cogitARMv8.c M spur64src/vm/cogitX64SysV.c M spur64src/vm/cogitX64WIN64.c M spur64src/vm/cointerp.c M spur64src/vm/cointerp.h M spur64src/vm/cointerpmt.c M spur64src/vm/cointerpmt.h M spur64src/vm/gcc3x-cointerp.c M spur64src/vm/gcc3x-cointerpmt.c M spurlowcode64src/vm/cogit.h A spurlowcode64src/vm/cogitARMv8.c M spurlowcode64src/vm/cogitX64SysV.c M spurlowcode64src/vm/cogitX64WIN64.c M spurlowcode64src/vm/cointerp.c M spurlowcode64src/vm/cointerp.h M spurlowcode64src/vm/gcc3x-cointerp.c M spurlowcodesrc/vm/cogit.h M spurlowcodesrc/vm/cogitARMv5.c M spurlowcodesrc/vm/cogitIA32.c M spurlowcodesrc/vm/cogitMIPSEL.c M spurlowcodesrc/vm/cointerp.c M spurlowcodesrc/vm/cointerp.h M spurlowcodesrc/vm/gcc3x-cointerp.c M spursista64src/vm/cogit.h A spursista64src/vm/cogitARMv8.c M spursista64src/vm/cogitX64SysV.c M spursista64src/vm/cogitX64WIN64.c M spursista64src/vm/cointerp.c M spursista64src/vm/cointerp.h M spursista64src/vm/gcc3x-cointerp.c M spursistasrc/vm/cogit.h M spursistasrc/vm/cogitARMv5.c M spursistasrc/vm/cogitIA32.c M spursistasrc/vm/cogitMIPSEL.c M spursistasrc/vm/cointerp.c M spursistasrc/vm/cointerp.h M spursistasrc/vm/gcc3x-cointerp.c M spursrc/vm/cogit.h M spursrc/vm/cogitARMv5.c M spursrc/vm/cogitIA32.c M spursrc/vm/cogitMIPSEL.c M spursrc/vm/cointerp.c M spursrc/vm/cointerp.h M spursrc/vm/cointerpmt.c M spursrc/vm/cointerpmt.h M spursrc/vm/gcc3x-cointerp.c M spursrc/vm/gcc3x-cointerpmt.c Log Message: ----------- CogVM source as per VMMaker.oscog-eem.2769/ClosedVMMaker-eem.90 64-bit ARMv8 cogit for everyone but Pharo. It turns out that Ken Dickey has been using the ARMv8 JIT without any issues in the JIT for months now, so it is about time we released it ;-) From builds at travis-ci.org Fri Jul 3 02:30:27 2020 From: builds at travis-ci.org (Travis CI) Date: Fri, 03 Jul 2020 02:30:27 +0000 Subject: [Vm-dev] Still Failing: OpenSmalltalk/opensmalltalk-vm#2101 (Cog - 4d65599) In-Reply-To: Message-ID: <5efe984370edc_13fcf045a8e041390f5@travis-tasks-7f59b87b96-sb7db.mail> Build Update for OpenSmalltalk/opensmalltalk-vm ------------------------------------- Build: #2101 Status: Still Failing Duration: 1 hr, 27 mins, and 5 secs Commit: 4d65599 (Cog) Author: Eliot Miranda Message: CogVM source as per VMMaker.oscog-eem.2769/ClosedVMMaker-eem.90 64-bit ARMv8 cogit for everyone but Pharo. It turns out that Ken Dickey has been using the ARMv8 JIT without any issues in the JIT for months now, so it is about time we released it ;-) View the changeset: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/8f9be8b3cb2e...4d655995bef9 View the full build log and details: https://travis-ci.org/github/OpenSmalltalk/opensmalltalk-vm/builds/704513555?utm_medium=notification&utm_source=email -- You can unsubscribe from build emails from the OpenSmalltalk/opensmalltalk-vm repository going to https://travis-ci.org/account/preferences/unsubscribe?repository=8795279&utm_medium=notification&utm_source=email. Or unsubscribe from *all* email updating your settings at https://travis-ci.org/account/preferences/unsubscribe?utm_medium=notification&utm_source=email. Or configure specific recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications. -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Fri Jul 3 11:26:48 2020 From: notifications at github.com (Christoph Thiede) Date: Fri, 03 Jul 2020 04:26:48 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] How to build on Win32 using WSL/Ubuntu | Missing headers (#510) In-Reply-To: References: Message-ID: No progress on this so far. Does there exist something like a docker file I could use to skip all these error-prone setup steps? -- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/510#issuecomment-653500456 -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits at source.squeak.org Sat Jul 4 19:10:02 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Sat, 4 Jul 2020 19:10:02 0000 Subject: [Vm-dev] VM Maker: VMMaker.oscog-eem.2770.mcz Message-ID: Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2770.mcz ==================== Summary ==================== Name: VMMaker.oscog-eem.2770 Author: eem Time: 4 July 2020, 12:09:46.919388 pm UUID: f04f64b9-87bb-49ab-a430-848afd98df9c Ancestors: VMMaker.oscog-eem.2769 Cogit: Putative support for alternative overflow checking when a processor's intrinsic multiply instruction doesn't check for overflow. Simulator: Fix a bad error in processor alien error checking which tested the sense of printRegisters and printInstructions wrongly. =============== Diff against VMMaker.oscog-eem.2769 =============== Item was added: + ----- Method: CogAbstractInstruction>>canMulRRDetectOverflow (in category 'testing') ----- + canMulRRDetectOverflow + "Hook for ARMv8 to implement overflow checking." + + ^true! Item was changed: ----- Method: CogObjectRepresentation>>genPrimitiveMultiply (in category 'primitive generators') ----- genPrimitiveMultiply | jumpNotSI jumpOvfl | (cogit processorHasMultiplyAndMClassIsSmallInteger) ifFalse: [^UnimplementedPrimitive]. cogit genLoadArgAtDepth: 0 into: Arg0Reg. cogit MoveR: Arg0Reg R: ClassReg. cogit MoveR: ReceiverResultReg R: Arg1Reg. jumpNotSI := self genJumpNotSmallInteger: Arg0Reg scratchReg: TempReg. self genShiftAwaySmallIntegerTagsInScratchReg: ClassReg. self genRemoveSmallIntegerTagsInScratchReg: Arg1Reg. + cogit MulOverflowR: Arg1Reg R: ClassReg. - cogit MulR: Arg1Reg R: ClassReg. jumpOvfl := cogit JumpOverflow: 0. self genSetSmallIntegerTagsIn: ClassReg. cogit MoveR: ClassReg R: ReceiverResultReg. cogit genPrimReturn. jumpOvfl jmpTarget: (jumpNotSI jmpTarget: cogit Label). ^CompletePrimitive! Item was added: + ----- Method: Cogit>>MulOverflowR:R: (in category 'abstract instructions') ----- + MulOverflowR: reg1 R: reg2 + "Multiplication is a little weird on some processors. Defer to the backEnd + to allow it to generate any special code it may need to." + + ^backEnd canMulRRDetectOverflow + ifTrue: [backEnd genMulR: reg1 R: reg2] + ifFalse: [backEnd MulOverflowR: reg1 R: reg2]! Item was changed: ----- Method: Cogit>>provideContextForCurrentInstruction (in category 'simulation processor access') ----- provideContextForCurrentInstruction + printRegisters ifTrue: - printRegisters ifFalse: [processor printRegistersOn: coInterpreter transcript]. + (printInstructions + and: [self addressIsInCodeZone: processor pc]) ifTrue: + [self disassembleFrom: processor pc to: processor pc]! - printInstructions ifFalse: - [(self addressIsInCodeZone: processor pc) ifTrue: - [self disassembleFrom: processor pc to: processor pc]]! From commits at source.squeak.org Sat Jul 4 21:36:21 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Sat, 4 Jul 2020 21:36:21 0000 Subject: [Vm-dev] VM Maker: VMMaker.oscog-eem.2771.mcz Message-ID: Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2771.mcz ==================== Summary ==================== Name: VMMaker.oscog-eem.2771 Author: eem Time: 4 July 2020, 2:36:08.977687 pm UUID: a7ba3af0-70cc-4104-be1b-8895f533ed7b Ancestors: VMMaker.oscog-eem.2770 Oops! Fix slip in previous commit. =============== Diff against VMMaker.oscog-eem.2770 =============== Item was changed: ----- Method: Cogit>>MulOverflowR:R: (in category 'abstract instructions') ----- MulOverflowR: reg1 R: reg2 "Multiplication is a little weird on some processors. Defer to the backEnd to allow it to generate any special code it may need to." ^backEnd canMulRRDetectOverflow ifTrue: [backEnd genMulR: reg1 R: reg2] + ifFalse: [backEnd genMulOverflowR: reg1 R: reg2]! - ifFalse: [backEnd MulOverflowR: reg1 R: reg2]! From noreply at github.com Sat Jul 4 22:02:29 2020 From: noreply at github.com (Eliot Miranda) Date: Sat, 04 Jul 2020 15:02:29 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 5d03fa: CogVM source as per VMMaker.oscog-eem.2771/ClosedV... Message-ID: Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: 5d03fae3e9f0383cb6602a5d54c6deba641670d6 https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/5d03fae3e9f0383cb6602a5d54c6deba641670d6 Author: Eliot Miranda Date: 2020-07-04 (Sat, 04 Jul 2020) Changed paths: M nsspur64src/vm/cogit.h M nsspur64src/vm/cogitARMv8.c M nsspur64src/vm/cogitX64SysV.c M nsspur64src/vm/cogitX64WIN64.c M nsspursrc/vm/cogit.h M nsspursrc/vm/cogitARMv5.c M nsspursrc/vm/cogitIA32.c M nsspursrc/vm/cogitMIPSEL.c M spur64src/vm/cogit.h M spur64src/vm/cogitARMv8.c M spur64src/vm/cogitX64SysV.c M spur64src/vm/cogitX64WIN64.c M spursista64src/vm/cogit.h M spursista64src/vm/cogitARMv8.c M spursista64src/vm/cogitX64SysV.c M spursista64src/vm/cogitX64WIN64.c M spursistasrc/vm/cogit.h M spursistasrc/vm/cogitARMv5.c M spursistasrc/vm/cogitIA32.c M spursistasrc/vm/cogitMIPSEL.c M spursrc/vm/cogit.h M spursrc/vm/cogitARMv5.c M spursrc/vm/cogitIA32.c M spursrc/vm/cogitMIPSEL.c M src/vm/cogit.h M src/vm/cogitARMv5.c M src/vm/cogitIA32.c M src/vm/cogitMIPSEL.c Log Message: ----------- CogVM source as per VMMaker.oscog-eem.2771/ClosedVMMaker-eem.91 ARMv8 Cogit: implement signed integer multiply overflow detection. From builds at travis-ci.org Sun Jul 5 00:40:24 2020 From: builds at travis-ci.org (Travis CI) Date: Sun, 05 Jul 2020 00:40:24 +0000 Subject: [Vm-dev] Fixed: OpenSmalltalk/opensmalltalk-vm#2102 (Cog - 5d03fae) In-Reply-To: Message-ID: <5f012177f03ed_13fd68aeb27d87156d@travis-tasks-5b7489cbff-hbppj.mail> Build Update for OpenSmalltalk/opensmalltalk-vm ------------------------------------- Build: #2102 Status: Fixed Duration: 2 hrs, 37 mins, and 40 secs Commit: 5d03fae (Cog) Author: Eliot Miranda Message: CogVM source as per VMMaker.oscog-eem.2771/ClosedVMMaker-eem.91 ARMv8 Cogit: implement signed integer multiply overflow detection. View the changeset: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/4d655995bef9...5d03fae3e9f0 View the full build log and details: https://travis-ci.org/github/OpenSmalltalk/opensmalltalk-vm/builds/705007036?utm_medium=notification&utm_source=email -- You can unsubscribe from build emails from the OpenSmalltalk/opensmalltalk-vm repository going to https://travis-ci.org/account/preferences/unsubscribe?repository=8795279&utm_medium=notification&utm_source=email. Or unsubscribe from *all* email updating your settings at https://travis-ci.org/account/preferences/unsubscribe?utm_medium=notification&utm_source=email. Or configure specific recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications. -------------- next part -------------- An HTML attachment was scrubbed... URL: From digit at sonic.net Sun Jul 5 19:52:24 2020 From: digit at sonic.net (Tim Johnson) Date: Sun, 5 Jul 2020 12:52:24 -0700 Subject: [Vm-dev] Probably pointless endianness question re: Float changes circa 4.6 Message-ID: <2C49B96A-C7B5-4009-B57B-351B1A13C358@sonic.net> Hi all, I finally achieved something I have wanted to do for ten years, though its relevance has steadily declined over that time: build the Carbon and Cocoa VMs on a PowerPC Mac. - Carbon VM (4.2.5b1, from VMMaker 4.2.4 on Squeak 4.1) - iOS/ObjC/Cocoa VM (5.7b2, from VMMaker 4.2.6 on Squeak 4.1) After building a successful product, I took the Carbon VM and began incrementing the non-oscog VMMaker's version in a Squeak 4.5 image. I was able to build products along the way from 4.3.21 past 4.4.12 and beyond. (I had to stop when [as could be expected] some plugins wouldn't export and some support code was missing.) Eventually I had a Mac Carbon VM which could load 4.6's format 6505 image, and it began displaying the world, but it also had a few drawing errors and didn't respond to events. A snip from SqueakDebug.log is at the end of this message, but probably isn't worth anyone's time to evaluate! Where I think my efforts hit a dead end is with the Float changes [2] in the 6505 image format used by Squeak 4.6 [1]. But I'm just hoping to verify here that the Float changes in image format 6505 could have fatal implications for a big-endian platform like PowerPC (the formerly-native format for the Floats ;) ) on a "vintage" stack/interpreter VM, and that perhaps that would have been / expected/ to be the last straw for it. (A further question might be: how big would the lift have been to keep it going? Or was that work done and just would require some extra attention?) I'm sure none of this is relevant or worth time. I guess my main question is whether this was supposed to have "kept working" but didn't — and whether that could have lingering implications on Squeak's effort (thanks David T Lewis!) to continue supporting the stack/interpreter VMMaker (though specifically only affecting big- endian platforms, which admittedly is a very small population). I suppose there could hypothetically be some big-endian platform out there which gets some Linux package of the 4.10.2 VM and fails to launch any image past 4.5 for similar reasons...? FWIW, I did try the old Darwin/PPC port of 4.10.2 [3] with both 4.6 and David T Lewis's "Squeak 5.2-in-V3 format" image (which is no longer available on the 'net!) and it exhibited similar behavior: couldn't display the world, ate 100% CPU, had to be forced to quit. Thanks, a Tim [1] http://wiki.squeak.org/squeak/6290 [2] http://forum.world.st/float-word-order-td106936.html [3] http://squeakvm.org/unix/ Error: Cannot truncate this number 3 July 2020 8:11:03.001 am VM: unix - Smalltalk Image: Squeak4.6 [latest update: #13700] SecurityManager state: Restricted: false FileAccess: true SocketAccess: true Working Dir /Users/ADMIN/Downloads/Squeak4.6-13700 Trusted Dir /Users/ADMIN/Downloads/Squeak4.6-13700/secure Untrusted Dir /Users/ADMIN/Downloads/Squeak4.6-13700/My Squeak Float(Object)>>error: Receiver: NaN Arguments and temporary variables: aString: 'Cannot truncate this number' Receiver's instance variables: NaN Float>>truncated Receiver: NaN Arguments and temporary variables: di: nil df: nil q: nil r: nil Receiver's instance variables: NaN Float>>rounded Receiver: NaN Arguments and temporary variables: Receiver's instance variables: NaN Color>>setRed:green:blue: Receiver: <> Arguments and temporary variables: r: NaN g: NaN b: NaN Receiver's instance variables: rgb: nil cachedDepth: nil cachedBitPattern: nil Color class>>r:g:b: Receiver: Color Arguments and temporary variables: r: NaN g: NaN b: NaN Receiver's instance variables: superclass: Object methodDict: a MethodDictionary(size 107) format: 136 instanceVariables: #('rgb' 'cachedDepth' 'cachedBitPattern') organization: ('access' alpha blue brightness green hue luminance red saturatio...etc... subclasses: {TranslucentColor} name: #Color classPool: a Dictionary(#Black->Color black #Blue->Color blue #BlueShift->0 #Br...etc... sharedPools: nil environment: Smalltalk category: #'Graphics-Primitives' Color class>>r:g:b:alpha: Receiver: Color Arguments and temporary variables: r: NaN g: NaN b: NaN alpha: 0.0 Receiver's instance variables: superclass: Object methodDict: a MethodDictionary(size 107) format: 136 instanceVariables: #('rgb' 'cachedDepth' 'cachedBitPattern') organization: ('access' alpha blue brightness green hue luminance red saturatio...etc... subclasses: {TranslucentColor} name: #Color classPool: a Dictionary(#Black->Color black #Blue->Color blue #BlueShift->0 #Br...etc... sharedPools: nil environment: Smalltalk category: #'Graphics-Primitives' Color>>alphaMixed:with: Receiver: Color veryDarkGray Arguments and temporary variables: From lewis at mail.msen.com Sun Jul 5 21:16:32 2020 From: lewis at mail.msen.com (David T. Lewis) Date: Sun, 5 Jul 2020 17:16:32 -0400 Subject: [Vm-dev] Probably pointless endianness question re: Float changes circa 4.6 In-Reply-To: <2C49B96A-C7B5-4009-B57B-351B1A13C358@sonic.net> References: <2C49B96A-C7B5-4009-B57B-351B1A13C358@sonic.net> Message-ID: <20200705211632.GA74588@shell.msen.com> Hi Tim, I cannot follow up on this right now, but will do so soon (maybe tomorrow). The float changes for format 6505 are actually quite simple so I'm sure we can get this sorted out. Dave On Sun, Jul 05, 2020 at 12:52:24PM -0700, Tim Johnson wrote: > > Hi all, > > I finally achieved something I have wanted to do for ten years, though > its relevance has steadily declined over that time: build the Carbon > and Cocoa VMs on a PowerPC Mac. > > - Carbon VM (4.2.5b1, from VMMaker 4.2.4 on Squeak 4.1) > - iOS/ObjC/Cocoa VM (5.7b2, from VMMaker 4.2.6 on Squeak 4.1) > > After building a successful product, I took the Carbon VM and began > incrementing the non-oscog VMMaker's version in a Squeak 4.5 image. I > was able to build products along the way from 4.3.21 past 4.4.12 and > beyond. (I had to stop when [as could be expected] some plugins > wouldn't export and some support code was missing.) > > Eventually I had a Mac Carbon VM which could load 4.6's format 6505 > image, and it began displaying the world, but it also had a few > drawing errors and didn't respond to events. A snip from > SqueakDebug.log is at the end of this message, but probably isn't > worth anyone's time to evaluate! > > Where I think my efforts hit a dead end is with the Float changes [2] > in the 6505 image format used by Squeak 4.6 [1]. > > But I'm just hoping to verify here that the Float changes in image > format 6505 could have fatal implications for a big-endian platform > like PowerPC (the formerly-native format for the Floats ;) ) on a > "vintage" stack/interpreter VM, and that perhaps that would have been / > expected/ to be the last straw for it. (A further question might be: > how big would the lift have been to keep it going? Or was that work > done and just would require some extra attention?) > > I'm sure none of this is relevant or worth time. I guess my main > question is whether this was supposed to have "kept working" but > didn't ??? and whether that could have lingering implications on > Squeak's effort (thanks David T Lewis!) to continue supporting the > stack/interpreter VMMaker (though specifically only affecting big- > endian platforms, which admittedly is a very small population). I > suppose there could hypothetically be some big-endian platform out > there which gets some Linux package of the 4.10.2 VM and fails to > launch any image past 4.5 for similar reasons...? > > FWIW, I did try the old Darwin/PPC port of 4.10.2 [3] with both 4.6 > and David T Lewis's "Squeak 5.2-in-V3 format" image (which is no > longer available on the 'net!) and it exhibited similar behavior: > couldn't display the world, ate 100% CPU, had to be forced to quit. > > Thanks, > a Tim > > [1] http://wiki.squeak.org/squeak/6290 > [2] http://forum.world.st/float-word-order-td106936.html > [3] http://squeakvm.org/unix/ > > Error: Cannot truncate this number > 3 July 2020 8:11:03.001 am > > VM: unix - Smalltalk > Image: Squeak4.6 [latest update: #13700] > > SecurityManager state: > Restricted: false > FileAccess: true > SocketAccess: true > Working Dir /Users/ADMIN/Downloads/Squeak4.6-13700 > Trusted Dir /Users/ADMIN/Downloads/Squeak4.6-13700/secure > Untrusted Dir /Users/ADMIN/Downloads/Squeak4.6-13700/My Squeak > > Float(Object)>>error: > Receiver: NaN > Arguments and temporary variables: > aString: 'Cannot truncate this number' > Receiver's instance variables: > NaN > Float>>truncated > Receiver: NaN > Arguments and temporary variables: > di: nil > df: nil > q: nil > r: nil > Receiver's instance variables: > NaN > Float>>rounded > Receiver: NaN > Arguments and temporary variables: > > Receiver's instance variables: > NaN > Color>>setRed:green:blue: > Receiver: <> > Arguments and temporary variables: > r: NaN > g: NaN > b: NaN > Receiver's instance variables: > rgb: nil > cachedDepth: nil > cachedBitPattern: nil > > Color class>>r:g:b: > Receiver: Color > Arguments and temporary variables: > r: NaN > g: NaN > b: NaN > Receiver's instance variables: > superclass: Object > methodDict: a MethodDictionary(size 107) > format: 136 > instanceVariables: #('rgb' 'cachedDepth' > 'cachedBitPattern') > organization: ('access' alpha blue brightness green hue > luminance red saturatio...etc... > subclasses: {TranslucentColor} > name: #Color > classPool: a Dictionary(#Black->Color black > #Blue->Color blue #BlueShift->0 #Br...etc... > sharedPools: nil > environment: Smalltalk > category: #'Graphics-Primitives' > > Color class>>r:g:b:alpha: > Receiver: Color > Arguments and temporary variables: > r: NaN > g: NaN > b: NaN > alpha: 0.0 > Receiver's instance variables: > superclass: Object > methodDict: a MethodDictionary(size 107) > format: 136 > instanceVariables: #('rgb' 'cachedDepth' > 'cachedBitPattern') > organization: ('access' alpha blue brightness green hue > luminance red saturatio...etc... > subclasses: {TranslucentColor} > name: #Color > classPool: a Dictionary(#Black->Color black > #Blue->Color blue #BlueShift->0 #Br...etc... > sharedPools: nil > environment: Smalltalk > category: #'Graphics-Primitives' > > Color>>alphaMixed:with: > Receiver: Color veryDarkGray > Arguments and temporary variables: > From eliot.miranda at gmail.com Sun Jul 5 22:00:23 2020 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sun, 5 Jul 2020 15:00:23 -0700 Subject: [Vm-dev] Probably pointless endianness question re: Float changes circa 4.6 In-Reply-To: <2C49B96A-C7B5-4009-B57B-351B1A13C358@sonic.net> References: <2C49B96A-C7B5-4009-B57B-351B1A13C358@sonic.net> Message-ID: <1D309501-E3F9-4E2F-A981-FF885D2CB5AC@gmail.com> Hi Tim, > On Jul 5, 2020, at 12:52 PM, Tim Johnson wrote: > > Hi all, > > I finally achieved something I have wanted to do for ten years, though its relevance has steadily declined over that time: build the Carbon and Cocoa VMs on a PowerPC Mac. > > - Carbon VM (4.2.5b1, from VMMaker 4.2.4 on Squeak 4.1) > - iOS/ObjC/Cocoa VM (5.7b2, from VMMaker 4.2.6 on Squeak 4.1) > > After building a successful product, I took the Carbon VM and began incrementing the non-oscog VMMaker's version in a Squeak 4.5 image. I was able to build products along the way from 4.3.21 past 4.4.12 and beyond. (I had to stop when [as could be expected] some plugins wouldn't export and some support code was missing.) > > Eventually I had a Mac Carbon VM which could load 4.6's format 6505 image, and it began displaying the world, but it also had a few drawing errors and didn't respond to events. A snip from SqueakDebug.log is at the end of this message, but probably isn't worth anyone's time to evaluate! > > Where I think my efforts hit a dead end is with the Float changes [2] in the 6505 image format used by Squeak 4.6 [1]. > > But I'm just hoping to verify here that the Float changes in image format 6505 could have fatal implications for a big-endian platform like PowerPC (the formerly-native format for the Floats ;) ) on a "vintage" stack/interpreter VM, and that perhaps that would have been /expected/ to be the last straw for it. (A further question might be: how big would the lift have been to keep it going? Or was that work done and just would require some extra attention?) I designed the scheme so that it would *not* have fatal implications on any platform :-) First let’s understand the representation. A Float is a double-precision 64-bit ieee float represented as a two element word array. Before the changes floats were always stored in the heap in big-endian format which meant: - aFloat at: 1 accessed the most significant word of the float on both big & little median platforms - on little endian platforms the vm therefore has to word reverse Float objects, perform arithmetic to obtain a new 64-big float, and word reverse it to store it back into a new Float This unfairly penalizes little endian platforms. My simple change was three-fold: 1. A bit in the image header specifies whether floats in the image are in big-endian format (bit unset) or in platform format (eg big endian on PPC, little endian on x86). 2. on load if required all Floats would be word reversed to ensure they are in platform order 3. Float at: was modified so that on little endian platforms Float at: 1 answered the most significant word, just as it does on big endian platforms, hence hiding from the image the change in layout on little endian platforms and avoiding having to do any word reversal in arithmetic on any platforms So what I did leveled the playing field. How does this have fatal consequences for big endian platforms? Note that the word reversal on Float at: is for free because the primitive only takes 1&2 as valid indices, so the implementation is really cheap. So in fact what I did was ensure that fp was as fast as possible on both platforms and (consciously) didn’t penalize either platform. Does this explanation make the scheme seem more sensible now? > > I'm sure none of this is relevant or worth time. I guess my main question is whether this was supposed to have "kept working" but didn't — and whether that could have lingering implications on Squeak's effort (thanks David T Lewis!) to continue supporting the stack/interpreter VMMaker (though specifically only affecting big-endian platforms, which admittedly is a very small population). I suppose there could hypothetically be some big-endian platform out there which gets some Linux package of the 4.10.2 VM and fails to launch any image past 4.5 for similar reasons...? > > FWIW, I did try the old Darwin/PPC port of 4.10.2 [3] with both 4.6 and David T Lewis's "Squeak 5.2-in-V3 format" image (which is no longer available on the 'net!) and it exhibited similar behavior: couldn't display the world, ate 100% CPU, had to be forced to quit. > > Thanks, > a Tim > > [1] http://wiki.squeak.org/squeak/6290 > [2] http://forum.world.st/float-word-order-td106936.html > [3] http://squeakvm.org/unix/ > > Error: Cannot truncate this number > 3 July 2020 8:11:03.001 am > > VM: unix - Smalltalk > Image: Squeak4.6 [latest update: #13700] > > SecurityManager state: > Restricted: false > FileAccess: true > SocketAccess: true > Working Dir /Users/ADMIN/Downloads/Squeak4.6-13700 > Trusted Dir /Users/ADMIN/Downloads/Squeak4.6-13700/secure > Untrusted Dir /Users/ADMIN/Downloads/Squeak4.6-13700/My Squeak > > Float(Object)>>error: > Receiver: NaN > Arguments and temporary variables: > aString: 'Cannot truncate this number' > Receiver's instance variables: > NaN > Float>>truncated > Receiver: NaN > Arguments and temporary variables: > di: nil > df: nil > q: nil > r: nil > Receiver's instance variables: > NaN > Float>>rounded > Receiver: NaN > Arguments and temporary variables: > > Receiver's instance variables: > NaN > Color>>setRed:green:blue: > Receiver: <> > Arguments and temporary variables: > r: NaN > g: NaN > b: NaN > Receiver's instance variables: > rgb: nil > cachedDepth: nil > cachedBitPattern: nil > > Color class>>r:g:b: > Receiver: Color > Arguments and temporary variables: > r: NaN > g: NaN > b: NaN > Receiver's instance variables: > superclass: Object > methodDict: a MethodDictionary(size 107) > format: 136 > instanceVariables: #('rgb' 'cachedDepth' 'cachedBitPattern') > organization: ('access' alpha blue brightness green hue luminance red saturatio...etc... > subclasses: {TranslucentColor} > name: #Color > classPool: a Dictionary(#Black->Color black #Blue->Color blue #BlueShift->0 #Br...etc... > sharedPools: nil > environment: Smalltalk > category: #'Graphics-Primitives' > > Color class>>r:g:b:alpha: > Receiver: Color > Arguments and temporary variables: > r: NaN > g: NaN > b: NaN > alpha: 0.0 > Receiver's instance variables: > superclass: Object > methodDict: a MethodDictionary(size 107) > format: 136 > instanceVariables: #('rgb' 'cachedDepth' 'cachedBitPattern') > organization: ('access' alpha blue brightness green hue luminance red saturatio...etc... > subclasses: {TranslucentColor} > name: #Color > classPool: a Dictionary(#Black->Color black #Blue->Color blue #BlueShift->0 #Br...etc... > sharedPools: nil > environment: Smalltalk > category: #'Graphics-Primitives' > > Color>>alphaMixed:with: > Receiver: Color veryDarkGray > Arguments and temporary variables: > From eliot.miranda at gmail.com Sun Jul 5 22:05:15 2020 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sun, 5 Jul 2020 15:05:15 -0700 Subject: [Vm-dev] Probably pointless endianness question re: Float changes circa 4.6 In-Reply-To: <20200705211632.GA74588@shell.msen.com> References: <20200705211632.GA74588@shell.msen.com> Message-ID: <16F4DC5D-25C4-4F0B-A5C0-706E3B1C212F@gmail.com> Tim, P.S. now is the best time ever to attempt a 64-bit or 32-bit PPC JIT. The VMMaker.oscog infrastructure is better than ever. I did the ARMv8 code generator in record time (about 6 weeks, ignoring misunderstandings on my part). And a 32-bit JIT would speed up 6505 images considerably. I don’t have time to write either of these but I’d love to mentor you if you felt like having a go. _,,,^..^,,,_ (phone) > On Jul 5, 2020, at 2:16 PM, David T. Lewis wrote: > >  > Hi Tim, > > I cannot follow up on this right now, but will do so soon (maybe tomorrow). > > The float changes for format 6505 are actually quite simple so I'm sure > we can get this sorted out. > > Dave > >> On Sun, Jul 05, 2020 at 12:52:24PM -0700, Tim Johnson wrote: >> >> Hi all, >> >> I finally achieved something I have wanted to do for ten years, though >> its relevance has steadily declined over that time: build the Carbon >> and Cocoa VMs on a PowerPC Mac. >> >> - Carbon VM (4.2.5b1, from VMMaker 4.2.4 on Squeak 4.1) >> - iOS/ObjC/Cocoa VM (5.7b2, from VMMaker 4.2.6 on Squeak 4.1) >> >> After building a successful product, I took the Carbon VM and began >> incrementing the non-oscog VMMaker's version in a Squeak 4.5 image. I >> was able to build products along the way from 4.3.21 past 4.4.12 and >> beyond. (I had to stop when [as could be expected] some plugins >> wouldn't export and some support code was missing.) >> >> Eventually I had a Mac Carbon VM which could load 4.6's format 6505 >> image, and it began displaying the world, but it also had a few >> drawing errors and didn't respond to events. A snip from >> SqueakDebug.log is at the end of this message, but probably isn't >> worth anyone's time to evaluate! >> >> Where I think my efforts hit a dead end is with the Float changes [2] >> in the 6505 image format used by Squeak 4.6 [1]. >> >> But I'm just hoping to verify here that the Float changes in image >> format 6505 could have fatal implications for a big-endian platform >> like PowerPC (the formerly-native format for the Floats ;) ) on a >> "vintage" stack/interpreter VM, and that perhaps that would have been / >> expected/ to be the last straw for it. (A further question might be: >> how big would the lift have been to keep it going? Or was that work >> done and just would require some extra attention?) >> >> I'm sure none of this is relevant or worth time. I guess my main >> question is whether this was supposed to have "kept working" but >> didn't ??? and whether that could have lingering implications on >> Squeak's effort (thanks David T Lewis!) to continue supporting the >> stack/interpreter VMMaker (though specifically only affecting big- >> endian platforms, which admittedly is a very small population). I >> suppose there could hypothetically be some big-endian platform out >> there which gets some Linux package of the 4.10.2 VM and fails to >> launch any image past 4.5 for similar reasons...? >> >> FWIW, I did try the old Darwin/PPC port of 4.10.2 [3] with both 4.6 >> and David T Lewis's "Squeak 5.2-in-V3 format" image (which is no >> longer available on the 'net!) and it exhibited similar behavior: >> couldn't display the world, ate 100% CPU, had to be forced to quit. >> >> Thanks, >> a Tim >> >> [1] http://wiki.squeak.org/squeak/6290 >> [2] http://forum.world.st/float-word-order-td106936.html >> [3] http://squeakvm.org/unix/ >> >> Error: Cannot truncate this number >> 3 July 2020 8:11:03.001 am >> >> VM: unix - Smalltalk >> Image: Squeak4.6 [latest update: #13700] >> >> SecurityManager state: >> Restricted: false >> FileAccess: true >> SocketAccess: true >> Working Dir /Users/ADMIN/Downloads/Squeak4.6-13700 >> Trusted Dir /Users/ADMIN/Downloads/Squeak4.6-13700/secure >> Untrusted Dir /Users/ADMIN/Downloads/Squeak4.6-13700/My Squeak >> >> Float(Object)>>error: >> Receiver: NaN >> Arguments and temporary variables: >> aString: 'Cannot truncate this number' >> Receiver's instance variables: >> NaN >> Float>>truncated >> Receiver: NaN >> Arguments and temporary variables: >> di: nil >> df: nil >> q: nil >> r: nil >> Receiver's instance variables: >> NaN >> Float>>rounded >> Receiver: NaN >> Arguments and temporary variables: >> >> Receiver's instance variables: >> NaN >> Color>>setRed:green:blue: >> Receiver: <> >> Arguments and temporary variables: >> r: NaN >> g: NaN >> b: NaN >> Receiver's instance variables: >> rgb: nil >> cachedDepth: nil >> cachedBitPattern: nil >> >> Color class>>r:g:b: >> Receiver: Color >> Arguments and temporary variables: >> r: NaN >> g: NaN >> b: NaN >> Receiver's instance variables: >> superclass: Object >> methodDict: a MethodDictionary(size 107) >> format: 136 >> instanceVariables: #('rgb' 'cachedDepth' >> 'cachedBitPattern') >> organization: ('access' alpha blue brightness green hue >> luminance red saturatio...etc... >> subclasses: {TranslucentColor} >> name: #Color >> classPool: a Dictionary(#Black->Color black >> #Blue->Color blue #BlueShift->0 #Br...etc... >> sharedPools: nil >> environment: Smalltalk >> category: #'Graphics-Primitives' >> >> Color class>>r:g:b:alpha: >> Receiver: Color >> Arguments and temporary variables: >> r: NaN >> g: NaN >> b: NaN >> alpha: 0.0 >> Receiver's instance variables: >> superclass: Object >> methodDict: a MethodDictionary(size 107) >> format: 136 >> instanceVariables: #('rgb' 'cachedDepth' >> 'cachedBitPattern') >> organization: ('access' alpha blue brightness green hue >> luminance red saturatio...etc... >> subclasses: {TranslucentColor} >> name: #Color >> classPool: a Dictionary(#Black->Color black >> #Blue->Color blue #BlueShift->0 #Br...etc... >> sharedPools: nil >> environment: Smalltalk >> category: #'Graphics-Primitives' >> >> Color>>alphaMixed:with: >> Receiver: Color veryDarkGray >> Arguments and temporary variables: >> From lewis at mail.msen.com Mon Jul 6 00:48:32 2020 From: lewis at mail.msen.com (David T. Lewis) Date: Sun, 5 Jul 2020 20:48:32 -0400 Subject: [Vm-dev] Probably pointless endianness question re: Float changes circa 4.6 In-Reply-To: <1D309501-E3F9-4E2F-A981-FF885D2CB5AC@gmail.com> References: <2C49B96A-C7B5-4009-B57B-351B1A13C358@sonic.net> <1D309501-E3F9-4E2F-A981-FF885D2CB5AC@gmail.com> Message-ID: <20200706004832.GA96544@shell.msen.com> On Sun, Jul 05, 2020 at 03:00:23PM -0700, Eliot Miranda wrote: > > Hi Tim, > > > On Jul 5, 2020, at 12:52 PM, Tim Johnson wrote: > > > > ???Hi all, > > > > I finally achieved something I have wanted to do for ten years, though its relevance has steadily declined over that time: build the Carbon and Cocoa VMs on a PowerPC Mac. > > > > - Carbon VM (4.2.5b1, from VMMaker 4.2.4 on Squeak 4.1) > > - iOS/ObjC/Cocoa VM (5.7b2, from VMMaker 4.2.6 on Squeak 4.1) > > > > After building a successful product, I took the Carbon VM and began incrementing the non-oscog VMMaker's version in a Squeak 4.5 image. I was able to build products along the way from 4.3.21 past 4.4.12 and beyond. (I had to stop when [as could be expected] some plugins wouldn't export and some support code was missing.) > > > > Eventually I had a Mac Carbon VM which could load 4.6's format 6505 image, and it began displaying the world, but it also had a few drawing errors and didn't respond to events. A snip from SqueakDebug.log is at the end of this message, but probably isn't worth anyone's time to evaluate! > > > > Where I think my efforts hit a dead end is with the Float changes [2] in the 6505 image format used by Squeak 4.6 [1]. > > > > But I'm just hoping to verify here that the Float changes in image format 6505 could have fatal implications for a big-endian platform like PowerPC (the formerly-native format for the Floats ;) ) on a "vintage" stack/interpreter VM, and that perhaps that would have been /expected/ to be the last straw for it. (A further question might be: how big would the lift have been to keep it going? Or was that work done and just would require some extra attention?) > > I designed the scheme so that it would *not* have fatal implications on any platform :-) > > First let???s understand the representation. A Float is a double-precision 64-bit ieee float represented as a two element word array. > > Before the changes floats were always stored in the heap in big-endian format which meant: > > - aFloat at: 1 accessed the most significant word of the float on both big & little median platforms > - on little endian platforms the vm therefore has to word reverse Float objects, perform arithmetic to obtain a new 64-big float, and word reverse it to store it back into a new Float > > This unfairly penalizes little endian platforms. > > My simple change was three-fold: > 1. A bit in the image header specifies whether floats in the image are in big-endian format (bit unset) or in platform format (eg big endian on PPC, little endian on x86). > > 2. on load if required all Floats would be word reversed to ensure they are in platform order > To add some detail: - In a 6504 image, Floats are stored in big-endian format (as Eliot explains above) regardless of the endianness of the current platform - In a 6505 image, Floats are stored in the native platform word ordering for the current platform - When a 6505 image is loaded into a classic interpreter VM the floats are converted big-endian format in ContextInterpreter>>normalizeFloatOrderingInImage which effectively turns it back into a 6504 image - When as 6505 image that was saved from a little-endian machine is loaded into an oscog (Cog/Spur) VM running on a big-endian platform, it is loaded in the saved format (presumeably little endian) So ... I am only guessing, but AFAIK we have never tried loading a 6505 image that was saved on a little-endian machine into a Cog/Spur VM running on a big-endian platform. Quite possibly in needs a word-reversal operation in that case. Dave From digit at sonic.net Mon Jul 6 05:21:54 2020 From: digit at sonic.net (Tim Johnson) Date: Sun, 5 Jul 2020 22:21:54 -0700 Subject: [Vm-dev] Probably pointless endianness question re: Float changes circa 4.6 In-Reply-To: <1D309501-E3F9-4E2F-A981-FF885D2CB5AC@gmail.com> References: <2C49B96A-C7B5-4009-B57B-351B1A13C358@sonic.net> <1D309501-E3F9-4E2F-A981-FF885D2CB5AC@gmail.com> Message-ID: Hi Eliot, I had a decent draft of this response, and my mail client pooped out when I hit send. Trying again. If this comes across as terse (I doubt it ;) ), please forgive. On Jul 5, 2020, at 3:00 PM, Eliot Miranda wrote: >> But I'm just hoping to verify here that the Float changes in image >> format 6505 could have fatal implications for a big-endian platform >> like PowerPC (the formerly-native format for the Floats ;) ) on a >> "vintage" stack/interpreter VM, and that perhaps that would have >> been /expected/ to be the last straw for it. (A further question >> might be: how big would the lift have been to keep it going? Or >> was that work done and just would require some extra attention?) > > I designed the scheme so that it would *not* have fatal implications > on any platform :-) This is a good point. It helps me to improve my question: Q: Could my build environment (platform support code, non-oscog VMMaker sources, Squeak 4.5 hosted-VMMaker) be missing something necessary for the scheme to work as designed? (This question & others summarized below.) > First let’s understand the representation. A Float is a double- > precision 64-bit ieee float represented as a two element word array. > > Before the changes floats were always stored in the heap in big- > endian format which meant: > > - aFloat at: 1 accessed the most significant word of the float on > both big & little median platforms > - on little endian platforms the vm therefore has to word reverse > Float objects, perform arithmetic to obtain a new 64-big float, and > word reverse it to store it back into a new Float > > This unfairly penalizes little endian platforms. Yes -- no doubt this was an important move. > > My simple change was three-fold: > 1. A bit in the image header specifies whether floats in the image > are in big-endian format (bit unset) or in platform format (eg big > endian on PPC, little endian on x86). > > 2. on load if required all Floats would be word reversed to ensure > they are in platform order ^^ this is something I'm hoping to instrument or measure; more on that below. > > 3. Float at: was modified so that on little endian platforms Float > at: 1 answered the most significant word, just as it does on big > endian platforms, hence hiding from the image the change in layout > on little endian platforms and avoiding having to do any word > reversal in arithmetic on any platforms > > > So what I did leveled the playing field. How does this have fatal > consequences for big endian platforms? Well, I mean, that's so similar to the question I was trying to get across: could it? And, if so, under which conditions? I definitely didn't mean to sound conclusive or be finger-pointy, and I'm sorry if it read that way. After getting the 6505 format image to load & the world to (mostly) display, it felt like a small victory. But then seeing Float-related errors in SqueakDebug.log after force-quitting made me think this conversion process could be related, and I hoped to gather more info. > Note that the word reversal on Float at: is for free because the > primitive only takes 1&2 as valid indices, so the implementation is > really cheap. So in fact what I did was ensure that fp was as fast > as possible on both platforms and (consciously) didn’t penalize > either platform. > > Does this explanation make the scheme seem more sensible now? I really appreciate this explanation. All I could find previously on this subject was that thread I linked in my prior message, which didn't indicate which path was actually chosen. This helps make it clear. From my easy chair, your scheme looks brilliant and thorough. I never meant to suggest otherwise, and am also totally underprepared and underqualified to do so. The only thing not sensible here is that I'm trying to build & update a ten-year-old snapshot of the code for the Mac VM on an antiquated machine based on a niche architecture. :) Your & Dave's responses have helped me to hone my question(s): Q: Did this Float scheme for 6505 require a change to the VM in order to function properly? If so, (similar to what I asked above) is it possible that the VM I am building is missing some part of that change? (Whether that is something that exists in VMMaker-oscog but didn't make it to VMMaker, or whether it's some platform support code, or a changed version of a primitive...) If not, I am probably barking up the wrong tree. Q: How long might I expect the Float conversion at load (#2 above) to take, on a slower image running on a slower computer? Milliseconds, seconds, minutes, or longer? If I wanted to log it, trace it, or debug it, how could I find it? (Dave helped with this, thanks: ContextInterpreter>>normalizeFloatOrderingInImage ) Q: If I spend the time to figure this out and do something about it, is there any way it could benefit anyone other than myself? That is the crux of my previous blathering about any hypothetical big-endian platforms of the future. I hope I haven't wasted your time or energy, Eliot. Thanks a lot for your explanation. Tim -------------- next part -------------- An HTML attachment was scrubbed... URL: From digit at sonic.net Mon Jul 6 05:54:14 2020 From: digit at sonic.net (Tim Johnson) Date: Sun, 5 Jul 2020 22:54:14 -0700 Subject: [Vm-dev] Probably pointless endianness question re: Float changes circa 4.6 In-Reply-To: <20200706004832.GA96544@shell.msen.com> References: <2C49B96A-C7B5-4009-B57B-351B1A13C358@sonic.net> <1D309501-E3F9-4E2F-A981-FF885D2CB5AC@gmail.com> <20200706004832.GA96544@shell.msen.com> Message-ID: <689B7921-3C44-46E5-BDF5-555075319393@sonic.net> Hi Dave, On Jul 5, 2020, at 5:48 PM, David T. Lewis wrote: > To add some detail: > > - In a 6504 image, Floats are stored in big-endian format (as Eliot > explains above) regardless of > the endianness of the current platform > > - In a 6505 image, Floats are stored in the native platform word > ordering for the current platform > > - When a 6505 image is loaded into a classic interpreter VM the > floats are converted big-endian > format in ContextInterpreter>>normalizeFloatOrderingInImage which > effectively turns it back > into a 6504 image Thank you. This helps me know where to possibly dig into the conversion process. Also, I wanted to try this. So I just did: 1) I loaded Squeak4.6-13700 (one of the alpha releases) into the 4.10.2-2614 VM on my Raspberry Pi, and then saved it out. 2) `ckformat` verifies that the original image was is a 6505 format, and the image I saved out is a 6504 format. 3) Transferred it over to my G4, and it very much runs! This particular VM was built with VMMaker 4.4.12. Amazing! What an effective solution :) Stepping stone-by-stone into the future... > - When as 6505 image that was saved from a little-endian machine is > loaded into an oscog (Cog/Spur) > VM running on a big-endian platform, it is loaded in the saved > format (presumeably little endian) > > So ... I am only guessing, but AFAIK we have never tried loading a > 6505 image that was saved > on a little-endian machine into a Cog/Spur VM running on a big- > endian platform. Quite possibly > in needs a word-reversal operation in that case. Very interesting. Are there any Cog/Spur VMs for big-endian platforms? Thanks a lot, Tim From boris at shingarov.com Mon Jul 6 15:53:20 2020 From: boris at shingarov.com (Boris Shingarov) Date: Mon, 6 Jul 2020 11:53:20 -0400 Subject: [Vm-dev] Probably pointless endianness question re: Float changes circa 4.6 In-Reply-To: <16F4DC5D-25C4-4F0B-A5C0-706E3B1C212F@gmail.com> References: <20200705211632.GA74588@shell.msen.com> <16F4DC5D-25C4-4F0B-A5C0-706E3B1C212F@gmail.com> Message-ID: <102bd672-1357-10ae-4a24-741e00e93d9c@shingarov.com> On 7/5/20 6:05 PM, Eliot Miranda wrote: > > now is the best time ever to attempt a 64-bit or 32-bit PPC JIT ..."attempt"??  I have most of it working already.  I'll ping you when I get it to the same point where we reached with i386 and arm (i.e. booting the Reader and being able to evaluate "100 factorial"). From commits at source.squeak.org Mon Jul 6 17:09:52 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Mon, 6 Jul 2020 17:09:52 0000 Subject: [Vm-dev] VM Maker: VMMaker.oscog-eem.2772.mcz Message-ID: Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2772.mcz ==================== Summary ==================== Name: VMMaker.oscog-eem.2772 Author: eem Time: 6 July 2020, 10:09:36.962415 am UUID: 925a3892-829d-4417-bd5b-1a6a26678025 Ancestors: VMMaker.oscog-eem.2771 VM Parameters primitive(s). Fix the issue with the allocation failure test on 32-bit systems. It really is a Vm bug that parameter #67 must be a SmallInteger. It should be a positive machine integer. =============== Diff against VMMaker.oscog-eem.2771 =============== Item was changed: ----- Method: StackInterpreterPrimitives>>primitiveAllVMParameters: (in category 'system control primitives') ----- primitiveAllVMParameters: paramsArraySize + "See primitiveVMParameter method comment. + N.B. use storePointerUnchecked:and finally beRootIfOld: to save size and time" - "See primitiveVMParameter method comment" | result | result := objectMemory instantiateClass: (objectMemory splObj: ClassArray) indexableSize: paramsArraySize. objectMemory storePointerUnchecked: 0 ofObject: result withValue: (self positiveMachineIntegerFor: objectMemory oldSpaceSize). objectMemory storePointerUnchecked: 1 ofObject: result withValue: (objectMemory integerObjectOf: objectMemory newSpaceSize). objectMemory storePointerUnchecked: 2 ofObject: result withValue: (self positiveMachineIntegerFor: objectMemory totalMemorySize). "objectMemory storePointerUnchecked: 3 ofObject: result withValue: objectMemory nilObject was allocationCount". "objectMemory storePointerUnchecked: 4 ofObject: result withValue: objectMemory nilObject allocationsBetweenGCs". objectMemory storePointerUnchecked: 5 ofObject: result withValue: (objectMemory integerObjectOf: objectMemory tenuringThreshold). objectMemory storePointerUnchecked: 6 ofObject: result withValue: (objectMemory integerObjectOf: objectMemory statFullGCs). objectMemory storePointerUnchecked: 7 ofObject: result withValue: (objectMemory integerObjectOf: objectMemory statFullGCUsecs + 500 // 1000). objectMemory storePointerUnchecked: 8 ofObject: result withValue: (objectMemory integerObjectOf: (objectMemory hasSpurMemoryManagerAPI ifTrue: [objectMemory statScavenges] ifFalse: [objectMemory statIncrGCs])). objectMemory storePointerUnchecked: 9 ofObject: result withValue: (objectMemory integerObjectOf: (objectMemory hasSpurMemoryManagerAPI ifTrue: [objectMemory statScavengeGCUsecs] ifFalse: [objectMemory statIncrGCUsecs]) + 500 // 1000). objectMemory storePointerUnchecked: 10 ofObject: result withValue: (objectMemory integerObjectOf: objectMemory statTenures). "JITTER VM info unused; 11 - 14/12 - 15 available for reuse" 11 to: 18 do: [:i | objectMemory storePointerUnchecked: i ofObject: result withValue: ConstZero]. objectMemory storePointerUnchecked: 15 ofObject: result withValue: (objectMemory positive64BitIntegerFor: statIdleUsecs). (SistaVM and: [self isCog]) ifTrue: [objectMemory storePointerUnchecked: 16 ofObject: result withValue: (objectMemory floatObjectOf: self getCogCodeZoneThreshold)]. objectMemory hasSpurMemoryManagerAPI ifTrue: [objectMemory storePointerUnchecked: 17 ofObject: result withValue: (objectMemory integerObjectOf: objectMemory statCompactionUsecs + 500 // 1000); storePointerUnchecked: 18 ofObject: result withValue: (objectMemory integerObjectOf: objectMemory scavengeThresholdAsExtent)]. objectMemory storePointerUnchecked: 19 ofObject: result withValue: (objectMemory positive64BitIntegerFor: self ioUTCStartMicroseconds). objectMemory storePointerUnchecked: 20 ofObject: result withValue: (objectMemory integerObjectOf: objectMemory rootTableCount). objectMemory storePointerUnchecked: 21 ofObject: result withValue: (objectMemory integerObjectOf: objectMemory statRootTableOverflows). objectMemory storePointerUnchecked: 22 ofObject: result withValue: (objectMemory integerObjectOf: extraVMMemory). objectMemory storePointerUnchecked: 23 ofObject: result withValue: (objectMemory integerObjectOf: objectMemory shrinkThreshold). objectMemory storePointerUnchecked: 24 ofObject: result withValue: (objectMemory integerObjectOf: objectMemory growHeadroom). objectMemory storePointerUnchecked: 25 ofObject: result withValue: (objectMemory integerObjectOf: self ioHeartbeatMilliseconds). objectMemory storePointerUnchecked: 26 ofObject: result withValue: (objectMemory integerObjectOf: objectMemory statMarkCount). objectMemory storePointerUnchecked: 27 ofObject: result withValue: (objectMemory integerObjectOf: objectMemory statSweepCount). objectMemory storePointerUnchecked: 28 ofObject: result withValue: (objectMemory integerObjectOf: objectMemory statMkFwdCount). objectMemory storePointerUnchecked: 29 ofObject: result withValue: (objectMemory integerObjectOf: objectMemory statCompMoveCount). objectMemory storePointerUnchecked: 30 ofObject: result withValue: (objectMemory integerObjectOf: objectMemory statGrowMemory). objectMemory storePointerUnchecked: 31 ofObject: result withValue: (objectMemory integerObjectOf: objectMemory statShrinkMemory). objectMemory storePointerUnchecked: 32 ofObject: result withValue: (objectMemory integerObjectOf: objectMemory statRootTableCount). objectMemory hasSpurMemoryManagerAPI ifTrue: "was statAllocationCount" [objectMemory storePointerUnchecked: 33 ofObject: result withValue: (objectMemory positive64BitIntegerFor: objectMemory currentAllocatedBytes)]. objectMemory storePointerUnchecked: 34 ofObject: result withValue: (objectMemory integerObjectOf: objectMemory statSurvivorCount). objectMemory storePointerUnchecked: 35 ofObject: result withValue: (objectMemory integerObjectOf: (self microsecondsToMilliseconds: objectMemory statGCEndUsecs)). objectMemory storePointerUnchecked: 36 ofObject: result withValue: (objectMemory integerObjectOf: objectMemory statSpecialMarkCount). objectMemory storePointerUnchecked: 37 ofObject: result withValue: (objectMemory integerObjectOf: objectMemory statIGCDeltaUsecs + 500 // 1000). objectMemory storePointerUnchecked: 38 ofObject: result withValue: (objectMemory integerObjectOf: statPendingFinalizationSignals). objectMemory storePointerUnchecked: 39 ofObject: result withValue: (objectMemory integerObjectOf: objectMemory wordSize). objectMemory storePointerUnchecked: 40 ofObject: result withValue: (objectMemory integerObjectOf: self imageFormatVersion). objectMemory storePointerUnchecked: 41 ofObject: result withValue: (objectMemory integerObjectOf: numStackPages). objectMemory storePointerUnchecked: 42 ofObject: result withValue: (objectMemory integerObjectOf: desiredNumStackPages). objectMemory storePointerUnchecked: 43 ofObject: result withValue: (objectMemory integerObjectOf: objectMemory edenBytes). objectMemory storePointerUnchecked: 44 ofObject: result withValue: (objectMemory integerObjectOf: desiredEdenBytes). objectMemory storePointerUnchecked: 45 ofObject: result withValue: self getCogCodeSize. objectMemory storePointerUnchecked: 46 ofObject: result withValue: self getDesiredCogCodeSize. objectMemory storePointerUnchecked: 47 ofObject: result withValue: self getCogVMFlags. objectMemory storePointerUnchecked: 48 ofObject: result withValue: (objectMemory integerObjectOf: self ioGetMaxExtSemTableSize). "50 & 51 (49 & 50) reserved for parameters that persist in the image" objectMemory storePointerUnchecked: 51 ofObject: result withValue: (objectMemory integerObjectOf: objectMemory rootTableCapacity). objectMemory hasSpurMemoryManagerAPI ifTrue: [objectMemory storePointerUnchecked: 52 ofObject: result withValue: (objectMemory integerObjectOf: objectMemory numSegments); storePointerUnchecked: 53 ofObject: result withValue: (objectMemory integerObjectOf: objectMemory freeSize); storePointerUnchecked: 54 ofObject: result withValue: (objectMemory floatObjectOf: objectMemory getHeapGrowthToSizeGCRatio)]. + objectMemory storePointerUnchecked: 55 ofObject: result withValue: (self positive64BitIntegerFor: statProcessSwitch). + objectMemory storePointerUnchecked: 56 ofObject: result withValue: (self positive64BitIntegerFor: statIOProcessEvents). + objectMemory storePointerUnchecked: 57 ofObject: result withValue: (self positive64BitIntegerFor: statForceInterruptCheck). + objectMemory storePointerUnchecked: 58 ofObject: result withValue: (self positive64BitIntegerFor: statCheckForEvents). + objectMemory storePointerUnchecked: 59 ofObject: result withValue: (self positive64BitIntegerFor: statStackOverflow). + objectMemory storePointerUnchecked: 60 ofObject: result withValue: (self positive64BitIntegerFor: statStackPageDivorce). + objectMemory storePointerUnchecked: 61 ofObject: result withValue: self getCodeCompactionCount. + objectMemory storePointerUnchecked: 62 ofObject: result withValue: self getCodeCompactionMSecs. + objectMemory storePointerUnchecked: 63 ofObject: result withValue: self getCogMethodCount. + objectMemory storePointerUnchecked: 64 ofObject: result withValue: self getCogVMFeatureFlags. + objectMemory storePointerUnchecked: 65 ofObject: result withValue: (objectMemory integerObjectOf: self stackPageByteSize). - objectMemory storePointerUnchecked: 55 ofObject: result withValue: (self positive64BitIntegerFor: statProcessSwitch). - objectMemory storePointerUnchecked: 56 ofObject: result withValue: (self positive64BitIntegerFor: statIOProcessEvents). - objectMemory storePointerUnchecked: 57 ofObject: result withValue: (self positive64BitIntegerFor: statForceInterruptCheck). - objectMemory storePointerUnchecked: 58 ofObject: result withValue: (self positive64BitIntegerFor: statCheckForEvents). - objectMemory storePointerUnchecked: 59 ofObject: result withValue: (self positive64BitIntegerFor: statStackOverflow). - objectMemory storePointerUnchecked: 60 ofObject: result withValue: (self positive64BitIntegerFor: statStackPageDivorce). - objectMemory storePointerUnchecked: 61 ofObject: result withValue: self getCodeCompactionCount. - objectMemory storePointerUnchecked: 62 ofObject: result withValue: self getCodeCompactionMSecs. - objectMemory storePointerUnchecked: 63 ofObject: result withValue: self getCogMethodCount. - objectMemory storePointerUnchecked: 64 ofObject: result withValue: self getCogVMFeatureFlags. - objectMemory storePointerUnchecked: 65 ofObject: result withValue: (objectMemory integerObjectOf: self stackPageByteSize). objectMemory hasSpurMemoryManagerAPI ifTrue: [objectMemory + storePointerUnchecked: 66 ofObject: result withValue: (self positiveMachineIntegerFor: objectMemory maxOldSpaceSize)]. - storePointerUnchecked: 66 ofObject: result withValue: (objectMemory integerObjectOf: objectMemory maxOldSpaceSize)]. objectMemory storePointerUnchecked: 67 ofObject: result withValue: (objectMemory floatObjectOf: stackPages statAverageLivePagesWhenMapping). objectMemory storePointerUnchecked: 68 ofObject: result withValue: (objectMemory integerObjectOf: stackPages statMaxPageCountWhenMapping). objectMemory storePointerUnchecked: 69 ofObject: result withValue: (objectMemory integerObjectOf: self vmProxyMajorVersion). objectMemory storePointerUnchecked: 70 ofObject: result withValue: (objectMemory integerObjectOf: self vmProxyMinorVersion). + objectMemory storePointerUnchecked: 71 ofObject: result withValue: (objectMemory integerObjectOf: objectMemory statMarkUsecs + 500 // 1000). + objectMemory storePointerUnchecked: 72 ofObject: result withValue: (objectMemory integerObjectOf: objectMemory statSweepUsecs + 500 // 1000). - objectMemory storePointerUnchecked: 71 ofObject: result withValue: (objectMemory integerObjectOf: objectMemory statMarkUsecs + 500 // 1000). - objectMemory storePointerUnchecked: 72 ofObject: result withValue: (objectMemory integerObjectOf: objectMemory statSweepUsecs + 500 // 1000). objectMemory hasSpurMemoryManagerAPI ifTrue: [objectMemory storePointerUnchecked: 73 ofObject: result withValue: (objectMemory integerObjectOf: objectMemory statMaxAllocSegmentTime + 500 // 1000)]. + objectMemory storePointerUnchecked: 74 ofObject: result withValue: (objectMemory booleanObjectOf: self primitiveDoMixedArithmetic). - objectMemory storePointerUnchecked: 74 ofObject: result withValue: (objectMemory booleanObjectOf: self primitiveDoMixedArithmetic). objectMemory beRootIfOld: result. self methodReturnValue: result! Item was changed: ----- Method: StackInterpreterPrimitives>>primitiveGetVMParameter: (in category 'system control primitives') ----- primitiveGetVMParameter: arg "See primitiveVMParameter method comment. N.B. written as a returning case to avoid branch limits in the V3 bytecode set." arg caseOf: { [1] -> [^self positiveMachineIntegerFor: objectMemory oldSpaceSize]. [2] -> [^objectMemory integerObjectOf: objectMemory newSpaceSize]. [3] -> [^self positiveMachineIntegerFor: objectMemory totalMemorySize]. [6] -> [^objectMemory integerObjectOf: objectMemory tenuringThreshold]. [7] -> [^objectMemory integerObjectOf: objectMemory statFullGCs]. [8] -> [^objectMemory integerObjectOf: objectMemory statFullGCUsecs + 500 // 1000]. [9] -> [^objectMemory integerObjectOf: (objectMemory hasSpurMemoryManagerAPI ifTrue: [objectMemory statScavenges] ifFalse: [objectMemory statIncrGCs])]. [10] -> [^objectMemory integerObjectOf: (objectMemory hasSpurMemoryManagerAPI ifTrue: [objectMemory statScavengeGCUsecs] ifFalse: [objectMemory statIncrGCUsecs]) + 500 // 1000]. [11] -> [^objectMemory integerObjectOf: objectMemory statTenures]. [12] -> [^ConstZero]. "Was JITTER VM info" [13] -> [^ConstZero]. "Was JITTER VM info" [14] -> [^ConstZero]. "Was JITTER VM info" [15] -> [^ConstZero]. "Was JITTER VM info" [16] -> [^self positive64BitIntegerFor: statIdleUsecs]. [17] -> [^(SistaVM and: [self isCog]) ifTrue: [objectMemory floatObjectOf: self getCogCodeZoneThreshold] ifFalse: [ConstZero]]. [18] -> [^objectMemory hasSpurMemoryManagerAPI ifTrue: [objectMemory integerObjectOf: objectMemory statCompactionUsecs + 500 // 1000] ifFalse: [ConstZero]]. [19] -> [^objectMemory hasSpurMemoryManagerAPI ifTrue: [objectMemory integerObjectOf: objectMemory scavengeThresholdAsExtent] ifFalse: [ConstZero]]. [20] -> [^objectMemory positive64BitIntegerFor: self ioUTCStartMicroseconds]. [21] -> [^objectMemory integerObjectOf: objectMemory rootTableCount]. [22] -> [^objectMemory integerObjectOf: objectMemory statRootTableOverflows]. [23] -> [^objectMemory integerObjectOf: extraVMMemory]. [24] -> [^objectMemory integerObjectOf: objectMemory shrinkThreshold]. [25] -> [^objectMemory integerObjectOf: objectMemory growHeadroom]. [26] -> [^objectMemory integerObjectOf: self ioHeartbeatMilliseconds]. [27] -> [^objectMemory integerObjectOf: objectMemory statMarkCount]. [28] -> [^objectMemory integerObjectOf: objectMemory statSweepCount]. [29] -> [^objectMemory integerObjectOf: objectMemory statMkFwdCount]. [30] -> [^objectMemory integerObjectOf: objectMemory statCompMoveCount]. [31] -> [^objectMemory integerObjectOf: objectMemory statGrowMemory]. [32] -> [^objectMemory integerObjectOf: objectMemory statShrinkMemory]. [33] -> [^objectMemory integerObjectOf: objectMemory statRootTableCount]. [34] -> [^objectMemory hasSpurMemoryManagerAPI ifTrue:"was statAllocationCount" [objectMemory positive64BitIntegerFor: objectMemory currentAllocatedBytes]]. [35] -> [^objectMemory integerObjectOf: objectMemory statSurvivorCount]. [36] -> [^objectMemory integerObjectOf: (self microsecondsToMilliseconds: objectMemory statGCEndUsecs)]. [37] -> [^objectMemory integerObjectOf: objectMemory statSpecialMarkCount]. [38] -> [^objectMemory integerObjectOf: objectMemory statIGCDeltaUsecs + 500 // 1000]. [39] -> [^objectMemory integerObjectOf: statPendingFinalizationSignals]. [40] -> [^objectMemory integerObjectOf: objectMemory wordSize]. [41] -> [^objectMemory integerObjectOf: self imageFormatVersion]. [42] -> [^objectMemory integerObjectOf: numStackPages]. [43] -> [^objectMemory integerObjectOf: desiredNumStackPages]. [44] -> [^objectMemory integerObjectOf: objectMemory edenBytes]. [45] -> [^objectMemory integerObjectOf: desiredEdenBytes]. [46] -> [^self getCogCodeSize]. [47] -> [^self getDesiredCogCodeSize]. [48] -> [^self getCogVMFlags]. [49] -> [^objectMemory integerObjectOf: self ioGetMaxExtSemTableSize]. [52] -> [^objectMemory integerObjectOf: objectMemory rootTableCapacity]. [53] -> [^objectMemory hasSpurMemoryManagerAPI ifTrue: [objectMemory integerObjectOf: objectMemory numSegments]]. [54] -> [^objectMemory hasSpurMemoryManagerAPI ifTrue: [objectMemory integerObjectOf: objectMemory freeSize]]. [55] -> [^objectMemory hasSpurMemoryManagerAPI ifTrue: [objectMemory floatObjectOf: objectMemory getHeapGrowthToSizeGCRatio]]. [56] -> [^self positive64BitIntegerFor: statProcessSwitch]. [57] -> [^self positive64BitIntegerFor: statIOProcessEvents]. [58] -> [^self positive64BitIntegerFor: statForceInterruptCheck]. [59] -> [^self positive64BitIntegerFor: statCheckForEvents]. [60] -> [^self positive64BitIntegerFor: statStackOverflow]. [61] -> [^self positive64BitIntegerFor: statStackPageDivorce]. [62] -> [^self getCodeCompactionCount]. [63] -> [^self getCodeCompactionMSecs]. [64] -> [^self getCogMethodCount]. [65] -> [^self getCogVMFeatureFlags]. [66] -> [^objectMemory integerObjectOf: self stackPageByteSize]. [67] -> [^objectMemory hasSpurMemoryManagerAPI ifTrue: + [self positiveMachineIntegerFor: objectMemory maxOldSpaceSize]]. - [objectMemory integerObjectOf: objectMemory maxOldSpaceSize]]. [68] -> [^objectMemory floatObjectOf: stackPages statAverageLivePagesWhenMapping]. [69] -> [^objectMemory integerObjectOf: stackPages statMaxPageCountWhenMapping]. [70] -> [^objectMemory integerObjectOf: self vmProxyMajorVersion]. [71] -> [^objectMemory integerObjectOf: self vmProxyMinorVersion]. [72] -> [^objectMemory integerObjectOf: objectMemory statMarkUsecs + 500 // 1000]. [73] -> [^objectMemory integerObjectOf: objectMemory statSweepUsecs + 500 // 1000]. [74] -> [^objectMemory hasSpurMemoryManagerAPI ifTrue: [objectMemory integerObjectOf: objectMemory statMaxAllocSegmentTime + 500 // 1000]]. [75] -> [^objectMemory booleanObjectOf: self primitiveDoMixedArithmetic] } otherwise: [^nil]! Item was changed: ----- Method: StackInterpreterPrimitives>>primitiveSetVMParameter:arg: (in category 'system control primitives') ----- primitiveSetVMParameter: index arg: argOop "See primitiveVMParameter method comment" | arg result | + "argOop read & checks; in most cases this is an integer parameter. Handle the exceptions." + index + caseOf: { + [17] -> [((objectMemory isFloatInstance: argOop) + or: [objectMemory isIntegerObject: argOop]) ifFalse: + [primFailCode := PrimErrBadArgument]]. + [55] -> [((objectMemory isFloatInstance: argOop) + or: [objectMemory isIntegerObject: argOop]) ifFalse: + [primFailCode := PrimErrBadArgument]]. + [68] -> [((objectMemory isFloatInstance: argOop) + or: [objectMemory isIntegerObject: argOop]) ifFalse: + [primFailCode := PrimErrBadArgument]]. + [67] -> [arg := self positiveMachineIntegerValueOf: argOop]. + [75] -> [arg := objectMemory booleanValueOf: argOop] } + otherwise: [arg := objectMemory integerValueOf: argOop]. + self failed ifTrue: + [^self primitiveFailFor: PrimErrBadArgument]. - "argOop read & checks; in most cases this is an integer parameter. In some it is either an integer or a Float" - index = 75 - ifTrue: - [ arg := objectMemory booleanValueOf: argOop. - self failed ifTrue: [^self primitiveFailFor: PrimErrBadArgument]] - ifFalse: [(index = 17 or: [index = 55 or: [index = 68]]) - ifTrue: - [((objectMemory isFloatInstance: argOop) - or: [objectMemory isIntegerObject: argOop]) ifFalse: - [^self primitiveFailFor: PrimErrBadArgument]] - ifFalse: [(objectMemory isIntegerObject: argOop) ifFalse: - [^self primitiveFailFor: PrimErrBadArgument]. - arg := objectMemory integerValueOf: argOop]]. "assume failure, then set success for handled indices" self primitiveFailFor: PrimErrBadArgument. index caseOf: { [5] -> [objectMemory hasSpurMemoryManagerAPI ifFalse: ["Was: result := allocationsBetweenGCs. allocationsBetweenGCs := arg." "Ignore for now, because old images won't start up otherwise. See 45 for eden size setting." result := objectMemory nilObject. self initPrimCall]]. [6] -> [result := objectMemory integerObjectOf: objectMemory tenuringThreshold. primFailCode := objectMemory tenuringThreshold: arg]. [11] -> [arg >= 0 ifTrue: [result := objectMemory integerObjectOf: objectMemory statTenures. objectMemory statTenures: arg. self initPrimCall]]. [17] -> [(SistaVM and: [self isCog]) ifTrue: [result := objectMemory floatObjectOf: self getCogCodeZoneThreshold. primFailCode := self setCogCodeZoneThreshold: (self noInlineLoadFloatOrIntFrom: argOop)]]. [23] -> [result := objectMemory integerObjectOf: extraVMMemory. extraVMMemory := arg. self initPrimCall]. [24] -> [arg > 0 ifTrue: [result := objectMemory integerObjectOf: objectMemory shrinkThreshold. objectMemory shrinkThreshold: arg. self initPrimCall]]. [25] -> [arg > 0 ifTrue: [result := objectMemory integerObjectOf: objectMemory growHeadroom. objectMemory growHeadroom: arg. self initPrimCall]]. [26] -> [arg >= 0 ifTrue: "0 turns off the heartbeat" [result := objectMemory integerObjectOf: self ioHeartbeatMilliseconds. self ioSetHeartbeatMilliseconds: arg. self initPrimCall]]. [34] -> [(objectMemory hasSpurMemoryManagerAPI "was statAllocationCount; now statAllocatedBytes" and: [arg >= 0]) ifTrue: [result := objectMemory positive64BitIntegerFor: objectMemory currentAllocatedBytes. objectMemory setCurrentAllocatedBytesTo: arg. self initPrimCall]]. [43] -> [(arg between: 0 and: 65535) ifTrue: [result := objectMemory integerObjectOf: desiredNumStackPages. desiredNumStackPages := arg. self initPrimCall]]. [45] -> [arg >= 0 ifTrue: [result := objectMemory integerObjectOf: desiredEdenBytes. desiredEdenBytes := arg. self initPrimCall]]. [47] -> [(self isCog and: [arg between: 0 and: self maxCogCodeSize]) ifTrue: [result := objectMemory integerObjectOf: self getDesiredCogCodeSize. self setDesiredCogCodeSize: arg. self initPrimCall]]. [48] -> [arg >= 0 ifTrue: [| oldPrimitiveDoMixedArithmetic | oldPrimitiveDoMixedArithmetic := primitiveDoMixedArithmetic. result := objectMemory integerObjectOf: self getCogVMFlags. self initPrimCall. "i.e. setCogVMFlags: can fail" self setCogVMFlags: arg. (primFailCode = 0 and: [oldPrimitiveDoMixedArithmetic ~= primitiveDoMixedArithmetic]) ifTrue: [self flushMethodCache. self flushMethodsWithMachineCodePrimitivesAndContinueAnswering: result "NOT REACHED (in CoInterpreter)"]]]. [49] -> [(arg between: 0 and: 65535) ifTrue: [result := objectMemory integerObjectOf: self ioGetMaxExtSemTableSize. self initPrimCall. "i.e. ioSetMaxExtSemTableSize: is allowed to fail" self setMaxExtSemSizeTo: arg]]. [55] -> [objectMemory hasSpurMemoryManagerAPI ifTrue: [result := objectMemory floatObjectOf: objectMemory getHeapGrowthToSizeGCRatio. primFailCode := objectMemory setHeapGrowthToSizeGCRatio: (self noInlineLoadFloatOrIntFrom: argOop)]]. [67] -> [(arg >= 0 and: [objectMemory hasSpurMemoryManagerAPI]) ifTrue: + [result := self positiveMachineIntegerFor: objectMemory maxOldSpaceSize. - [result := objectMemory integerObjectOf: objectMemory maxOldSpaceSize. primFailCode := objectMemory setMaxOldSpaceSize: arg]]. [68] -> [result := objectMemory floatObjectOf: stackPages statAverageLivePagesWhenMapping. self initPrimCall. "i.e. statAverageLivePagesWhenMapping: is allowed to fail" stackPages statAverageLivePagesWhenMapping: (self noInlineLoadFloatOrIntFrom: argOop)]. [69] -> [arg >= 0 ifTrue: [result := objectMemory integerObjectOf: stackPages statMaxPageCountWhenMapping. stackPages statMaxPageCountWhenMapping: arg. self initPrimCall]]. [74] -> [(arg >= 0 and: [objectMemory hasSpurMemoryManagerAPI]) ifTrue: [result := objectMemory integerObjectOf: objectMemory statMaxAllocSegmentTime + 500 // 1000. stackPages statMaxAllocSegmentTime: arg. "usually 0" self initPrimCall]]. [75] -> [| mustFlush | result := objectMemory booleanObjectOf: self primitiveDoMixedArithmetic. self initPrimCall. mustFlush := primitiveDoMixedArithmetic ~= arg. primitiveDoMixedArithmetic := arg. mustFlush ifTrue: [self flushMethodCache. self flushMethodsWithMachineCodePrimitivesAndContinueAnswering: result "NOT REACHED (in CoInterpreter)"]] } otherwise: []. self successful ifTrue: [self methodReturnValue: result] "return old value" ifFalse: [self primitiveFailFor: PrimErrInappropriate] "attempting to write a read-only or non-existent parameter"! From tim at rowledge.org Mon Jul 6 17:22:15 2020 From: tim at rowledge.org (tim Rowledge) Date: Mon, 6 Jul 2020 10:22:15 -0700 Subject: [Vm-dev] Probably pointless endianness question re: Float changes circa 4.6 In-Reply-To: <689B7921-3C44-46E5-BDF5-555075319393@sonic.net> References: <2C49B96A-C7B5-4009-B57B-351B1A13C358@sonic.net> <1D309501-E3F9-4E2F-A981-FF885D2CB5AC@gmail.com> <20200706004832.GA96544@shell.msen.com> <689B7921-3C44-46E5-BDF5-555075319393@sonic.net> Message-ID: Looks like you've got past the question, but I was going to point out that a) I don't recall any of the various conversion at load things we've ever done taking a noticeable time; and remember I usually have the slowest machines b) endianness of bitmaps may become an issue (again) if we try some of the possible graphics improvement ideas. For my original RISC OS port I actually did convert all bitmaps to little endian and the BitBlt and all the Form related code. > On 2020-07-05, at 10:54 PM, Tim Johnson wrote: > > Hi Dave, > > On Jul 5, 2020, at 5:48 PM, David T. Lewis wrote: > >> To add some detail: >> >> - In a 6504 image, Floats are stored in big-endian format (as Eliot explains above) regardless of >> the endianness of the current platform >> >> - In a 6505 image, Floats are stored in the native platform word ordering for the current platform >> >> - When a 6505 image is loaded into a classic interpreter VM the floats are converted big-endian >> format in ContextInterpreter>>normalizeFloatOrderingInImage which effectively turns it back >> into a 6504 image > > Thank you. This helps me know where to possibly dig into the conversion process. > > Also, I wanted to try this. So I just did: > > 1) I loaded Squeak4.6-13700 (one of the alpha releases) into the 4.10.2-2614 VM on my Raspberry Pi, and then saved it out. > > 2) `ckformat` verifies that the original image was is a 6505 format, and the image I saved out is a 6504 format. > > 3) Transferred it over to my G4, and it very much runs! This particular VM was built with VMMaker 4.4.12. > > Amazing! What an effective solution :) Stepping stone-by-stone into the future... > > >> - When as 6505 image that was saved from a little-endian machine is loaded into an oscog (Cog/Spur) >> VM running on a big-endian platform, it is loaded in the saved format (presumeably little endian) >> >> So ... I am only guessing, but AFAIK we have never tried loading a 6505 image that was saved >> on a little-endian machine into a Cog/Spur VM running on a big-endian platform. Quite possibly >> in needs a word-reversal operation in that case. > > Very interesting. > > Are there any Cog/Spur VMs for big-endian platforms? > > Thanks a lot, > Tim > > tim -- tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim Strange OpCodes: SSAN: Stop, and See if Anyone Notices From tim at rowledge.org Mon Jul 6 17:34:31 2020 From: tim at rowledge.org (tim Rowledge) Date: Mon, 6 Jul 2020 10:34:31 -0700 Subject: [Vm-dev] Probably pointless endianness question re: Float changes circa 4.6 In-Reply-To: <102bd672-1357-10ae-4a24-741e00e93d9c@shingarov.com> References: <20200705211632.GA74588@shell.msen.com> <16F4DC5D-25C4-4F0B-A5C0-706E3B1C212F@gmail.com> <102bd672-1357-10ae-4a24-741e00e93d9c@shingarov.com> Message-ID: <52A2C6FB-C7FE-4F41-9EC4-D40676B98B59@rowledge.org> > On 2020-07-06, at 8:53 AM, Boris Shingarov wrote: > > > On 7/5/20 6:05 PM, Eliot Miranda wrote: >> now is the best time ever to attempt a 64-bit or 32-bit PPC JIT > > ..."attempt"?? I have most of it working already. I'll ping you when I get it to the same point where we reached with i386 and arm (i.e. booting the Reader and being able to evaluate "100 factorial"). > Time for us to start designing an instruction set that properly supports dynamic translation and message sending etc. A Smalltalk that can run on trillions of cores! tim -- tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim Useful random insult:- Has nothing to say, but delights in saying it. From noreply at github.com Mon Jul 6 19:13:53 2020 From: noreply at github.com (Eliot Miranda) Date: Mon, 06 Jul 2020 12:13:53 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] b09b99: CogVM source as per VMMaker.oscog-eem.2772 Message-ID: Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: b09b99f489e7e97f1ba707124865e43aaa93fe6b https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/b09b99f489e7e97f1ba707124865e43aaa93fe6b Author: Eliot Miranda Date: 2020-07-06 (Mon, 06 Jul 2020) Changed paths: M nsspur64src/vm/cogit.h M nsspur64src/vm/cointerp.c M nsspur64src/vm/cointerp.h M nsspur64src/vm/gcc3x-cointerp.c M nsspursrc/vm/cogit.h M nsspursrc/vm/cointerp.c M nsspursrc/vm/cointerp.h M nsspursrc/vm/gcc3x-cointerp.c M nsspurstack64src/vm/gcc3x-interp.c M nsspurstack64src/vm/interp.c M nsspurstacksrc/vm/gcc3x-interp.c M nsspurstacksrc/vm/interp.c M spur64src/vm/cogit.h M spur64src/vm/cointerp.c M spur64src/vm/cointerp.h M spur64src/vm/cointerpmt.c M spur64src/vm/cointerpmt.h M spur64src/vm/gcc3x-cointerp.c M spur64src/vm/gcc3x-cointerpmt.c M spurlowcode64src/vm/cogit.h M spurlowcode64src/vm/cogitARMv8.c M spurlowcode64src/vm/cogitX64SysV.c M spurlowcode64src/vm/cogitX64WIN64.c M spurlowcode64src/vm/cointerp.c M spurlowcode64src/vm/cointerp.h M spurlowcode64src/vm/gcc3x-cointerp.c M spurlowcodesrc/vm/cogit.h M spurlowcodesrc/vm/cogitARMv5.c M spurlowcodesrc/vm/cogitIA32.c M spurlowcodesrc/vm/cogitMIPSEL.c M spurlowcodesrc/vm/cointerp.c M spurlowcodesrc/vm/cointerp.h M spurlowcodesrc/vm/gcc3x-cointerp.c M spurlowcodestack64src/vm/gcc3x-interp.c M spurlowcodestack64src/vm/interp.c M spurlowcodestacksrc/vm/gcc3x-interp.c M spurlowcodestacksrc/vm/interp.c M spursista64src/vm/cogit.h M spursista64src/vm/cointerp.c M spursista64src/vm/cointerp.h M spursista64src/vm/gcc3x-cointerp.c M spursistasrc/vm/cogit.h M spursistasrc/vm/cointerp.c M spursistasrc/vm/cointerp.h M spursistasrc/vm/gcc3x-cointerp.c M spursrc/vm/cogit.h M spursrc/vm/cointerp.c M spursrc/vm/cointerp.h M spursrc/vm/cointerpmt.c M spursrc/vm/cointerpmt.h M spursrc/vm/gcc3x-cointerp.c M spursrc/vm/gcc3x-cointerpmt.c M spurstack64src/vm/gcc3x-interp.c M spurstack64src/vm/interp.c M spurstacksrc/vm/gcc3x-interp.c M spurstacksrc/vm/interp.c M src/vm/cogit.h M src/vm/cointerp.c M src/vm/cointerp.h M src/vm/cointerpmt.c M src/vm/cointerpmt.h M src/vm/gcc3x-cointerp.c M src/vm/gcc3x-cointerpmt.c M stacksrc/vm/gcc3x-interp.c M stacksrc/vm/interp.c Log Message: ----------- CogVM source as per VMMaker.oscog-eem.2772 VM Parameters primitive(s). Fix the issue with the allocation failure test on 32-bit systems. It really is a VM bug that parameter #67 (maxOldSpaceSize) must be a SmallInteger. It should be a positive machine integer. From eliot.miranda at gmail.com Mon Jul 6 19:25:57 2020 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon, 6 Jul 2020 12:25:57 -0700 Subject: [Vm-dev] Probably pointless endianness question re: Float changes circa 4.6 In-Reply-To: References: <2C49B96A-C7B5-4009-B57B-351B1A13C358@sonic.net> <1D309501-E3F9-4E2F-A981-FF885D2CB5AC@gmail.com> Message-ID: Hi Tim, On Sun, Jul 5, 2020 at 10:22 PM Tim Johnson wrote: > > Hi Eliot, > > I had a decent draft of this response, and my mail client pooped out when > I hit send. Trying again. If this comes across as terse (I doubt it ;) ), > please forgive. > > On Jul 5, 2020, at 3:00 PM, Eliot Miranda wrote: > > But I'm just hoping to verify here that the Float changes in image format > 6505 could have fatal implications for a big-endian platform like PowerPC > (the formerly-native format for the Floats ;) ) on a "vintage" > stack/interpreter VM, and that perhaps that would have been /expected/ to > be the last straw for it. (A further question might be: how big would the > lift have been to keep it going? Or was that work done and just would > require some extra attention?) > > > I designed the scheme so that it would *not* have fatal implications on > any platform :-) > > > This is a good point. It helps me to improve my question: > > Q: Could my build environment (platform support code, non-oscog VMMaker > sources, Squeak 4.5 hosted-VMMaker) be missing something necessary for the > scheme to work as designed? > > (This question & others summarized below.) > > First let’s understand the representation. A Float is a double-precision > 64-bit ieee float represented as a two element word array. > > Before the changes floats were always stored in the heap in big-endian > format which meant: > > - aFloat at: 1 accessed the most significant word of the float on both big > & little median platforms > - on little endian platforms the vm therefore has to word reverse Float > objects, perform arithmetic to obtain a new 64-big float, and word reverse > it to store it back into a new Float > > This unfairly penalizes little endian platforms. > > > Yes -- no doubt this was an important move. > > > My simple change was three-fold: > 1. A bit in the image header specifies whether floats in the image are in > big-endian format (bit unset) or in platform format (eg big endian on PPC, > little endian on x86). > > 2. on load if required all Floats would be word reversed to ensure they > are in platform order > > > ^^ this is something I'm hoping to instrument or measure; more on that > below. > > > 3. Float at: was modified so that on little endian platforms Float at: 1 > answered the most significant word, just as it does on big endian > platforms, hence hiding from the image the change in layout on little > endian platforms and avoiding having to do any word reversal in arithmetic > on any platforms > > > So what I did leveled the playing field. How does this have fatal > consequences for big endian platforms? > > > Well, I mean, that's so similar to the question I was trying to get > across: could it? And, if so, under which conditions? > Since the scheme moves the cost into Float>>at:[put:] it would be I guess in serializing/deserializing floats etc. But I doubt the difference would be measurable; it'll be swamped by other effects. > > I definitely didn't mean to sound conclusive or be finger-pointy, and I'm > sorry if it read that way. > And I don't mean to sound attacked either. I was really just curious. Had I not seem something that would affect big-endian platforms (Cog has yet to be compiled on a big endian platform)? > > After getting the 6505 format image to load & the world to (mostly) > display, it felt like a small victory. But then seeing Float-related > errors in SqueakDebug.log after force-quitting made me think this > conversion process could be related, and I hoped to gather more info. > Yes. The Interpreter VM may be missing the closure support, or correct implementation of the closure support. But it may not. I haven't used it. Dave would know what the state of play is. > Note that the word reversal on Float at: is for free because the primitive > only takes 1&2 as valid indices, so the implementation is really cheap. So > in fact what I did was ensure that fp was as fast as possible on both > platforms and (consciously) didn’t penalize either platform. > > > Does this explanation make the scheme seem more sensible now? > > > I really appreciate this explanation. All I could find previously on this > subject was that thread I linked in my prior message, which didn't > indicate which path was actually chosen. This helps make it clear. > > From my easy chair, your scheme looks brilliant and thorough. I never > meant to suggest otherwise, and am also totally underprepared and > underqualified to do so. The only thing not sensible here is that I'm > trying to build & update a ten-year-old snapshot of the code for the Mac VM > on an antiquated machine based on a niche architecture. :) > Sorry. I should have tried to craft my tone netter. > Your & Dave's responses have helped me to hone my question(s): > > Q: Did this Float scheme for 6505 require a change to the VM in order to > function properly? If so, (similar to what I asked above) is it possible > that the VM I am building is missing some part of that change? (Whether > that is something that exists in VMMaker-oscog but didn't make it to > VMMaker, or whether it's some platform support code, or a changed version > of a primitive...) If not, I am probably barking up the wrong tree. > IIRC, yes. There's a macro in sqwMemoryAccess.h to access floats that always did the reversal on little-endian platforms. This isn't necessary with 6505. So look at sqMemoryAccess.h in your platform sources and in the opensmalltalk-vm sources and that should help you decide what the right solution is. > Q: How long might I expect the Float conversion at load (#2 above) to > take, on a slower image running on a slower computer? Milliseconds, > seconds, minutes, or longer? If I wanted to log it, trace it, or debug it, > how could I find it? (Dave helped with this, thanks: > ContextInterpreter>>normalizeFloatOrderingInImage ) > Oh, nothing noticabl;e. The conversion only happens when the endianness is changing. So in normal use you shouldn't see any slow down. > Q: If I spend the time to figure this out and do something about it, is > there any way it could benefit anyone other than myself? > Well any fix should go into the platform sources for the Interpreter VM. > That is the crux of my previous blathering about any hypothetical > big-endian platforms of the future. > > I hope I haven't wasted your time or energy, Eliot. Thanks a lot for your > explanation. > Not at all. _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: From eliot.miranda at gmail.com Mon Jul 6 19:27:24 2020 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon, 6 Jul 2020 12:27:24 -0700 Subject: [Vm-dev] Probably pointless endianness question re: Float changes circa 4.6 In-Reply-To: <102bd672-1357-10ae-4a24-741e00e93d9c@shingarov.com> References: <20200705211632.GA74588@shell.msen.com> <16F4DC5D-25C4-4F0B-A5C0-706E3B1C212F@gmail.com> <102bd672-1357-10ae-4a24-741e00e93d9c@shingarov.com> Message-ID: Hi Boris, On Mon, Jul 6, 2020 at 8:53 AM Boris Shingarov wrote: > > > On 7/5/20 6:05 PM, Eliot Miranda wrote: > > > > now is the best time ever to attempt a 64-bit or 32-bit PPC JIT > > ..."attempt"?? I have most of it working already. I'll ping you when I > get it to the same point where we reached with i386 and arm (i.e. > booting the Reader and being able to evaluate "100 factorial"). > Wonderful news!! Why haven;t you committed anything so we can see your work in progress?? Please, I'd love to see it. _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: From builds at travis-ci.org Mon Jul 6 19:59:49 2020 From: builds at travis-ci.org (Travis CI) Date: Mon, 06 Jul 2020 19:59:49 +0000 Subject: [Vm-dev] Errored: OpenSmalltalk/opensmalltalk-vm#2103 (Cog - b09b99f) In-Reply-To: Message-ID: <5f0382b54bb60_13fc38e451f5034841d@travis-tasks-5cc4469fc7-5h99q.mail> Build Update for OpenSmalltalk/opensmalltalk-vm ------------------------------------- Build: #2103 Status: Errored Duration: 45 mins and 31 secs Commit: b09b99f (Cog) Author: Eliot Miranda Message: CogVM source as per VMMaker.oscog-eem.2772 VM Parameters primitive(s). Fix the issue with the allocation failure test on 32-bit systems. It really is a VM bug that parameter #67 (maxOldSpaceSize) must be a SmallInteger. It should be a positive machine integer. View the changeset: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/5d03fae3e9f0...b09b99f489e7 View the full build log and details: https://travis-ci.org/github/OpenSmalltalk/opensmalltalk-vm/builds/705523029?utm_medium=notification&utm_source=email -- You can unsubscribe from build emails from the OpenSmalltalk/opensmalltalk-vm repository going to https://travis-ci.org/account/preferences/unsubscribe?repository=8795279&utm_medium=notification&utm_source=email. Or unsubscribe from *all* email updating your settings at https://travis-ci.org/account/preferences/unsubscribe?utm_medium=notification&utm_source=email. Or configure specific recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jecel at merlintec.com Mon Jul 6 20:04:41 2020 From: jecel at merlintec.com (Jecel Assumpcao Jr) Date: Mon, 6 Jul 2020 17:04:41 -0300 Subject: [Vm-dev] Probably pointless endianness question re: Float changes circa 4.6 In-Reply-To: <52A2C6FB-C7FE-4F41-9EC4-D40676B98B59@rowledge.org> References: <20200705211632.GA74588@shell.msen.com> <16F4DC5D-25C4-4F0B-A5C0-706E3B1C212F@gmail.com> <102bd672-1357-10ae-4a24-741e00e93d9c@shingarov.com> <52A2C6FB-C7FE-4F41-9EC4-D40676B98B59@rowledge.org> Message-ID: <20200706200445.1538613C078D@proxy.email-ssl.com.br> Tim Rowledge wrote on Mon, 6 Jul 2020 10:34:31 -0700 > Time for us to start designing an instruction set that > properly supports dynamic translation and message > sending etc. A Smalltalk that can run on trillions of cores! It is work in progress... -- Jecel From eliot.miranda at gmail.com Tue Jul 7 00:43:01 2020 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon, 6 Jul 2020 17:43:01 -0700 Subject: [Vm-dev] Errored: OpenSmalltalk/opensmalltalk-vm#2103 (Cog - b09b99f) In-Reply-To: <5f0382b54bb60_13fc38e451f5034841d@travis-tasks-5cc4469fc7-5h99q.mail> References: <5f0382b54bb60_13fc38e451f5034841d@travis-tasks-5cc4469fc7-5h99q.mail> Message-ID: The macos32x86 job "The job exceeded the maximum log length, and has been terminated." Seriously?!?! On Mon, Jul 6, 2020 at 12:59 PM Travis CI wrote: > > > OpenSmalltalk > > / > > opensmalltalk-vm > > > > [image: branch icon]Cog > > [image: build has errored] > Build #2103 has errored > > [image: arrow to build time] > [image: clock icon]45 mins and 31 secs > > [image: Eliot Miranda avatar]Eliot Miranda > b09b99f CHANGESET → > > > CogVM source as per VMMaker.oscog-eem.2772 > > VM Parameters primitive(s). Fix the issue with the allocation failure test > on > 32-bit systems. It really is a VM bug that parameter #67 (maxOldSpaceSize) > must be a SmallInteger. It should be a positive machine integer. > > Want to know about upcoming build environment updates? > > Would you like to stay up-to-date with the upcoming Travis CI build > environment updates? We set up a mailing list for you! > SIGN UP HERE > > [image: book icon] > > Documentation about Travis CI > Have any questions? We're here to help. > Unsubscribe > > from build emails from the OpenSmalltalk/opensmalltalk-vm repository. > To unsubscribe from *all* build emails, please update your settings > . > > [image: black and white travis ci logo] > > Travis CI GmbH, Rigaer Str. 8, 10427 Berlin, Germany | GF/CEO: Randy > Jacops | Contact: contact at travis-ci.com | Amtsgericht Charlottenburg, > Berlin, HRB 140133 B | Umsatzsteuer-ID gemäß §27 a Umsatzsteuergesetz: > DE282002648 > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: From noreply at github.com Tue Jul 7 02:27:32 2020 From: noreply at github.com (Eliot Miranda) Date: Mon, 06 Jul 2020 19:27:32 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 839a5c: MacOS: Message-ID: Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: 839a5cab095a76160d4b66c2fcd6e13d898ea0c9 https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/839a5cab095a76160d4b66c2fcd6e13d898ea0c9 Author: Eliot Miranda Date: 2020-07-06 (Mon, 06 Jul 2020) Changed paths: M build.macos32x86/common/Makefile.app M build.macos32x86/common/Makefile.flags M build.macos32x86/common/Makefile.lib.extra M build.macos64x64/common/Makefile.app M build.macos64x64/common/Makefile.flags M build.macos64x64/common/Makefile.lib.extra M platforms/iOS/vm/OSX/sqMacUnixExternalPrims.m Log Message: ----------- MacOS: Revise the install_name_tool machinations in the light of experience with the Terf plugins and examination of e.g. Xcode,app. When including dylibs from elsewhere in Contents/Frameworks they should have an id of @rpath/foo.M.dylib and access any dylibs they load from Contents/Frameworks should also be named @rpath/bar.N.dylib, etc. Likewise the executable should include an rpath for Contents/Resources (we'd like it to be Contents/PlugIns but this seems to break something), and Contents/Frameworks. It turns out that Xcode.app uses both @executable_path/../Frameworks & @executable_path/../PlugIns. We're close but not quite there yet. Add similar debug printing to tryLoadingLinked as is in tryLoadingInternals. From digit at sonic.net Tue Jul 7 03:03:32 2020 From: digit at sonic.net (Tim Johnson) Date: Mon, 6 Jul 2020 20:03:32 -0700 Subject: [Vm-dev] Probably pointless endianness question re: Float changes circa 4.6 In-Reply-To: References: <20200705211632.GA74588@shell.msen.com> <16F4DC5D-25C4-4F0B-A5C0-706E3B1C212F@gmail.com> <102bd672-1357-10ae-4a24-741e00e93d9c@shingarov.com> Message-ID: <0FD2348B-AE7B-403D-A0CD-7C8A369FED04@sonic.net> On Jul 6, 2020, at 12:27 PM, Eliot Miranda wrote: > On Mon, Jul 6, 2020 at 8:53 AM Boris Shingarov > wrote: > > > On 7/5/20 6:05 PM, Eliot Miranda wrote: > > > > now is the best time ever to attempt a 64-bit or 32-bit PPC JIT > > ..."attempt"?? I have most of it working already. I'll ping you > when I > get it to the same point where we reached with i386 and arm (i.e. > booting the Reader and being able to evaluate "100 factorial"). > > Wonderful news!! Why haven;t you committed anything so we can see > your work in progress?? Please, I'd love to see it. +1 Me too! Happy to test & experiment on various systems I have here. They're all old G3, G4, G5s though: no Raptor Talos II or Blackbird POWER ISA workstations in the apartment (yet?). Thanks, Tim -------------- next part -------------- An HTML attachment was scrubbed... URL: From builds at travis-ci.org Tue Jul 7 05:10:30 2020 From: builds at travis-ci.org (Travis CI) Date: Tue, 07 Jul 2020 05:10:30 +0000 Subject: [Vm-dev] Passed: OpenSmalltalk/opensmalltalk-vm#2104 (Cog - 839a5ca) In-Reply-To: Message-ID: <5f0403c5eb33d_13fb2a6dd9abc1137f6@travis-tasks-667fd8d4cc-tqztx.mail> Build Update for OpenSmalltalk/opensmalltalk-vm ------------------------------------- Build: #2104 Status: Passed Duration: 2 hrs, 42 mins, and 50 secs Commit: 839a5ca (Cog) Author: Eliot Miranda Message: MacOS: Revise the install_name_tool machinations in the light of experience with the Terf plugins and examination of e.g. Xcode,app. When including dylibs from elsewhere in Contents/Frameworks they should have an id of @rpath/foo.M.dylib and access any dylibs they load from Contents/Frameworks should also be named @rpath/bar.N.dylib, etc. Likewise the executable should include an rpath for Contents/Resources (we'd like it to be Contents/PlugIns but this seems to break something), and Contents/Frameworks. It turns out that Xcode.app uses both @executable_path/../Frameworks & @executable_path/../PlugIns. We're close but not quite there yet. Add similar debug printing to tryLoadingLinked as is in tryLoadingInternals. View the changeset: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/b09b99f489e7...839a5cab095a View the full build log and details: https://travis-ci.org/github/OpenSmalltalk/opensmalltalk-vm/builds/705636098?utm_medium=notification&utm_source=email -- You can unsubscribe from build emails from the OpenSmalltalk/opensmalltalk-vm repository going to https://travis-ci.org/account/preferences/unsubscribe?repository=8795279&utm_medium=notification&utm_source=email. Or unsubscribe from *all* email updating your settings at https://travis-ci.org/account/preferences/unsubscribe?utm_medium=notification&utm_source=email. Or configure specific recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Das.Linux at gmx.de Tue Jul 7 07:13:14 2020 From: Das.Linux at gmx.de (Tobias Pape) Date: Tue, 7 Jul 2020 09:13:14 +0200 Subject: [Vm-dev] Errored: OpenSmalltalk/opensmalltalk-vm#2103 (Cog - b09b99f) In-Reply-To: References: <5f0382b54bb60_13fc38e451f5034841d@travis-tasks-5cc4469fc7-5h99q.mail> Message-ID: > On 07.07.2020, at 02:43, Eliot Miranda wrote: > > The macos32x86 job "The job exceeded the maximum log length, and has been terminated." Seriously?!?! To be frank, 28k lines of output is quite excessive… And it's because this (pharo) build is compiling a lot of thridparty libs with a lot of warnings (I don't even know if freetype/cairo/etc. want to be compiled with clang in the first place…) best regards -tobias > > On Mon, Jul 6, 2020 at 12:59 PM Travis CI wrote: > > OpenSmalltalk/opensmalltalk-vm > Cog > Build #2103 has errored 45 mins and 31 secs > Eliot Miranda b09b99f CHANGESET → > CogVM source as per VMMaker.oscog-eem.2772 > > VM Parameters primitive(s). Fix the issue with the allocation failure test on > 32-bit systems. It really is a VM bug that parameter #67 (maxOldSpaceSize) > must be a SmallInteger. It should be a positive machine integer. > Want to know about upcoming build environment updates? > > Would you like to stay up-to-date with the upcoming Travis CI build environment updates? We set up a mailing list for you! > > SIGN UP HERE > Documentation about Travis CI > Have any questions? We're here to help. > Unsubscribe from build emails from the OpenSmalltalk/opensmalltalk-vm repository. > To unsubscribe from all build emails, please update your settings. > > Travis CI GmbH, Rigaer Str. 8, 10427 Berlin, Germany | GF/CEO: Randy Jacops | Contact: contact at travis-ci.com | Amtsgericht Charlottenburg, Berlin, HRB 140133 B | Umsatzsteuer-ID gemäß §27 a Umsatzsteuergesetz: DE282002648 From eliot.miranda at gmail.com Tue Jul 7 07:40:31 2020 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue, 7 Jul 2020 00:40:31 -0700 Subject: [Vm-dev] Errored: OpenSmalltalk/opensmalltalk-vm#2103 (Cog - b09b99f) In-Reply-To: References: Message-ID: <2CC7A9A3-9AA1-4684-BFCB-B215218079F8@gmail.com> > On Jul 7, 2020, at 12:13 AM, Tobias Pape wrote: > >  > >> On 07.07.2020, at 02:43, Eliot Miranda wrote: >> >> The macos32x86 job "The job exceeded the maximum log length, and has been terminated." Seriously?!?! > > To be frank, 28k lines of output is quite excessive… > And it's because this (pharo) build is compiling a lot of thridparty libs with a lot of warnings (I don't even know if freetype/cairo/etc. want to be compiled with clang in the first place…) So let’s nuke it. The Pharo community can build its own vm (insists in forking in fact). These builds are essential to our communities and having them constantly fail in the Pharo cases, which aren’t even used, makes no sense at all. > > best regards > -tobias > >> >> On Mon, Jul 6, 2020 at 12:59 PM Travis CI wrote: >> >> OpenSmalltalk/opensmalltalk-vm >> Cog >> Build #2103 has errored 45 mins and 31 secs >> Eliot Miranda b09b99f CHANGESET → >> CogVM source as per VMMaker.oscog-eem.2772 >> >> VM Parameters primitive(s). Fix the issue with the allocation failure test on >> 32-bit systems. It really is a VM bug that parameter #67 (maxOldSpaceSize) >> must be a SmallInteger. It should be a positive machine integer. >> Want to know about upcoming build environment updates? >> >> Would you like to stay up-to-date with the upcoming Travis CI build environment updates? We set up a mailing list for you! >> >> SIGN UP HERE >> Documentation about Travis CI >> Have any questions? We're here to help. >> Unsubscribe from build emails from the OpenSmalltalk/opensmalltalk-vm repository. >> To unsubscribe from all build emails, please update your settings. >> >> Travis CI GmbH, Rigaer Str. 8, 10427 Berlin, Germany | GF/CEO: Randy Jacops | Contact: contact at travis-ci.com | Amtsgericht Charlottenburg, Berlin, HRB 140133 B | Umsatzsteuer-ID gemäß §27 a Umsatzsteuergesetz: DE282002648 > > > From eliot.miranda at gmail.com Tue Jul 7 07:47:19 2020 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue, 7 Jul 2020 00:47:19 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] How to build on Win32 using WSL/Ubuntu | Missing headers (#510) In-Reply-To: References: Message-ID: Hi Christoph, > On Jun 13, 2020, at 11:07 AM, Christoph Thiede wrote: > >  > Hi Marcel, > > WSL = Windows Subsystem for Linux? > https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux > > Exactly. :-) > > I tried installing Cygwin now, too, but I still do not succeed. > I ran scripts/installCygwin.bat, then started a Cygwin session and ran the mvm script from there. But still, Windows.h is not found. Is this what I am supposed to do? > > However, I tried MSVC, too (this would be my preferred way over Cygwin). So, again strictly following the HowToBuild file, I opened an x86 Native Tools Command Prompt, navigated to build.win32x86\squeak.cog.spur\, executed ..\common\SETPATH.BAT and finally ..\common\MAKEDEBUG.BAT. Now guess what type LOGD will give me? > > ../../platforms/win32/vm/sqWin32Utils.c:11:10: fatal error: Windows.h: No such file or directory > So I guess the HowToBuild instructions much miss some significant point on how to these headers ... :-( > Did you install an SDK? I’m pretty sure that’s where the Windows.h headers live. Instal a 10.x SDK if you haven’t already. > Best, > Christoph > _,,,^..^,,,_ (phone) -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Tue Jul 7 07:50:50 2020 From: notifications at github.com (Eliot Miranda) Date: Tue, 07 Jul 2020 00:50:50 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] How to build on Win32 using WSL/Ubuntu | Missing headers (#510) In-Reply-To: References: Message-ID: Hi Christoph, > On Jun 19, 2020, at 11:56 AM, Christoph Thiede wrote: > >  > Is it the win64 (64 bits) VM? > > build.win32x86, no 64 bit. Hm ... could this occur because I have installed 64-bit version of cygwin? > No. 64-bit Cygwin will build the 32-bit vm. The problem is that its gdb won’t debug the 32-big exe :-(. So if you do want to debug you have to install 32-big Cygwin, & IIRC it had to be on a 32-bit OS. Hence use a VM :-( > — > You are receiving this because you are subscribed to this thread. > Reply to this email directly, view it on GitHub, or unsubscribe. -- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/510#issuecomment-654666745 -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolas.cellier.aka.nice at gmail.com Tue Jul 7 09:20:53 2020 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Tue, 7 Jul 2020 11:20:53 +0200 Subject: [Vm-dev] Fwd: [Lse-consortium] [OpenSmalltalk/opensmalltalk-vm] sqUnixXdnd: Don't record SQDragLeave when XdndDrop is handled (#508) In-Reply-To: References: <2B83EF8F-E6E5-4E0C-B046-6516D049D847@inria.fr> <9272E451-B26B-46F2-A342-22688530591D@inria.fr> Message-ID: Hmm, I forward this because I thought that I answered on vm-dev... but of course, pharo team cannot follow this ML for obvious reasons, and prefer obscure ML not even listed here https://lists.gforge.inria.fr/mailman/listinfo, maybe a private ML unless it's a typo? ---------- Forwarded message --------- De : Nicolas Cellier Date: dim. 28 juin 2020 à 15:52 Subject: Re: [Lse-consortium] [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] sqUnixXdnd: Don't record SQDragLeave when XdndDrop is handled (#508) To: Stéphane Ducasse Cc: Mailinglist for consortium engineering < lse-consortium at lists.gforge.inria.fr> Hi Stephane, please read carefully 'Ridiculous failure...' thread on OpenSmalltalk VM dev mailing list. http://forum.world.st/Ridiculous-failures-td5118674.html > The job exceeded the maximum log length, and has been terminated. We know that the CI set up is not good, it leads to these ridiculous failures. Solutions have been sketched for a long time, but never implemented in the original opensmalltalk-vm repository. https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/386 And of course, this kind of solution has been implemented in the pharo fork meanwhile... So a problem coming from the way pharo is built on opensmalltalk, is solved only in the fork shortly after the fork. A sign that it was not so complex to solve after all? This change was not contributed back. Why is that? Do you think it's a good thing to let pharo build rotting in original repo? Yes, this attitude upsets me. I helped fixing pharo builds upstream, "cleaning after the dog of someone else" as I said. But no one in Pharo community will never help and contribute back? Or take at least time to answer when I request support? You know the French saying, "trop bon, trop con", that's exactly how I feel at the moment. Le dim. 28 juin 2020 à 12:15, Stéphane Ducasse a écrit : > Hi nicolas > > When did you requested something? and that we did not react. > Most of us are in following the vm-dev for obvious reason. > We cannot be insulted on regular basis and be treated as guys that do not > understand > on discord. > For my particular case, I decided that pasted 50 I do not accept this > anymore. > > S. > > > On 27 Jun 2020, at 23:47, Christophe Demarey > wrote: > > In case you missed it: > > Début du message réexpédié : > > *De: *Nicolas Cellier > *Objet: **Rép : [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] sqUnixXdnd: > Don't record SQDragLeave when XdndDrop is handled (#508)* > *Date: *27 juin 2020 à 21:42:02 UTC+2 > *À: *OpenSmalltalk/opensmalltalk-vm > *Cc: *Subscribed > *Répondre à: *OpenSmalltalk/opensmalltalk-vm < > reply+AIJPEWYWOOPPNJ5IXVGPTG55AOBAVEVBNHHCMBT3BA at reply.github.com>, Open > Smalltalk Virtual Machine Development Discussion < > vm-dev at lists.squeakfoundation.org> > > Ideally we should do it on an old version of pharo too (7?), but at one > moment, pharo people shall help us to help them, and this is not the trend. > The INRIA team forked, and when I request community help on > Opensmalltalk-vm-dev ML, I ear nothing but a big silence, I guess no one is > interested. Newspeak sounds less like a problem, because they use their own > form of FFI for windows system integration rather than plugin. > > > _______________________________________________ > Lse-consortium mailing list > Lse-consortium at lists.gforge.inria.fr > https://lists.gforge.inria.fr/mailman/listinfo/lse-consortium > > > -------------------------------------------- > Stéphane Ducasse > http://stephane.ducasse.free.fr / http://www.pharo.org > 03 59 35 87 52 > Assistant: Aurore Dalle > FAX 03 59 57 78 50 > TEL 03 59 35 86 16 > S. Ducasse - Inria > 40, avenue Halley, > Parc Scientifique de la Haute Borne, Bât.A, Park Plaza > Villeneuve d'Ascq 59650 > France > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolas.cellier.aka.nice at gmail.com Tue Jul 7 09:23:46 2020 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Tue, 7 Jul 2020 11:23:46 +0200 Subject: [Vm-dev] Errored: OpenSmalltalk/opensmalltalk-vm#2103 (Cog - b09b99f) In-Reply-To: <2CC7A9A3-9AA1-4684-BFCB-B215218079F8@gmail.com> References: <2CC7A9A3-9AA1-4684-BFCB-B215218079F8@gmail.com> Message-ID: That was my post http://forum.world.st/Ridiculous-failures-td5118674.html I've put all pharo builds as authorized failures, so they should not make our build red, unless i forgot some? I asked for pharo community support for this... Just like shouting in the desert. I've got an indirect answer from Stephane Ducasse that I just forwarded on this list, explained it again. no reaction, but since the ML seems private, who knows... Le mar. 7 juil. 2020 à 09:40, Eliot Miranda a écrit : > > > > > On Jul 7, 2020, at 12:13 AM, Tobias Pape wrote: > > > >  > > > >> On 07.07.2020, at 02:43, Eliot Miranda wrote: > >> > >> The macos32x86 job "The job exceeded the maximum log length, and has > been terminated." Seriously?!?! > > > > To be frank, 28k lines of output is quite excessive… > > And it's because this (pharo) build is compiling a lot of thridparty > libs with a lot of warnings (I don't even know if freetype/cairo/etc. want > to be compiled with clang in the first place…) > > So let’s nuke it. The Pharo community can build its own vm (insists in > forking in fact). These builds are essential to our communities and having > them constantly fail in the Pharo cases, which aren’t even used, makes no > sense at all. > > > > > best regards > > -tobias > > > >> > >> On Mon, Jul 6, 2020 at 12:59 PM Travis CI wrote: > >> > >> OpenSmalltalk/opensmalltalk-vm > >> Cog > >> Build #2103 has errored 45 mins and 31 secs > > >> Eliot Miranda b09b99f > CHANGESET → > >> CogVM source as per VMMaker.oscog-eem.2772 > >> > >> VM Parameters primitive(s). Fix the issue with the allocation failure > test on > >> 32-bit systems. It really is a VM bug that parameter #67 > (maxOldSpaceSize) > >> must be a SmallInteger. It should be a positive machine integer. > >> Want to know about upcoming build environment updates? > >> > >> Would you like to stay up-to-date with the upcoming Travis CI build > environment updates? We set up a mailing list for you! > >> > >> SIGN UP HERE > >> Documentation about Travis CI > >> Have any questions? We're here to help. > >> Unsubscribe from build emails from the OpenSmalltalk/opensmalltalk-vm > repository. > >> To unsubscribe from all build emails, please update your settings. > >> > >> Travis CI GmbH, Rigaer Str. 8, 10427 Berlin, Germany | GF/CEO: Randy > Jacops | Contact: contact at travis-ci.com | Amtsgericht Charlottenburg, > Berlin, HRB 140133 B | Umsatzsteuer-ID gemäß §27 a Umsatzsteuergesetz: > DE282002648 > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Tue Jul 7 17:46:39 2020 From: notifications at github.com (Vanessa Freudenberg) Date: Tue, 07 Jul 2020 10:46:39 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] sqUnixXdnd: Don't record SQDragLeave when XdndDrop is handled (#508) In-Reply-To: References: Message-ID: Regarding code ownership - there currently is nobody specifically tending to the unix VM, or the X window display system. Most of the code is more than 15 years old, written by Ian Piumarta. Others and I contributed smaller parts over the years. That history got lost when switching from svn to git. As for DND, at some point around 2007 it was working fully - you could drag pictures and rich text into Squeak (e.g. a paragraph from Wikipedia), and you could drag e.g. a morph out of Squeak into an office document (where it would appear as a bitmap image) or onto another Squeak (where it would appear as fully functioning object, all the scripts etc. were being serialized). The latter part might be why there are squeak-specific DnD events. This was used for full interoperability inside of the Sugar OS on the OLPC laptop. E.g. you could drag a morph out of Etoys onto the Sugar Frame Clipboard, switch apps, and drag it into the other app. I used to be the maintainer of Squeak/Etoys for Sugar but haven’t touched it in years. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/508#issuecomment-655021654 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lewis at mail.msen.com Tue Jul 7 17:59:51 2020 From: lewis at mail.msen.com (David T. Lewis) Date: Tue, 7 Jul 2020 13:59:51 -0400 Subject: [Vm-dev] Probably pointless endianness question re: Float changes circa 4.6 In-Reply-To: <689B7921-3C44-46E5-BDF5-555075319393@sonic.net> References: <2C49B96A-C7B5-4009-B57B-351B1A13C358@sonic.net> <1D309501-E3F9-4E2F-A981-FF885D2CB5AC@gmail.com> <20200706004832.GA96544@shell.msen.com> <689B7921-3C44-46E5-BDF5-555075319393@sonic.net> Message-ID: <20200707175951.GA20310@shell.msen.com> Hi Tim, On Sun, Jul 05, 2020 at 10:54:14PM -0700, Tim Johnson wrote: > > Hi Dave, > > On Jul 5, 2020, at 5:48 PM, David T. Lewis wrote: > > >To add some detail: > > > >- In a 6504 image, Floats are stored in big-endian format (as Eliot > >explains above) regardless of > > the endianness of the current platform > > > >- In a 6505 image, Floats are stored in the native platform word > >ordering for the current platform > > > >- When a 6505 image is loaded into a classic interpreter VM the > >floats are converted big-endian > > format in ContextInterpreter>>normalizeFloatOrderingInImage which > >effectively turns it back > > into a 6504 image > > Thank you. This helps me know where to possibly dig into the > conversion process. > > Also, I wanted to try this. So I just did: > > 1) I loaded Squeak4.6-13700 (one of the alpha releases) into the > 4.10.2-2614 VM on my Raspberry Pi, and then saved it out. > > 2) `ckformat` verifies that the original image was is a 6505 format, > and the image I saved out is a 6504 format. > > 3) Transferred it over to my G4, and it very much runs! This > particular VM was built with VMMaker 4.4.12. > > Amazing! What an effective solution :) Stepping stone-by-stone into > the future... > By way of a belated follow up - The first version of VMMaker that provided support for loading 6505 images in a classic interpreter VM was VMMaker-dtl.190 (VMMaker versionString 4.3.4) from October 6, 2010. There were later changes related to refactoring, but anything from 4.3.4 onwards should successfully load and run V3 images saved from Cog. Prior to your efforts, this had never been tested on a big-endian machine, so I could not guarantee that it worked. But from your note above, it sounds like it did work when you tried it (good!). To summarize - the basic logic is that if the image file being loaded is 6505 and if the currently running VM is on a little-endian machine, then swap words in all Float objects before entering the interpreter (i.e. while loading the image). > > >- When as 6505 image that was saved from a little-endian machine is > >loaded into an oscog (Cog/Spur) > > VM running on a big-endian platform, it is loaded in the saved > >format (presumeably little endian) > > > >So ... I am only guessing, but AFAIK we have never tried loading a > >6505 image that was saved > >on a little-endian machine into a Cog/Spur VM running on a big- > >endian platform. Quite possibly > >in needs a word-reversal operation in that case. > > Very interesting. > > Are there any Cog/Spur VMs for big-endian platforms? > As far as I know, there are no big-ending Cog/Spur VMs. If somebody creates one, we would very likely need to update the word-swapping logic that I described above, because it would be saving the Float data in native order, which would not be big-endian. Something for future consideration I guess. The Cog/Spur VM would also need to handle word swapping if platform endianness changed. Dave From eliot.miranda at gmail.com Tue Jul 7 18:59:57 2020 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue, 7 Jul 2020 11:59:57 -0700 Subject: [Vm-dev] Probably pointless endianness question re: Float changes circa 4.6 In-Reply-To: <20200707175951.GA20310@shell.msen.com> References: <20200707175951.GA20310@shell.msen.com> Message-ID: <4FF64E3C-E048-40A3-8E8D-6867C0FA2149@gmail.com> Hi Dave, > On Jul 7, 2020, at 10:59 AM, David T. Lewis wrote: > >  > Hi Tim, > >> On Sun, Jul 05, 2020 at 10:54:14PM -0700, Tim Johnson wrote: >> >> Hi Dave, >> >>> On Jul 5, 2020, at 5:48 PM, David T. Lewis wrote: >>> >>> To add some detail: >>> >>> - In a 6504 image, Floats are stored in big-endian format (as Eliot >>> explains above) regardless of >>> the endianness of the current platform >>> >>> - In a 6505 image, Floats are stored in the native platform word >>> ordering for the current platform >>> >>> - When a 6505 image is loaded into a classic interpreter VM the >>> floats are converted big-endian >>> format in ContextInterpreter>>normalizeFloatOrderingInImage which >>> effectively turns it back >>> into a 6504 image >> >> Thank you. This helps me know where to possibly dig into the >> conversion process. >> >> Also, I wanted to try this. So I just did: >> >> 1) I loaded Squeak4.6-13700 (one of the alpha releases) into the >> 4.10.2-2614 VM on my Raspberry Pi, and then saved it out. >> >> 2) `ckformat` verifies that the original image was is a 6505 format, >> and the image I saved out is a 6504 format. >> >> 3) Transferred it over to my G4, and it very much runs! This >> particular VM was built with VMMaker 4.4.12. >> >> Amazing! What an effective solution :) Stepping stone-by-stone into >> the future... >> > > By way of a belated follow up - The first version of VMMaker that provided > support for loading 6505 images in a classic interpreter VM was VMMaker-dtl.190 > (VMMaker versionString 4.3.4) from October 6, 2010. There were later > changes related to refactoring, but anything from 4.3.4 onwards should > successfully load and run V3 images saved from Cog. > > Prior to your efforts, this had never been tested on a big-endian > machine, so I could not guarantee that it worked. But from your note > above, it sounds like it did work when you tried it (good!). > > To summarize - the basic logic is that if the image file being loaded is > 6505 and if the currently running VM is on a little-endian machine, then > swap words in all Float objects before entering the interpreter (i.e. > while loading the image). > >> >>> - When as 6505 image that was saved from a little-endian machine is >>> loaded into an oscog (Cog/Spur) >>> VM running on a big-endian platform, it is loaded in the saved >>> format (presumeably little endian) >>> >>> So ... I am only guessing, but AFAIK we have never tried loading a >>> 6505 image that was saved >>> on a little-endian machine into a Cog/Spur VM running on a big- >>> endian platform. Quite possibly >>> in needs a word-reversal operation in that case. >> >> Very interesting. >> >> Are there any Cog/Spur VMs for big-endian platforms? >> > > As far as I know, there are no big-ending Cog/Spur VMs. If somebody > creates one, we would very likely need to update the word-swapping > logic that I described above, because it would be saving the Float > data in native order, which would not be big-endian. Something for > future consideration I guess. The Cog/Spur VM would also need to > handle word swapping if platform endianness changed. I’ve not removed any of the load-time byte swapping logic. What’s missing is correct handling of big-end is ness in Spur and the JIT. The ones I noticed as I wrote code are makes self flag: #endianness. There are a few crucial ones to deal with. Boris will likely have encountered these as he’s working on the POC code generator, unless, sensibly he decides to use it in little-endian mode while developing the code generator. The issues are not hard to fix. The issue is best how to select the right code, use cppIf: or ifTrue: or endian-specific subclasses. > Dave _,,,^..^,,,_ (phone) From lewis at mail.msen.com Tue Jul 7 19:41:09 2020 From: lewis at mail.msen.com (David T. Lewis) Date: Tue, 7 Jul 2020 15:41:09 -0400 Subject: [Vm-dev] Probably pointless endianness question re: Float changes circa 4.6 In-Reply-To: <4FF64E3C-E048-40A3-8E8D-6867C0FA2149@gmail.com> References: <20200707175951.GA20310@shell.msen.com> <4FF64E3C-E048-40A3-8E8D-6867C0FA2149@gmail.com> Message-ID: <20200707194109.GA40442@shell.msen.com> Hi Eliot, On Tue, Jul 07, 2020 at 11:59:57AM -0700, Eliot Miranda wrote: > > Hi Dave, > > > On Jul 7, 2020, at 10:59 AM, David T. Lewis wrote: > > > > ??? > > Hi Tim, > > > >> On Sun, Jul 05, 2020 at 10:54:14PM -0700, Tim Johnson wrote: > >> > >> Hi Dave, > >> > >>> On Jul 5, 2020, at 5:48 PM, David T. Lewis wrote: > >>> > >>> To add some detail: > >>> > >>> - In a 6504 image, Floats are stored in big-endian format (as Eliot > >>> explains above) regardless of > >>> the endianness of the current platform > >>> > >>> - In a 6505 image, Floats are stored in the native platform word > >>> ordering for the current platform > >>> > >>> - When a 6505 image is loaded into a classic interpreter VM the > >>> floats are converted big-endian > >>> format in ContextInterpreter>>normalizeFloatOrderingInImage which > >>> effectively turns it back > >>> into a 6504 image > >> > >> Thank you. This helps me know where to possibly dig into the > >> conversion process. > >> > >> Also, I wanted to try this. So I just did: > >> > >> 1) I loaded Squeak4.6-13700 (one of the alpha releases) into the > >> 4.10.2-2614 VM on my Raspberry Pi, and then saved it out. > >> > >> 2) `ckformat` verifies that the original image was is a 6505 format, > >> and the image I saved out is a 6504 format. > >> > >> 3) Transferred it over to my G4, and it very much runs! This > >> particular VM was built with VMMaker 4.4.12. > >> > >> Amazing! What an effective solution :) Stepping stone-by-stone into > >> the future... > >> > > > > By way of a belated follow up - The first version of VMMaker that provided > > support for loading 6505 images in a classic interpreter VM was VMMaker-dtl.190 > > (VMMaker versionString 4.3.4) from October 6, 2010. There were later > > changes related to refactoring, but anything from 4.3.4 onwards should > > successfully load and run V3 images saved from Cog. > > > > Prior to your efforts, this had never been tested on a big-endian > > machine, so I could not guarantee that it worked. But from your note > > above, it sounds like it did work when you tried it (good!). > > > > To summarize - the basic logic is that if the image file being loaded is > > 6505 and if the currently running VM is on a little-endian machine, then > > swap words in all Float objects before entering the interpreter (i.e. > > while loading the image). > > > >> > >>> - When as 6505 image that was saved from a little-endian machine is > >>> loaded into an oscog (Cog/Spur) > >>> VM running on a big-endian platform, it is loaded in the saved > >>> format (presumeably little endian) > >>> > >>> So ... I am only guessing, but AFAIK we have never tried loading a > >>> 6505 image that was saved > >>> on a little-endian machine into a Cog/Spur VM running on a big- > >>> endian platform. Quite possibly > >>> in needs a word-reversal operation in that case. > >> > >> Very interesting. > >> > >> Are there any Cog/Spur VMs for big-endian platforms? > >> > > > > As far as I know, there are no big-ending Cog/Spur VMs. If somebody > > creates one, we would very likely need to update the word-swapping > > logic that I described above, because it would be saving the Float > > data in native order, which would not be big-endian. Something for > > future consideration I guess. The Cog/Spur VM would also need to > > handle word swapping if platform endianness changed. > > I???ve not removed any of the load-time byte swapping logic. What???s missing is correct handling of big-end is ness in Spur and the JIT. The ones I noticed as I wrote code are makes self flag: #endianness. There are a few crucial ones to deal with. > Indeed, I understand that doing the JIT for big-endian is not a trivial thing, especially if there is no realistic market for it. > Boris will likely have encountered these as he???s working on the POC code generator, unless, sensibly he decides to use it in little-endian mode while developing the code generator. > > The issues are not hard to fix. The issue is best how to select the right code, use cppIf: or ifTrue: or endian-specific subclasses. > With respect to the Float order issue we were discussing, I think that the only thing that needs to be addressed is to look at the endianness of the saved image, and do the word swap if endianness is different in the current VM. It's a small bit of logic, and it would be very similar to the method that I put into interpreter VM, except that there is no need to be concerned about converting back to 6504 format, just do the word swap if current endianness is different. All image formats after 6504 use native float ordering, so that logic would apply everywhere, and it just needs to be done during image load. The word swapping is fast, although I can't say I have ever actually measured it. But even if it was slow it would be a very rare use case, so nothing to worry about. Dave From notifications at github.com Wed Jul 8 08:22:55 2020 From: notifications at github.com (Christoph Thiede) Date: Wed, 08 Jul 2020 01:22:55 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] sqUnixXdnd: Don't record SQDragLeave when XdndDrop is handled (#508) In-Reply-To: References: Message-ID: @codefrau This is very interesting to hear! For starters, my goal is to translate every incoming drag into a transfer morph that can be handled natively by any morph. However, reviving the full potential of DnD will be a very interesting follow-up project. If you have further information on how this could break all without anyone noticing, please tell me. :-) Do you know whether all platforms already supported this? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/508#issuecomment-655369005 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Wed Jul 8 09:20:53 2020 From: notifications at github.com (Vanessa Freudenberg) Date: Wed, 08 Jul 2020 02:20:53 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] sqUnixXdnd: Don't record SQDragLeave when XdndDrop is handled (#508) In-Reply-To: References: Message-ID: I don't remember if all platforms supported this. Your best bet is to try with Etoys from Squeakland. This one here includes VMs for Win, Mac, and Linux: http://www.squeakland.org/content/installers/Etoys-To-Go-5.0.zip -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/508#issuecomment-655400308 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Wed Jul 8 10:20:53 2020 From: notifications at github.com (Christoph Thiede) Date: Wed, 08 Jul 2020 03:20:53 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] sqUnixXdnd: Don't record SQDragLeave when XdndDrop is handled (#508) In-Reply-To: References: Message-ID: Which VM version is that? On Windows, DnD works as well as in the latest OSVM. Unfortunately, I cannot find a 64 bit version for Linux, so I cannot test Etoys To Go on Linux ... -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/508#issuecomment-655430452 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Wed Jul 8 10:28:23 2020 From: notifications at github.com (Tom Beckmann) Date: Wed, 08 Jul 2020 03:28:23 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] sqUnixXdnd: Don't record SQDragLeave when XdndDrop is handled (#508) In-Reply-To: References: Message-ID: Hey @LinqLover, you should be able to get it to run on a 64bit linux as well. When running it will report which libraries are currently not installed in 32bit, on my system this was the only step necessary to get it to run: `sudo apt install libxrender1:i386 libpangocairo-1.0-0:i386` In general, once you know which libraries cannot be loaded, you can run for example `ldd Contents/Linux-i686/so.vm-display-X11` to see which of its dependencies are missing and then install those via apt-get with the `:i386` suffix. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/508#issuecomment-655433619 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Wed Jul 8 10:47:27 2020 From: notifications at github.com (Christoph Thiede) Date: Wed, 08 Jul 2020 03:47:27 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] sqUnixXdnd: Don't record SQDragLeave when XdndDrop is handled (#508) In-Reply-To: References: Message-ID: @tom95 The message only I'm seeing is: ```terminal $ ./etoys.sh ./etoys.sh: line 107: ./Contents/Linux-i686/etoys: cannot execute binary file: Exec format error ``` `ldd` gives me `not a dynamic executable`. Does native Linux support more backward compatibility in terms of architecture than a virtualized Linux? I am using Ubuntu in Windows Subsystem for Linux. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/508#issuecomment-655441484 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Wed Jul 8 11:02:40 2020 From: notifications at github.com (Tom Beckmann) Date: Wed, 08 Jul 2020 04:02:40 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] sqUnixXdnd: Don't record SQDragLeave when XdndDrop is handled (#508) In-Reply-To: References: Message-ID: Oh okay, in that case this might be your best bet: https://superuser.com/questions/1407730/run-32-bit-application-on-ubuntu-on-windows-subsystem-for-linux -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/508#issuecomment-655447927 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Wed Jul 8 12:11:04 2020 From: notifications at github.com (Christoph Thiede) Date: Wed, 08 Jul 2020 05:11:04 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] sqUnixXdnd: Don't record SQDragLeave when XdndDrop is handled (#508) In-Reply-To: References: Message-ID: @tom95 Great to know that WSL2 supports this. I still have to set up this, thank you :) -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/508#issuecomment-655479646 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Wed Jul 8 17:50:57 2020 From: notifications at github.com (Vanessa Freudenberg) Date: Wed, 08 Jul 2020 10:50:57 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] sqUnixXdnd: Don't record SQDragLeave when XdndDrop is handled (#508) In-Reply-To: References: Message-ID: Inside Etoys-To-Go are old 32 Bit interpreter VMs, from before Cog was around. You need those to be able to run the Etoys image. On Linux, there used to be a simple way to install the 32 bit support even on a 64 bit system, but I don’t know what the current status is. That Etoys image might have some more support code for DnD handling than current Squeak. Not everything has been properly integrated back. @timfel did the bulk of that work. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/508#issuecomment-655665680 -------------- next part -------------- An HTML attachment was scrubbed... URL: From bwestergaard at gmail.com Wed Jul 8 19:12:53 2020 From: bwestergaard at gmail.com (Bob Westergaard) Date: Wed, 8 Jul 2020 12:12:53 -0700 Subject: [Vm-dev] Possible bug in FFICallbackThunk class>>#freeBlockInExecutablePage: Message-ID: Hi, I believe there is a bug in FFICallbackThunk class>>#freeBlockInExecutablePage: (in Alien-Core). If there are multiple pages allocated, it is possible that the address comparison with the end of the executable page will mistakenly pass. What will end up happening is that you'll get an #unsignedByteAt:put: failure ('bad index') error during finalization when the section of that page is being marked as free. For example, I saw the failure where the address being freed was 1785856 (16r1B4000). There was a page at 16r1B3000, so the check for this address evaluates to true. This ends up trying to use 4097 as the index (dataSize is 4096 here). (address >= alienAddress and: [alienAddress + alienPage dataSize >= address]) ifTrue: [alienPage unsignedByteAt: address - alienAddress + 1 put: 0. ... The newest version I found on squeak source was Alien-Core-nice.104 and the test is the same. I changed >= to > here and the problem went away for me: (address >= alienAddress and: [alienAddress + alienPage dataSize > address]) ifTrue: Is my reading of this correct? Since we are here, why do #initializeX64 and #initializeX64Win64 end their methods with sending #primThunkEntryAddress and doing nothing with the returned result? Is there a side-effect going on here? It looks to me like a possible copy and paste error. Regards, -- Bob -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolas.cellier.aka.nice at gmail.com Wed Jul 8 21:42:39 2020 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Wed, 8 Jul 2020 23:42:39 +0200 Subject: [Vm-dev] Possible bug in FFICallbackThunk class>>#freeBlockInExecutablePage: In-Reply-To: References: Message-ID: Le mer. 8 juil. 2020 à 21:13, Bob Westergaard a écrit : > > Hi, > > I believe there is a bug in FFICallbackThunk > class>>#freeBlockInExecutablePage: (in Alien-Core). > If there are multiple pages allocated, it is possible that the address > comparison with the end of the executable page will mistakenly pass. What > will end up happening is that you'll get an #unsignedByteAt:put: failure > ('bad index') error during finalization when the section of that page is > being marked as free. > > For example, I saw the failure where the address being freed was 1785856 > (16r1B4000). There was a page at 16r1B3000, so the check for this address > evaluates to true. This ends up trying to use 4097 as the index (dataSize > is 4096 here). > > (address >= alienAddress > and: [alienAddress + alienPage dataSize >= address]) ifTrue: > [alienPage unsignedByteAt: address - alienAddress + 1 put: 0. > ... > > The newest version I found on squeak source was Alien-Core-nice.104 and > the test is the same. > > I changed >= to > here and the problem went away for me: > > (address >= alienAddress > and: [alienAddress + alienPage dataSize > address]) ifTrue: > > Is my reading of this correct? > > yes, if dataSize were 1, then we would have a single valid address in the page, alienAddress <= address < alienAdress + 1 so I think that you are right. Since we are here, why do #initializeX64 and #initializeX64Win64 end their > methods with sending #primThunkEntryAddress and doing nothing with the > returned result? Is there a side-effect going on here? It looks to me like > a possible copy and paste error. > > I don't see any side effect here, you can safely remove. For initializeX64Win64 I just did mimic the existing initializeX64 (Alien-nice.36) without questioning further... Regards, > -- Bob > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lewis at mail.msen.com Thu Jul 9 01:17:23 2020 From: lewis at mail.msen.com (David T. Lewis) Date: Wed, 8 Jul 2020 21:17:23 -0400 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] sqUnixXdnd: Don't record SQDragLeave when XdndDrop is handled (#508) In-Reply-To: References: Message-ID: <20200709011723.GA16804@shell.msen.com> On Wed, Jul 08, 2020 at 10:50:57AM -0700, Vanessa Freudenberg wrote: > > Inside Etoys-To-Go are old 32 Bit interpreter VMs, from before Cog was around. You need those to be able to run the Etoys image. On Linux, there used to be a simple way to install the 32 bit support even on a 64 bit system, but I don???t know what the current status is. > > That Etoys image might have some more support code for DnD handling than current Squeak. Not everything has been properly integrated back. @timfel did the bulk of that work. > The old interpreter VM in the Etoys-To_Go distribution still works fine on Ubuntu 16.04 LTS. I have 32-bit libraries installed as described in Tom Beckman's earlier reply. If you want to run Etoys on a native 64-bit VM, follow the instructions at http://wiki.squeak.org/squeak/6354. It takes about 5 or 10 minutes to do this, so allow yourself an hour of free time before you start, because nothing ever goes right the first time As a side note, Windows does a very good job of providing run-time backward compatibility for old applications, so a Squeak running on a very old Windows VM will almost always work. On Unix systems in general, and Linux in particular, there is very good source-level portability but backward compatibility for old compiled executables is not as good. The supporting runtime libraries tend to get updated regularly, and after 5 or 10 years you can easily end up with a compiled executable with runtime linkages to libraries that are no longer present. Dave From Das.Linux at gmx.de Thu Jul 9 05:19:32 2020 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu, 9 Jul 2020 07:19:32 +0200 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] sqUnixXdnd: Don't record SQDragLeave when XdndDrop is handled (#508) In-Reply-To: <20200709011723.GA16804@shell.msen.com> References: <20200709011723.GA16804@shell.msen.com> Message-ID: > On 09.07.2020, at 03:17, David T. Lewis wrote: > > > On Wed, Jul 08, 2020 at 10:50:57AM -0700, Vanessa Freudenberg wrote: >> >> Inside Etoys-To-Go are old 32 Bit interpreter VMs, from before Cog was around. You need those to be able to run the Etoys image. On Linux, there used to be a simple way to install the 32 bit support even on a 64 bit system, but I don???t know what the current status is. >> >> That Etoys image might have some more support code for DnD handling than current Squeak. Not everything has been properly integrated back. @timfel did the bulk of that work. >> > > The old interpreter VM in the Etoys-To_Go distribution still works fine > on Ubuntu 16.04 LTS. I have 32-bit libraries installed as described in > Tom Beckman's earlier reply. > > If you want to run Etoys on a native 64-bit VM, follow the instructions > at http://wiki.squeak.org/squeak/6354. It takes about 5 or 10 minutes to > do this, so allow yourself an hour of free time before you start, because > nothing ever goes right the first time > > As a side note, Windows does a very good job of providing run-time backward > compatibility for old applications, so a Squeak running on a very old Windows > VM will almost always work. On Unix systems in general, and Linux in particular, > there is very good source-level portability but backward compatibility > for old compiled executables is not as good. The supporting runtime libraries > tend to get updated regularly, and after 5 or 10 years you can easily end up > with a compiled executable with runtime linkages to libraries that are no > longer present. BTW: Fedora ships a 64bit squeak interpreter vm that can run 323bit closure and non-closure images. Except for a broken Rome-plugin, this works very fine for Etoys 5.0… Best regards -Tobias From notifications at github.com Thu Jul 9 09:09:20 2020 From: notifications at github.com (David Stes) Date: Thu, 09 Jul 2020 02:09:20 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Sunupdate (#496) In-Reply-To: References: Message-ID: @cstes pushed 1 commit. dadd2d2f3ee7754a92771735bb5cae599a5d7ccf Add comment about Basic Solaris User profile and pthread_setschedparam -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/496/files/dcdd632efcb63e2d55f66232aa25856796dc6b76..dadd2d2f3ee7754a92771735bb5cae599a5d7ccf -------------- next part -------------- An HTML attachment was scrubbed... URL: From lewis at mail.msen.com Thu Jul 9 13:52:19 2020 From: lewis at mail.msen.com (David T. Lewis) Date: Thu, 9 Jul 2020 09:52:19 -0400 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] sqUnixXdnd: Don't record SQDragLeave when XdndDrop is handled (#508) In-Reply-To: References: <20200709011723.GA16804@shell.msen.com> Message-ID: <20200709135219.GA51874@shell.msen.com> On Thu, Jul 09, 2020 at 07:19:32AM +0200, Tobias Pape wrote: > > > > On 09.07.2020, at 03:17, David T. Lewis wrote: > > > > > > On Wed, Jul 08, 2020 at 10:50:57AM -0700, Vanessa Freudenberg wrote: > >> > >> Inside Etoys-To-Go are old 32 Bit interpreter VMs, from before Cog was around. You need those to be able to run the Etoys image. On Linux, there used to be a simple way to install the 32 bit support even on a 64 bit system, but I don???t know what the current status is. > >> > >> That Etoys image might have some more support code for DnD handling than current Squeak. Not everything has been properly integrated back. @timfel did the bulk of that work. > >> > > > > The old interpreter VM in the Etoys-To_Go distribution still works fine > > on Ubuntu 16.04 LTS. I have 32-bit libraries installed as described in > > Tom Beckman's earlier reply. > > > > If you want to run Etoys on a native 64-bit VM, follow the instructions > > at http://wiki.squeak.org/squeak/6354. It takes about 5 or 10 minutes to > > do this, so allow yourself an hour of free time before you start, because > > nothing ever goes right the first time > > > > As a side note, Windows does a very good job of providing run-time backward > > compatibility for old applications, so a Squeak running on a very old Windows > > VM will almost always work. On Unix systems in general, and Linux in particular, > > there is very good source-level portability but backward compatibility > > for old compiled executables is not as good. The supporting runtime libraries > > tend to get updated regularly, and after 5 or 10 years you can easily end up > > with a compiled executable with runtime linkages to libraries that are no > > longer present. > > BTW: Fedora ships a 64bit squeak interpreter vm that can run 323bit closure and non-closure images. > Except for a broken Rome-plugin, this works very fine for Etoys 5.0??? > That's interesting, I did not know about that. If you get a chance, could you please check the version information for that VM? Either the contents of a system reporter in the image, or from the command line "/usr/bin/squeak -version" (assuming it is installed in /usr/bin). At one time there was a Debian package for the interpreter VM, but it was badly broken, so it would be nice to know if someone has been distributing one that works. Thank you! Dave From commits at source.squeak.org Thu Jul 9 17:47:02 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Thu, 9 Jul 2020 17:47:02 0000 Subject: [Vm-dev] VM Maker: VMMaker.oscog-eem.2773.mcz Message-ID: Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2773.mcz ==================== Summary ==================== Name: VMMaker.oscog-eem.2773 Author: eem Time: 9 July 2020, 10:46:46.555474 am UUID: 3c51054d-e839-4959-b3e1-562845a4fa54 Ancestors: VMMaker.oscog-eem.2772 Cogit: Fix the use of the undefined ceFlushDCache function when DUAL_WRITE_CODE_ZONE is not defined and flushDCacheFrom:to: is not a no-op. Make sure any generated check features, and the generated run-time are cache flushed before use. Move maybeGenerateCheckLZCNT later initializeCodeZoneFrom:upTo:; its result is not used until compiling primitives. =============== Diff against VMMaker.oscog-eem.2772 =============== Item was added: + ----- Method: CogIA32Compiler>>initialFlushICacheFrom:to: (in category 'inline cacheing') ----- + initialFlushICacheFrom: startAddress "" to: endAddress "" + "This must be implemented only if a back end defines any of the following as non-zero: + numCheckFeaturesOpcodes + numDCacheFlushOpcodes + numICacheFlushOpcode. + + This is a no-op on IA32." + ! Item was changed: ----- Method: Cogit>>initializeCodeZoneFrom:upTo: (in category 'initialization') ----- initializeCodeZoneFrom: startAddress upTo: endAddress self initializeBackend. self sqMakeMemoryExecutableFrom: startAddress To: endAddress CodeToDataDelta: (self cppIf: #DUAL_MAPPED_CODE_ZONE ifTrue: [self addressOf: codeToDataDelta put: [:v| codeToDataDelta := v]] ifFalse: [nil]). backEnd stopsFrom: startAddress to: endAddress - 1. self cCode: '' inSmalltalk: [self initializeProcessor. backEnd stopsFrom: 0 to: guardPageSize - 1]. codeBase := methodZoneBase := startAddress. minValidCallAddress := (codeBase min: coInterpreter interpretAddress) min: coInterpreter primitiveFailAddress. methodZone manageFrom: methodZoneBase to: endAddress. self assertValidDualZone. self maybeGenerateCheckFeatures. - self maybeGenerateCheckLZCNT. self maybeGenerateCacheFlush. + self maybeGenerateCheckLZCNT. self generateVMOwnerLockFunctions. self genGetLeafCallStackPointers. self generateStackPointerCapture. self generateTrampolines. self computeEntryOffsets. self computeFullBlockEntryOffsets. self generateClosedPICPrototype. self alignMethodZoneBase. + "None of the above is executed beyond ceCheckFeatures, so a bulk flush now is the leanest thing to do." + backEnd flushICacheFrom: startAddress to: methodZoneBase asUnsignedInteger. - "None of the above is executed beyond ceCheckFeatures & ceCheckLZCNTFunction, - so a bulk flush now is the leanest thing to do." self maybeFlushWritableZoneFrom: startAddress to: methodZoneBase asUnsignedInteger. + "Repeat so that now the methodZone ignores the generated run-time." - "repeat so that now the methodZone ignores the generated run-time" methodZone manageFrom: methodZoneBase to: endAddress. + "N.B. this is assumed to be the last thing done in initialization; see Cogit>>initialized. + This is done only to compute openPICSize; the generated code is discarded." - "N.B. this is assumed to be the last thing done in initialization; see Cogit>>initialized" self generateOpenPICPrototype! Item was changed: ----- Method: Cogit>>maybeFlushWritableZoneFrom:to: (in category 'generate machine code - dual mapped zone support') ----- maybeFlushWritableZoneFrom: startAddress to: endAddress "If there is a dual mapped code zone (the normal zone but marked with read/execute, and a read/write zone codeToDataDelta bytes away) then the data cache for the read/write zone must be flushed, and the data cache for the read/execute zone must be invalidated, for the Cogit to see the same values in both zones after a write to the read/write zone." + + self cppIf: #DUAL_MAPPED_CODE_ZONE + ifTrue: + [codeToDataDelta > 0 ifTrue: + [backEnd flushDCacheFrom: startAddress to: endAddress]]! - codeToDataDelta > 0 ifTrue: - [backEnd flushDCacheFrom: startAddress to: endAddress]! Item was changed: ----- Method: Cogit>>maybeGenerateCheckFeatures (in category 'initialization') ----- maybeGenerateCheckFeatures | startAddress | backEnd numCheckFeaturesOpcodes > 0 ifTrue: [self allocateOpcodes: backEnd numCheckFeaturesOpcodes bytecodes: 0. startAddress := methodZoneBase. backEnd generateCheckFeatures. self outputInstructionsForGeneratedRuntimeAt: startAddress. self recordGeneratedRunTime: 'ceCheckFeaturesFunction' address: startAddress. + ceCheckFeaturesFunction := self cCoerceSimple: startAddress to: #'usqIntptr_t (*)(void)'. + backEnd initialFlushICacheFrom: startAddress to: methodZoneBase]! - ceCheckFeaturesFunction := self cCoerceSimple: startAddress to: #'usqIntptr_t (*)(void)']! Item was removed: - ----- Method: Cogit>>processorHasLZCNTSupport (in category 'initialization') ----- - processorHasLZCNTSupport - - - ^backEnd hasLZCNTInstructions! From noreply at github.com Thu Jul 9 18:02:24 2020 From: noreply at github.com (Eliot Miranda) Date: Thu, 09 Jul 2020 11:02:24 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 41115d: CogVM source as per VMMaker.oscog-eem.2773/ClosedV... Message-ID: Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: 41115d41e24c7c6d9b1ab059fe312dbdbfb3848c https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/41115d41e24c7c6d9b1ab059fe312dbdbfb3848c Author: Eliot Miranda Date: 2020-07-09 (Thu, 09 Jul 2020) Changed paths: M nsspur64src/vm/cogit.h M nsspur64src/vm/cogitARMv8.c M nsspur64src/vm/cogitX64SysV.c M nsspur64src/vm/cogitX64WIN64.c M nsspursrc/vm/cogit.h M nsspursrc/vm/cogitARMv5.c M nsspursrc/vm/cogitIA32.c M nsspursrc/vm/cogitMIPSEL.c M spur64src/vm/cogit.h M spur64src/vm/cogitARMv8.c M spur64src/vm/cogitX64SysV.c M spur64src/vm/cogitX64WIN64.c M spurlowcode64src/vm/cogit.h M spurlowcode64src/vm/cogitARMv8.c M spurlowcode64src/vm/cogitX64SysV.c M spurlowcode64src/vm/cogitX64WIN64.c M spurlowcodesrc/vm/cogit.h M spurlowcodesrc/vm/cogitARMv5.c M spurlowcodesrc/vm/cogitIA32.c M spurlowcodesrc/vm/cogitMIPSEL.c M spursista64src/vm/cogit.h M spursista64src/vm/cogitARMv8.c M spursista64src/vm/cogitX64SysV.c M spursista64src/vm/cogitX64WIN64.c M spursistasrc/vm/cogit.h M spursistasrc/vm/cogitARMv5.c M spursistasrc/vm/cogitIA32.c M spursistasrc/vm/cogitMIPSEL.c M spursrc/vm/cogit.h M spursrc/vm/cogitARMv5.c M spursrc/vm/cogitIA32.c M spursrc/vm/cogitMIPSEL.c M src/vm/cogit.h M src/vm/cogitARMv5.c M src/vm/cogitIA32.c M src/vm/cogitMIPSEL.c Log Message: ----------- CogVM source as per VMMaker.oscog-eem.2773/ClosedVMMaker-eem.93 Cogit: Fix the use of the undefined ceFlushDCache function when DUAL_WRITE_CODE_ZONE is not defined and flushDCacheFrom:to: is not a no-op. Make sure any generated check features, and the generated run-time are cache flushed before use. Move maybeGenerateCheckLZCNT later initializeCodeZoneFrom:upTo:; its result is not used until compiling primitives. From vanessa at codefrau.net Fri Jul 10 00:05:08 2020 From: vanessa at codefrau.net (Vanessa Freudenberg) Date: Thu, 9 Jul 2020 17:05:08 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] sqUnixXdnd: Don't record SQDragLeave when XdndDrop is handled (#508) In-Reply-To: <20200709135219.GA51874@shell.msen.com> References: <20200709011723.GA16804@shell.msen.com> <20200709135219.GA51874@shell.msen.com> Message-ID: On Thu, Jul 9, 2020 at 6:52 AM David T. Lewis wrote: > > On Thu, Jul 09, 2020 at 07:19:32AM +0200, Tobias Pape wrote: > > > BTW: Fedora ships a 64bit squeak interpreter vm that can run 323bit > closure and non-closure images. > > Except for a broken Rome-plugin, this works very fine for Etoys 5.0??? > > > > That's interesting, I did not know about that. If you get a chance, > could you please check the version information for that VM? Either > the contents of a system reporter in the image, or from the command > line "/usr/bin/squeak -version" (assuming it is installed in /usr/bin). > > At one time there was a Debian package for the interpreter VM, but > it was badly broken, so it would be nice to know if someone has been > distributing one that works. > > Thank you! > Dave > I just found this site, which lists packages for many linux distros: https://pkgs.org/search/?q=squeak Fedora has 4.10.2.2614 VMs for 32 bit ARM, 64 bit ARM, and 64 bit x86, it appears. This matches the last src.tar.gz on http://squeakvm.org/unix/release/ (IIRC it's an automated build that pulls the latest from that site - but I could be mixing that up with Debian) That site also shows which distros carry etoys and scratch packages. Vanessa -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Fri Jul 10 18:27:31 2020 From: notifications at github.com (Christoph Thiede) Date: Fri, 10 Jul 2020 11:27:31 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] sqUnixXdnd: Don't record SQDragLeave when XdndDrop is handled (#508) In-Reply-To: References: Message-ID: @LinqLover pushed 2 commits. 1fde7270c5c3c4bbf7e9d33b8594f9e3ac3f8c92 Add explaining comments 33df20b6b4e18c5b827bd3da48be3ba0e1a1dcef Refactor drop event generation -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/508/files/4def9a65347638fe002deb5cfb92d00fa532145c..33df20b6b4e18c5b827bd3da48be3ba0e1a1dcef -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Fri Jul 10 19:09:25 2020 From: notifications at github.com (Christoph Thiede) Date: Fri, 10 Jul 2020 12:09:25 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] sqUnixXdnd: Don't record SQDragLeave when XdndDrop is handled (#508) In-Reply-To: References: Message-ID: @LinqLover pushed 1 commit. 3100c64c6b770079bdd13888ed8740eff38a8fe7 Improve comments -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/508/files/33df20b6b4e18c5b827bd3da48be3ba0e1a1dcef..3100c64c6b770079bdd13888ed8740eff38a8fe7 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Fri Jul 10 19:10:02 2020 From: notifications at github.com (Christoph Thiede) Date: Fri, 10 Jul 2020 12:10:02 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] sqUnixXdnd: Don't record SQDragLeave when XdndDrop is handled (#508) In-Reply-To: References: Message-ID: @LinqLover pushed 1 commit. 2ff21e28c04f97b3250e8001a6befc33e21ca2b7 Nuke obsolete variable -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/508/files/3100c64c6b770079bdd13888ed8740eff38a8fe7..2ff21e28c04f97b3250e8001a6befc33e21ca2b7 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Fri Jul 10 19:11:21 2020 From: notifications at github.com (Christoph Thiede) Date: Fri, 10 Jul 2020 12:11:21 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] sqUnixXdnd: Don't record SQDragLeave when XdndDrop is handled (#508) In-Reply-To: References: Message-ID: @LinqLover pushed 1 commit. b992e979b0ddc8f0887e965f411d0a6ca5108282 Revert rejected change -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/508/files/2ff21e28c04f97b3250e8001a6befc33e21ca2b7..b992e979b0ddc8f0887e965f411d0a6ca5108282 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Fri Jul 10 20:00:44 2020 From: notifications at github.com (Christoph Thiede) Date: Fri, 10 Jul 2020 13:00:44 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] sqUnixXdnd: Don't record SQDragLeave when XdndDrop is handled (#508) In-Reply-To: References: Message-ID: Thanks for all the hints, I will try that soon! However, reviving the full DnD potential will surely happen in separate threads and PRs. This one is ready now, again, at least from my side. Please see the updated description above. I hereby confirm that the latest version again does not show any regressions in an up to date Squeak image. @nicolas-cellier-aka-nice Would you mind to review/squash-merge again as soon as the checks have completed? :-) -- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/508#issuecomment-656864568 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Fri Jul 10 20:14:39 2020 From: notifications at github.com (Christoph Thiede) Date: Fri, 10 Jul 2020 13:14:39 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] sqUnixXdnd: Don't record SQDragLeave when XdndDrop is handled (#508) In-Reply-To: References: Message-ID: @LinqLover pushed 1 commit. 403836b5d07d6036e2855d133d148df9e4602892 Fix a stupid slip -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/508/files/b992e979b0ddc8f0887e965f411d0a6ca5108282..403836b5d07d6036e2855d133d148df9e4602892 -------------- next part -------------- An HTML attachment was scrubbed... URL: From noreply at github.com Sun Jul 12 01:32:47 2020 From: noreply at github.com (Eliot Miranda) Date: Sat, 11 Jul 2020 18:32:47 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] ba263d: CogVM source as per ClosedVMMaker-eem.95 Message-ID: Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: ba263dfef8d925c311e86f166d01811b1c0032c2 https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/ba263dfef8d925c311e86f166d01811b1c0032c2 Author: Eliot Miranda Date: 2020-07-11 (Sat, 11 Jul 2020) Changed paths: M build.macos32x86/makeproduct M nsspur64src/vm/cogitARMv8.c M spur64src/vm/cogitARMv8.c M spurlowcode64src/vm/cogitARMv8.c M spursista64src/vm/cogitARMv8.c Log Message: ----------- CogVM source as per ClosedVMMaker-eem.95 ARMv8 Cogit: Add a missing type declaration to noteFollowingConditionalBranch: Better order the two multiplies in MulOverflowRRR. From commits at source.squeak.org Sun Jul 12 01:50:15 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Sun, 12 Jul 2020 01:50:15 0000 Subject: [Vm-dev] VM Maker: VMMaker.oscog-eem.2774.mcz Message-ID: Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2774.mcz ==================== Summary ==================== Name: VMMaker.oscog-eem.2774 Author: eem Time: 11 July 2020, 6:50:06.654573 pm UUID: f6fac8da-39c5-413a-9dec-fd46dade5a44 Ancestors: VMMaker.oscog-eem.2773 Fic a warning from compiling the cogit. =============== Diff against VMMaker.oscog-eem.2773 =============== Item was changed: ----- Method: Cogit>>genInvokeInterpretTrampoline (in category 'initialization') ----- genInvokeInterpretTrampoline "Switch to the C stack (do *not* save the Smalltalk stack pointers; this is the caller's responsibility), and invoke interpret PDQ." | startAddress | startAddress := methodZoneBase. self zeroOpcodeIndex. backEnd hasVarBaseRegister ifTrue: [self MoveCq: self varBaseAddress R: VarBaseReg]. "Must happen first; value may be used in genLoadStackPointers" cFramePointerInUse ifTrue: [backEnd genLoadCStackPointers] ifFalse: [backEnd genLoadCStackPointer]. "Sideways call interpret so that the stack looks correct, for exception handling etc" backEnd genMarshallNArgs: 0 arg: nil arg: nil arg: nil arg: nil. backEnd hasLinkRegister ifTrue: [self MoveAw: coInterpreter cReturnAddressAddress R: LinkReg] ifFalse: [self MoveAw: coInterpreter cReturnAddressAddress R: ABIResultReg. backEnd genSubstituteReturnAddressR: ABIResultReg]. self JumpFullRT: (self cCode: [#interpret asUnsignedInteger] inSmalltalk: [self simulatedTrampolineFor: #interpret]). self outputInstructionsForGeneratedRuntimeAt: startAddress. self recordGeneratedRunTime: 'ceInvokeInterpret' address: startAddress. + ^self cCoerceSimple: startAddress to: #'void (*)(void)'! - ^startAddress! From noreply at github.com Sun Jul 12 02:03:25 2020 From: noreply at github.com (Eliot Miranda) Date: Sat, 11 Jul 2020 19:03:25 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] a2e6da: Fix install path for linux64ARMv8 squeak cogit bui... Message-ID: Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: a2e6daae424789fc2904ed584ef0049391a6b46d https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/a2e6daae424789fc2904ed584ef0049391a6b46d Author: Eliot Miranda Date: 2020-07-11 (Sat, 11 Jul 2020) Changed paths: M build.linux64ARMv8/squeak.cog.spur/build.assert/mvm M build.linux64ARMv8/squeak.cog.spur/build.debug/mvm M build.linux64ARMv8/squeak.cog.spur/build/mvm Log Message: ----------- Fix install path for linux64ARMv8 squeak cogit builds. [ci skip] From noreply at github.com Sun Jul 12 02:27:34 2020 From: noreply at github.com (Eliot Miranda) Date: Sat, 11 Jul 2020 19:27:34 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 53b979: A couple more INSTALL path fixes for linux64ARMv8. Message-ID: Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: 53b979ff231d91e548e85934530362035d5fa8ef https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/53b979ff231d91e548e85934530362035d5fa8ef Author: Eliot Miranda Date: 2020-07-11 (Sat, 11 Jul 2020) Changed paths: M build.linux64ARMv8/pharo.stack.spur/build.debug/mvm M build.linux64ARMv8/squeak.stack.spur/build.assert/mvm Log Message: ----------- A couple more INSTALL path fixes for linux64ARMv8. [ci skip] From notifications at github.com Tue Jul 14 16:04:54 2020 From: notifications at github.com (smalltalking) Date: Tue, 14 Jul 2020 09:04:54 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Add missing Cryptography plugins to squeak builds (#513) Message-ID: DESPlugin, MD5Plugin and SHA2Plugin as external plugins You can view, comment on, or merge this pull request online at: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/513 -- Commit Summary -- * Add missing Cryptography plugins to squeak builds -- File Changes -- M build.linux32ARMv6/squeak.cog.spur/plugins.ext (3) M build.linux32ARMv6/squeak.stack.spur/plugins.ext (5) M build.linux32ARMv6/squeak.stack.v3/plugins.ext (5) M build.linux32x86/squeak.cog.spur.immutability/plugins.ext (5) M build.linux32x86/squeak.cog.spur/plugins.ext (5) M build.linux32x86/squeak.cog.v3/plugins.ext (5) M build.linux32x86/squeak.sista.spur/plugins.ext (5) M build.linux32x86/squeak.stack.spur/plugins.ext (5) M build.linux32x86/squeak.stack.v3/plugins.ext (5) M build.linux64ARMv8/squeak.cog.spur/plugins.ext (5) M build.linux64ARMv8/squeak.stack.spur/plugins.ext (5) M build.linux64x64/squeak.cog.spur.immutability/plugins.ext (5) M build.linux64x64/squeak.cog.spur/plugins.ext (5) M build.linux64x64/squeak.stack.spur/plugins.ext (5) M build.macos32x86/squeak.cog.spur+immutability/plugins.ext (5) M build.macos32x86/squeak.cog.spur/plugins.ext (5) M build.macos32x86/squeak.cog.v3/plugins.ext (5) M build.macos32x86/squeak.sista.spur/plugins.ext (5) M build.macos32x86/squeak.stack.spur/plugins.ext (5) M build.macos32x86/squeak.stack.v3/plugins.ext (5) M build.macos64x64/squeak.cog.spur.immutability/plugins.ext (3) M build.macos64x64/squeak.cog.spur/plugins.ext (3) M build.macos64x64/squeak.sista.spur/plugins.ext (3) M build.macos64x64/squeak.stack.spur/plugins.ext (3) M build.sunos32x86/squeak.cog.spur/plugins.ext (5) M build.sunos32x86/squeak.stack.spur/plugins.ext (5) M build.sunos64x64/squeak.cog.spur/plugins.ext (5) M build.sunos64x64/squeak.stack.spur/plugins.ext (5) M build.win32x86/squeak.cog.spur.lowcode/plugins.ext (5) M build.win32x86/squeak.cog.spur/plugins.ext (5) M build.win32x86/squeak.cog.v3/plugins.ext (5) M build.win32x86/squeak.sista.spur/plugins.ext (5) M build.win32x86/squeak.stack.spur/plugins.ext (5) M build.win32x86/squeak.stack.v3/plugins.ext (5) M build.win64x64/squeak.cog.spur/plugins.ext (5) M build.win64x64/squeak.stack.spur/plugins.ext (5) -- Patch Links -- https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/513.patch https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/513.diff -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/513 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Tue Jul 14 17:05:22 2020 From: notifications at github.com (Fabio Niephaus) Date: Tue, 14 Jul 2020 10:05:22 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Add missing Cryptography plugins to squeak builds (#513) In-Reply-To: References: Message-ID: @fniephaus requested changes on this pull request. > @@ -16,3 +16,6 @@ XDisplayControlPlugin \ #BochsIA32Plugin \ #BochsX64Plugin \ #GdbARMPlugin +DESPlugin \ +MD5Plugin \ +SHA2Plugin \ Not sure these files are allowed to end with an ` \`. More importantly, these three new items must be listed *before* the first `#`. Currently, they are unfortunately all commented out. Yes, the syntax of this file is terrible! -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/513#pullrequestreview-448298510 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Tue Jul 14 18:02:19 2020 From: notifications at github.com (smalltalking) Date: Tue, 14 Jul 2020 11:02:19 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Add missing Cryptography plugins to squeak builds (#513) In-Reply-To: References: Message-ID: @smalltalking commented on this pull request. > @@ -16,3 +16,6 @@ XDisplayControlPlugin \ #BochsIA32Plugin \ #BochsX64Plugin \ #GdbARMPlugin +DESPlugin \ +MD5Plugin \ +SHA2Plugin \ I wrote a script to rewrite this files en massse because there are so many of them. The script intentionally adds a backslash to the end of all non-comment lines because on linux it just works, and having the \ there has the benefit of easier addition of more lines in the future. The interesting thing here is that only the 64-bit mac version had problem with the backslash. Neither linux, windows or the 32-bit mac had errors. On linux, the commented out lines did not cause any problems either. I don't know which program processes these files (and raised the error), but the 64-bit mac version is clearly different that the ones on linux and windows which both seem to accept comments in between lines and the last line ending with \. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/513#discussion_r454543270 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Tue Jul 14 23:59:53 2020 From: notifications at github.com (smalltalking) Date: Tue, 14 Jul 2020 16:59:53 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Add missing Cryptography plugins to squeak builds (#513) In-Reply-To: References: Message-ID: @smalltalking pushed 1 commit. b543daf0722049a61fbffd3780d02443fff14e12 Add missing Cryptography plugins to squeak builds part 2 -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/513/files/4540d7e3e5233a0921445783089f5b0f76519b49..b543daf0722049a61fbffd3780d02443fff14e12 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Wed Jul 15 11:27:46 2020 From: notifications at github.com (smalltalking) Date: Wed, 15 Jul 2020 04:27:46 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Add missing Cryptography plugins to squeak builds (#513) In-Reply-To: References: Message-ID: @smalltalking commented on this pull request. > @@ -16,3 +16,6 @@ XDisplayControlPlugin \ #BochsIA32Plugin \ #BochsX64Plugin \ #GdbARMPlugin +DESPlugin \ +MD5Plugin \ +SHA2Plugin \ Moving the comments to the end turned out to be enough to fix the errors on 64-bit mac. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/513#discussion_r454981175 -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits at source.squeak.org Thu Jul 16 23:10:29 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Thu, 16 Jul 2020 23:10:29 0000 Subject: [Vm-dev] VM Maker: VMMaker.oscog-eem.2775.mcz Message-ID: Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2775.mcz ==================== Summary ==================== Name: VMMaker.oscog-eem.2775 Author: eem Time: 16 July 2020, 4:10:20.53343 pm UUID: 5277c7af-b6e2-42b2-879d-eab85ff574c2 Ancestors: VMMaker.oscog-eem.2774 ThreadedFFIPlugin: Add primitiveCDataModel which with 0 args answers the C data model name (LLP64, ILP32 et al), and with a ByteArray arg of 9 elements, answers the sizes of char, short, etc, & wchar_t. Add ThreadedFFIPluginPartialSimulator to test the above primitive. Hence implement InterpreterProxy>>deny: & stringForCString:. Slang: Fix a bug with the struct name cache (somehow I lost the updates to the methods that loaded the cache, which should have been changed to send ensureStructTypeCache). Rename ensureStructTypeNameCache to ensureStructTypeCache to match voidStructTypeCache. Allow TMethod>>typeFor:in: to infer tpes for non-integral constants (integral constants need very special handling, done in the client). Eliminate unnecessary parentheses in ifNil:. =============== Diff against VMMaker.oscog-eem.2774 =============== Item was changed: ----- Method: CCodeGenerator>>generateIfNil:on:indent: (in category 'C translation') ----- generateIfNil: msgNode on: aStream indent: level "Generate the C code for this message onto the given stream." (self isNilConstantReceiverOf: msgNode) ifFalse: + [aStream nextPutAll: 'if (!!'. + self emitCExpression: msgNode receiver on: aStream indent: level + 1. + aStream nextPutAll: ') {'; cr. - [aStream nextPutAll: 'if (!!('. - msgNode receiver emitCCodeAsExpressionOn: aStream level: level + 1 generator: self. - aStream nextPutAll: ')) {'; cr. msgNode args last emitCCodeOn: aStream level: level + 1 generator: self. aStream tab: level; nextPut: $}] ifTrue: [msgNode args first emitCCodeOn: aStream level: level generator: self]! Item was added: + ----- Method: InterpreterProxy>>deny: (in category 'testing') ----- + deny: aBooleanOrBlock + aBooleanOrBlock value ifTrue: [AssertionFailure signal: 'Assertion failed']! Item was changed: ----- Method: InterpreterProxy>>stringForCString: (in category 'testing') ----- stringForCString: aCString "Answer a ByteString object containing the bytes (possibly UTF-8?) in the null-terminated C string aCString." + self assert: aCString isString. + ^aCString! - self notYetImplemented! Item was changed: ----- Method: TConstantNode>>typeOrNilFrom:in: (in category 'type inference') ----- typeOrNilFrom: aCodeGenerator in: aTMethod "For integers, answer int unless the value does not fit into a 32bits signed int. In that case, answer the shortest architecture independant integer type that could hold the constant. This method must be consistent with CCodeGenerator>>cLiteralFor:" | hb | value isInteger ifTrue: [value positive ifTrue: [hb := value highBit. hb < 32 ifTrue: [^#int]. hb = 32 ifTrue: [^#'unsigned int']. hb = 64 ifTrue: [^#'unsigned long long']. ^#'long long'] ifFalse: [hb := value bitInvert highBit. hb < 32 ifTrue: [^#int]. ^#'long long']]. value isFloat ifTrue: [^#double]. + (#(nil true false) includes: value) ifTrue: [^#sqInt]. "A machine word sized variable is better on 64-bits than int, we think." - (#(nil true false) includes: value) ifTrue: [^#int]. (value isString and: [value isSymbol not]) ifTrue: [^#'char *']. ^nil! Item was changed: ----- Method: TMethod>>typeFor:in: (in category 'utilities') ----- + typeFor: aVariableOrConstantOrVariableNameString in: aCodeGen - typeFor: aVariable in: aCodeGen "Answer the type for aVariable, deferring to aCodeGen (which defers to the vmClass) if no type is found and the variable is global (not an arg or a local). Expect the cCodeGen to answer nil for variables without types. nil for typelessness is required by the type propagation logic in inlineSend:directReturn:exitVar:in:." | varName | + aVariableOrConstantOrVariableNameString isString ifFalse: + ["N.B. Very important *not* to type integers, to allow the client to do the work of merging various integer types." + (aVariableOrConstantOrVariableNameString isConstant + and: [aVariableOrConstantOrVariableNameString value isInteger not]) ifTrue: + [^aVariableOrConstantOrVariableNameString typeOrNilFrom: aCodeGen in: self]]. + varName := aVariableOrConstantOrVariableNameString asString. - varName := aVariable asString. ^(declarations at: varName ifAbsent: [(args includes: varName) "arg types default to sqInt" ifTrue: ['sqInt ', varName] ifFalse: [(locals includes: varName) ifFalse: "don't provide type for locals" [aCodeGen typeOfVariable: varName]]]) ifNotNil: [:decl| aCodeGen extractTypeFor: varName fromDeclaration: decl]! Item was added: + ----- Method: ThreadedFFIPlugin>>primitiveCDataModel (in category 'primitives') ----- + primitiveCDataModel + "Two forms of C Data Model infomation. + With 0 arguments answer the string naming the C data model, LP32, LP64, LLP64, etc. + WIth 1 argument, which must be a ByteArray of at least 9 elements, answer the sizes of + char, short, int, long, long long, wchar_t, float, double, void *." + + | errorCode model | + interpreterProxy methodArgumentCount = 1 ifTrue: + [| sizes | + sizes := interpreterProxy stackValue: 0. + ((interpreterProxy isBytes: sizes) + and: [(interpreterProxy slotSizeOf: sizes) = 9]) ifFalse: + [^interpreterProxy primitiveFailFor: PrimErrBadArgument]. + (self cCoerceSimple: (interpreterProxy firstIndexableField: sizes) to: #'char *') + at: 0 put: (self sizeof: #char); + at: 1 put: (self sizeof: #short); + at: 2 put: (self sizeof: #int); + at: 3 put: (self sizeof: #long); + at: 4 put: (self sizeof: #'long long'); + at: 5 put: (self sizeof: #wchar_t); + at: 6 put: (self sizeof: #float); + at: 7 put: (self sizeof: #double); + at: 8 put: (self sizeof: #'void *'). + ^interpreterProxy methodReturnValue: sizes]. + + interpreterProxy methodArgumentCount = 0 ifFalse: + [^interpreterProxy primitiveFailFor: PrimErrBadNumArgs]. + + "Attempt to identify the programming model: + LP32 ILP32 LLP64 LP64 ILP64 SILP64(unidentified) + char 8 8 8 8 8 8 + + short 16 16 16 16 16 64 + + int 16 32 32 32 64 64 + + long 32 32 32 64 64 64 + + long long 64 64 64 64 64 64 + + pointer 32 32 64 64 64 64" + + errorCode := 0. "Set bit 0 if char is wrong, bit 1 if short is wrong, 2 for int, 3 for long, 4 for long long, 5 for void *" + (self sizeof: #char) ~= 1 ifTrue: + [errorCode := errorCode + 1]. + (self sizeof: #short) ~= 2 ifTrue: "N.B. SILP64 exists on Cray supercomputers; we don't care..." + [errorCode := errorCode + 2]. + (self sizeof: #'long long') ~= 8 ifTrue: + [errorCode := errorCode + 16]. + + (self sizeof: #'void *') = 8 ifTrue: "LP64 LLP64 ILP64" + [(self sizeof: #int) = 8 ifTrue: "ILP64" + [(self sizeof: #long) = 8 + ifTrue: [model := 'ILP64'] + ifFalse: [errorCode := errorCode + 8]]. + (self sizeof: #int) = 4 ifTrue: "LP64 or LLP64" + [(self sizeof: #long) = 8 ifTrue: "LP64" + [model := 'LP64']. + (self sizeof: #long) = 4 ifTrue: "LLP64" + [model := 'LLP64']. + ((self sizeof: #long) ~= 8 and: [(self sizeof: #long) ~= 4]) ifTrue: + [errorCode := errorCode + 8]]. + ((self sizeof: #int) ~= 8 and: [(self sizeof: #int) ~= 4]) ifTrue: + [errorCode := errorCode + 4]]. + + (self sizeof: #'void *') = 4 ifTrue: "LP32 ILP32" + [(self sizeof: #long) ~= 4 ifTrue: + [errorCode := errorCode + 8]. + (self sizeof: #int) = 4 ifTrue: "ILP32" + [model := 'ILP32']. + (self sizeof: #int) = 2 ifTrue: "LP32" + [model := 'LP32']. + ((self sizeof: #int) ~= 4 and: [(self sizeof: #int) ~= 2]) ifTrue: + [errorCode := errorCode + 4]]. + + ((self sizeof: #'void *') ~= 8 and: [(self sizeof: #'void *') ~= 4]) ifTrue: + [errorCode := errorCode + 32]. + + errorCode ~= 0 ifTrue: + [^interpreterProxy primitiveFailForOSError: errorCode]. + model ifNil: + [^interpreterProxy primitiveFailFor: PrimErrNotFound]. + interpreterProxy methodReturnString: model + + "Screed for testing + | proxy plugin | + proxy := InterpreterProxy new. + plugin := ThreadedFFIPluginPartialSimulator new. + plugin sizes: (Dictionary newFromPairs: #(char 1 short 2 int 4 long 4 #'long long' 8 #'void *' 8 #'void *' 4 float 4 double 8 wchar_t 4)). + plugin sizes: (Dictionary newFromPairs: #(char 1 short 2 int 2 long 4 #'long long' 8 #'void *' 4 float 4 double 8 wchar_t 4)). + plugin instVarNamed: 'interpreterProxy' put: proxy. + proxy synthesizeStackFor: plugin with: (Array with: (ByteArray new: 9)). + plugin primitiveCDataModel. + ^proxy stackValue: 0"! Item was added: + ThreadedFFIPlugin subclass: #ThreadedFFIPluginPartialSimulator + instanceVariableNames: 'sizes' + classVariableNames: '' + poolDictionaries: '' + category: 'VMMaker-Plugins-FFI'! + + !ThreadedFFIPluginPartialSimulator commentStamp: 'eem 7/16/2020 12:22' prior: 0! + A ThreadedFFIPluginPartialSimulator exists to test a few primitives such as primitiveCProgrammingModel. + + Instance Variables + sizes a Dictionary of sizes for sizeof:! Item was added: + ----- Method: ThreadedFFIPluginPartialSimulator>>sizeof: (in category 'simulation support') ----- + sizeof: aType + ^sizes + ifNil: [super sizeof: aType] + ifNotNil: [sizes at: aType]! Item was added: + ----- Method: ThreadedFFIPluginPartialSimulator>>sizes (in category 'accessing') ----- + sizes + + ^ sizes! Item was added: + ----- Method: ThreadedFFIPluginPartialSimulator>>sizes: (in category 'accessing') ----- + sizes: anObject + + sizes := anObject.! Item was added: + ----- Method: VMStructType class>>ensureStructTypeCache (in category 'translation') ----- + ensureStructTypeCache + ^StructTypeNameCache ifNil: + [StructTypeNameCache := Set new. + self allSubclassesDo: + [:sc| sc addStructTypeNamesTo: StructTypeNameCache]. + StructTypeNameCache]! Item was removed: - ----- Method: VMStructType class>>ensureStructTypeNameCache (in category 'translation') ----- - ensureStructTypeNameCache - ^StructTypeNameCache ifNil: - [StructTypeNameCache := Set new. - self allSubclassesDo: - [:sc| sc addStructTypeNamesTo: StructTypeNameCache]. - StructTypeNameCache]! Item was changed: ----- Method: VMStructType class>>isTypePointerToStruct: (in category 'translation') ----- isTypePointerToStruct: type | index | ^type notNil and: [(index := type indexOf: $*) > 0 + and: [self ensureStructTypeCache anySatisfy: - and: [self ensureStructTypeNameCache anySatisfy: [:structType| (type beginsWith: structType) and: [index > structType size]]]]! Item was changed: ----- Method: VMStructType class>>isTypeStruct: (in category 'translation') ----- isTypeStruct: type + self ensureStructTypeCache. - StructTypeNameCache ifNil: - [StructTypeNameCache := Set new. - self allSubclassesDo: - [:sc| StructTypeNameCache add: sc name; add: sc structTypeName]]. ^type notNil and: [StructTypeNameCache anySatisfy: [:structType| type = structType]]! Item was changed: ----- Method: VMStructType class>>structTargetKindForDeclaration: (in category 'translation') ----- structTargetKindForDeclaration: decl ^(decl notNil + and: [(self ensureStructTypeCache includes: decl) - and: [(self ensureStructTypeNameCache includes: decl) or: [StructTypeNameCache anySatisfy: [:structType| (decl beginsWith: structType) and: [(decl indexOf: $* ifAbsent: [decl indexOf: Character space]) > structType size]]]]) ifTrue: [(decl indexOf: $*) > 0 ifTrue: [#pointer] ifFalse: [#struct]]! Item was changed: ----- Method: VMStructType class>>structTargetKindForType: (in category 'translation') ----- structTargetKindForType: type + self ensureStructTypeCache. - StructTypeNameCache ifNil: - [StructTypeNameCache := Set new. - self allSubclassesDo: - [:sc| StructTypeNameCache add: sc name; add: sc structTypeName ]]. ^(type notNil and: [StructTypeNameCache anySatisfy: [:structType| (type beginsWith: structType) and: [type size = structType size or: [(type at: structType size + 1) isAlphaNumeric not]]]]) ifTrue: [(type includes: $*) ifTrue: [#pointer] ifFalse: [#struct]]! From noreply at github.com Thu Jul 16 23:41:54 2020 From: noreply at github.com (Eliot Miranda) Date: Thu, 16 Jul 2020 16:41:54 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] ae724f: CogVM source as per VMMaker.oscog-eem.2775 Message-ID: Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: ae724ff77d9af402c15916b529ee10e3a3db7fcf https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/ae724ff77d9af402c15916b529ee10e3a3db7fcf Author: Eliot Miranda Date: 2020-07-16 (Thu, 16 Jul 2020) Changed paths: M nsspur64src/vm/cogit.h M nsspur64src/vm/cogitARMv8.c M nsspur64src/vm/cogitX64SysV.c M nsspur64src/vm/cogitX64WIN64.c M nsspursrc/vm/cogit.h M nsspursrc/vm/cogitARMv5.c M nsspursrc/vm/cogitIA32.c M nsspursrc/vm/cogitMIPSEL.c M spur64src/vm/cogit.h M spur64src/vm/cogitARMv8.c M spur64src/vm/cogitX64SysV.c M spur64src/vm/cogitX64WIN64.c M spurlowcode64src/vm/cogit.h M spurlowcode64src/vm/cogitARMv8.c M spurlowcode64src/vm/cogitX64SysV.c M spurlowcode64src/vm/cogitX64WIN64.c M spurlowcodesrc/vm/cogit.h M spurlowcodesrc/vm/cogitARMv5.c M spurlowcodesrc/vm/cogitIA32.c M spurlowcodesrc/vm/cogitMIPSEL.c M spursista64src/vm/cogit.h M spursista64src/vm/cogitARMv8.c M spursista64src/vm/cogitX64SysV.c M spursista64src/vm/cogitX64WIN64.c M spursistasrc/vm/cogit.h M spursistasrc/vm/cogitARMv5.c M spursistasrc/vm/cogitIA32.c M spursistasrc/vm/cogitMIPSEL.c M spursrc/vm/cogit.h M spursrc/vm/cogitARMv5.c M spursrc/vm/cogitIA32.c M spursrc/vm/cogitMIPSEL.c M src/plugins/SqueakFFIPrims/ARM32FFIPlugin.c M src/plugins/SqueakFFIPrims/ARM64FFIPlugin.c M src/plugins/SqueakFFIPrims/IA32FFIPlugin.c M src/plugins/SqueakFFIPrims/X64SysVFFIPlugin.c M src/plugins/SqueakFFIPrims/X64Win64FFIPlugin.c M src/vm/cogit.h M src/vm/cogitARMv5.c M src/vm/cogitIA32.c M src/vm/cogitMIPSEL.c Log Message: ----------- CogVM source as per VMMaker.oscog-eem.2775 Fix a warning from compiling the cogit. ThreadedFFIPlugin: Add primitiveCDataModel which with 0 args answers the C data model name (LLP64, ILP32 et al), and with a ByteArray arg of 9 elements, answers the sizes of char, short, etc, & wchar_t. Slang: Allow TMethod>>typeFor:in: to infer tpes for non-integral constants (integral constants need very special handling, done in the client). Eliminate unnecessary parentheses in ifNil:. From no-reply at appveyor.com Thu Jul 16 23:45:32 2020 From: no-reply at appveyor.com (AppVeyor) Date: Thu, 16 Jul 2020 23:45:32 +0000 Subject: [Vm-dev] Build failed: opensmalltalk-vm 1.0.2114 Message-ID: <20200716234532.1.83D5B512B3E90CC8@appveyor.com> An HTML attachment was scrubbed... URL: From builds at travis-ci.org Thu Jul 16 23:51:15 2020 From: builds at travis-ci.org (Travis CI) Date: Thu, 16 Jul 2020 23:51:15 +0000 Subject: [Vm-dev] Errored: OpenSmalltalk/opensmalltalk-vm#2116 (Cog - ae724ff) In-Reply-To: Message-ID: <5f10e7f22c024_13fa0faadff1815808@travis-tasks-86578488dc-pz6h2.mail> Build Update for OpenSmalltalk/opensmalltalk-vm ------------------------------------- Build: #2116 Status: Errored Duration: 8 mins and 44 secs Commit: ae724ff (Cog) Author: Eliot Miranda Message: CogVM source as per VMMaker.oscog-eem.2775 Fix a warning from compiling the cogit. ThreadedFFIPlugin: Add primitiveCDataModel which with 0 args answers the C data model name (LLP64, ILP32 et al), and with a ByteArray arg of 9 elements, answers the sizes of char, short, etc, & wchar_t. Slang: Allow TMethod>>typeFor:in: to infer tpes for non-integral constants (integral constants need very special handling, done in the client). Eliminate unnecessary parentheses in ifNil:. View the changeset: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/53b979ff231d...ae724ff77d9a View the full build log and details: https://travis-ci.org/github/OpenSmalltalk/opensmalltalk-vm/builds/708969862?utm_medium=notification&utm_source=email -- You can unsubscribe from build emails from the OpenSmalltalk/opensmalltalk-vm repository going to https://travis-ci.org/account/preferences/unsubscribe?repository=8795279&utm_medium=notification&utm_source=email. Or unsubscribe from *all* email updating your settings at https://travis-ci.org/account/preferences/unsubscribe?utm_medium=notification&utm_source=email. Or configure specific recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications. -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits at source.squeak.org Thu Jul 16 23:52:36 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Thu, 16 Jul 2020 23:52:36 0000 Subject: [Vm-dev] VM Maker: VMMaker.oscog-eem.2776.mcz Message-ID: Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2776.mcz ==================== Summary ==================== Name: VMMaker.oscog-eem.2776 Author: eem Time: 16 July 2020, 4:52:27.299313 pm UUID: 9f8a0f46-28c8-4139-8366-088e6e75e4cd Ancestors: VMMaker.oscog-eem.2775 Oops! Fix a regression from VMMaker.oscog-eem.2774. Slang isn't smart enough to emit types for C's funky example typing for functions that return pointers to functions, so we have to manually type genInvokeInterpretTrampoline. =============== Diff against VMMaker.oscog-eem.2775 =============== Item was changed: ----- Method: Cogit>>genInvokeInterpretTrampoline (in category 'initialization') ----- genInvokeInterpretTrampoline "Switch to the C stack (do *not* save the Smalltalk stack pointers; this is the caller's responsibility), and invoke interpret PDQ." + | startAddress | startAddress := methodZoneBase. self zeroOpcodeIndex. backEnd hasVarBaseRegister ifTrue: [self MoveCq: self varBaseAddress R: VarBaseReg]. "Must happen first; value may be used in genLoadStackPointers" cFramePointerInUse ifTrue: [backEnd genLoadCStackPointers] ifFalse: [backEnd genLoadCStackPointer]. "Sideways call interpret so that the stack looks correct, for exception handling etc" backEnd genMarshallNArgs: 0 arg: nil arg: nil arg: nil arg: nil. backEnd hasLinkRegister ifTrue: [self MoveAw: coInterpreter cReturnAddressAddress R: LinkReg] ifFalse: [self MoveAw: coInterpreter cReturnAddressAddress R: ABIResultReg. backEnd genSubstituteReturnAddressR: ABIResultReg]. self JumpFullRT: (self cCode: [#interpret asUnsignedInteger] inSmalltalk: [self simulatedTrampolineFor: #interpret]). self outputInstructionsForGeneratedRuntimeAt: startAddress. self recordGeneratedRunTime: 'ceInvokeInterpret' address: startAddress. ^self cCoerceSimple: startAddress to: #'void (*)(void)'! From noreply at github.com Thu Jul 16 23:57:39 2020 From: noreply at github.com (Eliot Miranda) Date: Thu, 16 Jul 2020 16:57:39 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] b90d60: CogVM source as per Name: VMMaker.oscog-eem.2776 Message-ID: Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: b90d60fc7119d945591ae3e8d66d2ab0108fefc6 https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/b90d60fc7119d945591ae3e8d66d2ab0108fefc6 Author: Eliot Miranda Date: 2020-07-16 (Thu, 16 Jul 2020) Changed paths: M nsspur64src/vm/cogit.h M nsspur64src/vm/cogitARMv8.c M nsspur64src/vm/cogitX64SysV.c M nsspur64src/vm/cogitX64WIN64.c M nsspursrc/vm/cogit.h M nsspursrc/vm/cogitARMv5.c M nsspursrc/vm/cogitIA32.c M nsspursrc/vm/cogitMIPSEL.c M spur64src/vm/cogit.h M spur64src/vm/cogitARMv8.c M spur64src/vm/cogitX64SysV.c M spur64src/vm/cogitX64WIN64.c M spurlowcode64src/vm/cogit.h M spurlowcode64src/vm/cogitARMv8.c M spurlowcode64src/vm/cogitX64SysV.c M spurlowcode64src/vm/cogitX64WIN64.c M spurlowcodesrc/vm/cogit.h M spurlowcodesrc/vm/cogitARMv5.c M spurlowcodesrc/vm/cogitIA32.c M spurlowcodesrc/vm/cogitMIPSEL.c M spursista64src/vm/cogit.h M spursista64src/vm/cogitARMv8.c M spursista64src/vm/cogitX64SysV.c M spursista64src/vm/cogitX64WIN64.c M spursistasrc/vm/cogit.h M spursistasrc/vm/cogitARMv5.c M spursistasrc/vm/cogitIA32.c M spursistasrc/vm/cogitMIPSEL.c M spursrc/vm/cogit.h M spursrc/vm/cogitARMv5.c M spursrc/vm/cogitIA32.c M spursrc/vm/cogitMIPSEL.c M src/vm/cogit.h M src/vm/cogitARMv5.c M src/vm/cogitIA32.c M src/vm/cogitMIPSEL.c Log Message: ----------- CogVM source as per Name: VMMaker.oscog-eem.2776 Oops! Fix a regression from VMMaker.oscog-eem.2774. Slang isn't smart enough to emit types for C's funky example typing for functions that return pointers to functions, so we have to manually type genInvokeInterpretTrampoline. From no-reply at appveyor.com Fri Jul 17 00:41:09 2020 From: no-reply at appveyor.com (AppVeyor) Date: Fri, 17 Jul 2020 00:41:09 +0000 Subject: [Vm-dev] Build failed: opensmalltalk-vm 1.0.2115 Message-ID: <20200717004109.1.50D154EC3826E07D@appveyor.com> An HTML attachment was scrubbed... URL: From commits at source.squeak.org Fri Jul 17 01:29:33 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Fri, 17 Jul 2020 01:29:33 0000 Subject: [Vm-dev] VM Maker: VMMaker.oscog-eem.2777.mcz Message-ID: Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2777.mcz ==================== Summary ==================== Name: VMMaker.oscog-eem.2777 Author: eem Time: 16 July 2020, 6:29:24.838687 pm UUID: 6b0b031e-efb5-4b78-af61-94095803d9ea Ancestors: VMMaker.oscog-eem.2776 Test accessors for the new primitiveCDataModel. =============== Diff against VMMaker.oscog-eem.2776 =============== Item was added: + ----- Method: ThreadedFFIPlugin class>>primitiveCDataModel (in category 'simulation') ----- + primitiveCDataModel + "Answer the name for the platform C compiler's data model, ILP32, LP64, et al." + + self primitiveFailed + + "self primitiveCDataModel"! Item was added: + ----- Method: ThreadedFFIPlugin class>>primitiveSizesInto: (in category 'simulation') ----- + primitiveSizesInto: aByteArrayOfSizeNine + "Answer the platform C compiler's sizes for char, short, int, long, long long, wchar_t, float, double, void *." + + self primitiveFailed + + "(#(char short int long #'long long' wchar_t float double #'void *') + with: (self primitiveSizesInto: (ByteArray new: 9)) + collect: [:n :s| {n. s}]) flatten"! From builds at travis-ci.org Fri Jul 17 03:30:51 2020 From: builds at travis-ci.org (Travis CI) Date: Fri, 17 Jul 2020 03:30:51 +0000 Subject: [Vm-dev] Passed: OpenSmalltalk/opensmalltalk-vm#2117 (Cog - b90d60f) In-Reply-To: Message-ID: <5f111b6ae69e6_13fb3279a0ed826416@travis-tasks-6fcf599bf5-fsls6.mail> Build Update for OpenSmalltalk/opensmalltalk-vm ------------------------------------- Build: #2117 Status: Passed Duration: 3 hrs, 32 mins, and 59 secs Commit: b90d60f (Cog) Author: Eliot Miranda Message: CogVM source as per Name: VMMaker.oscog-eem.2776 Oops! Fix a regression from VMMaker.oscog-eem.2774. Slang isn't smart enough to emit types for C's funky example typing for functions that return pointers to functions, so we have to manually type genInvokeInterpretTrampoline. View the changeset: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/ae724ff77d9a...b90d60fc7119 View the full build log and details: https://travis-ci.org/github/OpenSmalltalk/opensmalltalk-vm/builds/708973978?utm_medium=notification&utm_source=email -- You can unsubscribe from build emails from the OpenSmalltalk/opensmalltalk-vm repository going to https://travis-ci.org/account/preferences/unsubscribe?repository=8795279&utm_medium=notification&utm_source=email. Or unsubscribe from *all* email updating your settings at https://travis-ci.org/account/preferences/unsubscribe?utm_medium=notification&utm_source=email. Or configure specific recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications. -------------- next part -------------- An HTML attachment was scrubbed... URL: From stes at telenet.be Fri Jul 17 18:46:18 2020 From: stes at telenet.be (stes@PANDORA.BE) Date: Fri, 17 Jul 2020 20:46:18 +0200 (CEST) Subject: [Vm-dev] FloatMathPlugin and -lm (libm) Message-ID: <1660314514.68187081.1595011578217.JavaMail.zimbra@telenet.be> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 I've noticed that in the FloatMathPlugin there is fdlibm (freely distributable libm) : platforms/Cross/plugins/FloatMathPlugin This refers to the platforms/Cross/third-party/fdlibm I wonder whether the VM shouldn't be using the system provided libm (-lm). Perhaps for Croquet or other software that depends on FLoatMathPlugin, see https://en.m.wikipedia.org/wiki/Croquet_Project a special test framework could be ran in Squeak, or perhaps as part of "./configure" configuration, to check the results, of the underlying (system) libm, so that it provides results similar to fdlibm ? Maybe fdlibm and libm "run bit identically" on some platforms. This is because for Croquet the goal is to have the VM run bit identically. Using the system provided -lm would possibly result in a smaller executable, with less duplicated code (no overhead). I'm no expert on libm, but perhaps the system provided libm is also faster. Regards, David Stes -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJfEfHMAAoJEAwpOKXMq1Ma1psH/2yaIMdU6YMV8ZUSRlolvsH8 jlcuxPZV/Oo0FOq+jF2moBV01WquA8vCxZKm40s7ofrac7dWuNaaWwpDg/2xiVGc p0crmTlv9FtHqTzjT3lrBMDxvOwq9oXAJUX+LaeGhNkYMbLE969m8hoRNSlDPPuk NsXowTP7PpjyZ5RB5FApRHEnBzzyHjUIksUUhedCDWQRMqebEwxmHWbq6UobcED7 zVDx04crvw2hhzhKN8+AomZXNccMTDEQ6fTVBDeP7t4/iRmxo/6MmxOKMbQJ5dIi fgYpODPPvXiAYipVx/lRXhgo5xEjQXgPjwBXKYQy8O2vJdH/0q/7r8u8k1MutbI= =lWqV -----END PGP SIGNATURE----- From noreply at github.com Sat Jul 18 02:45:51 2020 From: noreply at github.com (Eliot Miranda) Date: Fri, 17 Jul 2020 19:45:51 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 02a274: Mac CameraPlugin: Add safety, only copying the min... Message-ID: Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: 02a274782dfa1747a846950423ec2bb555c282e9 https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/02a274782dfa1747a846950423ec2bb555c282e9 Author: Eliot Miranda Date: 2020-07-17 (Fri, 17 Jul 2020) Changed paths: M platforms/iOS/plugins/CameraPlugin/AVFoundationVideoGrabber.m Log Message: ----------- Mac CameraPlugin: Add safety, only copying the minimum of the size of the c framebuffer and the size of the input buffer. Use "grabber" instead of "this" as the variable name for each camera struct, since lldb refuses to allow this to be used, assuming it is being used outside an object context. From no-reply at appveyor.com Sat Jul 18 03:34:28 2020 From: no-reply at appveyor.com (AppVeyor) Date: Sat, 18 Jul 2020 03:34:28 +0000 Subject: [Vm-dev] Build failed: opensmalltalk-vm 1.0.2116 Message-ID: <20200718033428.1.BEF263D8BA4BECD9@appveyor.com> An HTML attachment was scrubbed... URL: From notifications at github.com Sat Jul 18 07:27:42 2020 From: notifications at github.com (Tobias Pape) Date: Sat, 18 Jul 2020 00:27:42 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Mac CameraPlugin: Add safety, only copying the minimum of the size of the c (02a2747) In-Reply-To: References: Message-ID: Was that intentional? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/02a274782dfa1747a846950423ec2bb555c282e9#commitcomment-40707585 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Sat Jul 18 07:28:44 2020 From: notifications at github.com (Tobias Pape) Date: Sat, 18 Jul 2020 00:28:44 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Mac CameraPlugin: Add safety, only copying the minimum of the size of the c (02a2747) In-Reply-To: References: Message-ID: Can we please not have one-armed two-line ifs? :( I know you like that style but its still dangerous… -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/02a274782dfa1747a846950423ec2bb555c282e9#commitcomment-40707594 -------------- next part -------------- An HTML attachment was scrubbed... URL: From eliot.miranda at gmail.com Sat Jul 18 17:57:59 2020 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sat, 18 Jul 2020 10:57:59 -0700 Subject: [Vm-dev] FloatMathPlugin and -lm (libm) In-Reply-To: <1660314514.68187081.1595011578217.JavaMail.zimbra@telenet.be> References: <1660314514.68187081.1595011578217.JavaMail.zimbra@telenet.be> Message-ID: Hi David, > On Jul 17, 2020, at 11:46 AM, stes at PANDORA.BE wrote: > >  > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > > I've noticed that in the FloatMathPlugin there is fdlibm > (freely distributable libm) : > > platforms/Cross/plugins/FloatMathPlugin > > This refers to the platforms/Cross/third-party/fdlibm > > I wonder whether the VM shouldn't be using the system provided libm (-lm). > > Perhaps for Croquet or other software that depends on FLoatMathPlugin, > see https://en.m.wikipedia.org/wiki/Croquet_Project > a special test framework could be ran in Squeak, > or perhaps as part of "./configure" configuration, to check the results, > of the underlying (system) libm, so that it provides results similar to fdlibm ? > > Maybe fdlibm and libm "run bit identically" on some platforms. > > This is because for Croquet the goal is to have the VM run bit identically. > > Using the system provided -lm would possibly result in a smaller executable, > with less duplicated code (no overhead). > > I'm no expert on libm, but perhaps the system provided libm is also faster. For context see https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/383#issuecomment-629095487 What we want (I think) is either the entire vm, including the FloatMathPlugin, links against the platform’s libm, or the entire vm, including the FloatMathPlugin, links against fdlibm. I don’t see much benefit in arbitrarily mixing and matching. So then we arrive at the above message. Is the default to link against the platform’s libm, requiring a Makefile to specify BIT_IDENTICAL_FLOATING_POINT to link against fdlibm, or is the default to link against fdlibm, requiring a Makefile to specify PLATFORM_SPECIFIC_FLOATING_POINT to link against the platform’s libm? I agree with Marcel that the latter is preferable, by default a vm provides bit-identical floating-point, building and linking against fdlibm. For the moment we have the former. Im not too concerned about core floating-point performance. I don’t think it dominates in our usage because we have other overheads, primarily primitive invocation and boxing/unboxing. Whereas I do think that the core execution engine should be perfectly cross-platform, and floating point is the one area I’m aware of where the platform percolates up. So I think we should make it an objective that the 6.0 release vm links against fdlibm. What do people think? > Regards, > David Stes Eliot _,,,^..^,,,_ (phone) -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at rowledge.org Sat Jul 18 18:44:19 2020 From: tim at rowledge.org (tim Rowledge) Date: Sat, 18 Jul 2020 11:44:19 -0700 Subject: [Vm-dev] setting rtprio on ubuntu 18 x64 box appears to fail Message-ID: <48810669-DCAD-4845-ABF0-D67C822D8344@rowledge.org> Running a recent squeak 5.3-19435 on an x64 ubuntu 18 system has the vm complaining about the rtprio stuff. The /etc/security/limits.d/squeak.conf file appears to have the appropriate contents and lists as -rw-r--r-- 1 root root permissions etc. I rebooted the system. VM still complains. Tried the `ulimit -r 2` -> Operation not permitted Let's see, anything else I can add... uname -a -> Linux gravious 4.15.0-101-generic #102-Ubuntu SMP May 11 10:07:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux Gronk? Thank goodness we never had so much of this annoyance on RPi. tim -- tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim If it was easy, the hardware people would take care of it. From leves at caesar.elte.hu Sat Jul 18 23:52:38 2020 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Sun, 19 Jul 2020 01:52:38 +0200 (CEST) Subject: [Vm-dev] VM Maker: VMMaker.oscog-eem.2761.mcz In-Reply-To: References: Message-ID: Hi Eliot, On Thu, 25 Jun 2020, Eliot Miranda wrote: > Here's how to do #1. > > 1. check out the opensmalltalk-vm repository (or update your copy) > 2. build a VMMaker image using opensmalltalk-vm/image/buildspurtrunkvmmaker64image.sh (or update your copy) > 3. open the Source Generation workspace to find the source generaiton doits. > 4. evaluate VMMaker generateVMPlugins. > 5. in opensmalltalk-vm commit using scripts/gitci -u Does that work with pull requests too? #3 is waiting for integration: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/513 Levente From noreply at github.com Sun Jul 19 03:28:31 2020 From: noreply at github.com (Eliot Miranda) Date: Sat, 18 Jul 2020 20:28:31 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 8b2091: Make the linux makeallsqueak scripts do what they ... Message-ID: Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: 8b209154f6a9fc9e138713da2963797df4ccdbba https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/8b209154f6a9fc9e138713da2963797df4ccdbba Author: Eliot Miranda Date: 2020-07-18 (Sat, 18 Jul 2020) Changed paths: A build.linux64ARMv8/makeall A build.linux64ARMv8/makeallclean A build.linux64ARMv8/makeallmakefiles A build.linux64ARMv8/makeallsqueak M build.linux64x64/makeallsqueak Log Message: ----------- Make the linux makeallsqueak scripts do what they claim. Add make scripts for linux64ARMv8. [ci skip] From noreply at github.com Sun Jul 19 07:14:40 2020 From: noreply at github.com (Tobias Pape) Date: Sun, 19 Jul 2020 00:14:40 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 4540d7: Add missing Cryptography plugins to squeak builds Message-ID: Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: 4540d7e3e5233a0921445783089f5b0f76519b49 https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/4540d7e3e5233a0921445783089f5b0f76519b49 Author: Levente Uzonyi Date: 2020-07-14 (Tue, 14 Jul 2020) Changed paths: M build.linux32ARMv6/squeak.cog.spur/plugins.ext M build.linux32ARMv6/squeak.stack.spur/plugins.ext M build.linux32ARMv6/squeak.stack.v3/plugins.ext M build.linux32x86/squeak.cog.spur.immutability/plugins.ext M build.linux32x86/squeak.cog.spur/plugins.ext M build.linux32x86/squeak.cog.v3/plugins.ext M build.linux32x86/squeak.sista.spur/plugins.ext M build.linux32x86/squeak.stack.spur/plugins.ext M build.linux32x86/squeak.stack.v3/plugins.ext M build.linux64ARMv8/squeak.cog.spur/plugins.ext M build.linux64ARMv8/squeak.stack.spur/plugins.ext M build.linux64x64/squeak.cog.spur.immutability/plugins.ext M build.linux64x64/squeak.cog.spur/plugins.ext M build.linux64x64/squeak.stack.spur/plugins.ext M build.macos32x86/squeak.cog.spur+immutability/plugins.ext M build.macos32x86/squeak.cog.spur/plugins.ext M build.macos32x86/squeak.cog.v3/plugins.ext M build.macos32x86/squeak.sista.spur/plugins.ext M build.macos32x86/squeak.stack.spur/plugins.ext M build.macos32x86/squeak.stack.v3/plugins.ext M build.macos64x64/squeak.cog.spur.immutability/plugins.ext M build.macos64x64/squeak.cog.spur/plugins.ext M build.macos64x64/squeak.sista.spur/plugins.ext M build.macos64x64/squeak.stack.spur/plugins.ext M build.sunos32x86/squeak.cog.spur/plugins.ext M build.sunos32x86/squeak.stack.spur/plugins.ext M build.sunos64x64/squeak.cog.spur/plugins.ext M build.sunos64x64/squeak.stack.spur/plugins.ext M build.win32x86/squeak.cog.spur.lowcode/plugins.ext M build.win32x86/squeak.cog.spur/plugins.ext M build.win32x86/squeak.cog.v3/plugins.ext M build.win32x86/squeak.sista.spur/plugins.ext M build.win32x86/squeak.stack.spur/plugins.ext M build.win32x86/squeak.stack.v3/plugins.ext M build.win64x64/squeak.cog.spur/plugins.ext M build.win64x64/squeak.stack.spur/plugins.ext Log Message: ----------- Add missing Cryptography plugins to squeak builds DESPlugin, MD5Plugin and SHA2Plugin as external plugins Commit: b543daf0722049a61fbffd3780d02443fff14e12 https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/b543daf0722049a61fbffd3780d02443fff14e12 Author: Levente Uzonyi Date: 2020-07-15 (Wed, 15 Jul 2020) Changed paths: M build.linux32ARMv6/squeak.cog.spur/plugins.ext M build.macos64x64/squeak.cog.spur.immutability/plugins.ext M build.macos64x64/squeak.cog.spur/plugins.ext M build.macos64x64/squeak.sista.spur/plugins.ext M build.macos64x64/squeak.stack.spur/plugins.ext M build.win32x86/squeak.cog.spur.lowcode/plugins.ext Log Message: ----------- Add missing Cryptography plugins to squeak builds part 2 Make sure that all commented out plugins in modified plugins.ext files go to the end. Commit: a3b64322cacbc395fe23f3d8221da90f488f50bc https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/a3b64322cacbc395fe23f3d8221da90f488f50bc Author: Tobias Pape Date: 2020-07-19 (Sun, 19 Jul 2020) Changed paths: M build.linux32ARMv6/squeak.cog.spur/plugins.ext M build.linux32ARMv6/squeak.stack.spur/plugins.ext M build.linux32ARMv6/squeak.stack.v3/plugins.ext M build.linux32x86/squeak.cog.spur.immutability/plugins.ext M build.linux32x86/squeak.cog.spur/plugins.ext M build.linux32x86/squeak.cog.v3/plugins.ext M build.linux32x86/squeak.sista.spur/plugins.ext M build.linux32x86/squeak.stack.spur/plugins.ext M build.linux32x86/squeak.stack.v3/plugins.ext M build.linux64ARMv8/squeak.cog.spur/plugins.ext M build.linux64ARMv8/squeak.stack.spur/plugins.ext M build.linux64x64/squeak.cog.spur.immutability/plugins.ext M build.linux64x64/squeak.cog.spur/plugins.ext M build.linux64x64/squeak.stack.spur/plugins.ext M build.macos32x86/squeak.cog.spur+immutability/plugins.ext M build.macos32x86/squeak.cog.spur/plugins.ext M build.macos32x86/squeak.cog.v3/plugins.ext M build.macos32x86/squeak.sista.spur/plugins.ext M build.macos32x86/squeak.stack.spur/plugins.ext M build.macos32x86/squeak.stack.v3/plugins.ext M build.macos64x64/squeak.cog.spur.immutability/plugins.ext M build.macos64x64/squeak.cog.spur/plugins.ext M build.macos64x64/squeak.sista.spur/plugins.ext M build.macos64x64/squeak.stack.spur/plugins.ext M build.sunos32x86/squeak.cog.spur/plugins.ext M build.sunos32x86/squeak.stack.spur/plugins.ext M build.sunos64x64/squeak.cog.spur/plugins.ext M build.sunos64x64/squeak.stack.spur/plugins.ext M build.win32x86/squeak.cog.spur.lowcode/plugins.ext M build.win32x86/squeak.cog.spur/plugins.ext M build.win32x86/squeak.cog.v3/plugins.ext M build.win32x86/squeak.sista.spur/plugins.ext M build.win32x86/squeak.stack.spur/plugins.ext M build.win32x86/squeak.stack.v3/plugins.ext M build.win64x64/squeak.cog.spur/plugins.ext M build.win64x64/squeak.stack.spur/plugins.ext Log Message: ----------- Merge pull request #513 from smalltalking/Cog Add missing Cryptography plugins to squeak builds Compare: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/8b209154f6a9...a3b64322cacb From notifications at github.com Sun Jul 19 07:14:41 2020 From: notifications at github.com (Tobias Pape) Date: Sun, 19 Jul 2020 00:14:41 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Add missing Cryptography plugins to squeak builds (#513) In-Reply-To: References: Message-ID: Merged #513 into Cog. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/513#event-3562177757 -------------- next part -------------- An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Sun Jul 19 08:44:26 2020 From: no-reply at appveyor.com (AppVeyor) Date: Sun, 19 Jul 2020 08:44:26 +0000 Subject: [Vm-dev] Build failed: opensmalltalk-vm 1.0.2117 Message-ID: <20200719084426.1.054A0D427F50C8DA@appveyor.com> An HTML attachment was scrubbed... URL: From stes at telenet.be Sun Jul 19 11:55:50 2020 From: stes at telenet.be (stes@PANDORA.BE) Date: Sun, 19 Jul 2020 13:55:50 +0200 (CEST) Subject: [Vm-dev] FloatMathPlugin and -lm (libm) In-Reply-To: <1660314514.68187081.1595011578217.JavaMail.zimbra@telenet.be> References: <1660314514.68187081.1595011578217.JavaMail.zimbra@telenet.be> Message-ID: <1090452593.73885861.1595159750729.JavaMail.zimbra@telenet.be> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 For MacOS and Windows I think that it defines -DBIT_IDENTICAL_FLOATING_POINT=1: CFLAGS:=$(CFLAGS) -DBIT_IDENTICAL_FLOATING_POINT=1 That can be seen in ./build.macos64x64/common/Makefile.flags ./build.win64x64/common/Makefile.tools and then it adds fdlibm/libm.a: ifdef BIT_IDENTICAL_FLOATING_POINT LIBS:=$(LIBS) $(BLDDIR)/fdlibm/libm.a endif So I think that if you set -DBIT_IDENTICAL_FLOATING_POINT=0 on MacOS, then it stills adds fdlibm/libm.a (because it is defined as '0') So regardless of whether you set it '0' or '1', it adds fdlibm/libm.a right ? David Stes -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJfFDRfAAoJEAwpOKXMq1MaexQH/2pWfPKgd5EJjPXFepo5QK+z czByVnHFB8IOdcz23IVNq4JDwrMTFx3X8pnIpKAsWBOcEdxnd9zidaDdSUFk9VYF lUa8ToEpMoxbVmh0+5YH96yvXGmHQr8vv2C2G5AGuzRkqMbjTgN+MZNUGEpX0PAa 5bKLe7Lrt29Y7q2v0O6JxdlHR/xbUFcT7KFgbaWKZc/vPtGxfoVm0qyshQCFO2hJ P2RN9s3NwM9t4boO3TPpQwcnD5VGOqELWDYh1LAEksif+re5WIJmw0e9w2j5izhS qJRupmIA6qtXduj+G6sDCFdSb7Q9kPqje2RHbQgo49bOC+6BD+GspMq/NWzBwMI= =kCOF -----END PGP SIGNATURE----- From lewis at mail.msen.com Sun Jul 19 16:26:21 2020 From: lewis at mail.msen.com (David T. Lewis) Date: Sun, 19 Jul 2020 12:26:21 -0400 Subject: [Vm-dev] [squeak-dev] Support an updated image format number for Sista In-Reply-To: <20200113143334.GA9638@shell.msen.com> References: <20200113143334.GA9638@shell.msen.com> Message-ID: <20200719162621.GA89267@shell.msen.com> Background: Sista bytecodes have been supported in the VM (opensmalltalk-vm) for quite some time. Shortly after the Squeak 5.3 release Sista became the default bytecode set in the trunk image. In Squeak trunk, Sista bytecodes can be activated (or deactivated) with CompiledCode class>>useSista: aBoolean, which also calls the hook to inform the VM of Sista bytecode usage: This optional primitive is intended to inform the VM that an alternate bytecode set is (or is not) being used by the image, and the VM can use this information to update the image format number (first few bytes of the saved image file) to a new number that indicates that Sista or other enhanced bytecode set support is required for that image. A proposed implementation of the primitive for opensmalltalk-vm is in the VMMaker inbox (VMMaker.oscog-dtl.2711). An earlier follow-up discussion in this thread included the suggestion of e.g. a #primitiveAvailableBytecodeSets that would provide a list of available bytecode sets to the image. This is also a good idea, but it is not directly related to the intended use of #primitiveMultipleBytecodeSetsActive. Perhaps it could be implemented as a zero-argument call to a single primitive, such that a boolean argument informs the VM of multiple bytecodes active, and calling primitiveMultipleBytecodeSetsActive without arguments would ask the VM to tell the image what bytecode sets can be supported by that VM. @eliot - are you still on board with this concept, and if so could you please take a look at the inbox proposal? We discussed this in the last Squeak board meeting, and the board remains supportive of the idea of updating the image format number for the next Squeak release. Thanks, Dave On Mon, Jan 13, 2020 at 09:33:34AM -0500, David T. Lewis wrote: > Hi Eliot, > > This is a belated follow up on earlier private discussion during a Squeak > board meeting a few months ago, in which we agreed that identifying > "Sista in use" in the image format number would be a useful thing to do. > I previously added the documentation for this in ImageFormat-dtl.39.mcz > (as well as the updated ckformat.c program to match). > > Attached here is a change set that can be loaded into a VMMaker image to > add VM support for setting and reading the updated image format numbers. > Here I used a primitive to initially set or clear the "sista bit". There > are other ways this could be done, but this at least gets us started > with a working implementation. > > By way of explanation, I am copying below both the change set preamble > and the earlier ImageFormat commit notice: > > === > > Change Set: VMM-Sista-bit-dtl > Date: 12 January 2020 > Author: David T. Lewis > > Let the image inform the interpreter that alternate bytecodes either are > or are not in use, and remember that setting when writing or reading the > image format number in a shapshot file header. > > Provide primitiveMultipleBytecodesActive to allow the setting to be updated > from the image. Expected usage is that the image can call this primitive > after recompiling with Systa bytecodes, or after reverting back. Note that > an alternative implemenation would be to use a VM parameter. The primitive > was chosen here because it can perform parameter checking and does not > require coordinated update the the VM parameter usage. > > Expected usage is that this feature will remain unused for some grace period > (perhaps a few months) during which an updated VM can be widely circulated. > After that period, images using Sista bytecodes may be safely saved with the > updated image format number indicating that multiple bytecodes are in use. > > This change set includes helper methods in SmalltalkImage for testing or > setting the multipleBytecodeSetsActive setting in the VM. > > Note the change set postscript which is necessary for initializing a class > variable prior to code generation. > > === > > Name: ImageFormat-dtl.37 > Author: dtl > Time: 20 July 2019, 5:23:59.004 pm > UUID: 52b464d5-0bf7-4326-bde3-4f18ad70b239 > Ancestors: ImageFormat-dtl.36 > > Identify extended bytecodes for Sista in the image format number. Bit 10 > identifies an image that contains extended bytecodes. Thus a 32 bit Spur > image is 6521, with Sista it is 7033, and a 64 bit Spur image is 68021, > with Sista it is 68533. > > It is expected that additional bytecode sets can be identified by an > additional field in the image header, probably 32 bits containing two > 16 bit fields, if both zero then Sista. > > Per discussion with Eliot and Bert in a Squeak oversight board meeting > 2019-05-15. > > > Dave > > 'From Squeak5.3beta of 4 January 2020 [latest update: #19304] on 12 January 2020 at 2:10:55 pm'! "Change Set: VMM-Sista-bit-dtl Date: 12 January 2020 Author: David T. Lewis Let the image inform the interpreter that alternate bytecodes either are or are not in use, and remember that setting when writing or reading the image format number in a shapshot file header. Provide primitiveMultipleBytecodesActive to allow the setting to be updated from the image. Expected usage is that the image can call this primitive after recompiling with Systa bytecodes, or after reverting back. Note that an alternative implemenation would be to use a VM parameter. The primitive was chosen here because it can perform parameter checking and does not require coordinated update the the VM parameter usage. Expected usage is that this feature will remain unused for some grace period (perhaps a few months) during which an updated VM can be widely circulated. After that period, images using Sista bytecodes may be safely saved with the updated image format number indicating that multiple bytecodes are in use. This change set includes helper methods in SmalltalkImage for testing or setting the multipleBytecodeSetsActive setting in the VM. Note the change set postscript which is necessary for initializing a class variable prior to code generation."! VMClass subclass: #InterpreterPrimitives instanceVariableNames: 'objectMemory messageSelector argumentCount newMethod primFailCode osErrorCode exceptionPC inFFIFlags profileMethod profileProcess profileSemaphore nextProfileTick preemptionYields newFinalization sHEAFn ffiExceptionResponse multipleBytecodeSetsActive' classVariableNames: 'CrossedX EndOfRun MillisecondClockMask' poolDictionaries: 'VMBasicConstants VMBytecodeConstants VMMethodCacheConstants VMObjectIndices VMSqueakClassIndices VMStackFrameOffsets' category: 'VMMaker-Interpreter'! InterpreterPrimitives subclass: #StackInterpreter instanceVariableNames: 'currentBytecode bytecodeSetSelector localFP localIP localSP stackLimit stackPage stackPages method instructionPointer stackPointer framePointer localReturnValue localAbsentReceiver localAbsentReceiverOrZero extA extB numExtB primitiveFunctionPointer methodCache nsMethodCache atCache lkupClassTag lkupClass methodDictLinearSearchLimit highestRunnableProcessPriority reenterInterpreter nextWakeupUsecs nextPollUsecs inIOProcessEvents interruptKeycode interruptPending savedWindowSize imageHeaderFlags fullScreenFlag sendWheelEvents deferDisplayUpdates pendingFinalizationSignals extraVMMemory interpreterProxy showSurfaceFn primitiveTable primitiveAccessorDepthTable externalPrimitiveTable externalPrimitiveTableFirstFreeIndex overflowedPage extraFramesToMoveOnOverflow globalSessionID jmpBuf jmpDepth suspendedCallbacks suspendedMethods numStackPages desiredNumStackPages desiredEdenBytes classNameIndex thisClassIndex metaclassNumSlots interruptCheckChain suppressHeartbeatFlag breakSelector breakSelectorLength breakLookupClassTag longRunningPrimitiveCheckMethod longRunningPrimitiveCheckSemaphore longRunningPrimitiveStartUsecs longRunningPrimitiveStopUsecs longRunningPrimitiveGCUsecs longRunningPrimitiveCheckSequenceNumber longRunningPrimitiveSignalUndelivered checkAllocFiller tempOop tempOop2 metaAccessorDepth theUnknownShort the2ndUnknownShort imageFloatsBigEndian maxExtSemTabSizeSet lastMethodCacheProbeWrite gcSemaphoreIndex classByteArrayCompactIndex checkedPluginName nativeSP nativeStackPointer lowcodeCalloutState shadowCallStackPointer displayBits displayWidth displayHeight displayDepth statForceInterruptCheck statStackOverflow statStackPageDivorce statCheckForEvents statProcessSwitch statIOProcessEvents statPendingFinalizationSignals statIdleUsecs debugCallbackPath debugCallbackReturns debugCallbackInvokes primitiveDoMixedArithmetic' classVariableNames: 'AccessModifierPrivate AccessModifierProtected AccessModifierPublic AltBytecodeEncoderClassName AltLongStoreBytecode AlternateHeaderHasPrimFlag AlternateHeaderIsOptimizedFlag AlternateHeaderNumLiteralsMask AtCacheFixedFields AtCacheFmt AtCacheMask AtCacheOop AtCacheSize AtCacheTotalSize AtPutBase BytecodeEncoderClassName BytecodeTable CacheProbeMax DirBadPath DirEntryFound DirNoMoreEntries DumpStackOnLowSpace EnclosingMixinIndex EnclosingObjectIndex EnforceAccessControl FailImbalancedPrimitives LongStoreBytecode MaxExternalPrimitiveTableSize MaxJumpBuf MaxPrimitiveIndex MaxQuickPrimitiveIndex MethodHeaderArgCountShift MethodHeaderFlagBitPosition MethodHeaderTempCountShift MixinIndex MultipleBytecodeSetsBitmask PrimNumberDoExternalCall PrimNumberDoPrimitive PrimNumberExternalCall PrimNumberFFICall PrimitiveTable ReturnToInterpreter StackPageReachedButUntraced StackPageTraceInvalid StackPageTraced StackPageUnreached V3PrimitiveBitsMask' poolDictionaries: 'VMBasicConstants VMBytecodeConstants VMMethodCacheConstants VMObjectIndices VMSpurObjectRepresentationConstants VMSqueakClassIndices VMStackFrameOffsets' category: 'VMMaker-Interpreter'! !InterpreterPrimitives methodsFor: 'other primitives' stamp: 'dtl 1/12/2020 13:47'! primitiveMultipleBytecodeSetsActive "Set the value of multipleBytecodeSetsActive based on the boolean argument if supplied. Fail if multiple bytecode sets are not supported. Answer the current value of multipleBytecodeSetsActive." argumentCount >1 ifTrue: [^self primitiveFailFor: PrimErrBadNumArgs]. argumentCount = 1 ifTrue: [self stackTop = objectMemory trueObject ifTrue: [self cppIf: MULTIPLEBYTECODESETS ifTrue: [multipleBytecodeSetsActive := true] ifFalse: [^self primitiveFailFor: PrimErrUnsupported]] ifFalse: [self stackTop = objectMemory falseObject ifTrue: [multipleBytecodeSetsActive := false] ifFalse:[^self primitiveFailFor: PrimErrBadArgument]]]. multipleBytecodeSetsActive ifTrue: [self pop: argumentCount + 1 thenPush: objectMemory trueObject] ifFalse: [self pop: argumentCount + 1 thenPush: objectMemory falseObject]. ! ! !SmalltalkImage methodsFor: 'system attributes' stamp: 'dtl 1/12/2020 11:55'! multipleBytecodeSetsActive "Answer true if the VM is assuming that multiple bytecode sets such as Sista are active in this image." . self primitiveFailed! ! !SmalltalkImage methodsFor: 'system attributes' stamp: 'dtl 1/12/2020 11:52'! multipleBytecodeSetsActive: aBoolean "Inform the VM that an alternate bytecode set such as EncoderForSistaV1 is or is not currently in use by this image. The VM may use this to update the image format number when saving the image." . self primitiveFailed! ! !StackInterpreter methodsFor: 'image save/restore' stamp: 'dtl 1/12/2020 11:19'! readableFormat: imageVersion "Anwer true if images of the given format are readable by this interpreter. Allows a virtual machine to accept selected older image formats." | imageVersionWithoutSistaBit | imageVersionWithoutSistaBit := imageVersion bitAnd: ( -1 - MultipleBytecodeSetsBitmask). "Ignore multiple bytecode support identifier" [imageVersionWithoutSistaBit = self imageFormatVersion "Float words in platform-order" or: [objectMemory hasSpurMemoryManagerAPI not "No compatibility version for Spur as yet" and: [imageVersionWithoutSistaBit = self imageFormatCompatibilityVersion]]] "Float words in BigEndian order" ifTrue: [multipleBytecodeSetsActive := imageVersion bitAnd: MultipleBytecodeSetsBitmask. "Remember the Sista bit" ^ true]. ^ false ! ! !StackInterpreter methodsFor: 'image save/restore' stamp: 'dtl 1/12/2020 11:18'! writeImageFileIO "Write the image header and heap contents to imageFile for snapshot. c.f. writeImageFileIOSimulation. The game below is to maintain 64-bit alignment for all putLong:toFile: occurrences." | imageName headerStart headerSize f imageBytes bytesWritten sCWIfn okToWrite | self cCode: [] inSmalltalk: [imageName := 'sooth compiler'. ^self writeImageFileIOSimulation]. "If the security plugin can be loaded, use it to check for write permission. If not, assume it's ok" sCWIfn := self ioLoadFunction: 'secCanWriteImage' From: 'SecurityPlugin'. sCWIfn ~= 0 ifTrue: [okToWrite := self cCode: '((sqInt (*)(void))sCWIfn)()'. okToWrite ifFalse:[^self primitiveFail]]. "local constants" headerStart := 0. headerSize := objectMemory wordSize = 4 ifTrue: [64] ifFalse: [128]. "header size in bytes; do not change!!" f := self sqImageFile: imageName Open: 'wb'. f = nil ifTrue: "could not open the image file for writing" [^self primitiveFail]. imageBytes := objectMemory imageSizeToWrite. headerStart := self sqImage: f File: imageName StartLocation: headerSize + imageBytes. self cCode: '/* Note: on Unix systems one could put an exec command here, padded to 512 bytes */'. "position file to start of header" self sqImageFile: f Seek: headerStart. multipleBytecodeSetsActive ifTrue: [self putWord32: (self imageFormatVersion bitOr: MultipleBytecodeSetsBitmask) toFile: f] ifFalse: [self putWord32: self imageFormatVersion toFile: f]. self putWord32: headerSize toFile: f. self putLong: imageBytes toFile: f. self putLong: objectMemory baseAddressOfImage toFile: f. self putLong: objectMemory specialObjectsOop toFile: f. self putLong: objectMemory newObjectHash toFile: f. self putLong: self getSnapshotScreenSize toFile: f. self putLong: self getImageHeaderFlags toFile: f. self putWord32: extraVMMemory toFile: f. self putShort: desiredNumStackPages toFile: f. self putShort: self unknownShortOrCodeSizeInKs toFile: f. self putWord32: desiredEdenBytes toFile: f. self putShort: (maxExtSemTabSizeSet ifTrue: [self ioGetMaxExtSemTableSize] ifFalse: [0]) toFile: f. self putShort: the2ndUnknownShort toFile: f. objectMemory hasSpurMemoryManagerAPI ifTrue: [self putLong: objectMemory firstSegmentBytes toFile: f. self putLong: objectMemory bytesLeftInOldSpace toFile: f. 2 timesRepeat: [self putLong: 0 toFile: f] "Pad the rest of the header."] ifFalse: [4 timesRepeat: [self putLong: 0 toFile: f]]. "Pad the rest of the header." objectMemory wordSize = 8 ifTrue: [3 timesRepeat: [self putLong: 0 toFile: f]]. "Pad the rest of the header." self assert: headerStart + headerSize = (self sqImageFilePosition: f). "position file after the header" self sqImageFile: f Seek: headerStart + headerSize. self successful ifFalse: "file write or seek failure" [self sqImageFileClose: f. ^nil]. "write the image data" objectMemory hasSpurMemoryManagerAPI ifTrue: [bytesWritten := objectMemory writeImageSegmentsToFile: f] ifFalse: [bytesWritten := self sq: (self pointerForOop: objectMemory baseAddressOfImage) Image: (self sizeof: #char) File: imageBytes Write: f]. self success: bytesWritten = imageBytes. self sqImageFileClose: f! ! !StackInterpreter class methodsFor: 'initialization' stamp: 'dtl 1/12/2020 11:19'! initializeMiscConstants super initializeMiscConstants. STACKVM := true. "These flags function to identify a GC operation, or to specify what operations the leak checker should be run for." GCModeFull := 1. "stop-the-world global GC" GCModeNewSpace := 2. "Spur's scavenge, or V3's incremental" GCModeIncremental := 4. "incremental global gc (Dijkstra tri-colour marking); as yet unimplemented" GCModeBecome := 8. "v3 post-become sweeping/Spur forwarding" GCModeImageSegment := 16. "just a flag for leak checking image segments" GCModeFreeSpace := 32. "just a flag for leak checking free space; Spur only" GCCheckPrimCall := 64. "just a flag for leak checking external primitive calls" StackPageTraceInvalid := -1. StackPageUnreached := 0. StackPageReachedButUntraced := 1. StackPageTraced := 2. DumpStackOnLowSpace := 0. MillisecondClockMask := 16r1FFFFFFF. "Note: The external primitive table should actually be dynamically sized but for the sake of inferior platforms (e.g., Mac :-) who cannot allocate memory in any reasonable way, we keep it static (and cross our fingers...)" MaxExternalPrimitiveTableSize := 4096. "entries" MaxJumpBuf := 32. "max. callback depth" FailImbalancedPrimitives := InitializationOptions at: #FailImbalancedPrimitives ifAbsentPut: [true]. EnforceAccessControl := InitializationOptions at: #EnforceAccessControl ifAbsent: [true]. ReturnToInterpreter := 1. "setjmp/longjmp code." "N.B. some of these DisownFlags are replicated in platforms/Cross/vm/sqVirtualMachine.h. Hence they should always be initialized. Because of a hack with callbacks in the non-threaded VM they must not conflct with the VM's tag bits." DisownVMLockOutFullGC := 8. DisownVMForFFICall := 16. DisownVMForThreading := 32. "The Sista bit in the interpreter image format version number" MultipleBytecodeSetsBitmask := 512. ! ! "Postscript: Initialize MultipleByteCodeSets class variable." StackInterpreter initializeMiscConstants.! > From lewis at mail.msen.com Sun Jul 19 17:51:24 2020 From: lewis at mail.msen.com (David T. Lewis) Date: Sun, 19 Jul 2020 13:51:24 -0400 Subject: [Vm-dev] [squeak-dev] Support an updated image format number for Sista In-Reply-To: <20200719162621.GA89267@shell.msen.com> References: <20200113143334.GA9638@shell.msen.com> <20200719162621.GA89267@shell.msen.com> Message-ID: <20200719175124.GA98958@shell.msen.com> I should add that my underlying assumption in proposing the primitive is that the VM has no easy or efficient way of knowing whether alternate bytecode sets are currently in use, hence the "helper" primitive to permit the image to pass a hint to the VM that alternate bytecodes are now active. But I note that CompiledMethod is in the special object array, so maybe there is some way to scan object memory for compiled methods that use the alternate bytecode set. Dave On Sun, Jul 19, 2020 at 12:26:21PM -0400, David T. Lewis wrote: > > > Background: > > Sista bytecodes have been supported in the VM (opensmalltalk-vm) for quite > some time. Shortly after the Squeak 5.3 release Sista became the default > bytecode set in the trunk image. > > In Squeak trunk, Sista bytecodes can be activated (or deactivated) with > CompiledCode class>>useSista: aBoolean, which also calls the hook to inform > the VM of Sista bytecode usage: > > > > This optional primitive is intended to inform the VM that an alternate > bytecode set is (or is not) being used by the image, and the VM can use > this information to update the image format number (first few bytes of > the saved image file) to a new number that indicates that Sista or other > enhanced bytecode set support is required for that image. A proposed > implementation of the primitive for opensmalltalk-vm is in the VMMaker > inbox (VMMaker.oscog-dtl.2711). > > An earlier follow-up discussion in this thread included the suggestion > of e.g. a #primitiveAvailableBytecodeSets that would provide a list of > available bytecode sets to the image. This is also a good idea, but it is > not directly related to the intended use of #primitiveMultipleBytecodeSetsActive. > Perhaps it could be implemented as a zero-argument call to a single primitive, > such that a boolean argument informs the VM of multiple bytecodes active, > and calling primitiveMultipleBytecodeSetsActive without arguments would ask > the VM to tell the image what bytecode sets can be supported by that VM. > > @eliot - are you still on board with this concept, and if so could you > please take a look at the inbox proposal? We discussed this in the last > Squeak board meeting, and the board remains supportive of the idea of > updating the image format number for the next Squeak release. > > Thanks, > Dave > > > On Mon, Jan 13, 2020 at 09:33:34AM -0500, David T. Lewis wrote: > > Hi Eliot, > > > > This is a belated follow up on earlier private discussion during a Squeak > > board meeting a few months ago, in which we agreed that identifying > > "Sista in use" in the image format number would be a useful thing to do. > > I previously added the documentation for this in ImageFormat-dtl.39.mcz > > (as well as the updated ckformat.c program to match). > > > > Attached here is a change set that can be loaded into a VMMaker image to > > add VM support for setting and reading the updated image format numbers. > > Here I used a primitive to initially set or clear the "sista bit". There > > are other ways this could be done, but this at least gets us started > > with a working implementation. > > > > By way of explanation, I am copying below both the change set preamble > > and the earlier ImageFormat commit notice: > > > > === > > > > Change Set: VMM-Sista-bit-dtl > > Date: 12 January 2020 > > Author: David T. Lewis > > > > Let the image inform the interpreter that alternate bytecodes either are > > or are not in use, and remember that setting when writing or reading the > > image format number in a shapshot file header. > > > > Provide primitiveMultipleBytecodesActive to allow the setting to be updated > > from the image. Expected usage is that the image can call this primitive > > after recompiling with Systa bytecodes, or after reverting back. Note that > > an alternative implemenation would be to use a VM parameter. The primitive > > was chosen here because it can perform parameter checking and does not > > require coordinated update the the VM parameter usage. > > > > Expected usage is that this feature will remain unused for some grace period > > (perhaps a few months) during which an updated VM can be widely circulated. > > After that period, images using Sista bytecodes may be safely saved with the > > updated image format number indicating that multiple bytecodes are in use. > > > > This change set includes helper methods in SmalltalkImage for testing or > > setting the multipleBytecodeSetsActive setting in the VM. > > > > Note the change set postscript which is necessary for initializing a class > > variable prior to code generation. > > > > === > > > > Name: ImageFormat-dtl.37 > > Author: dtl > > Time: 20 July 2019, 5:23:59.004 pm > > UUID: 52b464d5-0bf7-4326-bde3-4f18ad70b239 > > Ancestors: ImageFormat-dtl.36 > > > > Identify extended bytecodes for Sista in the image format number. Bit 10 > > identifies an image that contains extended bytecodes. Thus a 32 bit Spur > > image is 6521, with Sista it is 7033, and a 64 bit Spur image is 68021, > > with Sista it is 68533. > > > > It is expected that additional bytecode sets can be identified by an > > additional field in the image header, probably 32 bits containing two > > 16 bit fields, if both zero then Sista. > > > > Per discussion with Eliot and Bert in a Squeak oversight board meeting > > 2019-05-15. > > > > > > Dave > > > > > 'From Squeak5.3beta of 4 January 2020 [latest update: #19304] on 12 January 2020 at 2:10:55 pm'! "Change Set: VMM-Sista-bit-dtl Date: 12 January 2020 Author: David T. Lewis Let the image inform the interpreter that alternate bytecodes either are or are not in use, and remember that setting when writing or reading the image format number in a shapshot file header. Provide primitiveMultipleBytecodesActive to allow the setting to be updated from the image. Expected usage is that the image can call this primitive after recompiling with Systa bytecodes, or after reverting back. Note that an alternative implemenation would be to use a VM parameter. The primitive was chosen here because it can perform parameter checking and does not require coordinated update the the VM parameter usage. Expected usage is that this feature will remain unused for some grace period (perhaps a few months) during which an updated VM can be widely circulated. After that period, images using Sista bytecodes may be safely saved with the updated image format number indicating that multiple bytecodes are in use. This change set includes helper methods in SmalltalkImage for testing or setting the multipleBytecodeSetsActive setting in the VM. Note the change set postscript which is necessary for initializing a class variable prior to code generation."! VMClass subclass: #InterpreterPrimitives instanceVariableNames: 'objectMemory messageSelector argumentCount newMethod primFailCode osErrorCode exceptionPC inFFIFlags profileMethod profileProcess profileSemaphore nextProfileTick preemptionYields newFinalization sHEAFn ffiExceptionResponse multipleBytecodeSetsActive' classVariableNames: 'CrossedX EndOfRun MillisecondClockMask' poolDictionaries: 'VMBasicConstants VMBytecodeConstants VMMethodCacheConstants VMObjectIndices VMSqueakClassIndices VMStackFrameOffsets' category: 'VMMaker-Interpreter'! InterpreterPrimitives subclass: #StackInterpreter instanceVariableNames: 'currentBytecode bytecodeSetSelector localFP localIP localSP stackLimit stackPage stackPages method instructionPointer stackPointer framePointer localReturnValue localAbsentReceiver localAbsentReceiverOrZero extA extB numExtB primitiveFunctionPointer methodCache nsMethodCache atCache lkupClassTag lkupClass methodDictLinearSearchLimit highestRunnableProcessPriority reenterInterpreter nextWakeupUsecs nextPollUsecs inIOProcessEvents interruptKeycode interruptPending savedWindowSize imageHeaderFlags fullScreenFlag sendWheelEvents deferDisplayUpdates pendingFinalizationSignals extraVMMemory interpreterProxy showSurfaceFn primitiveTable primitiveAccessorDepthTable externalPrimitiveTable externalPrimitiveTableFirstFreeIndex overflowedPage extraFramesToMoveOnOverflow globalSessionID jmpBuf jmpDepth suspendedCallbacks suspendedMethods numStackPages desiredNumStackPages desiredEdenBytes classNameIndex thisClassIndex metaclassNumSlots interruptCheckChain suppressHeartbeatFlag breakSelector breakSelectorLength breakLookupClassTag longRunningPrimitiveCheckMethod longRunningPrimitiveCheckSemaphore longRunningPrimitiveStartUsecs longRunningPrimitiveStopUsecs longRunningPrimitiveGCUsecs longRunningPrimitiveCheckSequenceNumber longRunningPrimitiveSignalUndelivered checkAllocFiller tempOop tempOop2 metaAccessorDepth theUnknownShort the2ndUnknownShort imageFloatsBigEndian maxExtSemTabSizeSet lastMethodCacheProbeWrite gcSemaphoreIndex classByteArrayCompactIndex checkedPluginName nativeSP nativeStackPointer lowcodeCalloutState shadowCallStackPointer displayBits displayWidth displayHeight displayDepth statForceInterruptCheck statStackOverflow statStackPageDivorce statCheckForEvents statProcessSwitch statIOProcessEvents statPendingFinalizationSignals statIdleUsecs debugCallbackPath debugCallbackReturns debugCallbackInvokes primitiveDoMixedArithmetic' classVariableNames: 'AccessModifierPrivate AccessModifierProtected AccessModifierPublic AltBytecodeEncoderClassName AltLongStoreBytecode AlternateHeaderHasPrimFlag AlternateHeaderIsOptimizedFlag AlternateHeaderNumLiteralsMask AtCacheFixedFields AtCacheFmt AtCacheMask AtCacheOop AtCacheSize AtCacheTotalSize AtPutBase BytecodeEncoderClassName BytecodeTable CacheProbeMax DirBadPath DirEntryFound DirNoMoreEntries DumpStackOnLowSpace EnclosingMixinIndex EnclosingObjectIndex EnforceAccessControl FailImbalancedPrimitives LongStoreBytecode MaxExternalPrimitiveTableSize MaxJumpBuf MaxPrimitiveIndex MaxQuickPrimitiveIndex MethodHeaderArgCountShift MethodHeaderFlagBitPosition MethodHeaderTempCountShift MixinIndex MultipleBytecodeSetsBitmask PrimNumberDoExternalCall PrimNumberDoPrimitive PrimNumberExternalCall PrimNumberFFICall PrimitiveTable ReturnToInterpreter StackPageReachedButUntraced StackPageTraceInvalid StackPageTraced StackPageUnreached V3PrimitiveBitsMask' poolDictionaries: 'VMBasicConstants VMBytecodeConstants VMMethodCacheConstants VMObjectIndices VMSpurObjectRepresentationConstants VMSqueakClassIndices VMStackFrameOffsets' category: 'VMMaker-Interpreter'! !InterpreterPrimitives methodsFor: 'other primitives' stamp: 'dtl 1/12/2020 13:47'! primitiveMultipleBytecodeSetsActive "Set the value of multipleBytecodeSetsActive based on the boolean argument if supplied. Fail if multiple bytecode sets are not supported. Answer the current value of multipleBytecodeSetsActive." argumentCount >1 ifTrue: [^self primitiveFailFor: PrimErrBadNumArgs]. argumentCount = 1 ifTrue: [self stackTop = objectMemory trueObject ifTrue: [self cppIf: MULTIPLEBYTECODESETS ifTrue: [multipleBytecodeSetsActive := true] ifFalse: [^self primitiveFailFor: PrimErrUnsupported]] ifFalse: [self stackTop = objectMemory falseObject ifTrue: [multipleBytecodeSetsActive := false] ifFalse:[^self primitiveFailFor: PrimErrBadArgument]]]. multipleBytecodeSetsActive ifTrue: [self pop: argumentCount + 1 thenPush: objectMemory trueObject] ifFalse: [self pop: argumentCount + 1 thenPush: objectMemory falseObject]. ! ! !SmalltalkImage methodsFor: 'system attributes' stamp: 'dtl 1/12/2020 11:55'! multipleBytecodeSetsActive "Answer true if the VM is assuming that multiple bytecode sets such as Sista are active in this image." . self primitiveFailed! ! !SmalltalkImage methodsFor: 'system attributes' stamp: 'dtl 1/12/2020 11:52'! multipleBytecodeSetsActive: aBoolean "Inform the VM that an alternate bytecode set such as EncoderForSistaV1 is or is not currently in use by this image. The VM may use this to update the image format number when saving the image." . self primitiveFailed! ! !StackInterpreter methodsFor: 'image save/restore' stamp: 'dtl 1/12/2020 11:19'! readableFormat: imageVersion "Anwer true if images of the given format are readable by this interpreter. Allows a virtual machine to accept selected older image formats." | imageVersionWithoutSistaBit | imageVersionWithoutSistaBit := imageVersion bitAnd: ( -1 - MultipleBytecodeSetsBitmask). "Ignore multiple bytecode support identifier" [imageVersionWithoutSistaBit = self imageFormatVersion "Float words in platform-order" or: [objectMemory hasSpurMemoryManagerAPI not "No compatibility version for Spur as yet" and: [imageVersionWithoutSistaBit = self imageFormatCompatibilityVersion]]] "Float words in BigEndian order" ifTrue: [multipleBytecodeSetsActive := imageVersion bitAnd: MultipleBytecodeSetsBitmask. "Remember the Sista bit" ^ true]. ^ false ! ! !StackInterpreter methodsFor: 'image save/restore' stamp: 'dtl 1/12/2020 11:18'! writeImageFileIO "Write the image header and heap contents to imageFile for snapshot. c.f. writeImageFileIOSimulation. The game below is to maintain 64-bit alignment for all putLong:toFile: occurrences." | imageName headerStart headerSize f imageBytes bytesWritten sCWIfn okToWrite | self cCode: [] inSmalltalk: [imageName := 'sooth compiler'. ^self writeImageFileIOSimulation]. "If the security plugin can be loaded, use it to check for write permission. If not, assume it's ok" sCWIfn := self ioLoadFunction: 'secCanWriteImage' From: 'SecurityPlugin'. sCWIfn ~= 0 ifTrue: [okToWrite := self cCode: '((sqInt (*)(void))sCWIfn)()'. okToWrite ifFalse:[^self primitiveFail]]. "local constants" headerStart := 0. headerSize := objectMemory wordSize = 4 ifTrue: [64] ifFalse: [128]. "header size in bytes; do not change!!" f := self sqImageFile: imageName Open: 'wb'. f = nil ifTrue: "could not open the image file for writing" [^self primitiveFail]. imageBytes := objectMemory imageSizeToWrite. headerStart := self sqImage: f File: imageName StartLocation: headerSize + imageBytes. self cCode: '/* Note: on Unix systems one could put an exec command here, padded to 512 bytes */'. "position file to start of header" self sqImageFile: f Seek: headerStart. multipleBytecodeSetsActive ifTrue: [self putWord32: (self imageFormatVersion bitOr: MultipleBytecodeSetsBitmask) toFile: f] ifFalse: [self putWord32: self imageFormatVersion toFile: f]. self putWord32: headerSize toFile: f. self putLong: imageBytes toFile: f. self putLong: objectMemory baseAddressOfImage toFile: f. self putLong: objectMemory specialObjectsOop toFile: f. self putLong: objectMemory newObjectHash toFile: f. self putLong: self getSnapshotScreenSize toFile: f. self putLong: self getImageHeaderFlags toFile: f. self putWord32: extraVMMemory toFile: f. self putShort: desiredNumStackPages toFile: f. self putShort: self unknownShortOrCodeSizeInKs toFile: f. self putWord32: desiredEdenBytes toFile: f. self putShort: (maxExtSemTabSizeSet ifTrue: [self ioGetMaxExtSemTableSize] ifFalse: [0]) toFile: f. self putShort: the2ndUnknownShort toFile: f. objectMemory hasSpurMemoryManagerAPI ifTrue: [self putLong: objectMemory firstSegmentBytes toFile: f. self putLong: objectMemory bytesLeftInOldSpace toFile: f. 2 timesRepeat: [self putLong: 0 toFile: f] "Pad the rest of the header."] ifFalse: [4 timesRepeat: [self putLong: 0 toFile: f]]. "Pad the rest of the header." objectMemory wordSize = 8 ifTrue: [3 timesRepeat: [self putLong: 0 toFile: f]]. "Pad the rest of the header." self assert: headerStart + headerSize = (self sqImageFilePosition: f). "position file after the header" self sqImageFile: f Seek: headerStart + headerSize. self successful ifFalse: "file write or seek failure" [self sqImageFileClose: f. ^nil]. "write the image data" objectMemory hasSpurMemoryManagerAPI ifTrue: [bytesWritten := objectMemory writeImageSegmentsToFile: f] ifFalse: [bytesWritten := self sq: (self pointerForOop: objectMemory baseAddressOfImage) Image: (self sizeof: #char) File: imageBytes Write: f]. self success: bytesWritten = imageBytes. self sqImageFileClose: f! ! !StackInterpreter class methodsFor: 'initialization' stamp: 'dtl 1/12/2020 11:19'! initializeMiscConstants super initializeMiscConstants. STACKVM := true. "These flags function to identify a GC operation, or to specify what operations the leak checker should be run for." GCModeFull := 1. "stop-the-world global GC" GCModeNewSpace := 2. "Spur's scavenge, or V3's incremental" GCModeIncremental := 4. "incremental global gc (Dijkstra tri-colour marking); as yet unimplemented" GCModeBecome := 8. "v3 post-become sweeping/Spur forwarding" GCModeImageSegment := 16. "just a flag for leak checking image segments" GCModeFreeSpace := 32. "just a flag for leak checking free space; Spur only" GCCheckPrimCall := 64. "just a flag for leak checking external primitive calls" StackPageTraceInvalid := -1. StackPageUnreached := 0. StackPageReachedButUntraced := 1. StackPageTraced := 2. DumpStackOnLowSpace := 0. MillisecondClockMask := 16r1FFFFFFF. "Note: The external primitive table should actually be dynamically sized but for the sake of inferior platforms (e.g., Mac :-) who cannot allocate memory in any reasonable way, we keep it static (and cross our fingers...)" MaxExternalPrimitiveTableSize := 4096. "entries" MaxJumpBuf := 32. "max. callback depth" FailImbalancedPrimitives := InitializationOptions at: #FailImbalancedPrimitives ifAbsentPut: [true]. EnforceAccessControl := InitializationOptions at: #EnforceAccessControl ifAbsent: [true]. ReturnToInterpreter := 1. "setjmp/longjmp code." "N.B. some of these DisownFlags are replicated in platforms/Cross/vm/sqVirtualMachine.h. Hence they should always be initialized. Because of a hack with callbacks in the non-threaded VM they must not conflct with the VM's tag bits." DisownVMLockOutFullGC := 8. DisownVMForFFICall := 16. DisownVMForThreading := 32. "The Sista bit in the interpreter image format version number" MultipleBytecodeSetsBitmask := 512. ! ! "Postscript: Initialize MultipleByteCodeSets class variable." StackInterpreter initializeMiscConstants.! > > > > From lists at fniephaus.com Sun Jul 19 18:50:19 2020 From: lists at fniephaus.com (Fabio Niephaus) Date: Sun, 19 Jul 2020 20:50:19 +0200 Subject: [Vm-dev] [squeak-dev] Support an updated image format number for Sista In-Reply-To: <20200719175124.GA98958@shell.msen.com> References: <20200113143334.GA9638@shell.msen.com> <20200719162621.GA89267@shell.msen.com> <20200719175124.GA98958@shell.msen.com> Message-ID: On Sun, 19 Jul 2020 at 7:51 pm, David T. Lewis wrote: > > I should add that my underlying assumption in proposing the primitive is > that > the VM has no easy or efficient way of knowing whether alternate bytecode > sets > are currently in use, hence the "helper" primitive to permit the image to > pass a hint to the VM that alternate bytecodes are now active. > > But I note that CompiledMethod is in the special object array, so maybe > there is some way to scan object memory for compiled methods that use > the alternate bytecode set. IIRC the sign bit of a method header defines whether the primary or secondary bytecode set is in use. So I believe we can use different sets per method, not just per image. The sign bit is used to make the check as cheap as possible. Fabio > > Dave > > On Sun, Jul 19, 2020 at 12:26:21PM -0400, David T. Lewis wrote: > > > > > > Background: > > > > Sista bytecodes have been supported in the VM (opensmalltalk-vm) for > quite > > some time. Shortly after the Squeak 5.3 release Sista became the default > > bytecode set in the trunk image. > > > > In Squeak trunk, Sista bytecodes can be activated (or deactivated) with > > CompiledCode class>>useSista: aBoolean, which also calls the hook to > inform > > the VM of Sista bytecode usage: > > > > > > > > This optional primitive is intended to inform the VM that an alternate > > bytecode set is (or is not) being used by the image, and the VM can use > > this information to update the image format number (first few bytes of > > the saved image file) to a new number that indicates that Sista or other > > enhanced bytecode set support is required for that image. A proposed > > implementation of the primitive for opensmalltalk-vm is in the VMMaker > > inbox (VMMaker.oscog-dtl.2711). > > > > An earlier follow-up discussion in this thread included the suggestion > > of e.g. a #primitiveAvailableBytecodeSets that would provide a list of > > available bytecode sets to the image. This is also a good idea, but it is > > not directly related to the intended use of > #primitiveMultipleBytecodeSetsActive. > > Perhaps it could be implemented as a zero-argument call to a single > primitive, > > such that a boolean argument informs the VM of multiple bytecodes active, > > and calling primitiveMultipleBytecodeSetsActive without arguments would > ask > > the VM to tell the image what bytecode sets can be supported by that VM. > > > > @eliot - are you still on board with this concept, and if so could you > > please take a look at the inbox proposal? We discussed this in the last > > Squeak board meeting, and the board remains supportive of the idea of > > updating the image format number for the next Squeak release. > > > > Thanks, > > Dave > > > > > > On Mon, Jan 13, 2020 at 09:33:34AM -0500, David T. Lewis wrote: > > > Hi Eliot, > > > > > > This is a belated follow up on earlier private discussion during a > Squeak > > > board meeting a few months ago, in which we agreed that identifying > > > "Sista in use" in the image format number would be a useful thing to > do. > > > I previously added the documentation for this in ImageFormat-dtl.39.mcz > > > (as well as the updated ckformat.c program to match). > > > > > > Attached here is a change set that can be loaded into a VMMaker image > to > > > add VM support for setting and reading the updated image format > numbers. > > > Here I used a primitive to initially set or clear the "sista bit". > There > > > are other ways this could be done, but this at least gets us started > > > with a working implementation. > > > > > > By way of explanation, I am copying below both the change set preamble > > > and the earlier ImageFormat commit notice: > > > > > > === > > > > > > Change Set: VMM-Sista-bit-dtl > > > Date: 12 January 2020 > > > Author: David T. Lewis > > > > > > Let the image inform the interpreter that alternate bytecodes either > are > > > or are not in use, and remember that setting when writing or reading > the > > > image format number in a shapshot file header. > > > > > > Provide primitiveMultipleBytecodesActive to allow the setting to be > updated > > > from the image. Expected usage is that the image can call this > primitive > > > after recompiling with Systa bytecodes, or after reverting back. > Note that > > > an alternative implemenation would be to use a VM parameter. The > primitive > > > was chosen here because it can perform parameter checking and does > not > > > require coordinated update the the VM parameter usage. > > > > > > Expected usage is that this feature will remain unused for some > grace period > > > (perhaps a few months) during which an updated VM can be widely > circulated. > > > After that period, images using Sista bytecodes may be safely saved > with the > > > updated image format number indicating that multiple bytecodes are > in use. > > > > > > This change set includes helper methods in SmalltalkImage for > testing or > > > setting the multipleBytecodeSetsActive setting in the VM. > > > > > > Note the change set postscript which is necessary for initializing a > class > > > variable prior to code generation. > > > > > > === > > > > > > Name: ImageFormat-dtl.37 > > > Author: dtl > > > Time: 20 July 2019, 5:23:59.004 pm > > > UUID: 52b464d5-0bf7-4326-bde3-4f18ad70b239 > > > Ancestors: ImageFormat-dtl.36 > > > > > > Identify extended bytecodes for Sista in the image format number. > Bit 10 > > > identifies an image that contains extended bytecodes. Thus a 32 bit > Spur > > > image is 6521, with Sista it is 7033, and a 64 bit Spur image is > 68021, > > > with Sista it is 68533. > > > > > > It is expected that additional bytecode sets can be identified by an > > > additional field in the image header, probably 32 bits containing two > > > 16 bit fields, if both zero then Sista. > > > > > > Per discussion with Eliot and Bert in a Squeak oversight board > meeting > > > 2019-05-15. > > > > > > > > > Dave > > > > > > > > 'From Squeak5.3beta of 4 January 2020 [latest update: #19304] on 12 > January 2020 at 2:10:55 pm'!"Change Set: > VMM-Sista-bit-dtlDate: 12 January 2020Author: > David T. LewisLet the image inform the interpreter that alternate > bytecodes either are or are not in use, and remember that setting when > writing or reading the image format number in a shapshot file > header.Provide primitiveMultipleBytecodesActive to allow the setting to be > updated from the image. Expected usage is that the image can call this > primitive after recompiling with Systa bytecodes, or after reverting back. > Note that an alternative implemenation would be to use a VM parameter. The > primitive was chosen here because it can perform parameter checking and > does not require coordinated update the the VM parameter usage.Expected > usage is that this feature will remain unused for some grace period > (perhaps a few months) during which an updated VM can be widely circulated. > After that period, images using Sista bytecodes may be safely saved with > the updated image format number indicating that multiple bytecodes are in > use.This change set includes helper methods in SmalltalkImage for testing > or setting the multipleBytecodeSetsActive setting in the VM.Note the change > set postscript which is necessary for initializing a class variable prior > to code generation."!VMClass subclass: #InterpreterPrimitives > instanceVariableNames: 'objectMemory messageSelector argumentCount > newMethod primFailCode osErrorCode exceptionPC inFFIFlags profileMethod > profileProcess profileSemaphore nextProfileTick preemptionYields > newFinalization sHEAFn ffiExceptionResponse multipleBytecodeSetsActive' > classVariableNames: 'CrossedX EndOfRun MillisecondClockMask' > poolDictionaries: 'VMBasicConstants VMBytecodeConstants > VMMethodCacheConstants VMObjectIndices VMSqueakClassIndices > VMStackFrameOffsets' category: > 'VMMaker-Interpreter'!InterpreterPrimitives subclass: #StackInterpreter > instanceVariableNames: 'currentBytecode bytecodeSetSelector localFP > localIP localSP stackLimit stackPage stackPages method instructionPointer > stackPointer framePointer localReturnValue localAbsentReceiver > localAbsentReceiverOrZero extA extB numExtB primitiveFunctionPointer > methodCache nsMethodCache atCache lkupClassTag lkupClass > methodDictLinearSearchLimit highestRunnableProcessPriority > reenterInterpreter nextWakeupUsecs nextPollUsecs inIOProcessEvents > interruptKeycode interruptPending savedWindowSize imageHeaderFlags > fullScreenFlag sendWheelEvents deferDisplayUpdates > pendingFinalizationSignals extraVMMemory interpreterProxy showSurfaceFn > primitiveTable primitiveAccessorDepthTable externalPrimitiveTable > externalPrimitiveTableFirstFreeIndex overflowedPage > extraFramesToMoveOnOverflow globalSessionID jmpBuf jmpDepth > suspendedCallbacks suspendedMethods numStackPages desiredNumStackPages > desiredEdenBytes classNameIndex thisClassIndex metaclassNumSlots > interruptCheckChain suppressHeartbeatFlag breakSelector breakSelectorLength > breakLookupClassTag longRunningPrimitiveCheckMethod > longRunningPrimitiveCheckSemaphore longRunningPrimitiveStartUsecs > longRunningPrimitiveStopUsecs longRunningPrimitiveGCUsecs > longRunningPrimitiveCheckSequenceNumber > longRunningPrimitiveSignalUndelivered checkAllocFiller tempOop tempOop2 > metaAccessorDepth theUnknownShort the2ndUnknownShort imageFloatsBigEndian > maxExtSemTabSizeSet lastMethodCacheProbeWrite gcSemaphoreIndex > classByteArrayCompactIndex checkedPluginName nativeSP nativeStackPointer > lowcodeCalloutState shadowCallStackPointer displayBits displayWidth > displayHeight displayDepth statForceInterruptCheck statStackOverflow > statStackPageDivorce statCheckForEvents statProcessSwitch > statIOProcessEvents statPendingFinalizationSignals statIdleUsecs > debugCallbackPath debugCallbackReturns debugCallbackInvokes > primitiveDoMixedArithmetic' classVariableNames: 'AccessModifierPrivate > AccessModifierProtected AccessModifierPublic AltBytecodeEncoderClassName > AltLongStoreBytecode AlternateHeaderHasPrimFlag > AlternateHeaderIsOptimizedFlag AlternateHeaderNumLiteralsMask > AtCacheFixedFields AtCacheFmt AtCacheMask AtCacheOop AtCacheSize > AtCacheTotalSize AtPutBase BytecodeEncoderClassName BytecodeTable > CacheProbeMax DirBadPath DirEntryFound DirNoMoreEntries DumpStackOnLowSpace > EnclosingMixinIndex EnclosingObjectIndex EnforceAccessControl > FailImbalancedPrimitives LongStoreBytecode MaxExternalPrimitiveTableSize > MaxJumpBuf MaxPrimitiveIndex MaxQuickPrimitiveIndex > MethodHeaderArgCountShift MethodHeaderFlagBitPosition > MethodHeaderTempCountShift MixinIndex MultipleBytecodeSetsBitmask > PrimNumberDoExternalCall PrimNumberDoPrimitive PrimNumberExternalCall > PrimNumberFFICall PrimitiveTable ReturnToInterpreter > StackPageReachedButUntraced StackPageTraceInvalid StackPageTraced > StackPageUnreached V3PrimitiveBitsMask' poolDictionaries: > 'VMBasicConstants VMBytecodeConstants VMMethodCacheConstants > VMObjectIndices VMSpurObjectRepresentationConstants VMSqueakClassIndices > VMStackFrameOffsets' category: > 'VMMaker-Interpreter'!!InterpreterPrimitives methodsFor: 'other primitives' > stamp: 'dtl 1/12/2020 13:47'!primitiveMultipleBytecodeSetsActive "Set the > value of multipleBytecodeSetsActive based on the boolean argument if > supplied. Fail if multiple bytecode sets are not supported. Answer the > current value of multipleBytecodeSetsActive." > argumentCount >1 ifTrue: [^self primitiveFailFor: > PrimErrBadNumArgs]. argumentCount = 1 ifTrue: [self > stackTop = objectMemory trueObject ifTrue: [self > cppIf: MULTIPLEBYTECODESETS ifTrue: > [multipleBytecodeSetsActive := true] ifFalse: > [^self primitiveFailFor: PrimErrUnsupported]] ifFalse: > [self stackTop = objectMemory falseObject > ifTrue: [multipleBytecodeSetsActive := false] > ifFalse:[^self primitiveFailFor: PrimErrBadArgument]]]. > multipleBytecodeSetsActive ifTrue: [self pop: argumentCount + > 1 thenPush: objectMemory trueObject] ifFalse: [self pop: > argumentCount + 1 thenPush: objectMemory falseObject].! !!SmalltalkImage > methodsFor: 'system attributes' stamp: 'dtl 1/12/2020 > 11:55'!multipleBytecodeSetsActive "Answer true if the VM is assuming > that multiple bytecode sets such as Sista are active in this image." > . self > primitiveFailed! !!SmalltalkImage methodsFor: 'system attributes' stamp: > 'dtl 1/12/2020 11:52'!multipleBytecodeSetsActive: aBoolean "Inform > the VM that an alternate bytecode set such as EncoderForSistaV1 is or is > not currently in use by this image. The VM may use this to update the > image format number when saving the image." 'primitiveMultipleBytecodeSetsActive'>. self primitiveFailed! > !!StackInterpreter methodsFor: 'image save/restore' stamp: 'dtl 1/12/2020 > 11:19'!readableFormat: imageVersion "Anwer true if images of the given > format are readable by this interpreter. Allows a virtual machine to > accept selected older image formats." | > imageVersionWithoutSistaBit | imageVersionWithoutSistaBit := imageVersion > bitAnd: ( -1 - MultipleBytecodeSetsBitmask). "Ignore multiple bytecode > support identifier" [imageVersionWithoutSistaBit = self imageFormatVersion > "Float words in platform-order" or: [objectMemory > hasSpurMemoryManagerAPI not "No compatibility version for Spur as yet" > and: [imageVersionWithoutSistaBit = self > imageFormatCompatibilityVersion]]] "Float words in BigEndian order" > ifTrue: [multipleBytecodeSetsActive := imageVersion bitAnd: > MultipleBytecodeSetsBitmask. "Remember the Sista bit" > ^ true]. ^ false! !!StackInterpreter methodsFor: 'image > save/restore' stamp: 'dtl 1/12/2020 11:18'!writeImageFileIO "Write the > image header and heap contents to imageFile for snapshot. c.f. > writeImageFileIOSimulation. The game below is to maintain 64-bit > alignment for all putLong:toFile: occurrences." | > imageName headerStart headerSize f imageBytes bytesWritten sCWIfn okToWrite > | #squeakFileOffsetType> declareC: 'extern char imageName[]'> self cCode: [] inSmalltalk: > [imageName := 'sooth compiler'. ^self writeImageFileIOSimulation]. "If the > security plugin can be loaded, use it to check for write permission. If > not, assume it's ok" sCWIfn := self ioLoadFunction: > 'secCanWriteImage' From: 'SecurityPlugin'. sCWIfn ~= 0 ifTrue: > [okToWrite := self cCode: '((sqInt (*)(void))sCWIfn)()'. > okToWrite ifFalse:[^self primitiveFail]]. "local > constants" headerStart := 0. headerSize := objectMemory > wordSize = 4 ifTrue: [64] ifFalse: [128]. "header size in bytes; do not > change!!" f := self sqImageFile: imageName Open: 'wb'. f = nil ifTrue: > "could not open the image file for writing" [^self > primitiveFail]. imageBytes := objectMemory imageSizeToWrite. > headerStart := self sqImage: f File: imageName StartLocation: headerSize + > imageBytes. self cCode: '/* Note: on Unix systems one could put an exec > command here, padded to 512 bytes */'. "position file to start of > header" self sqImageFile: f Seek: headerStart. > multipleBytecodeSetsActive ifTrue: [self putWord32: (self > imageFormatVersion bitOr: MultipleBytecodeSetsBitmask) toFile: f] > ifFalse: [self putWord32: self imageFormatVersion toFile: f]. self > putWord32: headerSize toFile: f. self putLong: imageBytes toFile: f. > self putLong: objectMemory baseAddressOfImage toFile: f. self > putLong: objectMemory specialObjectsOop toFile: f. self putLong: > objectMemory newObjectHash toFile: f. self putLong: self > getSnapshotScreenSize toFile: f. self putLong: self getImageHeaderFlags > toFile: f. self putWord32: extraVMMemory toFile: f. self > putShort: desiredNumStackPages toFile: f. self putShort: self > unknownShortOrCodeSizeInKs toFile: f. self putWord32: > desiredEdenBytes toFile: f. self putShort: (maxExtSemTabSizeSet ifTrue: > [self ioGetMaxExtSemTableSize] ifFalse: [0]) toFile: f. self putShort: > the2ndUnknownShort toFile: f. objectMemory hasSpurMemoryManagerAPI > ifTrue: [self putLong: objectMemory firstSegmentBytes > toFile: f. self putLong: objectMemory > bytesLeftInOldSpace toFile: f. 2 timesRepeat: [self > putLong: 0 toFile: f] "Pad the rest of the header."] ifFalse: > [4 timesRepeat: [self putLong: 0 toFile: f]]. "Pad > the rest of the header." objectMemory wordSize = 8 ifTrue: > [3 timesRepeat: [self putLong: 0 toFile: f]]. "Pad the rest of the > header." self assert: headerStart + headerSize = (self > sqImageFilePosition: f). "position file after the header" self > sqImageFile: f Seek: headerStart + headerSize. self successful ifFalse: > "file write or seek failure" [self sqImageFileClose: f. > ^nil]. "write the image data" objectMemory hasSpurMemoryManagerAPI > ifTrue: [bytesWritten := objectMemory > writeImageSegmentsToFile: f] ifFalse: > [bytesWritten := self sq: (self pointerForOop: objectMemory > baseAddressOfImage) > Image: (self sizeof: #char) > File: imageBytes > Write: f]. self success: bytesWritten = imageBytes. > self sqImageFileClose: f! !!StackInterpreter class methodsFor: > 'initialization' stamp: 'dtl 1/12/2020 11:19'!initializeMiscConstants > super initializeMiscConstants. STACKVM := true. "These flags > function to identify a GC operation, or to specify what operations the > leak checker should be run for." GCModeFull := 1. > "stop-the-world global GC" GCModeNewSpace := 2. > "Spur's scavenge, or V3's incremental" GCModeIncremental := 4. > "incremental global gc (Dijkstra tri-colour marking); as yet > unimplemented" GCModeBecome := 8. "v3 post-become > sweeping/Spur forwarding" GCModeImageSegment := 16. "just a > flag for leak checking image segments" GCModeFreeSpace := 32. > "just a flag for leak checking free space; Spur only" GCCheckPrimCall := > 64. "just a flag for leak checking external primitive calls" > StackPageTraceInvalid := -1. StackPageUnreached := 0. > StackPageReachedButUntraced := 1. StackPageTraced := 2. > DumpStackOnLowSpace := 0. MillisecondClockMask := 16r1FFFFFFF. > "Note: The external primitive table should actually be dynamically sized > but for the sake of inferior platforms (e.g., Mac :-) who cannot allocate > memory in any reasonable way, we keep it static (and cross our > fingers...)" MaxExternalPrimitiveTableSize := 4096. "entries" > MaxJumpBuf := 32. "max. callback depth" FailImbalancedPrimitives := > InitializationOptions at: #FailImbalancedPrimitives ifAbsentPut: [true]. > EnforceAccessControl := InitializationOptions at: #EnforceAccessControl > ifAbsent: [true]. ReturnToInterpreter := 1. "setjmp/longjmp code." > "N.B. some of these DisownFlags are replicated in > platforms/Cross/vm/sqVirtualMachine.h. Hence they should always be > initialized. Because of a hack with callbacks in the non-threaded VM they > must not conflct with the VM's tag bits." DisownVMLockOutFullGC := 8. > DisownVMForFFICall := 16. DisownVMForThreading := 32. > "The Sista bit in the interpreter image format version number" > MultipleBytecodeSetsBitmask := 512.! !"Postscript:Initialize > MultipleByteCodeSets class variable."StackInterpreter > initializeMiscConstants.! > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lewis at mail.msen.com Sun Jul 19 19:56:35 2020 From: lewis at mail.msen.com (David T. Lewis) Date: Sun, 19 Jul 2020 15:56:35 -0400 Subject: [Vm-dev] [squeak-dev] Support an updated image format number for Sista In-Reply-To: References: <20200113143334.GA9638@shell.msen.com> <20200719162621.GA89267@shell.msen.com> <20200719175124.GA98958@shell.msen.com> Message-ID: <20200719195635.GA18835@shell.msen.com> On Sun, Jul 19, 2020 at 08:50:19PM +0200, Fabio Niephaus wrote: > > On Sun, 19 Jul 2020 at 7:51 pm, David T. Lewis wrote: > > > > > I should add that my underlying assumption in proposing the primitive is that > > the VM has no easy or efficient way of knowing whether alternate bytecode sets > > are currently in use, hence the "helper" primitive to permit the image to > > pass a hint to the VM that alternate bytecodes are now active. > > > > But I note that CompiledMethod is in the special object array, so maybe > > there is some way to scan object memory for compiled methods that use > > the alternate bytecode set. > > > IIRC the sign bit of a method header defines whether the primary or > secondary bytecode set is in use. So I believe we can use different sets > per method, not just per image. The sign bit is used to make the check as > cheap as possible. > > Fabio > Yes, that's right. For example: Spur64BitMemoryManager>>headerIndicatesAlternateBytecodeSet: methodHeader "A negative header selects the alternate bytecode set." ^methodHeader signedIntFromLong64 < 0 So if it is possible to scan object memory for compiled methods that answer true to this test, it would indicate that an alternate bytecode set is currently in use. I'm not sure how to implement that scan, but ideally it would be done prior to image snapshot, and if and only if the "Sista bit" had not previously been set in the image format number. Dave > > > > > Dave > > > > On Sun, Jul 19, 2020 at 12:26:21PM -0400, David T. Lewis wrote: > > > > > > > > > Background: > > > > > > Sista bytecodes have been supported in the VM (opensmalltalk-vm) for > > quite > > > some time. Shortly after the Squeak 5.3 release Sista became the default > > > bytecode set in the trunk image. > > > > > > In Squeak trunk, Sista bytecodes can be activated (or deactivated) with > > > CompiledCode class>>useSista: aBoolean, which also calls the hook to > > inform > > > the VM of Sista bytecode usage: > > > > > > > > > > > > This optional primitive is intended to inform the VM that an alternate > > > bytecode set is (or is not) being used by the image, and the VM can use > > > this information to update the image format number (first few bytes of > > > the saved image file) to a new number that indicates that Sista or other > > > enhanced bytecode set support is required for that image. A proposed > > > implementation of the primitive for opensmalltalk-vm is in the VMMaker > > > inbox (VMMaker.oscog-dtl.2711). > > > > > > An earlier follow-up discussion in this thread included the suggestion > > > of e.g. a #primitiveAvailableBytecodeSets that would provide a list of > > > available bytecode sets to the image. This is also a good idea, but it is > > > not directly related to the intended use of > > #primitiveMultipleBytecodeSetsActive. > > > Perhaps it could be implemented as a zero-argument call to a single > > primitive, > > > such that a boolean argument informs the VM of multiple bytecodes active, > > > and calling primitiveMultipleBytecodeSetsActive without arguments would > > ask > > > the VM to tell the image what bytecode sets can be supported by that VM. > > > > > > @eliot - are you still on board with this concept, and if so could you > > > please take a look at the inbox proposal? We discussed this in the last > > > Squeak board meeting, and the board remains supportive of the idea of > > > updating the image format number for the next Squeak release. > > > > > > Thanks, > > > Dave > > > > > > > > > On Mon, Jan 13, 2020 at 09:33:34AM -0500, David T. Lewis wrote: > > > > Hi Eliot, > > > > > > > > This is a belated follow up on earlier private discussion during a > > Squeak > > > > board meeting a few months ago, in which we agreed that identifying > > > > "Sista in use" in the image format number would be a useful thing to > > do. > > > > I previously added the documentation for this in ImageFormat-dtl.39.mcz > > > > (as well as the updated ckformat.c program to match). > > > > > > > > Attached here is a change set that can be loaded into a VMMaker image > > to > > > > add VM support for setting and reading the updated image format > > numbers. > > > > Here I used a primitive to initially set or clear the "sista bit". > > There > > > > are other ways this could be done, but this at least gets us started > > > > with a working implementation. > > > > > > > > By way of explanation, I am copying below both the change set preamble > > > > and the earlier ImageFormat commit notice: > > > > > > > > === > > > > > > > > Change Set: VMM-Sista-bit-dtl > > > > Date: 12 January 2020 > > > > Author: David T. Lewis > > > > > > > > Let the image inform the interpreter that alternate bytecodes either > > are > > > > or are not in use, and remember that setting when writing or reading > > the > > > > image format number in a shapshot file header. > > > > > > > > Provide primitiveMultipleBytecodesActive to allow the setting to be > > updated > > > > from the image. Expected usage is that the image can call this > > primitive > > > > after recompiling with Systa bytecodes, or after reverting back. > > Note that > > > > an alternative implemenation would be to use a VM parameter. The > > primitive > > > > was chosen here because it can perform parameter checking and does > > not > > > > require coordinated update the the VM parameter usage. > > > > > > > > Expected usage is that this feature will remain unused for some > > grace period > > > > (perhaps a few months) during which an updated VM can be widely > > circulated. > > > > After that period, images using Sista bytecodes may be safely saved > > with the > > > > updated image format number indicating that multiple bytecodes are > > in use. > > > > > > > > This change set includes helper methods in SmalltalkImage for > > testing or > > > > setting the multipleBytecodeSetsActive setting in the VM. > > > > > > > > Note the change set postscript which is necessary for initializing a > > class > > > > variable prior to code generation. > > > > > > > > === > > > > > > > > Name: ImageFormat-dtl.37 > > > > Author: dtl > > > > Time: 20 July 2019, 5:23:59.004 pm > > > > UUID: 52b464d5-0bf7-4326-bde3-4f18ad70b239 > > > > Ancestors: ImageFormat-dtl.36 > > > > > > > > Identify extended bytecodes for Sista in the image format number. > > Bit 10 > > > > identifies an image that contains extended bytecodes. Thus a 32 bit > > Spur > > > > image is 6521, with Sista it is 7033, and a 64 bit Spur image is > > 68021, > > > > with Sista it is 68533. > > > > > > > > It is expected that additional bytecode sets can be identified by an > > > > additional field in the image header, probably 32 bits containing two > > > > 16 bit fields, if both zero then Sista. > > > > > > > > Per discussion with Eliot and Bert in a Squeak oversight board > > meeting > > > > 2019-05-15. > > > > > > > > > > > > Dave > > > > > > > > > > > 'From Squeak5.3beta of 4 January 2020 [latest update: #19304] on 12 > > January 2020 at 2:10:55 pm'!"Change Set: > > VMM-Sista-bit-dtlDate: 12 January 2020Author: > > David T. LewisLet the image inform the interpreter that alternate > > bytecodes either are or are not in use, and remember that setting when > > writing or reading the image format number in a shapshot file > > header.Provide primitiveMultipleBytecodesActive to allow the setting to be > > updated from the image. Expected usage is that the image can call this > > primitive after recompiling with Systa bytecodes, or after reverting back. > > Note that an alternative implemenation would be to use a VM parameter. The > > primitive was chosen here because it can perform parameter checking and > > does not require coordinated update the the VM parameter usage.Expected > > usage is that this feature will remain unused for some grace period > > (perhaps a few months) during which an updated VM can be widely circulated. > > After that period, images using Sista bytecodes may be safely saved with > > the updated image format number indicating that multiple bytecodes are in > > use.This change set includes helper methods in SmalltalkImage for testing > > or setting the multipleBytecodeSetsActive setting in the VM.Note the change > > set postscript which is necessary for initializing a class variable prior > > to code generation."!VMClass subclass: #InterpreterPrimitives > > instanceVariableNames: 'objectMemory messageSelector argumentCount > > newMethod primFailCode osErrorCode exceptionPC inFFIFlags profileMethod > > profileProcess profileSemaphore nextProfileTick preemptionYields > > newFinalization sHEAFn ffiExceptionResponse multipleBytecodeSetsActive' > > classVariableNames: 'CrossedX EndOfRun MillisecondClockMask' > > poolDictionaries: 'VMBasicConstants VMBytecodeConstants > > VMMethodCacheConstants VMObjectIndices VMSqueakClassIndices > > VMStackFrameOffsets' category: > > 'VMMaker-Interpreter'!InterpreterPrimitives subclass: #StackInterpreter > > instanceVariableNames: 'currentBytecode bytecodeSetSelector localFP > > localIP localSP stackLimit stackPage stackPages method instructionPointer > > stackPointer framePointer localReturnValue localAbsentReceiver > > localAbsentReceiverOrZero extA extB numExtB primitiveFunctionPointer > > methodCache nsMethodCache atCache lkupClassTag lkupClass > > methodDictLinearSearchLimit highestRunnableProcessPriority > > reenterInterpreter nextWakeupUsecs nextPollUsecs inIOProcessEvents > > interruptKeycode interruptPending savedWindowSize imageHeaderFlags > > fullScreenFlag sendWheelEvents deferDisplayUpdates > > pendingFinalizationSignals extraVMMemory interpreterProxy showSurfaceFn > > primitiveTable primitiveAccessorDepthTable externalPrimitiveTable > > externalPrimitiveTableFirstFreeIndex overflowedPage > > extraFramesToMoveOnOverflow globalSessionID jmpBuf jmpDepth > > suspendedCallbacks suspendedMethods numStackPages desiredNumStackPages > > desiredEdenBytes classNameIndex thisClassIndex metaclassNumSlots > > interruptCheckChain suppressHeartbeatFlag breakSelector breakSelectorLength > > breakLookupClassTag longRunningPrimitiveCheckMethod > > longRunningPrimitiveCheckSemaphore longRunningPrimitiveStartUsecs > > longRunningPrimitiveStopUsecs longRunningPrimitiveGCUsecs > > longRunningPrimitiveCheckSequenceNumber > > longRunningPrimitiveSignalUndelivered checkAllocFiller tempOop tempOop2 > > metaAccessorDepth theUnknownShort the2ndUnknownShort imageFloatsBigEndian > > maxExtSemTabSizeSet lastMethodCacheProbeWrite gcSemaphoreIndex > > classByteArrayCompactIndex checkedPluginName nativeSP nativeStackPointer > > lowcodeCalloutState shadowCallStackPointer displayBits displayWidth > > displayHeight displayDepth statForceInterruptCheck statStackOverflow > > statStackPageDivorce statCheckForEvents statProcessSwitch > > statIOProcessEvents statPendingFinalizationSignals statIdleUsecs > > debugCallbackPath debugCallbackReturns debugCallbackInvokes > > primitiveDoMixedArithmetic' classVariableNames: 'AccessModifierPrivate > > AccessModifierProtected AccessModifierPublic AltBytecodeEncoderClassName > > AltLongStoreBytecode AlternateHeaderHasPrimFlag > > AlternateHeaderIsOptimizedFlag AlternateHeaderNumLiteralsMask > > AtCacheFixedFields AtCacheFmt AtCacheMask AtCacheOop AtCacheSize > > AtCacheTotalSize AtPutBase BytecodeEncoderClassName BytecodeTable > > CacheProbeMax DirBadPath DirEntryFound DirNoMoreEntries DumpStackOnLowSpace > > EnclosingMixinIndex EnclosingObjectIndex EnforceAccessControl > > FailImbalancedPrimitives LongStoreBytecode MaxExternalPrimitiveTableSize > > MaxJumpBuf MaxPrimitiveIndex MaxQuickPrimitiveIndex > > MethodHeaderArgCountShift MethodHeaderFlagBitPosition > > MethodHeaderTempCountShift MixinIndex MultipleBytecodeSetsBitmask > > PrimNumberDoExternalCall PrimNumberDoPrimitive PrimNumberExternalCall > > PrimNumberFFICall PrimitiveTable ReturnToInterpreter > > StackPageReachedButUntraced StackPageTraceInvalid StackPageTraced > > StackPageUnreached V3PrimitiveBitsMask' poolDictionaries: > > 'VMBasicConstants VMBytecodeConstants VMMethodCacheConstants > > VMObjectIndices VMSpurObjectRepresentationConstants VMSqueakClassIndices > > VMStackFrameOffsets' category: > > 'VMMaker-Interpreter'!!InterpreterPrimitives methodsFor: 'other primitives' > > stamp: 'dtl 1/12/2020 13:47'!primitiveMultipleBytecodeSetsActive "Set the > > value of multipleBytecodeSetsActive based on the boolean argument if > > supplied. Fail if multiple bytecode sets are not supported. Answer the > > current value of multipleBytecodeSetsActive." > > argumentCount >1 ifTrue: [^self primitiveFailFor: > > PrimErrBadNumArgs]. argumentCount = 1 ifTrue: [self > > stackTop = objectMemory trueObject ifTrue: [self > > cppIf: MULTIPLEBYTECODESETS ifTrue: > > [multipleBytecodeSetsActive := true] ifFalse: > > [^self primitiveFailFor: PrimErrUnsupported]] ifFalse: > > [self stackTop = objectMemory falseObject > > ifTrue: [multipleBytecodeSetsActive := false] > > ifFalse:[^self primitiveFailFor: PrimErrBadArgument]]]. > > multipleBytecodeSetsActive ifTrue: [self pop: argumentCount + > > 1 thenPush: objectMemory trueObject] ifFalse: [self pop: > > argumentCount + 1 thenPush: objectMemory falseObject].! !!SmalltalkImage > > methodsFor: 'system attributes' stamp: 'dtl 1/12/2020 > > 11:55'!multipleBytecodeSetsActive "Answer true if the VM is assuming > > that multiple bytecode sets such as Sista are active in this image." > > . self > > primitiveFailed! !!SmalltalkImage methodsFor: 'system attributes' stamp: > > 'dtl 1/12/2020 11:52'!multipleBytecodeSetsActive: aBoolean "Inform > > the VM that an alternate bytecode set such as EncoderForSistaV1 is or is > > not currently in use by this image. The VM may use this to update the > > image format number when saving the image." > 'primitiveMultipleBytecodeSetsActive'>. self primitiveFailed! > > !!StackInterpreter methodsFor: 'image save/restore' stamp: 'dtl 1/12/2020 > > 11:19'!readableFormat: imageVersion "Anwer true if images of the given > > format are readable by this interpreter. Allows a virtual machine to > > accept selected older image formats." | > > imageVersionWithoutSistaBit | imageVersionWithoutSistaBit := imageVersion > > bitAnd: ( -1 - MultipleBytecodeSetsBitmask). "Ignore multiple bytecode > > support identifier" [imageVersionWithoutSistaBit = self imageFormatVersion > > "Float words in platform-order" or: [objectMemory > > hasSpurMemoryManagerAPI not "No compatibility version for Spur as yet" > > and: [imageVersionWithoutSistaBit = self > > imageFormatCompatibilityVersion]]] "Float words in BigEndian order" > > ifTrue: [multipleBytecodeSetsActive := imageVersion bitAnd: > > MultipleBytecodeSetsBitmask. "Remember the Sista bit" > > ^ true]. ^ false! !!StackInterpreter methodsFor: 'image > > save/restore' stamp: 'dtl 1/12/2020 11:18'!writeImageFileIO "Write the > > image header and heap contents to imageFile for snapshot. c.f. > > writeImageFileIOSimulation. The game below is to maintain 64-bit > > alignment for all putLong:toFile: occurrences." | > > imageName headerStart headerSize f imageBytes bytesWritten sCWIfn okToWrite > > | > #squeakFileOffsetType> > declareC: 'extern char imageName[]'> self cCode: [] inSmalltalk: > > [imageName := 'sooth compiler'. ^self writeImageFileIOSimulation]. "If the > > security plugin can be loaded, use it to check for write permission. If > > not, assume it's ok" sCWIfn := self ioLoadFunction: > > 'secCanWriteImage' From: 'SecurityPlugin'. sCWIfn ~= 0 ifTrue: > > [okToWrite := self cCode: '((sqInt (*)(void))sCWIfn)()'. > > okToWrite ifFalse:[^self primitiveFail]]. "local > > constants" headerStart := 0. headerSize := objectMemory > > wordSize = 4 ifTrue: [64] ifFalse: [128]. "header size in bytes; do not > > change!!" f := self sqImageFile: imageName Open: 'wb'. f = nil ifTrue: > > "could not open the image file for writing" [^self > > primitiveFail]. imageBytes := objectMemory imageSizeToWrite. > > headerStart := self sqImage: f File: imageName StartLocation: headerSize + > > imageBytes. self cCode: '/* Note: on Unix systems one could put an exec > > command here, padded to 512 bytes */'. "position file to start of > > header" self sqImageFile: f Seek: headerStart. > > multipleBytecodeSetsActive ifTrue: [self putWord32: (self > > imageFormatVersion bitOr: MultipleBytecodeSetsBitmask) toFile: f] > > ifFalse: [self putWord32: self imageFormatVersion toFile: f]. self > > putWord32: headerSize toFile: f. self putLong: imageBytes toFile: f. > > self putLong: objectMemory baseAddressOfImage toFile: f. self > > putLong: objectMemory specialObjectsOop toFile: f. self putLong: > > objectMemory newObjectHash toFile: f. self putLong: self > > getSnapshotScreenSize toFile: f. self putLong: self getImageHeaderFlags > > toFile: f. self putWord32: extraVMMemory toFile: f. self > > putShort: desiredNumStackPages toFile: f. self putShort: self > > unknownShortOrCodeSizeInKs toFile: f. self putWord32: > > desiredEdenBytes toFile: f. self putShort: (maxExtSemTabSizeSet ifTrue: > > [self ioGetMaxExtSemTableSize] ifFalse: [0]) toFile: f. self putShort: > > the2ndUnknownShort toFile: f. objectMemory hasSpurMemoryManagerAPI > > ifTrue: [self putLong: objectMemory firstSegmentBytes > > toFile: f. self putLong: objectMemory > > bytesLeftInOldSpace toFile: f. 2 timesRepeat: [self > > putLong: 0 toFile: f] "Pad the rest of the header."] ifFalse: > > [4 timesRepeat: [self putLong: 0 toFile: f]]. "Pad > > the rest of the header." objectMemory wordSize = 8 ifTrue: > > [3 timesRepeat: [self putLong: 0 toFile: f]]. "Pad the rest of the > > header." self assert: headerStart + headerSize = (self > > sqImageFilePosition: f). "position file after the header" self > > sqImageFile: f Seek: headerStart + headerSize. self successful ifFalse: > > "file write or seek failure" [self sqImageFileClose: f. > > ^nil]. "write the image data" objectMemory hasSpurMemoryManagerAPI > > ifTrue: [bytesWritten := objectMemory > > writeImageSegmentsToFile: f] ifFalse: > > [bytesWritten := self sq: (self pointerForOop: objectMemory > > baseAddressOfImage) > > Image: (self sizeof: #char) > > File: imageBytes > > Write: f]. self success: bytesWritten = imageBytes. > > self sqImageFileClose: f! !!StackInterpreter class methodsFor: > > 'initialization' stamp: 'dtl 1/12/2020 11:19'!initializeMiscConstants > > super initializeMiscConstants. STACKVM := true. "These flags > > function to identify a GC operation, or to specify what operations the > > leak checker should be run for." GCModeFull := 1. > > "stop-the-world global GC" GCModeNewSpace := 2. > > "Spur's scavenge, or V3's incremental" GCModeIncremental := 4. > > "incremental global gc (Dijkstra tri-colour marking); as yet > > unimplemented" GCModeBecome := 8. "v3 post-become > > sweeping/Spur forwarding" GCModeImageSegment := 16. "just a > > flag for leak checking image segments" GCModeFreeSpace := 32. > > "just a flag for leak checking free space; Spur only" GCCheckPrimCall := > > 64. "just a flag for leak checking external primitive calls" > > StackPageTraceInvalid := -1. StackPageUnreached := 0. > > StackPageReachedButUntraced := 1. StackPageTraced := 2. > > DumpStackOnLowSpace := 0. MillisecondClockMask := 16r1FFFFFFF. > > "Note: The external primitive table should actually be dynamically sized > > but for the sake of inferior platforms (e.g., Mac :-) who cannot allocate > > memory in any reasonable way, we keep it static (and cross our > > fingers...)" MaxExternalPrimitiveTableSize := 4096. "entries" > > MaxJumpBuf := 32. "max. callback depth" FailImbalancedPrimitives := > > InitializationOptions at: #FailImbalancedPrimitives ifAbsentPut: [true]. > > EnforceAccessControl := InitializationOptions at: #EnforceAccessControl > > ifAbsent: [true]. ReturnToInterpreter := 1. "setjmp/longjmp code." > > "N.B. some of these DisownFlags are replicated in > > platforms/Cross/vm/sqVirtualMachine.h. Hence they should always be > > initialized. Because of a hack with callbacks in the non-threaded VM they > > must not conflct with the VM's tag bits." DisownVMLockOutFullGC := 8. > > DisownVMForFFICall := 16. DisownVMForThreading := 32. > > "The Sista bit in the interpreter image format version number" > > MultipleBytecodeSetsBitmask := 512.! !"Postscript:Initialize > > MultipleByteCodeSets class variable."StackInterpreter > > initializeMiscConstants.! > > > > > > > > > > > > From marcel.taeumel at hpi.de Mon Jul 20 07:30:39 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Mon, 20 Jul 2020 09:30:39 +0200 Subject: [Vm-dev] [squeak-dev] Support an updated image format number for Sista In-Reply-To: <20200719195635.GA18835@shell.msen.com> References: <20200113143334.GA9638@shell.msen.com> <20200719162621.GA89267@shell.msen.com> <20200719175124.GA98958@shell.msen.com> <20200719195635.GA18835@shell.msen.com> Message-ID: Well, that bit is not a "Sista bit" in the long term.  What is now "secondary" could become virtually "primary" when somebody designs SistaV2 etc. So, while you can find out, whether "primary" or "secondary" is used, you cannot find out whether or not SistaV1 is used in some method. Following that bit in a method will only give you a hint on whether to look in the classVar PrimaryBytecodeSetEncoderClass or SecondaryBytecodeSetEncoderClass ... which could be set to anything in the future. Best, Marcel Am 19.07.2020 21:56:42 schrieb David T. Lewis : On Sun, Jul 19, 2020 at 08:50:19PM +0200, Fabio Niephaus wrote: > > On Sun, 19 Jul 2020 at 7:51 pm, David T. Lewis wrote: > > > > > I should add that my underlying assumption in proposing the primitive is that > > the VM has no easy or efficient way of knowing whether alternate bytecode sets > > are currently in use, hence the "helper" primitive to permit the image to > > pass a hint to the VM that alternate bytecodes are now active. > > > > But I note that CompiledMethod is in the special object array, so maybe > > there is some way to scan object memory for compiled methods that use > > the alternate bytecode set. > > > IIRC the sign bit of a method header defines whether the primary or > secondary bytecode set is in use. So I believe we can use different sets > per method, not just per image. The sign bit is used to make the check as > cheap as possible. > > Fabio > Yes, that's right. For example: Spur64BitMemoryManager>>headerIndicatesAlternateBytecodeSet: methodHeader "A negative header selects the alternate bytecode set." ^methodHeader signedIntFromLong64 <> So if it is possible to scan object memory for compiled methods that answer true to this test, it would indicate that an alternate bytecode set is currently in use. I'm not sure how to implement that scan, but ideally it would be done prior to image snapshot, and if and only if the "Sista bit" had not previously been set in the image format number. Dave > > > > > Dave > > > > On Sun, Jul 19, 2020 at 12:26:21PM -0400, David T. Lewis wrote: > > > > > > > > > Background: > > > > > > Sista bytecodes have been supported in the VM (opensmalltalk-vm) for > > quite > > > some time. Shortly after the Squeak 5.3 release Sista became the default > > > bytecode set in the trunk image. > > > > > > In Squeak trunk, Sista bytecodes can be activated (or deactivated) with > > > CompiledCode class>>useSista: aBoolean, which also calls the hook to > > inform > > > the VM of Sista bytecode usage: > > > > > > > > > > > > This optional primitive is intended to inform the VM that an alternate > > > bytecode set is (or is not) being used by the image, and the VM can use > > > this information to update the image format number (first few bytes of > > > the saved image file) to a new number that indicates that Sista or other > > > enhanced bytecode set support is required for that image. A proposed > > > implementation of the primitive for opensmalltalk-vm is in the VMMaker > > > inbox (VMMaker.oscog-dtl.2711). > > > > > > An earlier follow-up discussion in this thread included the suggestion > > > of e.g. a #primitiveAvailableBytecodeSets that would provide a list of > > > available bytecode sets to the image. This is also a good idea, but it is > > > not directly related to the intended use of > > #primitiveMultipleBytecodeSetsActive. > > > Perhaps it could be implemented as a zero-argument call to a single > > primitive, > > > such that a boolean argument informs the VM of multiple bytecodes active, > > > and calling primitiveMultipleBytecodeSetsActive without arguments would > > ask > > > the VM to tell the image what bytecode sets can be supported by that VM. > > > > > > @eliot - are you still on board with this concept, and if so could you > > > please take a look at the inbox proposal? We discussed this in the last > > > Squeak board meeting, and the board remains supportive of the idea of > > > updating the image format number for the next Squeak release. > > > > > > Thanks, > > > Dave > > > > > > > > > On Mon, Jan 13, 2020 at 09:33:34AM -0500, David T. Lewis wrote: > > > > Hi Eliot, > > > > > > > > This is a belated follow up on earlier private discussion during a > > Squeak > > > > board meeting a few months ago, in which we agreed that identifying > > > > "Sista in use" in the image format number would be a useful thing to > > do. > > > > I previously added the documentation for this in ImageFormat-dtl.39.mcz > > > > (as well as the updated ckformat.c program to match). > > > > > > > > Attached here is a change set that can be loaded into a VMMaker image > > to > > > > add VM support for setting and reading the updated image format > > numbers. > > > > Here I used a primitive to initially set or clear the "sista bit". > > There > > > > are other ways this could be done, but this at least gets us started > > > > with a working implementation. > > > > > > > > By way of explanation, I am copying below both the change set preamble > > > > and the earlier ImageFormat commit notice: > > > > > > > > === > > > > > > > > Change Set: VMM-Sista-bit-dtl > > > > Date: 12 January 2020 > > > > Author: David T. Lewis > > > > > > > > Let the image inform the interpreter that alternate bytecodes either > > are > > > > or are not in use, and remember that setting when writing or reading > > the > > > > image format number in a shapshot file header. > > > > > > > > Provide primitiveMultipleBytecodesActive to allow the setting to be > > updated > > > > from the image. Expected usage is that the image can call this > > primitive > > > > after recompiling with Systa bytecodes, or after reverting back. > > Note that > > > > an alternative implemenation would be to use a VM parameter. The > > primitive > > > > was chosen here because it can perform parameter checking and does > > not > > > > require coordinated update the the VM parameter usage. > > > > > > > > Expected usage is that this feature will remain unused for some > > grace period > > > > (perhaps a few months) during which an updated VM can be widely > > circulated. > > > > After that period, images using Sista bytecodes may be safely saved > > with the > > > > updated image format number indicating that multiple bytecodes are > > in use. > > > > > > > > This change set includes helper methods in SmalltalkImage for > > testing or > > > > setting the multipleBytecodeSetsActive setting in the VM. > > > > > > > > Note the change set postscript which is necessary for initializing a > > class > > > > variable prior to code generation. > > > > > > > > === > > > > > > > > Name: ImageFormat-dtl.37 > > > > Author: dtl > > > > Time: 20 July 2019, 5:23:59.004 pm > > > > UUID: 52b464d5-0bf7-4326-bde3-4f18ad70b239 > > > > Ancestors: ImageFormat-dtl.36 > > > > > > > > Identify extended bytecodes for Sista in the image format number. > > Bit 10 > > > > identifies an image that contains extended bytecodes. Thus a 32 bit > > Spur > > > > image is 6521, with Sista it is 7033, and a 64 bit Spur image is > > 68021, > > > > with Sista it is 68533. > > > > > > > > It is expected that additional bytecode sets can be identified by an > > > > additional field in the image header, probably 32 bits containing two > > > > 16 bit fields, if both zero then Sista. > > > > > > > > Per discussion with Eliot and Bert in a Squeak oversight board > > meeting > > > > 2019-05-15. > > > > > > > > > > > > Dave > > > > > > > > > > > 'From Squeak5.3beta of 4 January 2020 [latest update: #19304] on 12 > > January 2020 at 2:10:55 pm'!"Change Set: > > VMM-Sista-bit-dtlDate: 12 January 2020Author: > > David T. LewisLet the image inform the interpreter that alternate > > bytecodes either are or are not in use, and remember that setting when > > writing or reading the image format number in a shapshot file > > header.Provide primitiveMultipleBytecodesActive to allow the setting to be > > updated from the image. Expected usage is that the image can call this > > primitive after recompiling with Systa bytecodes, or after reverting back. > > Note that an alternative implemenation would be to use a VM parameter. The > > primitive was chosen here because it can perform parameter checking and > > does not require coordinated update the the VM parameter usage.Expected > > usage is that this feature will remain unused for some grace period > > (perhaps a few months) during which an updated VM can be widely circulated. > > After that period, images using Sista bytecodes may be safely saved with > > the updated image format number indicating that multiple bytecodes are in > > use.This change set includes helper methods in SmalltalkImage for testing > > or setting the multipleBytecodeSetsActive setting in the VM.Note the change > > set postscript which is necessary for initializing a class variable prior > > to code generation."!VMClass subclass: #InterpreterPrimitives > > instanceVariableNames: 'objectMemory messageSelector argumentCount > > newMethod primFailCode osErrorCode exceptionPC inFFIFlags profileMethod > > profileProcess profileSemaphore nextProfileTick preemptionYields > > newFinalization sHEAFn ffiExceptionResponse multipleBytecodeSetsActive' > > classVariableNames: 'CrossedX EndOfRun MillisecondClockMask' > > poolDictionaries: 'VMBasicConstants VMBytecodeConstants > > VMMethodCacheConstants VMObjectIndices VMSqueakClassIndices > > VMStackFrameOffsets' category: > > 'VMMaker-Interpreter'!InterpreterPrimitives subclass: #StackInterpreter > > instanceVariableNames: 'currentBytecode bytecodeSetSelector localFP > > localIP localSP stackLimit stackPage stackPages method instructionPointer > > stackPointer framePointer localReturnValue localAbsentReceiver > > localAbsentReceiverOrZero extA extB numExtB primitiveFunctionPointer > > methodCache nsMethodCache atCache lkupClassTag lkupClass > > methodDictLinearSearchLimit highestRunnableProcessPriority > > reenterInterpreter nextWakeupUsecs nextPollUsecs inIOProcessEvents > > interruptKeycode interruptPending savedWindowSize imageHeaderFlags > > fullScreenFlag sendWheelEvents deferDisplayUpdates > > pendingFinalizationSignals extraVMMemory interpreterProxy showSurfaceFn > > primitiveTable primitiveAccessorDepthTable externalPrimitiveTable > > externalPrimitiveTableFirstFreeIndex overflowedPage > > extraFramesToMoveOnOverflow globalSessionID jmpBuf jmpDepth > > suspendedCallbacks suspendedMethods numStackPages desiredNumStackPages > > desiredEdenBytes classNameIndex thisClassIndex metaclassNumSlots > > interruptCheckChain suppressHeartbeatFlag breakSelector breakSelectorLength > > breakLookupClassTag longRunningPrimitiveCheckMethod > > longRunningPrimitiveCheckSemaphore longRunningPrimitiveStartUsecs > > longRunningPrimitiveStopUsecs longRunningPrimitiveGCUsecs > > longRunningPrimitiveCheckSequenceNumber > > longRunningPrimitiveSignalUndelivered checkAllocFiller tempOop tempOop2 > > metaAccessorDepth theUnknownShort the2ndUnknownShort imageFloatsBigEndian > > maxExtSemTabSizeSet lastMethodCacheProbeWrite gcSemaphoreIndex > > classByteArrayCompactIndex checkedPluginName nativeSP nativeStackPointer > > lowcodeCalloutState shadowCallStackPointer displayBits displayWidth > > displayHeight displayDepth statForceInterruptCheck statStackOverflow > > statStackPageDivorce statCheckForEvents statProcessSwitch > > statIOProcessEvents statPendingFinalizationSignals statIdleUsecs > > debugCallbackPath debugCallbackReturns debugCallbackInvokes > > primitiveDoMixedArithmetic' classVariableNames: 'AccessModifierPrivate > > AccessModifierProtected AccessModifierPublic AltBytecodeEncoderClassName > > AltLongStoreBytecode AlternateHeaderHasPrimFlag > > AlternateHeaderIsOptimizedFlag AlternateHeaderNumLiteralsMask > > AtCacheFixedFields AtCacheFmt AtCacheMask AtCacheOop AtCacheSize > > AtCacheTotalSize AtPutBase BytecodeEncoderClassName BytecodeTable > > CacheProbeMax DirBadPath DirEntryFound DirNoMoreEntries DumpStackOnLowSpace > > EnclosingMixinIndex EnclosingObjectIndex EnforceAccessControl > > FailImbalancedPrimitives LongStoreBytecode MaxExternalPrimitiveTableSize > > MaxJumpBuf MaxPrimitiveIndex MaxQuickPrimitiveIndex > > MethodHeaderArgCountShift MethodHeaderFlagBitPosition > > MethodHeaderTempCountShift MixinIndex MultipleBytecodeSetsBitmask > > PrimNumberDoExternalCall PrimNumberDoPrimitive PrimNumberExternalCall > > PrimNumberFFICall PrimitiveTable ReturnToInterpreter > > StackPageReachedButUntraced StackPageTraceInvalid StackPageTraced > > StackPageUnreached V3PrimitiveBitsMask' poolDictionaries: > > 'VMBasicConstants VMBytecodeConstants VMMethodCacheConstants > > VMObjectIndices VMSpurObjectRepresentationConstants VMSqueakClassIndices > > VMStackFrameOffsets' category: > > 'VMMaker-Interpreter'!!InterpreterPrimitives methodsFor: 'other primitives' > > stamp: 'dtl 1/12/2020 13:47'!primitiveMultipleBytecodeSetsActive "Set the > > value of multipleBytecodeSetsActive based on the boolean argument if > > supplied. Fail if multiple bytecode sets are not supported. Answer the > > current value of multipleBytecodeSetsActive." > > argumentCount >1 ifTrue: [^self primitiveFailFor: > > PrimErrBadNumArgs]. argumentCount = 1 ifTrue: [self > > stackTop = objectMemory trueObject ifTrue: [self > > cppIf: MULTIPLEBYTECODESETS ifTrue: > > [multipleBytecodeSetsActive := true] ifFalse: > > [^self primitiveFailFor: PrimErrUnsupported]] ifFalse: > > [self stackTop = objectMemory falseObject > > ifTrue: [multipleBytecodeSetsActive := false] > > ifFalse:[^self primitiveFailFor: PrimErrBadArgument]]]. > > multipleBytecodeSetsActive ifTrue: [self pop: argumentCount + > > 1 thenPush: objectMemory trueObject] ifFalse: [self pop: > > argumentCount + 1 thenPush: objectMemory falseObject].! !!SmalltalkImage > > methodsFor: 'system attributes' stamp: 'dtl 1/12/2020 > > 11:55'!multipleBytecodeSetsActive "Answer true if the VM is assuming > > that multiple bytecode sets such as Sista are active in this image." > > . self > > primitiveFailed! !!SmalltalkImage methodsFor: 'system attributes' stamp: > > 'dtl 1/12/2020 11:52'!multipleBytecodeSetsActive: aBoolean "Inform > > the VM that an alternate bytecode set such as EncoderForSistaV1 is or is > > not currently in use by this image. The VM may use this to update the > > image format number when saving the image." <> > > 'primitiveMultipleBytecodeSetsActive'>. self primitiveFailed! > > !!StackInterpreter methodsFor: 'image save/restore' stamp: 'dtl 1/12/2020 > > 11:19'!readableFormat: imageVersion "Anwer true if images of the given > > format are readable by this interpreter. Allows a virtual machine to > > accept selected older image formats." | > > imageVersionWithoutSistaBit | imageVersionWithoutSistaBit := imageVersion > > bitAnd: ( -1 - MultipleBytecodeSetsBitmask). "Ignore multiple bytecode > > support identifier" [imageVersionWithoutSistaBit = self imageFormatVersion > > "Float words in platform-order" or: [objectMemory > > hasSpurMemoryManagerAPI not "No compatibility version for Spur as yet" > > and: [imageVersionWithoutSistaBit = self > > imageFormatCompatibilityVersion]]] "Float words in BigEndian order" > > ifTrue: [multipleBytecodeSetsActive := imageVersion bitAnd: > > MultipleBytecodeSetsBitmask. "Remember the Sista bit" > > ^ true]. ^ false! !!StackInterpreter methodsFor: 'image > > save/restore' stamp: 'dtl 1/12/2020 11:18'!writeImageFileIO "Write the > > image header and heap contents to imageFile for snapshot. c.f. > > writeImageFileIOSimulation. The game below is to maintain 64-bit > > alignment for all putLong:toFile: occurrences." | > > imageName headerStart headerSize f imageBytes bytesWritten sCWIfn okToWrite > > | > > #squeakFileOffsetType> > > declareC: 'extern char imageName[]'> self cCode: [] inSmalltalk: > > [imageName := 'sooth compiler'. ^self writeImageFileIOSimulation]. "If the > > security plugin can be loaded, use it to check for write permission. If > > not, assume it's ok" sCWIfn := self ioLoadFunction: > > 'secCanWriteImage' From: 'SecurityPlugin'. sCWIfn ~= 0 ifTrue: > > [okToWrite := self cCode: '((sqInt (*)(void))sCWIfn)()'. > > okToWrite ifFalse:[^self primitiveFail]]. "local > > constants" headerStart := 0. headerSize := objectMemory > > wordSize = 4 ifTrue: [64] ifFalse: [128]. "header size in bytes; do not > > change!!" f := self sqImageFile: imageName Open: 'wb'. f = nil ifTrue: > > "could not open the image file for writing" [^self > > primitiveFail]. imageBytes := objectMemory imageSizeToWrite. > > headerStart := self sqImage: f File: imageName StartLocation: headerSize + > > imageBytes. self cCode: '/* Note: on Unix systems one could put an exec > > command here, padded to 512 bytes */'. "position file to start of > > header" self sqImageFile: f Seek: headerStart. > > multipleBytecodeSetsActive ifTrue: [self putWord32: (self > > imageFormatVersion bitOr: MultipleBytecodeSetsBitmask) toFile: f] > > ifFalse: [self putWord32: self imageFormatVersion toFile: f]. self > > putWord32: headerSize toFile: f. self putLong: imageBytes toFile: f. > > self putLong: objectMemory baseAddressOfImage toFile: f. self > > putLong: objectMemory specialObjectsOop toFile: f. self putLong: > > objectMemory newObjectHash toFile: f. self putLong: self > > getSnapshotScreenSize toFile: f. self putLong: self getImageHeaderFlags > > toFile: f. self putWord32: extraVMMemory toFile: f. self > > putShort: desiredNumStackPages toFile: f. self putShort: self > > unknownShortOrCodeSizeInKs toFile: f. self putWord32: > > desiredEdenBytes toFile: f. self putShort: (maxExtSemTabSizeSet ifTrue: > > [self ioGetMaxExtSemTableSize] ifFalse: [0]) toFile: f. self putShort: > > the2ndUnknownShort toFile: f. objectMemory hasSpurMemoryManagerAPI > > ifTrue: [self putLong: objectMemory firstSegmentBytes > > toFile: f. self putLong: objectMemory > > bytesLeftInOldSpace toFile: f. 2 timesRepeat: [self > > putLong: 0 toFile: f] "Pad the rest of the header."] ifFalse: > > [4 timesRepeat: [self putLong: 0 toFile: f]]. "Pad > > the rest of the header." objectMemory wordSize = 8 ifTrue: > > [3 timesRepeat: [self putLong: 0 toFile: f]]. "Pad the rest of the > > header." self assert: headerStart + headerSize = (self > > sqImageFilePosition: f). "position file after the header" self > > sqImageFile: f Seek: headerStart + headerSize. self successful ifFalse: > > "file write or seek failure" [self sqImageFileClose: f. > > ^nil]. "write the image data" objectMemory hasSpurMemoryManagerAPI > > ifTrue: [bytesWritten := objectMemory > > writeImageSegmentsToFile: f] ifFalse: > > [bytesWritten := self sq: (self pointerForOop: objectMemory > > baseAddressOfImage) > > Image: (self sizeof: #char) > > File: imageBytes > > Write: f]. self success: bytesWritten = imageBytes. > > self sqImageFileClose: f! !!StackInterpreter class methodsFor: > > 'initialization' stamp: 'dtl 1/12/2020 11:19'!initializeMiscConstants > > super initializeMiscConstants. STACKVM := true. "These flags > > function to identify a GC operation, or to specify what operations the > > leak checker should be run for." GCModeFull := 1. > > "stop-the-world global GC" GCModeNewSpace := 2. > > "Spur's scavenge, or V3's incremental" GCModeIncremental := 4. > > "incremental global gc (Dijkstra tri-colour marking); as yet > > unimplemented" GCModeBecome := 8. "v3 post-become > > sweeping/Spur forwarding" GCModeImageSegment := 16. "just a > > flag for leak checking image segments" GCModeFreeSpace := 32. > > "just a flag for leak checking free space; Spur only" GCCheckPrimCall := > > 64. "just a flag for leak checking external primitive calls" > > StackPageTraceInvalid := -1. StackPageUnreached := 0. > > StackPageReachedButUntraced := 1. StackPageTraced := 2. > > DumpStackOnLowSpace := 0. MillisecondClockMask := 16r1FFFFFFF. > > "Note: The external primitive table should actually be dynamically sized > > but for the sake of inferior platforms (e.g., Mac :-) who cannot allocate > > memory in any reasonable way, we keep it static (and cross our > > fingers...)" MaxExternalPrimitiveTableSize := 4096. "entries" > > MaxJumpBuf := 32. "max. callback depth" FailImbalancedPrimitives := > > InitializationOptions at: #FailImbalancedPrimitives ifAbsentPut: [true]. > > EnforceAccessControl := InitializationOptions at: #EnforceAccessControl > > ifAbsent: [true]. ReturnToInterpreter := 1. "setjmp/longjmp code." > > "N.B. some of these DisownFlags are replicated in > > platforms/Cross/vm/sqVirtualMachine.h. Hence they should always be > > initialized. Because of a hack with callbacks in the non-threaded VM they > > must not conflct with the VM's tag bits." DisownVMLockOutFullGC := 8. > > DisownVMForFFICall := 16. DisownVMForThreading := 32. > > "The Sista bit in the interpreter image format version number" > > MultipleBytecodeSetsBitmask := 512.! !"Postscript:Initialize > > MultipleByteCodeSets class variable."StackInterpreter > > initializeMiscConstants.! > > > > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lewis at mail.msen.com Mon Jul 20 12:36:55 2020 From: lewis at mail.msen.com (David T. Lewis) Date: Mon, 20 Jul 2020 08:36:55 -0400 Subject: [Vm-dev] [squeak-dev] Support an updated image format number for Sista In-Reply-To: References: <20200113143334.GA9638@shell.msen.com> <20200719162621.GA89267@shell.msen.com> <20200719175124.GA98958@shell.msen.com> <20200719195635.GA18835@shell.msen.com> Message-ID: <20200720123655.GA87702@shell.msen.com> On Mon, Jul 20, 2020 at 09:30:39AM +0200, Marcel Taeumel wrote: > > Well, that bit is not a "Sista bit" in the long term.?? > > What is now "secondary" could become virtually "primary" when somebody > designs SistaV2 etc. So, while you can find out, whether "primary" or > "secondary" is used, you cannot find out whether or not SistaV1 is used > in some method. Following that bit in a method will only give you a hint > on whether to look in the classVar??PrimaryBytecodeSetEncoderClass or??SecondaryBytecodeSetEncoderClass ... which could be set to anything in the future. > > Best, > > Marcel Exactly so. I am using the term "sista bit" informally here, and I probably should not do that. As documented in ImageFormat, it is this: ImageFormat>>requiresMultipleBytecodeSupport "True if this image contains extended bytecodes such as the Sista bytecode set. An additional field in the image header may be used to specify a specific bytecode or extension. If false, the image contains only the traditional bytecodes." ^requiresMultipleBytecodeSupport ImageFormat can be loaded from SqueakMap, and does not require VMMaker. Dave > Am 19.07.2020 21:56:42 schrieb David T. Lewis : > > On Sun, Jul 19, 2020 at 08:50:19PM +0200, Fabio Niephaus wrote: > > > > On Sun, 19 Jul 2020 at 7:51 pm, David T. Lewis wrote: > > > > > > > > I should add that my underlying assumption in proposing the primitive is that > > > the VM has no easy or efficient way of knowing whether alternate bytecode sets > > > are currently in use, hence the "helper" primitive to permit the image to > > > pass a hint to the VM that alternate bytecodes are now active. > > > > > > But I note that CompiledMethod is in the special object array, so maybe > > > there is some way to scan object memory for compiled methods that use > > > the alternate bytecode set. > > > > > > IIRC the sign bit of a method header defines whether the primary or > > secondary bytecode set is in use. So I believe we can use different sets > > per method, not just per image. The sign bit is used to make the check as > > cheap as possible. > > > > Fabio > > > > Yes, that's right. For example: > > Spur64BitMemoryManager>>headerIndicatesAlternateBytecodeSet: methodHeader > "A negative header selects the alternate bytecode set." > > > ^methodHeader signedIntFromLong64 <> > > So if it is possible to scan object memory for compiled methods that > answer true to this test, it would indicate that an alternate bytecode > set is currently in use. I'm not sure how to implement that scan, but > ideally it would be done prior to image snapshot, and if and only if > the "Sista bit" had not previously been set in the image format number. > > Dave > > > > > > > > > > Dave > > > > > > On Sun, Jul 19, 2020 at 12:26:21PM -0400, David T. Lewis wrote: > > > > > > > > > > > > Background: > > > > > > > > Sista bytecodes have been supported in the VM (opensmalltalk-vm) for > > > quite > > > > some time. Shortly after the Squeak 5.3 release Sista became the default > > > > bytecode set in the trunk image. > > > > > > > > In Squeak trunk, Sista bytecodes can be activated (or deactivated) with > > > > CompiledCode class>>useSista: aBoolean, which also calls the hook to > > > inform > > > > the VM of Sista bytecode usage: > > > > > > > > > > > > > > > > This optional primitive is intended to inform the VM that an alternate > > > > bytecode set is (or is not) being used by the image, and the VM can use > > > > this information to update the image format number (first few bytes of > > > > the saved image file) to a new number that indicates that Sista or other > > > > enhanced bytecode set support is required for that image. A proposed > > > > implementation of the primitive for opensmalltalk-vm is in the VMMaker > > > > inbox (VMMaker.oscog-dtl.2711). > > > > > > > > An earlier follow-up discussion in this thread included the suggestion > > > > of e.g. a #primitiveAvailableBytecodeSets that would provide a list of > > > > available bytecode sets to the image. This is also a good idea, but it is > > > > not directly related to the intended use of > > > #primitiveMultipleBytecodeSetsActive. > > > > Perhaps it could be implemented as a zero-argument call to a single > > > primitive, > > > > such that a boolean argument informs the VM of multiple bytecodes active, > > > > and calling primitiveMultipleBytecodeSetsActive without arguments would > > > ask > > > > the VM to tell the image what bytecode sets can be supported by that VM. > > > > > > > > @eliot - are you still on board with this concept, and if so could you > > > > please take a look at the inbox proposal? We discussed this in the last > > > > Squeak board meeting, and the board remains supportive of the idea of > > > > updating the image format number for the next Squeak release. > > > > > > > > Thanks, > > > > Dave > > > > > > > > > > > > On Mon, Jan 13, 2020 at 09:33:34AM -0500, David T. Lewis wrote: > > > > > Hi Eliot, > > > > > > > > > > This is a belated follow up on earlier private discussion during a > > > Squeak > > > > > board meeting a few months ago, in which we agreed that identifying > > > > > "Sista in use" in the image format number would be a useful thing to > > > do. > > > > > I previously added the documentation for this in ImageFormat-dtl.39.mcz > > > > > (as well as the updated ckformat.c program to match). > > > > > > > > > > Attached here is a change set that can be loaded into a VMMaker image > > > to > > > > > add VM support for setting and reading the updated image format > > > numbers. > > > > > Here I used a primitive to initially set or clear the "sista bit". > > > There > > > > > are other ways this could be done, but this at least gets us started > > > > > with a working implementation. > > > > > > > > > > By way of explanation, I am copying below both the change set preamble > > > > > and the earlier ImageFormat commit notice: > > > > > > > > > > === > > > > > > > > > > Change Set: VMM-Sista-bit-dtl > > > > > Date: 12 January 2020 > > > > > Author: David T. Lewis > > > > > > > > > > Let the image inform the interpreter that alternate bytecodes either > > > are > > > > > or are not in use, and remember that setting when writing or reading > > > the > > > > > image format number in a shapshot file header. > > > > > > > > > > Provide primitiveMultipleBytecodesActive to allow the setting to be > > > updated > > > > > from the image. Expected usage is that the image can call this > > > primitive > > > > > after recompiling with Systa bytecodes, or after reverting back. > > > Note that > > > > > an alternative implemenation would be to use a VM parameter. The > > > primitive > > > > > was chosen here because it can perform parameter checking and does > > > not > > > > > require coordinated update the the VM parameter usage. > > > > > > > > > > Expected usage is that this feature will remain unused for some > > > grace period > > > > > (perhaps a few months) during which an updated VM can be widely > > > circulated. > > > > > After that period, images using Sista bytecodes may be safely saved > > > with the > > > > > updated image format number indicating that multiple bytecodes are > > > in use. > > > > > > > > > > This change set includes helper methods in SmalltalkImage for > > > testing or > > > > > setting the multipleBytecodeSetsActive setting in the VM. > > > > > > > > > > Note the change set postscript which is necessary for initializing a > > > class > > > > > variable prior to code generation. > > > > > > > > > > === > > > > > > > > > > Name: ImageFormat-dtl.37 > > > > > Author: dtl > > > > > Time: 20 July 2019, 5:23:59.004 pm > > > > > UUID: 52b464d5-0bf7-4326-bde3-4f18ad70b239 > > > > > Ancestors: ImageFormat-dtl.36 > > > > > > > > > > Identify extended bytecodes for Sista in the image format number. > > > Bit 10 > > > > > identifies an image that contains extended bytecodes. Thus a 32 bit > > > Spur > > > > > image is 6521, with Sista it is 7033, and a 64 bit Spur image is > > > 68021, > > > > > with Sista it is 68533. > > > > > > > > > > It is expected that additional bytecode sets can be identified by an > > > > > additional field in the image header, probably 32 bits containing two > > > > > 16 bit fields, if both zero then Sista. > > > > > > > > > > Per discussion with Eliot and Bert in a Squeak oversight board > > > meeting > > > > > 2019-05-15. > > > > > > > > > > > > > > > Dave > > > > > > > > > > > > > > 'From Squeak5.3beta of 4 January 2020 [latest update: #19304] on 12 > > > January 2020 at 2:10:55 pm'!"Change Set: > > > VMM-Sista-bit-dtlDate: 12 January 2020Author: > > > David T. LewisLet the image inform the interpreter that alternate > > > bytecodes either are or are not in use, and remember that setting when > > > writing or reading the image format number in a shapshot file > > > header.Provide primitiveMultipleBytecodesActive to allow the setting to be > > > updated from the image. Expected usage is that the image can call this > > > primitive after recompiling with Systa bytecodes, or after reverting back. > > > Note that an alternative implemenation would be to use a VM parameter. The > > > primitive was chosen here because it can perform parameter checking and > > > does not require coordinated update the the VM parameter usage.Expected > > > usage is that this feature will remain unused for some grace period > > > (perhaps a few months) during which an updated VM can be widely circulated. > > > After that period, images using Sista bytecodes may be safely saved with > > > the updated image format number indicating that multiple bytecodes are in > > > use.This change set includes helper methods in SmalltalkImage for testing > > > or setting the multipleBytecodeSetsActive setting in the VM.Note the change > > > set postscript which is necessary for initializing a class variable prior > > > to code generation."!VMClass subclass: #InterpreterPrimitives > > > instanceVariableNames: 'objectMemory messageSelector argumentCount > > > newMethod primFailCode osErrorCode exceptionPC inFFIFlags profileMethod > > > profileProcess profileSemaphore nextProfileTick preemptionYields > > > newFinalization sHEAFn ffiExceptionResponse multipleBytecodeSetsActive' > > > classVariableNames: 'CrossedX EndOfRun MillisecondClockMask' > > > poolDictionaries: 'VMBasicConstants VMBytecodeConstants > > > VMMethodCacheConstants VMObjectIndices VMSqueakClassIndices > > > VMStackFrameOffsets' category: > > > 'VMMaker-Interpreter'!InterpreterPrimitives subclass: #StackInterpreter > > > instanceVariableNames: 'currentBytecode bytecodeSetSelector localFP > > > localIP localSP stackLimit stackPage stackPages method instructionPointer > > > stackPointer framePointer localReturnValue localAbsentReceiver > > > localAbsentReceiverOrZero extA extB numExtB primitiveFunctionPointer > > > methodCache nsMethodCache atCache lkupClassTag lkupClass > > > methodDictLinearSearchLimit highestRunnableProcessPriority > > > reenterInterpreter nextWakeupUsecs nextPollUsecs inIOProcessEvents > > > interruptKeycode interruptPending savedWindowSize imageHeaderFlags > > > fullScreenFlag sendWheelEvents deferDisplayUpdates > > > pendingFinalizationSignals extraVMMemory interpreterProxy showSurfaceFn > > > primitiveTable primitiveAccessorDepthTable externalPrimitiveTable > > > externalPrimitiveTableFirstFreeIndex overflowedPage > > > extraFramesToMoveOnOverflow globalSessionID jmpBuf jmpDepth > > > suspendedCallbacks suspendedMethods numStackPages desiredNumStackPages > > > desiredEdenBytes classNameIndex thisClassIndex metaclassNumSlots > > > interruptCheckChain suppressHeartbeatFlag breakSelector breakSelectorLength > > > breakLookupClassTag longRunningPrimitiveCheckMethod > > > longRunningPrimitiveCheckSemaphore longRunningPrimitiveStartUsecs > > > longRunningPrimitiveStopUsecs longRunningPrimitiveGCUsecs > > > longRunningPrimitiveCheckSequenceNumber > > > longRunningPrimitiveSignalUndelivered checkAllocFiller tempOop tempOop2 > > > metaAccessorDepth theUnknownShort the2ndUnknownShort imageFloatsBigEndian > > > maxExtSemTabSizeSet lastMethodCacheProbeWrite gcSemaphoreIndex > > > classByteArrayCompactIndex checkedPluginName nativeSP nativeStackPointer > > > lowcodeCalloutState shadowCallStackPointer displayBits displayWidth > > > displayHeight displayDepth statForceInterruptCheck statStackOverflow > > > statStackPageDivorce statCheckForEvents statProcessSwitch > > > statIOProcessEvents statPendingFinalizationSignals statIdleUsecs > > > debugCallbackPath debugCallbackReturns debugCallbackInvokes > > > primitiveDoMixedArithmetic' classVariableNames: 'AccessModifierPrivate > > > AccessModifierProtected AccessModifierPublic AltBytecodeEncoderClassName > > > AltLongStoreBytecode AlternateHeaderHasPrimFlag > > > AlternateHeaderIsOptimizedFlag AlternateHeaderNumLiteralsMask > > > AtCacheFixedFields AtCacheFmt AtCacheMask AtCacheOop AtCacheSize > > > AtCacheTotalSize AtPutBase BytecodeEncoderClassName BytecodeTable > > > CacheProbeMax DirBadPath DirEntryFound DirNoMoreEntries DumpStackOnLowSpace > > > EnclosingMixinIndex EnclosingObjectIndex EnforceAccessControl > > > FailImbalancedPrimitives LongStoreBytecode MaxExternalPrimitiveTableSize > > > MaxJumpBuf MaxPrimitiveIndex MaxQuickPrimitiveIndex > > > MethodHeaderArgCountShift MethodHeaderFlagBitPosition > > > MethodHeaderTempCountShift MixinIndex MultipleBytecodeSetsBitmask > > > PrimNumberDoExternalCall PrimNumberDoPrimitive PrimNumberExternalCall > > > PrimNumberFFICall PrimitiveTable ReturnToInterpreter > > > StackPageReachedButUntraced StackPageTraceInvalid StackPageTraced > > > StackPageUnreached V3PrimitiveBitsMask' poolDictionaries: > > > 'VMBasicConstants VMBytecodeConstants VMMethodCacheConstants > > > VMObjectIndices VMSpurObjectRepresentationConstants VMSqueakClassIndices > > > VMStackFrameOffsets' category: > > > 'VMMaker-Interpreter'!!InterpreterPrimitives methodsFor: 'other primitives' > > > stamp: 'dtl 1/12/2020 13:47'!primitiveMultipleBytecodeSetsActive "Set the > > > value of multipleBytecodeSetsActive based on the boolean argument if > > > supplied. Fail if multiple bytecode sets are not supported. Answer the > > > current value of multipleBytecodeSetsActive." > > > argumentCount >1 ifTrue: [^self primitiveFailFor: > > > PrimErrBadNumArgs]. argumentCount = 1 ifTrue: [self > > > stackTop = objectMemory trueObject ifTrue: [self > > > cppIf: MULTIPLEBYTECODESETS ifTrue: > > > [multipleBytecodeSetsActive := true] ifFalse: > > > [^self primitiveFailFor: PrimErrUnsupported]] ifFalse: > > > [self stackTop = objectMemory falseObject > > > ifTrue: [multipleBytecodeSetsActive := false] > > > ifFalse:[^self primitiveFailFor: PrimErrBadArgument]]]. > > > multipleBytecodeSetsActive ifTrue: [self pop: argumentCount + > > > 1 thenPush: objectMemory trueObject] ifFalse: [self pop: > > > argumentCount + 1 thenPush: objectMemory falseObject].! !!SmalltalkImage > > > methodsFor: 'system attributes' stamp: 'dtl 1/12/2020 > > > 11:55'!multipleBytecodeSetsActive "Answer true if the VM is assuming > > > that multiple bytecode sets such as Sista are active in this image." > > > . self > > > primitiveFailed! !!SmalltalkImage methodsFor: 'system attributes' stamp: > > > 'dtl 1/12/2020 11:52'!multipleBytecodeSetsActive: aBoolean "Inform > > > the VM that an alternate bytecode set such as EncoderForSistaV1 is or is > > > not currently in use by this image. The VM may use this to update the > > > image format number when saving the image." <> > > > 'primitiveMultipleBytecodeSetsActive'>. self primitiveFailed! > > > !!StackInterpreter methodsFor: 'image save/restore' stamp: 'dtl 1/12/2020 > > > 11:19'!readableFormat: imageVersion "Anwer true if images of the given > > > format are readable by this interpreter. Allows a virtual machine to > > > accept selected older image formats." | > > > imageVersionWithoutSistaBit | imageVersionWithoutSistaBit := imageVersion > > > bitAnd: ( -1 - MultipleBytecodeSetsBitmask). "Ignore multiple bytecode > > > support identifier" [imageVersionWithoutSistaBit = self imageFormatVersion > > > "Float words in platform-order" or: [objectMemory > > > hasSpurMemoryManagerAPI not "No compatibility version for Spur as yet" > > > and: [imageVersionWithoutSistaBit = self > > > imageFormatCompatibilityVersion]]] "Float words in BigEndian order" > > > ifTrue: [multipleBytecodeSetsActive := imageVersion bitAnd: > > > MultipleBytecodeSetsBitmask. "Remember the Sista bit" > > > ^ true]. ^ false! !!StackInterpreter methodsFor: 'image > > > save/restore' stamp: 'dtl 1/12/2020 11:18'!writeImageFileIO "Write the > > > image header and heap contents to imageFile for snapshot. c.f. > > > writeImageFileIOSimulation. The game below is to maintain 64-bit > > > alignment for all putLong:toFile: occurrences." | > > > imageName headerStart headerSize f imageBytes bytesWritten sCWIfn okToWrite > > > | > > > #squeakFileOffsetType> > > > declareC: 'extern char imageName[]'> self cCode: [] inSmalltalk: > > > [imageName := 'sooth compiler'. ^self writeImageFileIOSimulation]. "If the > > > security plugin can be loaded, use it to check for write permission. If > > > not, assume it's ok" sCWIfn := self ioLoadFunction: > > > 'secCanWriteImage' From: 'SecurityPlugin'. sCWIfn ~= 0 ifTrue: > > > [okToWrite := self cCode: '((sqInt (*)(void))sCWIfn)()'. > > > okToWrite ifFalse:[^self primitiveFail]]. "local > > > constants" headerStart := 0. headerSize := objectMemory > > > wordSize = 4 ifTrue: [64] ifFalse: [128]. "header size in bytes; do not > > > change!!" f := self sqImageFile: imageName Open: 'wb'. f = nil ifTrue: > > > "could not open the image file for writing" [^self > > > primitiveFail]. imageBytes := objectMemory imageSizeToWrite. > > > headerStart := self sqImage: f File: imageName StartLocation: headerSize + > > > imageBytes. self cCode: '/* Note: on Unix systems one could put an exec > > > command here, padded to 512 bytes */'. "position file to start of > > > header" self sqImageFile: f Seek: headerStart. > > > multipleBytecodeSetsActive ifTrue: [self putWord32: (self > > > imageFormatVersion bitOr: MultipleBytecodeSetsBitmask) toFile: f] > > > ifFalse: [self putWord32: self imageFormatVersion toFile: f]. self > > > putWord32: headerSize toFile: f. self putLong: imageBytes toFile: f. > > > self putLong: objectMemory baseAddressOfImage toFile: f. self > > > putLong: objectMemory specialObjectsOop toFile: f. self putLong: > > > objectMemory newObjectHash toFile: f. self putLong: self > > > getSnapshotScreenSize toFile: f. self putLong: self getImageHeaderFlags > > > toFile: f. self putWord32: extraVMMemory toFile: f. self > > > putShort: desiredNumStackPages toFile: f. self putShort: self > > > unknownShortOrCodeSizeInKs toFile: f. self putWord32: > > > desiredEdenBytes toFile: f. self putShort: (maxExtSemTabSizeSet ifTrue: > > > [self ioGetMaxExtSemTableSize] ifFalse: [0]) toFile: f. self putShort: > > > the2ndUnknownShort toFile: f. objectMemory hasSpurMemoryManagerAPI > > > ifTrue: [self putLong: objectMemory firstSegmentBytes > > > toFile: f. self putLong: objectMemory > > > bytesLeftInOldSpace toFile: f. 2 timesRepeat: [self > > > putLong: 0 toFile: f] "Pad the rest of the header."] ifFalse: > > > [4 timesRepeat: [self putLong: 0 toFile: f]]. "Pad > > > the rest of the header." objectMemory wordSize = 8 ifTrue: > > > [3 timesRepeat: [self putLong: 0 toFile: f]]. "Pad the rest of the > > > header." self assert: headerStart + headerSize = (self > > > sqImageFilePosition: f). "position file after the header" self > > > sqImageFile: f Seek: headerStart + headerSize. self successful ifFalse: > > > "file write or seek failure" [self sqImageFileClose: f. > > > ^nil]. "write the image data" objectMemory hasSpurMemoryManagerAPI > > > ifTrue: [bytesWritten := objectMemory > > > writeImageSegmentsToFile: f] ifFalse: > > > [bytesWritten := self sq: (self pointerForOop: objectMemory > > > baseAddressOfImage) > > > Image: (self sizeof: #char) > > > File: imageBytes > > > Write: f]. self success: bytesWritten = imageBytes. > > > self sqImageFileClose: f! !!StackInterpreter class methodsFor: > > > 'initialization' stamp: 'dtl 1/12/2020 11:19'!initializeMiscConstants > > > super initializeMiscConstants. STACKVM := true. "These flags > > > function to identify a GC operation, or to specify what operations the > > > leak checker should be run for." GCModeFull := 1. > > > "stop-the-world global GC" GCModeNewSpace := 2. > > > "Spur's scavenge, or V3's incremental" GCModeIncremental := 4. > > > "incremental global gc (Dijkstra tri-colour marking); as yet > > > unimplemented" GCModeBecome := 8. "v3 post-become > > > sweeping/Spur forwarding" GCModeImageSegment := 16. "just a > > > flag for leak checking image segments" GCModeFreeSpace := 32. > > > "just a flag for leak checking free space; Spur only" GCCheckPrimCall := > > > 64. "just a flag for leak checking external primitive calls" > > > StackPageTraceInvalid := -1. StackPageUnreached := 0. > > > StackPageReachedButUntraced := 1. StackPageTraced := 2. > > > DumpStackOnLowSpace := 0. MillisecondClockMask := 16r1FFFFFFF. > > > "Note: The external primitive table should actually be dynamically sized > > > but for the sake of inferior platforms (e.g., Mac :-) who cannot allocate > > > memory in any reasonable way, we keep it static (and cross our > > > fingers...)" MaxExternalPrimitiveTableSize := 4096. "entries" > > > MaxJumpBuf := 32. "max. callback depth" FailImbalancedPrimitives := > > > InitializationOptions at: #FailImbalancedPrimitives ifAbsentPut: [true]. > > > EnforceAccessControl := InitializationOptions at: #EnforceAccessControl > > > ifAbsent: [true]. ReturnToInterpreter := 1. "setjmp/longjmp code." > > > "N.B. some of these DisownFlags are replicated in > > > platforms/Cross/vm/sqVirtualMachine.h. Hence they should always be > > > initialized. Because of a hack with callbacks in the non-threaded VM they > > > must not conflct with the VM's tag bits." DisownVMLockOutFullGC := 8. > > > DisownVMForFFICall := 16. DisownVMForThreading := 32. > > > "The Sista bit in the interpreter image format version number" > > > MultipleBytecodeSetsBitmask := 512.! !"Postscript:Initialize > > > MultipleByteCodeSets class variable."StackInterpreter > > > initializeMiscConstants.! > > > > > > > > > > > > > > > > > From notifications at github.com Mon Jul 20 17:10:38 2020 From: notifications at github.com (David Stes) Date: Mon, 20 Jul 2020 10:10:38 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] primitives 54 and 554 for timesTwoPower: answer incorrect result on 64bits macOS VM (#383) In-Reply-To: References: Message-ID: For what it's worth, I think that if those primitives 54 and 554 fail sometimes, then they can perhaps be added in a Test framework (perhaps those Tests were already written) - the "Run Tests" in Squeak. For example I can see that for some other "float" bug there is such a test : testZeroRaisedToNegativePower "this is a test related to http://bugs.squeak.org/view.php?id=6781" (there is also a method testTimesTwoPowerGradualUnderflow in KernelTests-Numbers -> FloatTest -> test - arithmetic. Ideally I think the Squeak kernel should have some configuration option to be able to use the system provided libmath (or not) so that it's possible to choose which one , when compiling/building the VM. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/383#issuecomment-661201409 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Mon Jul 20 18:01:12 2020 From: notifications at github.com (David Stes) Date: Mon, 20 Jul 2020 11:01:12 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] primitives 54 and 554 for timesTwoPower: answer incorrect result on 64bits macOS VM (#383) In-Reply-To: References: Message-ID: I checked the Float-tests (Kernel-Numbers) in Squeak6.0alpha-19793-64bit.image. I don't immediately see in the Test framework whether there is a Squeak test, equivalent to the tests for this issue. Is it perhaps already in the Test framework , maybe I just don't see it ? David Stes -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/383#issuecomment-661244924 -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits at source.squeak.org Tue Jul 21 00:27:57 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Tue, 21 Jul 2020 00:27:57 0000 Subject: [Vm-dev] VM Maker: VMMaker.oscog-eem.2778.mcz Message-ID: Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2778.mcz ==================== Summary ==================== Name: VMMaker.oscog-eem.2778 Author: eem Time: 20 July 2020, 5:27:46.688881 pm UUID: b747c434-29c0-4abf-9e8b-3787a02c06ea Ancestors: VMMaker.oscog-eem.2777 Slang: Infer the correct types for the float/double accessors. Hence correct primitiveSpurFloatArrayAt for Float32Array. =============== Diff against VMMaker.oscog-eem.2777 =============== Item was changed: ----- Method: TMethod>>inferTypesForImplicitlyTypedVariablesIn: (in category 'type inference') ----- inferTypesForImplicitlyTypedVariablesIn: aCodeGen "infer types for untyped variables from assignments and arithmetic uses. For debugging answer a Dictionary from var to the nodes that determined types This for debugging: (self copy inferTypesForImplicitlyTypedVariablesIn: aCodeGen)" | alreadyExplicitlyTypedOrNotToBeTyped asYetUntyped mustBeSigned newDeclarations effectiveNodes | aCodeGen maybeBreakForTestToInline: selector in: self. alreadyExplicitlyTypedOrNotToBeTyped := declarations keys asSet. asYetUntyped := locals copyWithoutAll: alreadyExplicitlyTypedOrNotToBeTyped. mustBeSigned := Set new. newDeclarations := Dictionary new. effectiveNodes := Dictionary new. "this for debugging" parseTree nodesDo: [:node| | type var | "If there is something of the form i >= 0, then i should be signed, not unsigned." (node isSend and: [(locals includes: (var := node receiver variableNameOrNil)) and: [(#(<= < >= >) includes: node selector) and: [node args first isConstant and: [node args first value = 0]]]]) ifTrue: [mustBeSigned add: var. effectiveNodes at: var put: { #signed. node }, (effectiveNodes at: var ifAbsent: [#()])]. "if an assignment to an untyped local of a known type, set the local's type to that type. Only observe known sends (methods in the current set) and typed local variables." (node isAssignment and: [(locals includes: (var := node variable name)) and: [(alreadyExplicitlyTypedOrNotToBeTyped includes: var) not]]) ifTrue: "don't be fooled by previously inferred types" [type := node expression isSend ifTrue: [aCodeGen returnTypeForSend: node expression in: self ifNil: nil] ifFalse: [self typeFor: (node expression isAssignment ifTrue: [node expression variable] ifFalse: [node expression]) in: aCodeGen]. type "If untyped, then cannot type the variable yet. A subsequent assignment may assign a subtype of what this type ends up being" ifNil: "Further, if the type derives from an as-yet-untyped method, we must defer." [alreadyExplicitlyTypedOrNotToBeTyped add: var. (node expression isSend and: [(aCodeGen methodNamed: node expression selector) notNil]) ifTrue: [newDeclarations removeKey: var ifAbsent: nil]] ifNotNil: "Merge simple types (but *don't* merge untyped vars); complex types must be defined by the programmer." + [((aCodeGen isSimpleType: type) or: [aCodeGen isFloatingPointCType: type]) ifTrue: - [(aCodeGen isSimpleType: type) ifTrue: [(asYetUntyped includes: var) ifTrue: [newDeclarations at: var put: type, ' ', var. asYetUntyped remove: var] ifFalse: [aCodeGen mergeTypeOf: var in: newDeclarations with: type method: self]. effectiveNodes at: var put: { newDeclarations at: var. node }, (effectiveNodes at: var ifAbsent: [#()])]]]]. mustBeSigned do: [:var| (newDeclarations at: var ifAbsent: nil) ifNotNil: [:decl| | type | type := aCodeGen extractTypeFor: var fromDeclaration: decl. type first == $u ifTrue: [newDeclarations at: var put: (aCodeGen signedTypeForIntegralType: type), ' ', var]]]. newDeclarations keysAndValuesDo: [:var :decl| declarations at: var put: decl]. ^effectiveNodes! From noreply at github.com Tue Jul 21 00:48:45 2020 From: noreply at github.com (Eliot Miranda) Date: Mon, 20 Jul 2020 17:48:45 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 666623: CogVM source as per VMMaker.oscog-eem.2778 Message-ID: Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: 666623a5179c0e62b61ea3daf370a9ccf20c0610 https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/666623a5179c0e62b61ea3daf370a9ccf20c0610 Author: Eliot Miranda Date: 2020-07-20 (Mon, 20 Jul 2020) Changed paths: M nsspur64src/vm/cogit.h M nsspur64src/vm/cointerp.c M nsspur64src/vm/cointerp.h M nsspur64src/vm/gcc3x-cointerp.c M nsspursrc/vm/cogit.h M nsspursrc/vm/cointerp.c M nsspursrc/vm/cointerp.h M nsspursrc/vm/gcc3x-cointerp.c M nsspurstack64src/vm/gcc3x-interp.c M nsspurstack64src/vm/interp.c M nsspurstacksrc/vm/gcc3x-interp.c M nsspurstacksrc/vm/interp.c M spur64src/vm/cogit.h M spur64src/vm/cointerp.c M spur64src/vm/cointerp.h M spur64src/vm/cointerpmt.c M spur64src/vm/cointerpmt.h M spur64src/vm/gcc3x-cointerp.c M spur64src/vm/gcc3x-cointerpmt.c M spurlowcode64src/vm/cogit.h M spurlowcode64src/vm/cointerp.c M spurlowcode64src/vm/cointerp.h M spurlowcode64src/vm/gcc3x-cointerp.c M spurlowcodesrc/vm/cogit.h M spurlowcodesrc/vm/cointerp.c M spurlowcodesrc/vm/cointerp.h M spurlowcodesrc/vm/gcc3x-cointerp.c M spurlowcodestack64src/vm/gcc3x-interp.c M spurlowcodestack64src/vm/interp.c M spurlowcodestacksrc/vm/gcc3x-interp.c M spurlowcodestacksrc/vm/interp.c M spursista64src/vm/cogit.h M spursista64src/vm/cointerp.c M spursista64src/vm/cointerp.h M spursista64src/vm/gcc3x-cointerp.c M spursistasrc/vm/cogit.h M spursistasrc/vm/cointerp.c M spursistasrc/vm/cointerp.h M spursistasrc/vm/gcc3x-cointerp.c M spursrc/vm/cogit.h M spursrc/vm/cointerp.c M spursrc/vm/cointerp.h M spursrc/vm/cointerpmt.c M spursrc/vm/cointerpmt.h M spursrc/vm/gcc3x-cointerp.c M spursrc/vm/gcc3x-cointerpmt.c M spurstack64src/vm/gcc3x-interp.c M spurstack64src/vm/interp.c M spurstack64src/vm/validImage.c M spurstacksrc/vm/gcc3x-interp.c M spurstacksrc/vm/interp.c M spurstacksrc/vm/validImage.c M src/plugins/B3DAcceleratorPlugin/B3DAcceleratorPlugin.c M src/plugins/FileAttributesPlugin/FileAttributesPlugin.c M src/plugins/LargeIntegers/LargeIntegers.c M src/plugins/VMProfileLinuxSupportPlugin/VMProfileLinuxSupportPlugin.c M src/vm/cogit.h M src/vm/cointerp.c M src/vm/cointerp.h M src/vm/cointerpmt.c M src/vm/cointerpmt.h M src/vm/gcc3x-cointerp.c M src/vm/gcc3x-cointerpmt.c M stacksrc/vm/gcc3x-interp.c M stacksrc/vm/interp.c Log Message: ----------- CogVM source as per VMMaker.oscog-eem.2778 Slang: Infer the correct types for the float/double accessors. Hence correct primitiveSpurFloatArrayAt for Float32Array. Plugins affected by VMMaker.oscog-eem.2775 Eliminate unnecessary parentheses in ifNil:. From no-reply at appveyor.com Tue Jul 21 03:28:12 2020 From: no-reply at appveyor.com (AppVeyor) Date: Tue, 21 Jul 2020 03:28:12 +0000 Subject: [Vm-dev] Build completed: opensmalltalk-vm 1.0.2118 Message-ID: <20200721032812.1.445EA21E31BD35D4@appveyor.com> An HTML attachment was scrubbed... URL: From boris at shingarov.com Tue Jul 21 15:54:16 2020 From: boris at shingarov.com (Boris Shingarov) Date: Tue, 21 Jul 2020 11:54:16 -0400 Subject: [Vm-dev] Probably pointless endianness question re: Float changes circa 4.6 In-Reply-To: References: <20200705211632.GA74588@shell.msen.com> <16F4DC5D-25C4-4F0B-A5C0-706E3B1C212F@gmail.com> <102bd672-1357-10ae-4a24-741e00e93d9c@shingarov.com> Message-ID: Hi Eliot, > Wonderful news!!  Why haven;t you committed anything so we can see > your work in progress??  Please, I'd love to see it. There isn't really anything that's not public.  (Well ok, there are some exceptions -- some early-prototype experiments re: deriving Smalltalk from Sail, stuff that's definitely too rough yet to be useful to anyone but myself).  The problem is not publishing, the problem is integration.  We have all the pieces working but some only work in Squeak, some in Pharo, some in Smalltalk/X.  Multiply that by the dimension that some are applied to OpenSmalltalk VM and some to Bee DMR.  Sure I could bring a piece from (say) Smalltalk/X into Squeak and commit it on the squeaksource repo, but what's the point, other than to create confusion and frustration for others? At least the stuff I committed here (VMMaker-over-ULD instead of Alien) actually works IN SQUEAK: so if someone is curious to try it, they can start from where it's reasonable to expect that they will be able to understand what the code does.  (And yes, I am always here available to answer questions).  If they are curious to see how I infer an assembler and disassembler from PDL, they can head over to the Pharo-ArchC repo and start from watching that code run in their Pharo image (because it's been working well for the past 5 years).  But to expect that someone will load this unfamiliar bunch of code into Squeak and struggle to make it work, I think this would be a totally unreasonable, simply idiotic, expectation. There are reasons why we ended up in this state of fragmentation.  One is that I am interested in things like proving correctness of self-modifying code, or like auto-inferring a RISC-V toolchain from its Sail2 spec, much more than in Squeak or Pharo per se.  So if I know it's going to take me a week to build a proof-of-concept of something in Pharo vs a year in Smalltalk/X, I'll do that piece in Pharo no matter my preferences. Unfortunately, there are many of these situations forcing me to work in non-preferred dialects. At this point in time, though, we need to sit down and brainstorm how to change this, because the components have now matured enough to reach diminishing returns from working on them separately. I'd like to somehow integrate to at least allow for short-term progress (now we can't even exchange code easily -- Tonel and whatnot). By short-term, I mean, probably, start from plugging the target-agnostic assemblers: things like e.g. CogARMCompiler>>faddd:with:, this kind of hand-written source just doesn't belong in the source-codebase: this knowledge is trivially inferred from the machine-readable CPU spec.  (And yes, I know how to slang the inferred form, although I have not actually done it yet).  This should simplify the CogCompilers by an order of magnitude. The second thing I want to do sooner than later is erase the black-and-white division between simulation and production: for example in Cogit>>compileCallFor:..., either ALL of them go the cCode: [aRoutine asUnsignedInteger] way, or ALL of them go the inSmalltalk: [self simulatedTrampolineFor: aRoutine] way.  John Sarkela already taught us how to do it granularly, i.e. one simulation run can have some runtime calls executed as native CPU code, and some others be simulated via fakeAddress.  That's not even hard, but what stands in the way is that we have two different address space layouts.  Obviously these will need to become unified. > You're doing 64-bit, 32-bit or both?  What are the significant PPC > platforms these days? There are basically two disjoint PPC worlds these days, Embedded/IOT (NXP/Freescale) and Server (IBM). Right now, only PPC32 is actively moving forward.  I am testing in gem5 simulation, as well as on two different dev boards from Freescale (with e300 and e500) and on the 440 block within XC5VFX (those are past-end-of-life by Xilinx, but are *excellent* debug targets (esp. when semihosting like in OpenSmalltalkVM) and very inexpensive because they are "old tech"). PPC64 is kind of in a weird state.  In gem5 there are out-of-tree patches for PPC64 support, I've tried those and found it frustrating to, when something doesn't work, never be sure if it's their bug or mine. On the hardware side, there are some open-source implementations, one of them from IBM, but it's not quite there yet: every time I configure an FPGA with it and try running my JIT, I bump into one issue or another.  I try to participate in resolving them, but at this stage it's not a very productive tool for JIT testing.  (It's an immensely fun mode to run a Smalltalk VM in, though: no-OS, with MMU switched off, so there is nothing to detect a fake address, these are MMIO to a purpose-built register pulling an interrupt line on access... fun toy but I hope it will mature soon). - bgs On 7/6/20 3:27 PM, Eliot Miranda wrote: > > > Hi Boris, > > On Mon, Jul 6, 2020 at 8:53 AM Boris Shingarov > wrote: > > > > On 7/5/20 6:05 PM, Eliot Miranda wrote: > > > > now is the best time ever to attempt a 64-bit or 32-bit PPC JIT > > ..."attempt"??  I have most of it working already.  I'll ping you > when I > get it to the same point where we reached with i386 and arm (i.e. > booting the Reader and being able to evaluate "100 factorial"). > > > Wonderful news!!  Why haven;t you committed anything so we can see > your work in progress??  Please, I'd love to see it. > _,,,^..^,,,_ > best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: From smalltalk at stefan-marr.de Tue Jul 21 17:00:14 2020 From: smalltalk at stefan-marr.de (Stefan Marr) Date: Tue, 21 Jul 2020 18:00:14 +0100 Subject: [Vm-dev] [2nd CfP] MPLR 2020 - 17th International Conference on Managed Programming Languages & Runtimes Message-ID: <038F1D2C-8BA4-42F6-9F52-286D52D8E8B6@stefan-marr.de> ======================================================================== Call for Papers MPLR 2020 - 17th International Conference on Managed Programming Languages & Runtimes November 4-6, 2020 in Manchester, United Kingdom https://mplr2020.cs.manchester.ac.uk/ Follow us @MPLR_Conf ======================================================================== The 17th International Conference on Managed Programming Languages & Runtimes (MPLR, formerly ManLang) is a premier forum for presenting and discussing novel results in all aspects of managed programming languages and runtime systems, which serve as building blocks for some of the most important computing systems in use, ranging from small-scale (embedded and real-time systems) to large-scale (cloud-computing and big-data platforms) and anything in between (desktop, mobile, IoT, and wearable applications). This year, MPLR will be held virtually. Registration and participation will be free. For up-to-date details, check out the conference website: https://mplr2020.cs.manchester.ac.uk/ and follow us on Twitter @MPLR_Conf. The areas of interest include but are not limited to: * Languages and Compilers - Managed languages (e.g., Java, Scala, JavaScript, Python, Ruby, C#, F#, Clojure, Groovy, Kotlin, R, Smalltalk, Racket, Rust, Go, etc.) - Domain-specific languages - Language design - Compilers and interpreters - Type systems and program logics - Language interoperability - Parallelism, distribution, and concurrency * Virtual Machines - Managed runtime systems (e.g., JVM, Android Runtime (ART), V8, LLVM, .NET CLR, RPython, GraalVM, etc.) - VM design and optimization - VMs for mobile and embedded devices - VMs for real-time applications - Memory management and garbage collection - Hardware/software co-design * Techniques, Tools, and Applications - Static and dynamic program analysis - Testing and debugging - Refactoring - Program understanding - Program synthesis - Security and privacy - Performance analysis and monitoring - Compiler and program verification Submission Categories --------------------- MPLR accepts four types of submissions: 1. Regular research papers describing novel contributions involving managed language platforms. Research papers will be evaluated based on their relevance, novelty, technical rigor, and contribution to the state-of-the-art. Format: up to 12 pages, excluding bibliography and appendix 2. Work-in-progress research papers describing promising new ideas, with perhaps less maturity than full Papers. Work-in-progress papers will be evaluated with an emphasis on novelty and the potential of the new ideas instead of technical rigor and experimental results. Format: up to 6 pages, excluding bibliography and appendix 3. Industry and tool papers presenting technical challenges and solutions for managed language platforms in the context of deployed applications and systems. Industry and tool papers will be evaluated on their relevance, usefulness, and results. Suitability for demonstration and availability will also be considered for tool papers. Format: up to 6 pages, excluding bibliography and appendix 4. Posters They will be evaluated similarly to work-in-progress papers. Posters can accompany any submission as a way to provide additional demonstration and discussion opportunities. Format: poster and 1-page abstract MPLR 2020 submissions must conform to the ACM Policy on Prior Publication and Simultaneous Submissions and to the SIGPLAN Republication Policy. See http://www.sigplan.org/Resources/Policies/Republication/ Author Instructions ------------------- Submissions need to use the ACM `acmart` format with the `sigconf` style: https://www.acm.org/publications/proceedings-template If you are using LaTeX, submissions need to use the 'acmart' document class with the 'sigconf' option. For reviewing, please include page numbers in your submission using the LaTeX command `\settopmatter{printfolios=true}`. The standard settings of a 9 point font size and the Libertine/Biolinum font family are to be kept. All submissions need to be in PDF format. MPLR uses single-blind reviewing, i.e., author names are generally included in submissions. Please also ensure that your submission is legible when printed on a black and white printer. In particular, please check that colors remain distinct and font sizes are legible. Submission Site: https://mplr2020.cs.manchester.ac.uk/submissions/ Important Dates --------------- Submission Deadline: 12 August 2020 Author Notification: 14 September 2020 Camera Ready: 05 October 2020 Conference Dates: 04-06 November 2020 All deadlines are 23:59 AoE (UTC-12h). AUTHORS TAKE NOTE: The official publication date is the date the proceedings are made available in the ACM Digital Library. This date may be up to two weeks prior to the first day of your conference. The official publication date affects the deadline for any patent filings related to published work. COVID-19 -------- MPLR will be held virtual to avoid any health risks to attendees and avoid uncertainties around traveling. Organization ------------ Program Committee: Lubomír Bulej, Charles University, Czech Republic Jeronimo Castrillon, TU Dresden, Germany Shigeru Chiba, University of Tokyo, Japan Irene Finocchi, LUISS Guido Carli University, Italy Juliana Franco, Microsoft Research, UK Elisa Gonzalez Boix, Vrije Universiteit Brussel, Belgium Robert Hirschfeld, Hasso Plattner Institute, Germany Roberto Ierusalimschy, PUC-Rio, Brazil Georgia Kouveli, ARM, UK Burcu Külahçıoğlu Özkan, MPI-SWS, Germany Doug Lea, SUNY Oswego, USA Daryl Maier, IBM, Canada Mark Marron, Microsoft Research, USA Hidehiko Masuhara, Tokyo Institute of Technology, Japan Hanspeter Mössenböck, JKU Linz, Austria Hannes Payer, Google, Germany Julien Ponge, Red Hat, France Aleksandar Prokopec, Oracle Labs, Switzerland Manuel Rigger, ETH Zurich, Switzerland Andrea Rosa, USI, Switzerland Jeremy Singer, University of Glasgow, UK Eli Tilevich, Virginia Tech, USA Sam Tobin-Hochstadt, Indiana University, USA Tobias Wrigstad, Uppsala University, Sweden General Chair: Christos Kotselidis, University of Manchester, UK Program Chair: Stefan Marr, University of Kent, UK If you are unsure whether a particular topic falls within the scope of MPRL’20 or if you have any other questions, please do not hesitate to contact the Program Chair (s.marr at kent.ac.uk). -- Stefan Marr School of Computing, University of Kent https://stefan-marr.de/research/ From noreply at github.com Tue Jul 21 19:13:45 2020 From: noreply at github.com (Eliot Miranda) Date: Tue, 21 Jul 2020 12:13:45 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 0e1d7a: Mac CameraPlugin: Message-ID: Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: 0e1d7ac4c6e41be97b9e8d163c25552b7592d58f https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/0e1d7ac4c6e41be97b9e8d163c25552b7592d58f Author: Eliot Miranda Date: 2020-07-21 (Tue, 21 Jul 2020) Changed paths: M platforms/iOS/plugins/CameraPlugin/AVFoundationVideoGrabber.m Log Message: ----------- Mac CameraPlugin: Fix a slip in setting the exposure mode. Fix getting the camera extent so that doing so doesn't turn the camera on. Implement accessing parameters a la the Windows CameraPlugin. From stes at telenet.be Wed Jul 22 18:12:12 2020 From: stes at telenet.be (stes@PANDORA.BE) Date: Wed, 22 Jul 2020 20:12:12 +0200 (CEST) Subject: [Vm-dev] setting rtprio on ubuntu 18 x64 box appears to fail In-Reply-To: <1090452593.73885861.1595159750729.JavaMail.zimbra@telenet.be> References: <1660314514.68187081.1595011578217.JavaMail.zimbra@telenet.be> <1090452593.73885861.1595159750729.JavaMail.zimbra@telenet.be> Message-ID: <456350113.87849630.1595441532460.JavaMail.zimbra@telenet.be> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hi, The warning/error pthread_setschedparam failed: Not owner is also happening on Solaris, and obviously it also prints some text, which does not really make sense on Solaris. I have documented on the following Wiki how to get rid of this warning/error on Solaris: https://sourceforge.net/p/solaris-squeak/wiki/Home/ I don't know how to fix the issue specifically on your Ubuntu distribution, but possibly it makes sense to - when the error happens - to print a simple: "error: pthread_setschedparam failed: Not owner or "error: heartbeat thread unable to run at higher priority" Such a simple short message would be sufficient, and then the user can try to do some research and find fixes for the specific platform, where the error happens. I can imagine that on various Unix flavors the instructions for: /etc/security/limits.d/squeak.conf do not apply. Also note that in my limited experience on Solaris, I can either fix the warning (by having threads run at different priorities) or ignore the warning, as it does not seem to make much difference ... But it's not nice that an extensive error message is printed, certainly not when it does not apply to that specific Unix distribution. Regards, David Stes -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJfGIB/AAoJEAwpOKXMq1MaRngIAKRpp650F5wxVLLl5RI03rxY Cbog93dnnXYhEtsKr1U1+FLTfwXcvMVDEI6nTi0dUuRfUg+698yPblisUJtQzgc4 3k54aqbz36oslkJA1y+kBU9V6nv/LfvVwpz9R0fnvuGTZndZYYHMfbCcU9yfDZ6x psHJ2EQRWfT+tjXC1nVHARb2IIWfR2NtG/YoaZcuohNE342B2CHx3OisTck5tlKA Fnx1pl/G7Z4OHleSmqKUT1KkMGfMHz4VIW0t3/D2CCMOuYqXQxxOejD2mqtqhzMP 8uUqNo1TLAmTjZwY4NVt7sa2Ny2PUXhxkASOL0c3YlvB3Dp6DAYNPptFmWC48Is= =5Vgy -----END PGP SIGNATURE----- From noreply at github.com Thu Jul 23 22:57:07 2020 From: noreply at github.com (Eliot Miranda) Date: Thu, 23 Jul 2020 15:57:07 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 582b86: Cleanups/simplifications to the MacOS CameraPlugin... Message-ID: Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: 582b86e5211ac8da06c7af9aa5e434a86ee37022 https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/582b86e5211ac8da06c7af9aa5e434a86ee37022 Author: Eliot Miranda Date: 2020-07-23 (Thu, 23 Jul 2020) Changed paths: M platforms/iOS/plugins/CameraPlugin/AVFoundationVideoGrabber.m Log Message: ----------- Cleanups/simplifications to the MacOS CameraPlugin. Expecially set the native format correctly. From builds at travis-ci.org Thu Jul 23 23:18:22 2020 From: builds at travis-ci.org (Travis CI) Date: Thu, 23 Jul 2020 23:18:22 +0000 Subject: [Vm-dev] Errored: OpenSmalltalk/opensmalltalk-vm#2122 (Cog - 582b86e) In-Reply-To: Message-ID: <5f1a1abd71a62_13f9ffa8479f02037d7@travis-tasks-7879c5fb8f-fp92r.mail> Build Update for OpenSmalltalk/opensmalltalk-vm ------------------------------------- Build: #2122 Status: Errored Duration: 20 mins and 28 secs Commit: 582b86e (Cog) Author: Eliot Miranda Message: Cleanups/simplifications to the MacOS CameraPlugin. Expecially set the native format correctly. View the changeset: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/0e1d7ac4c6e4...582b86e5211a View the full build log and details: https://travis-ci.org/github/OpenSmalltalk/opensmalltalk-vm/builds/711276488?utm_medium=notification&utm_source=email -- You can unsubscribe from build emails from the OpenSmalltalk/opensmalltalk-vm repository going to https://travis-ci.org/account/preferences/unsubscribe?repository=8795279&utm_medium=notification&utm_source=email. Or unsubscribe from *all* email updating your settings at https://travis-ci.org/account/preferences/unsubscribe?utm_medium=notification&utm_source=email. Or configure specific recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications. -------------- next part -------------- An HTML attachment was scrubbed... URL: From noreply at github.com Fri Jul 24 00:37:11 2020 From: noreply at github.com (Eliot Miranda) Date: Thu, 23 Jul 2020 17:37:11 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] b046a0: And of course the Mac CameraPlgin doesn't need to ... Message-ID: Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: b046a0a01416fdc97254626d47ccd2ac02906a67 https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/b046a0a01416fdc97254626d47ccd2ac02906a67 Author: Eliot Miranda Date: 2020-07-23 (Thu, 23 Jul 2020) Changed paths: M platforms/iOS/plugins/CameraPlugin/AVFoundationVideoGrabber.m Log Message: ----------- And of course the Mac CameraPlgin doesn't need to use numberWithDouble: for camera dimensions. From builds at travis-ci.org Fri Jul 24 00:57:44 2020 From: builds at travis-ci.org (Travis CI) Date: Fri, 24 Jul 2020 00:57:44 +0000 Subject: [Vm-dev] Errored: OpenSmalltalk/opensmalltalk-vm#2123 (Cog - b046a0a) In-Reply-To: Message-ID: <5f1a32081feb0_13fbb194b1a68780ef@travis-tasks-5fd89567db-mj45p.mail> Build Update for OpenSmalltalk/opensmalltalk-vm ------------------------------------- Build: #2123 Status: Errored Duration: 20 mins and 0 secs Commit: b046a0a (Cog) Author: Eliot Miranda Message: And of course the Mac CameraPlgin doesn't need to use numberWithDouble: for camera dimensions. View the changeset: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/582b86e5211a...b046a0a01416 View the full build log and details: https://travis-ci.org/github/OpenSmalltalk/opensmalltalk-vm/builds/711305852?utm_medium=notification&utm_source=email -- You can unsubscribe from build emails from the OpenSmalltalk/opensmalltalk-vm repository going to https://travis-ci.org/account/preferences/unsubscribe?repository=8795279&utm_medium=notification&utm_source=email. Or unsubscribe from *all* email updating your settings at https://travis-ci.org/account/preferences/unsubscribe?utm_medium=notification&utm_source=email. Or configure specific recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications. -------------- next part -------------- An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Fri Jul 24 01:36:48 2020 From: no-reply at appveyor.com (AppVeyor) Date: Fri, 24 Jul 2020 01:36:48 +0000 Subject: [Vm-dev] Build failed: opensmalltalk-vm 1.0.2120 Message-ID: <20200724013648.1.4090F8B98131A330@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Fri Jul 24 04:16:34 2020 From: no-reply at appveyor.com (AppVeyor) Date: Fri, 24 Jul 2020 04:16:34 +0000 Subject: [Vm-dev] Build completed: opensmalltalk-vm 1.0.2121 Message-ID: <20200724041634.1.BFF4CF8A0C0B3FBA@appveyor.com> An HTML attachment was scrubbed... URL: From noreply at github.com Fri Jul 24 19:20:55 2020 From: noreply at github.com (Eliot Miranda) Date: Fri, 24 Jul 2020 12:20:55 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] bbbe44: Mac Webcam doc & typo fix. [ci skip] Message-ID: Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: bbbe44d700a83cc3ea336212bd3a8b969a1e2891 https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/bbbe44d700a83cc3ea336212bd3a8b969a1e2891 Author: Eliot Miranda Date: 2020-07-24 (Fri, 24 Jul 2020) Changed paths: M platforms/iOS/plugins/CameraPlugin/AVFoundationVideoGrabber.m Log Message: ----------- Mac Webcam doc & typo fix. [ci skip] From digit at sonic.net Sat Jul 25 18:02:17 2020 From: digit at sonic.net (Tim Johnson) Date: Sat, 25 Jul 2020 11:02:17 -0700 Subject: [Vm-dev] Mac PPC Carbon VM resuscitation part 2: status and two questions Message-ID: <1F63DDCD-6583-4F48-A6A3-D9BA957A7E86@sonic.net> Hi all, Continuing down the dusty road of bringing the Mac Carbon VM back to life on PowerPC for research and educational purposes. Here's a status update and two questions. First, status update: I've concluded that the VM will continue to build with very few changes up to VMMaker 4.4.14, but then a VM that locks up at interpret() as of 4.4.15. I then fast-forwarded to VMMaker 4.7.8 and again have a working VM. But, this has required a few changes to methods and I have had to stop building a few more plugins (to be expected, I think!), namely B3DEnginePlugin and SoundGenerationPlugin. The VM built with VMMaker 4.7.8 passes more tests in Squeak 4.6 than those built with previous versions, but also happens to be failing one test which may be consequential: LargeNegativeIntegerTest>>#testMinimumNegativeIntegerArithmetic I've been working lately within a 4.6 image converted to 6504 format (thanks for the tip, Dave!). Note that my build product, even at 4.7.8, still can't natively launch & interpret a 6505-format image like the release version of 4.6 from files.squeak.org. Nor can it launch & interpret Squeak5.2-V3-18216.image. Squeak5.2-V3-18216.image is already in 6504 format, so I suspect something else to be at fault (I just force-quit it now, and found it having trouble at _primDigitMultiplyNegative and _cDigitMultiplylenwithleninto). May be worth further research on my part. By VMMaker 4.7.8, my VM build workspace is as follows: vmm := (Smalltalk at: #VMMaker) default. " We can't cascade here. Maybe was fixed in later versions." vmm deleteEntireGeneratedTree. vmm makeAllModulesInternal. vmm internalModules removeAll: #( ADPCMCodecPlugin B3DEnginePlugin ClipboardExtendedPlugin CroquetPlugin FFIPlugin FloatMathPlugin FileCopyPlugin ImmX11Plugin LocalePlugin Mpeg3Plugin QuicktimePlugin SlangTestSupportSSIP SlangTestSupportPlugin SoundGenerationPlugin TestOSAPlugin). vmm generateEntire. ((Smalltalk at: #Gnuifier) on: (FileDirectory default fullName), '/src/ vm') gnuify. The script I used for getting a VMMaker build image going in a "stock" Squeak 4.5/4.6 image is attached. It was based off of (and, I believe, clarifies or codifies) the instructions found in platforms/ Mac OS/vm/Documentation/readme.txt re: proper load order. -------------- next part -------------- A non-text attachment was scrubbed... Name: VMBuilder.st Type: application/octet-stream Size: 1358 bytes Desc: not available URL: -------------- next part -------------- Question 1: InterpreterPrimitives>>#signed64BitValueOf: uses usqLong which wasn't defined in any of my platform support code: value := 0 - (self cCoerce: value to: 'usqLong'). I changed it to: value := 0 - (self cCoerce: value to: 'unsigned sqLong'). ...does that seem equivalent? Should I have usqLong defined somewhere in my platform support code? It is used more heavily in opensmalltalk-vm, but I can't seem to find where it is defined over there, either. Question 2: LargeIntegersPlugin>>#digitMontgomery:times:modulo:mInvModB: was introduced in VMMaker 4.4.20 (VMMaker-dtl.233) and later bugfixed in VMMaker 4.5.3 (VMMaker-dtl.239) However, this method calls "self error:" as follows: firstLen <= thirdLen ifFalse: [^self error: 'firstLarge must be less than thirdLarge']. secondLen <= thirdLen ifFalse: [^self error: 'secondLarge must be less than thirdLarge']. (mInv >= 0 and: [mInv <= 255]) ifFalse: [^self error: 'mInvMod256 must be between 0 and 255']. which results in an undefined symbol _error when building this VM. What would be the proper way to address this? Find a place to implement error() in the VM cross/ or platform/ sources (or steal from newer support code)? Or to change the call to self error: to something else? To get the VM building, I've just hand-patched LargeIntegers.c as follows: if (!(firstLen <= thirdLen)) { /* return error("firstLarge must be less than thirdLarge"); */ return interpreterProxy->success(false); } if (!(secondLen <= thirdLen)) { /* return error("secondLarge must be less than thirdLarge"); */ return interpreterProxy->success(false); } if (!((mInv >= 0) && (mInv <= 255))) { /* return error("mInvMod256 must be between 0 and 255"); */ return interpreterProxy->success(false); } Lastly: I'm tempted to ask if anybody ever tried controlling the Xcode project via AppleScript, back when Xcode was still a big part of building the Mac or iOS VM. Maybe maximum effort with minimum payoff, but could be interesting or fun to automatically enable/disable plugin sources based on VMMaker(Tool) selections, and automatically trigger build/clean from within the Squeak image. Thanks, a Tim From commits at source.squeak.org Sat Jul 25 20:02:47 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Sat, 25 Jul 2020 20:02:47 0000 Subject: [Vm-dev] VM Maker: VMMaker.oscog-eem.2779.mcz Message-ID: Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2779.mcz ==================== Summary ==================== Name: VMMaker.oscog-eem.2779 Author: eem Time: 25 July 2020, 1:02:37.771342 pm UUID: 69eafb1b-0a60-46f9-ad35-00f4a863fe8a Ancestors: VMMaker.oscog-eem.2778 Slang: Implement and support cppIf:ifTrue:cppIf:ifTrue:ifFalse: for ARMv8 cache flushing. As a result of the changes to generateInlineCppIfElse:asArgument:on:indent: clean-up generating indents and terminating semicolons. In particular don't add a trailing semicolo to a statement list when prepending, leaving it to the sender. Clean up generating switches, avoiding emitting a bogus newline before hand, and a newline before break jumps. Change generateV3RemapOopIn:on:indent: to terminate the last statement with a semicolon. =============== Diff against VMMaker.oscog-eem.2778 =============== Item was changed: ----- Method: CCodeGenerator>>generateInlineCppIfElse:asArgument:on:indent: (in category 'C translation') ----- generateInlineCppIfElse: msgNode asArgument: asArgument on: aStream indent: level "Generate the C code for this message onto the given stream." + | putStatement allAlternativesWereDeterminable expr pos | - | expr putStatement | "Compile-time expansion for constants set in the options dictionary, e.g. to cut down on noise for MULTIPLEBYTECODESETS." putStatement := asArgument ifTrue: "emitCCodeAsArgumentOn: doesn't indent, the code needs indenting if it takes multiple lines, so post-process." [[:node| | expansion | expansion := String streamContents: [:s| node emitCCodeAsArgumentOn: s level: level generator: self]. aStream nextPutAll: ((expansion includes: Character cr) ifTrue: [(String streamContents: [:s| s position > 0 ifTrue: [s tab: level + 1]. node emitCCodeAsArgumentOn: s level: level generator: self]) copyReplaceAll: (String with: Character cr) with: (String with: Character cr), (String new: level + 1 withAll: Character tab)] ifFalse: [expansion])]] ifFalse: [[:node| | expansion | expansion := String streamContents: [:s| node emitCCodeOn: s level: level generator: self]. "Remove tabs from first line to avoid indenting a second time" expansion ifNotEmpty: [expansion := expansion allButFirst: (expansion findFirst: [:c| c ~~ Character tab]) - 1]. aStream nextPutAll: expansion]]. + "First attempt to expand statically..." + allAlternativesWereDeterminable := true. + 1 to: msgNode args size - 1 by: 2 do: "Deal with cppIf:ifTrue:, cppIf:ifTrue:ifFalse:, cppIf:ifTrue:cppIf:ifTrue:ifFalse:, etc" + [:conditionIndex| + (self nilOrBooleanConditionFor: (msgNode args at: conditionIndex)) + ifNil: [allAlternativesWereDeterminable := false] + ifNotNil: + [:condition| + condition ifTrue: + [putStatement value: (msgNode args at: conditionIndex + 1). + ^self]]]. + allAlternativesWereDeterminable ifTrue: + [msgNode args size odd ifTrue: "there is an ifFalse:" + [putStatement value: msgNode args last]. - (self nilOrBooleanConditionFor: msgNode args first) ifNotNil: - [:condition| - condition - ifTrue: - [putStatement value: msgNode args second] - ifFalse: - [msgNode args size >= 3 ifTrue: - [putStatement value: msgNode args third]]. ^self]. + "Expand for compile-time evaluation. Full #if ... #else..." - "Full #if ... #else..." putStatement := asArgument ifTrue: "emitCCodeAsArgumentOn: doesn't indent, the code needs indenting in this case, so post-process." [[:node| aStream nextPutAll: ((String streamContents: [:s| s next: level + 1 put: Character tab. node emitCCodeAsArgumentOn: s level: level generator: self]) copyReplaceAll: (String with: Character cr) with: (String with: Character cr), (String new: level + 1 withAll: Character tab))]] ifFalse: [[:node| node emitCCodeOn: aStream level: level generator: self]]. + 1 to: msgNode args size - 1 by: 2 do: "Deal with cppIf:ifTrue:, cppIf:ifTrue:ifFalse:, cppIf:ifTrue:cppIf:ifTrue:ifFalse:, etc" + [:conditionIndex| | condition | + condition := String streamContents: + [:es| + (msgNode args at: conditionIndex) + emitCCodeAsArgumentOn: es + level: 0 + generator: self]. + [condition last isSeparator] whileTrue: + [condition := condition allButLast]. + aStream + ensureCr; + nextPut: $#; next: level * 2 put: Character space; nextPutAll: (conditionIndex = 1 ifTrue: ['if '] ifFalse: ['elif ']); nextPutAll: condition; cr. - expr := String streamContents: - [:es| - msgNode args first - emitCCodeAsArgumentOn: es - level: 0 - generator: self]. - [expr last isSeparator] whileTrue: - [expr := expr allButLast]. - aStream - ensureCr; - nextPut: $#; next: level * 2 put: Character space; nextPutAll: 'if '; nextPutAll: expr; cr. + pos := aStream position. + self with: (msgNode args at: conditionIndex) + ifAppropriateSetTo: true + do: [putStatement value: (msgNode args at: conditionIndex + 1)]. + expr := (expr ifNil: [' /* '] ifNotNil: [expr, ' || ']), condition]. + expr := expr, ' */'. + msgNode args size odd ifTrue: "there is an ifFalse:" - self with: msgNode args first - ifAppropriateSetTo: true - do: [putStatement value: msgNode args second]. - expr := ' /* ', expr, ' */'. - msgNode args size >= 3 ifTrue: [aStream ensureCr; + nextPut: $#; next: level * 2 put: Character space; nextPutAll: 'else'. + aStream position - pos >= 128 ifTrue: + [aStream nextPutAll: expr]. + aStream cr. + pos := aStream position. + msgNode args size <= 3 + ifTrue: "ifTrue:ifFalse:, so negate condition for ifFalse:" + [self with: msgNode args last + ifAppropriateSetTo: false + do: [putStatement value: msgNode args third]] + ifFalse: + [putStatement value: msgNode args last]]. - nextPut: $#; next: level * 2 put: Character space; nextPutAll: 'else'; nextPutAll: expr; - cr. - self with: msgNode args first - ifAppropriateSetTo: false - do: [putStatement value: msgNode args third]]. aStream ensureCr; + nextPut: $#; next: level * 2 put: Character space; nextPutAll: 'endif'. + aStream position - pos >= 128 ifTrue: + [aStream nextPutAll: expr]. + aStream cr. - nextPut: $#; next: level * 2 put: Character space; nextPutAll: 'endif'; nextPutAll: expr; - cr. asArgument ifTrue: [aStream next: level + 1 put: Character tab]! Item was changed: ----- Method: CCodeGenerator>>generateToByDo:on:indent: (in category 'C translation') ----- generateToByDo: msgNode on: aStream indent: level "Generate the C code for this message onto the given stream." "N.B. MessageNode>>asTranslatorNodeIn: adds the limit var as a hidden fourth argument." | blockExpr iterationVar limitExpr mayHaveSideEffects limitVar step | blockExpr := msgNode args third. blockExpr args size = 1 ifFalse: [self error: 'wrong number of block arguments']. iterationVar := blockExpr args first. limitExpr := msgNode args first. aStream nextPutAll: 'for (', iterationVar, ' = '. self noteUsedVariableName: iterationVar. self emitCExpression: msgNode receiver on: aStream. mayHaveSideEffects := msgNode args size = 4. "See TMethod>>prepareMethodIn:" mayHaveSideEffects ifTrue: [limitVar := msgNode args last. aStream nextPutAll: ', ', limitVar name, ' = '. self emitCExpression: limitExpr on: aStream. limitExpr := limitVar]. aStream nextPutAll: '; ', iterationVar. step := msgNode args at: 2. self generateToByDoLimitExpression: limitExpr negative: (self stepExpressionIsNegative: step) on: aStream. aStream nextPutAll: '; ', iterationVar, ' += '. self emitCExpression: step on: aStream. aStream nextPutAll: ') {'; cr. blockExpr emitCCodeOn: aStream level: level + 1 generator: self. + aStream tab: level; nextPut: $}! - aStream tab: level. - aStream nextPut: $}! Item was changed: ----- Method: CCodeGenerator>>generateToDo:on:indent: (in category 'C translation') ----- generateToDo: msgNode on: aStream indent: level "Generate the C code for this message onto the given stream." | iterationVar | (msgNode args last args size = 1) ifFalse: [ self error: 'wrong number of block arguments'. ]. iterationVar := msgNode args last args first. aStream nextPutAll: 'for (', iterationVar, ' = '. self emitCExpression: msgNode receiver on: aStream. aStream nextPutAll: '; ', iterationVar. self generateToByDoLimitExpression: msgNode args first negative: false on: aStream. aStream nextPutAll: '; ', iterationVar, '++) {'; cr. msgNode args last emitCCodeOn: aStream level: level + 1 generator: self. + aStream tab: level; nextPut: $}! - level timesRepeat: [ aStream tab ]. - aStream nextPutAll: '}'.! Item was changed: ----- Method: CCodeGenerator>>initializeCTranslationDictionary (in category 'C translation support') ----- initializeCTranslationDictionary "Initialize the dictionary mapping message names to actions for C code generation." | pairs | translationDict := Dictionary new: 200. pairs := #( #& #generateAnd:on:indent: #| #generateOr:on:indent: #abs #generateAbs:on:indent: #and: #generateSequentialAnd:on:indent: #or: #generateSequentialOr:on:indent: #not #generateNot:on:indent: #+ #generatePlus:on:indent: #- #generateMinus:on:indent: #negated #generateNegated:on:indent: #* #generateTimes:on:indent: #/ #generateDivide:on:indent: #// #generateDivide:on:indent: #\\ #generateModulo:on:indent: #<< #generateShiftLeft:on:indent: #>> #generateShiftRight:on:indent: #>>> #generateSignedShiftRight:on:indent: #, #generateComma:on:indent: #min: #generateMin:on:indent: #max: #generateMax:on:indent: #between:and: #generateBetweenAnd:on:indent: #bitAnd: #generateBitAnd:on:indent: #bitOr: #generateBitOr:on:indent: #bitXor: #generateBitXor:on:indent: #bitShift: #generateBitShift:on:indent: #signedBitShift: #generateSignedBitShift:on:indent: #bitInvert32 #generateBitInvert:on:indent: #bitInvert64 #generateBitInvert:on:indent: #bitClear: #generateBitClear:on:indent: #truncateTo: #generateTruncateTo:on:indent: #rounded #generateRounded:on:indent: #even #generateEven:on:indent: #odd #generateOdd:on:indent: #byteSwap32 #generateByteSwap32:on:indent: #byteSwap64 #generateByteSwap64:on:indent: #byteSwapped32IfBigEndian: generateByteSwap32IfBigEndian:on:indent: #byteSwapped64IfBigEndian: generateByteSwap64IfBigEndian:on:indent: #< #generateLessThan:on:indent: #<= #generateLessThanOrEqual:on:indent: #= #generateEqual:on:indent: #> #generateGreaterThan:on:indent: #>= #generateGreaterThanOrEqual:on:indent: #~= #generateNotEqual:on:indent: #== #generateEqual:on:indent: #~~ #generateNotEqual:on:indent: #isNil #generateIsNil:on:indent: #notNil #generateNotNil:on:indent: #whileTrue: #generateWhileTrue:on:indent: #whileFalse: #generateWhileFalse:on:indent: #whileTrue #generateDoWhileTrue:on:indent: #whileFalse #generateDoWhileFalse:on:indent: #to:do: #generateToDo:on:indent: #to:by:do: #generateToByDo:on:indent: #repeat #generateRepeat:on:indent: #timesRepeat: #generateTimesRepeat:on:indent: #ifTrue: #generateIfTrue:on:indent: #ifFalse: #generateIfFalse:on:indent: #ifTrue:ifFalse: #generateIfTrueIfFalse:on:indent: #ifFalse:ifTrue: #generateIfFalseIfTrue:on:indent: #ifNotNil: #generateIfNotNil:on:indent: #ifNil: #generateIfNil:on:indent: #ifNotNil:ifNil: #generateIfNotNilIfNil:on:indent: #ifNil:ifNotNil: #generateIfNilIfNotNil:on:indent: + #at: #generateAt:on:indent: + #at:put: #generateAtPut:on:indent: - #at: #generateAt:on:indent: - #at:put: #generateAtPut:on:indent: #basicAt: #generateAt:on:indent: #basicAt:put: #generateAtPut:on:indent: #integerValueOf: #generateIntegerValueOf:on:indent: #integerObjectOf: #generateIntegerObjectOf:on:indent: #isIntegerObject: #generateIsIntegerObject:on:indent: #cCode: #generateInlineCCode:on:indent: + #cCode:inSmalltalk: #generateInlineCCode:on:indent: - #cCode:inSmalltalk: #generateInlineCCode:on:indent: #cPreprocessorDirective: #generateInlineCPreprocessorDirective:on:indent: + #cppIf:ifTrue:ifFalse: #generateInlineCppIfElse:on:indent: + #cppIf:ifTrue:cppIf:ifTrue:ifFalse: #generateInlineCppIfElse:on:indent: + #cppIf:ifTrue: #generateInlineCppIfElse:on:indent: - #cppIf:ifTrue:ifFalse: #generateInlineCppIfElse:on:indent: - #cppIf:ifTrue: #generateInlineCppIfElse:on:indent: #cCoerce:to: #generateCCoercion:on:indent: #cCoerceSimple:to: #generateCCoercion:on:indent: #addressOf: #generateAddressOf:on:indent: #addressOf:put: #generateAddressOf:on:indent: #asAddress:put: #generateAsAddress:on:indent: + #signedIntFromLong64 #generateSignedIntFromLong64:on:indent: - #signedIntFromLong64 #generateSignedIntFromLong64:on:indent: #signedIntFromLong #generateSignedIntFromLong:on:indent: #signedIntFromShort #generateSignedIntFromShort:on:indent: #signedIntToLong64 #generateSignedIntToLong64:on:indent: #signedIntToLong #generateSignedIntToLong:on:indent: #signedIntToShort #generateSignedIntToShort:on:indent: #preIncrement #generatePreIncrement:on:indent: #preDecrement #generatePreDecrement:on:indent: #inline: #generateInlineDirective:on:indent: #asFloat #generateAsFloat:on:indent: #asInteger #generateAsInteger:on:indent: #asIntegerPtr #generateAsIntegerPtr:on:indent: #asUnsignedInteger #generateAsUnsignedInteger:on:indent: #asUnsignedIntegerPtr #generateAsUnsignedIntegerPtr:on:indent: #asLong #generateAsLong:on:indent: #asUnsignedLong #generateAsUnsignedLong:on:indent: #asUnsignedLongLong #generateAsUnsignedLongLong:on:indent: #asVoidPointer #generateAsVoidPointer:on:indent: #asSymbol #generateAsSymbol:on:indent: #flag: #generateFlag:on:indent: #anyMask: #generateBitAnd:on:indent: #allMask: #generateAllMask:on:indent: #noMask: #generateNoMask:on:indent: #raisedTo: #generateRaisedTo:on:indent: + #touch: #generateTouch:on:indent: - #touch: #generateTouch:on:indent: #bytesPerOop #generateBytesPerOop:on:indent: #bytesPerWord #generateBytesPerWord:on:indent: #wordSize #generateBytesPerWord:on:indent: #baseHeaderSize #generateBaseHeaderSize:on:indent: #minSmallInteger #generateSmallIntegerConstant:on:indent: #maxSmallInteger #generateSmallIntegerConstant:on:indent: #sharedCodeNamed:inCase: #generateSharedCodeDirective:on:indent: #perform: #generatePerform:on:indent: #perform:with: #generatePerform:on:indent: + #perform:with:with: #generatePerform:on:indent: + #perform:with:with:with: #generatePerform:on:indent: - #perform:with:with: #generatePerform:on:indent: - #perform:with:with:with: #generatePerform:on:indent: #perform:with:with:with:with: #generatePerform:on:indent: #perform:with:with:with:with:with: #generatePerform:on:indent: + #value #generateValue:on:indent: + #value: #generateValue:on:indent: + #value:value: #generateValue:on:indent: + #value:value:value: #generateValue:on:indent: + #value:value:value:value: #generateValue:on:indent: - #value #generateValue:on:indent: - #value: #generateValue:on:indent: - #value:value: #generateValue:on:indent: - #value:value:value: #generateValue:on:indent: - #value:value:value:value: #generateValue:on:indent: #value:value:value:value:value: #generateValue:on:indent: #value:value:value:value:value:value: #generateValue:on:indent: #deny: #generateDeny:on:indent: #shouldNotImplement #generateSmalltalkMetaError:on:indent: #shouldBeImplemented #generateSmalltalkMetaError:on:indent: + #subclassResponsibility #generateSmalltalkMetaError:on:indent: - #subclassResponsibility #generateSmalltalkMetaError:on:indent: ). 1 to: pairs size by: 2 do: [:i | translationDict at: (pairs at: i) put: (pairs at: i + 1)]. pairs := #( + #ifTrue: #generateIfTrueAsArgument:on:indent: - #ifTrue: #generateIfTrueAsArgument:on:indent: #ifFalse: #generateIfFalseAsArgument:on:indent: #ifTrue:ifFalse: #generateIfTrueIfFalseAsArgument:on:indent: #ifFalse:ifTrue: #generateIfFalseIfTrueAsArgument:on:indent: #ifNotNil: #generateIfNotNilAsArgument:on:indent: #ifNil: #generateIfNilAsArgument:on:indent: #ifNotNil:ifNil: #generateIfNotNilIfNilAsArgument:on:indent: #ifNil:ifNotNil: #generateIfNilIfNotNilAsArgument:on:indent: #cCode: #generateInlineCCodeAsArgument:on:indent: + #cCode:inSmalltalk: #generateInlineCCodeAsArgument:on:indent: - #cCode:inSmalltalk: #generateInlineCCodeAsArgument:on:indent: #cppIf:ifTrue:ifFalse: #generateInlineCppIfElseAsArgument:on:indent: #cppIf:ifTrue: #generateInlineCppIfElseAsArgument:on:indent: #value #generateValueAsArgument:on:indent: #value: #generateValueAsArgument:on:indent: #value:value: #generateValueAsArgument:on:indent: ). asArgumentTranslationDict := Dictionary new: 8. 1 to: pairs size by: 2 do: [:i | asArgumentTranslationDict at: (pairs at: i) put: (pairs at: i + 1)]. ! Item was changed: ----- Method: TCaseStmtNode>>emitCCodeOn:addToEndOfCases:level:generator: (in category 'C code generation') ----- emitCCodeOn: aStream addToEndOfCases: aNodeOrNil level: level generator: aCodeGen | indent | indent := String new: level withAll: Character tab. - aStream crtab: level. aStream nextPutAll: 'switch ('. expression emitCCodeAsArgumentOn: aStream level: level generator: aCodeGen. aStream nextPutAll: ') {'; cr. cases withIndexDo: [:case :i| (firsts at: i) to: (lasts at: i) do: [ :caseIndex | aStream nextPutAll: indent; nextPutAll: 'case '; print: caseIndex; nextPut: $:; cr]. case emitCCodeOn: aStream prependToEnd: aNodeOrNil level: level + 1 generator: aCodeGen. (aNodeOrNil notNil and: [aNodeOrNil isReturn]) ifFalse: [aStream crtab: level + 1; nextPutAll: 'break;']]. aStream crtab: level; nextPutAll: 'default:'; crtab: level + 1; nextPutAll: 'error("Case not found");'. aNodeOrNil ifNotNil: [aStream crtab: level + 1. (aNodeOrNil copy setExpression: (TConstantNode new setValue: -1)) emitCCodeOn: aStream level: level generator: aCodeGen. aStream nextPut: $;]. aStream crtab: level; nextPut: $}! Item was changed: ----- Method: TMethod>>statementsListsForInliningIn: (in category 'inlining') ----- statementsListsForInliningIn: aCodeGen "Answer a collection of statement list nodes that are candidates for inlining. Currently, we cannot inline into the argument blocks of and: and or: messages. We do not want to inline code strings within cCode:inSmalltalk: blocks (those with a proper block for the cCode: argument are inlined in MessageNode>>asTranslatorNodeIn:). We do not want to inline code within assert: sends (because we want the assert to read nicely)." | stmtLists | stmtLists := OrderedCollection new: 10. parseTree nodesDo: [:node| node isStmtList ifTrue: [stmtLists add: node]] unless: [:node| node isSend and: [node selector == #cCode:inSmalltalk: or: [aCodeGen isAssertSelector: node selector]]]. parseTree nodesDo: [:node| node isSend ifTrue: [node selector = #cCode:inSmalltalk: ifTrue: [node nodesDo: [:ccisNode| stmtLists remove: ccisNode ifAbsent: []]]. + (node selector beginsWith: #cppIf:ifTrue:) ifTrue: - (node selector = #cppIf:ifTrue:ifFalse: or: [node selector = #cppIf:ifTrue:]) ifTrue: [node args first nodesDo: [:inCondNode| stmtLists remove: inCondNode ifAbsent: []]]. ((node selector = #and:) or: [node selector = #or:]) ifTrue: "Note: the PP 2.3 compiler produces two arg nodes for these selectors" [stmtLists remove: node args first ifAbsent: []. stmtLists remove: node args last ifAbsent: []]. (#( #ifTrue: #ifFalse: #ifTrue:ifFalse: #ifFalse:ifTrue: #ifNil: #ifNotNil: #ifNil:ifNotNil: #ifNotNil:ifNil: ) includes: node selector) ifTrue: [stmtLists remove: node receiver ifAbsent: []]. (#(whileTrue whileTrue: whilefalse whileFalse:) includes: node selector) ifTrue: "Allow inlining if it is a [...] whileTrue/whileFalse. This is identified by having more than one statement in the receiver block in which case the C code wouldn't work anyways" [node receiver statements size = 1 ifTrue: [stmtLists remove: node receiver ifAbsent: []]]. (node selector = #to:do:) ifTrue: [stmtLists remove: node receiver ifAbsent: []. stmtLists remove: node args first ifAbsent: []]. (node selector = #to:by:do:) ifTrue: [stmtLists remove: node receiver ifAbsent: []. stmtLists remove: node args first ifAbsent: []. stmtLists remove: node args second ifAbsent: []]]. node isCaseStmt ifTrue: "don't inline cases" [node cases do: [:case| stmtLists remove: case ifAbsent: []]]]. ^stmtLists! Item was changed: ----- Method: TSendNode>>isPreprocessorDirective (in category 'testing') ----- isPreprocessorDirective + ^#(cPreprocessorDirective: cppIf:ifTrue: cppIf:ifTrue:ifFalse: cppIf:ifTrue:cppIf:ifTrue:ifFalse:) includes: selector! - ^#(cPreprocessorDirective: cppIf:ifTrue:ifFalse: cppIf:ifTrue:) includes: selector! Item was changed: ----- Method: TSendNode>>needsTrailingSemicolon (in category 'testing') ----- needsTrailingSemicolon "Answer if, when emitted as a statement (in particular in a TStmtList), the receiver needs a trailing semicolon. Preprocessor directives and special expansions do not." ^(self isPreprocessorDirective or: [self isValueExpansion + or: [self isConditionalSend + or: [selector == #expandDereferenceInterpreterProxyFunctionTable]]]) not! - or: [selector == #expandDereferenceInterpreterProxyFunctionTable]]) not! Item was changed: ----- Method: TStmtListNode>>emitCCodeOn:prependToEnd:level:generator: (in category 'C code generation') ----- emitCCodeOn: aStream prependToEnd: aNodeOrNil level: level generator: aCodeGen | statementToElide | self emitCCommentOn: aStream level: level generator: aCodeGen. (aNodeOrNil notNil or: [statements isEmpty or: [statements last hasEffect]]) ifFalse: [statementToElide := statements last]. statements withIndexDo: + [:s :idx| | position lastWhilePrepending | - [:s :idx| | position | s emitCCommentOn: aStream level: level generator: aCodeGen. (s == statementToElide or: [s isLeaf and: [s isLabel not and: [aNodeOrNil isNil or: [idx < statements size]]]]) ifFalse: + [((s isSend and: [s isPreprocessorDirective]) or: [aStream peekLast == Character tab]) ifFalse: - [aStream peekLast ~~ Character tab ifTrue: [aStream tab: level]. position := aStream position. + (lastWhilePrepending := aNodeOrNil notNil and: [idx = statements size]) + ifTrue: [s emitCCodeOn: aStream prependToEnd: aNodeOrNil level: level generator: aCodeGen] + ifFalse: [s emitCCodeOn: aStream level: level generator: aCodeGen]. - (aNodeOrNil notNil - and: [idx = statements size]) - ifTrue: - [s emitCCodeOn: aStream prependToEnd: aNodeOrNil level: level generator: aCodeGen] - ifFalse: - [s emitCCodeOn: aStream level: level generator: aCodeGen]. aStream position > position ifTrue: [(self stream: aStream endsWithAnyOf: '};') ifFalse: [s needsTrailingSemicolon ifTrue: [aStream nextPut: $;]]. + (lastWhilePrepending or: [aStream peekLast == Character cr]) ifFalse: - aStream peekLast ~~ Character cr ifTrue: [aStream cr]]]]! Item was changed: ----- Method: TSwitchStmtNode>>emitCCodeOn:addToEndOfCases:level:generator: (in category 'C code generation') ----- emitCCodeOn: aStream addToEndOfCases: aNodeOrNil level: level generator: aCodeGen - aStream crtab: level. aStream nextPutAll: 'switch ('. expression emitCCodeAsArgumentOn: aStream level: level generator: aCodeGen. aStream nextPutAll: ') {'. cases do: [:tuple| [:labels :case| labels do: [:label| aStream crtab: level; nextPutAll: 'case '. label emitCCodeAsArgumentOn: aStream level: level + 1 generator: aCodeGen. aStream nextPut: $:]. aStream crtab: level + 1. case emitCCodeOn: aStream prependToEnd: aNodeOrNil level: level + 1 generator: aCodeGen] valueWithArguments: tuple. + (aNodeOrNil notNil and: [aNodeOrNil isReturn]) + ifTrue: [(self stream: aStream endsWithAnyOf: ';}') ifFalse: [aStream nextPut: $;]] + ifFalse: [aStream crtab: level + 1; nextPutAll: 'break;']. + aStream cr]. - (aNodeOrNil notNil and: [aNodeOrNil isReturn]) ifFalse: - [aStream crtab: level + 1; nextPutAll: 'break;']]. aStream crtab: level; nextPutAll: 'default:'; crtab: level + 1. otherwiseOrNil ifNotNil: [otherwiseOrNil emitCCodeOn: aStream prependToEnd: aNodeOrNil level: level + 1 generator: aCodeGen] + ifNil: [aStream nextPutAll: 'error("Case not found and no otherwise clause")'. - ifNil: [aStream nextPutAll: 'error("Case not found and no otherwise clause");'. aNodeOrNil ifNotNil: [| defaultExpr type | + aStream nextPut: $;; crtab: level + 1. - aStream crtab: level + 1. defaultExpr := TConstantNode new setValue: -1. (aNodeOrNil isAssignment and: [(type := aCodeGen typeFor: aNodeOrNil variable in: aCodeGen currentMethod) notNil and: [aCodeGen isPointerCType: type]]) ifTrue: [defaultExpr := TSendNode new setSelector: #cCoerceSimple:to: receiver: (TVariableNode new setName: 'self') arguments: {defaultExpr. TConstantNode new setValue: type}]. (aNodeOrNil copy setExpression: defaultExpr) + emitCCodeOn: aStream level: level generator: aCodeGen]]. - emitCCodeOn: aStream level: level generator: aCodeGen. - aStream nextPut: $;]]. aStream + nextPut: $;; crtab: level; nextPut: $}! Item was changed: ----- Method: TSwitchStmtNode>>emitCCodeOn:level:generator: (in category 'C code generation') ----- emitCCodeOn: aStream level: level generator: aCodeGen - aStream crtab: level. aStream nextPutAll: 'switch ('. expression emitCCodeAsArgumentOn: aStream level: level generator: aCodeGen. aStream nextPutAll: ') {'. cases do: [:tuple| [:labels :case| labels do: [:label| aStream crtab: level; nextPutAll: 'case '. label emitCCodeAsArgumentOn: aStream level: level + 1 generator: aCodeGen. aStream nextPut: $:]. aStream crtab: level + 1. case emitCCodeOn: aStream level: level + 1 generator: aCodeGen. case endsWithReturn ifFalse: [aStream tab: level + 1; nextPutAll: 'break;']] valueWithArguments: tuple]. aStream crtab: level; nextPutAll: 'default:'; crtab: level + 1. otherwiseOrNil ifNotNil: [otherwiseOrNil emitCCodeOn: aStream level: level + 1 generator: aCodeGen. (self stream: aStream endsWithAnyOf: '};') ifFalse: [aStream nextPut: $;]] ifNil: [aStream nextPutAll: 'error("Case not found and no otherwise clause");']. aStream crtab: level; nextPut: $}! Item was changed: ----- Method: TSwitchStmtNode>>printOn:level: (in category 'printing') ----- printOn: aStream level: level - aStream crtab: level. aStream nextPutAll: 'switch ('. expression printOn: aStream level: level. aStream nextPutAll: ') {'. cases do: [:tuple| [:labels :case| labels do: [:label| aStream crtab: level; nextPutAll: 'case '. label printOn: aStream level: level + 1. aStream nextPut: $:]. aStream crtab: level + 1. case printOn: aStream level: level + 1. aStream crtab: level + 1; nextPutAll: 'break;'] valueWithArguments: tuple]. otherwiseOrNil ifNotNil: [aStream crtab: level; nextPutAll: 'default:'; crtab: level + 1. otherwiseOrNil printOn: aStream level: level + 1]. aStream crtab: level; nextPut: $}! Item was added: + ----- Method: VMClass>>cppIf:ifTrue:cppIf:ifTrue:ifFalse: (in category 'translation support') ----- + cppIf: firstCondition ifTrue: firstExpression cppIf: secondCondition ifTrue: secondExpression ifFalse: falseExpression + + ^self cppIf: firstCondition + ifTrue: firstExpression + ifFalse: + [self cppIf: secondCondition ifTrue: secondExpression ifFalse: falseExpression]! Item was changed: ----- Method: VMPluginCodeGenerator>>generateV3RemapOopIn:on:indent: (in category 'C translation') ----- generateV3RemapOopIn: aNode on: aStream indent: level "Generate call on remapOop: for the variable oopOrList (or all of the variables in oopOrList) before evaluating aBlock, and restore them after. This keeps the oops valid if, as V3 will, there is a GC on allocation." | idList | pluginFunctionsUsed add: #pushRemappableOop:; add: #popRemappableOop. idList := aNode args first nameOrValue. idList class == Array ifFalse: [idList := Array with: idList]. idList do: [:each | aStream tab: level; nextPutAll: 'pushRemappableOop('; nextPutAll: each asString; nextPutAll: ');'] separatedBy: [aStream cr]. aStream cr. aNode args second emitCCodeOn: aStream level: level generator: self. level timesRepeat: [aStream tab]. idList reversed do: [:each | + aStream + tab: level; - aStream nextPutAll: each asString; + nextPutAll: ' = popRemappableOop();'] + separatedBy: [aStream cr]! - nextPutAll: ' = popRemappableOop()'] - separatedBy: [aStream nextPut: $;; crtab: level]! From commits at source.squeak.org Sat Jul 25 20:44:53 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Sat, 25 Jul 2020 20:44:53 0000 Subject: [Vm-dev] VM Maker: VMMaker.oscog-eem.2780.mcz Message-ID: Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2780.mcz ==================== Summary ==================== Name: VMMaker.oscog-eem.2780 Author: eem Time: 25 July 2020, 1:44:44.159824 pm UUID: 5e381464-117c-4633-8fe7-a95973208436 Ancestors: VMMaker.oscog-eem.2779 Slang: Make the necessary changes to TCaseStmtNode for the last commit (already done for TSwitchStmtNode). Fix the formatting of generateRemapOopIn:on:indent: given those canges. =============== Diff against VMMaker.oscog-eem.2779 =============== Item was changed: ----- Method: TCaseStmtNode>>emitCCodeOn:addToEndOfCases:level:generator: (in category 'C code generation') ----- emitCCodeOn: aStream addToEndOfCases: aNodeOrNil level: level generator: aCodeGen | indent | indent := String new: level withAll: Character tab. aStream nextPutAll: 'switch ('. expression emitCCodeAsArgumentOn: aStream level: level generator: aCodeGen. aStream nextPutAll: ') {'; cr. cases withIndexDo: [:case :i| + (firsts at: i) to: (lasts at: i) do: - (firsts at: i) to: (lasts at: i) do: [ :caseIndex | aStream nextPutAll: indent; nextPutAll: 'case '; print: caseIndex; nextPut: $:; cr]. + case emitCCodeOn: aStream prependToEnd: aNodeOrNil level: level + 1 generator: aCodeGen. + (aNodeOrNil notNil and: [aNodeOrNil isReturn]) ifFalse: + [aStream crtab: level + 1; nextPutAll: 'break;']. + aStream cr]. - case emitCCodeOn: aStream prependToEnd: aNodeOrNil level: level + 1 generator: aCodeGen. - (aNodeOrNil notNil and: [aNodeOrNil isReturn]) ifFalse: - [aStream crtab: level + 1; nextPutAll: 'break;']]. aStream crtab: level; nextPutAll: 'default:'; crtab: level + 1; nextPutAll: 'error("Case not found");'. aNodeOrNil ifNotNil: [aStream crtab: level + 1. (aNodeOrNil copy setExpression: (TConstantNode new setValue: -1)) emitCCodeOn: aStream level: level generator: aCodeGen. aStream nextPut: $;]. aStream crtab: level; nextPut: $}! Item was changed: ----- Method: TSendNode>>needsTrailingSemicolon (in category 'testing') ----- needsTrailingSemicolon "Answer if, when emitted as a statement (in particular in a TStmtList), the receiver needs a trailing semicolon. Preprocessor directives and special expansions do not." ^(self isPreprocessorDirective or: [self isValueExpansion or: [self isConditionalSend + or: [selector == #expandDereferenceInterpreterProxyFunctionTable + or: [selector == #remapOop:in:]]]]) not! - or: [selector == #expandDereferenceInterpreterProxyFunctionTable]]]) not! Item was changed: ----- Method: VMPluginCodeGenerator>>generateRemapOopIn:on:indent: (in category 'C translation') ----- generateRemapOopIn: aNode on: aStream indent: level "Generate the C code for this message onto the given stream." | arm | "Avoid nesting #if SPURVM...#else...#endif within arms of an outer #if SPURVM...#else...#endif." (Notification new tag: #inRemapOopInArm; signal) ifNotNil: [:inRemapOopInArm| ^inRemapOopInArm ifTrue: [self generateSpurRemapOopIn: aNode on: aStream indent: level] ifFalse: [self generateV3RemapOopIn: aNode on: aStream indent: level]]. [aStream cr; nextPutAll: '#if SPURVM'; cr. arm := true. self generateSpurRemapOopIn: aNode on: aStream indent: level. + aStream ensureCr; nextPutAll: '#else /* SPURVM */'; cr. - aStream cr; nextPutAll: '#else /* SPURVM */'; cr. arm := false. self generateV3RemapOopIn: aNode on: aStream indent: level. aStream cr; nextPutAll: '#endif /* SPURVM */'; cr] on: Notification do: [:ex| ex tag == #inRemapOopInArm ifTrue: [ex resume: arm] ifFalse: [ex pass]]! Item was changed: ----- Method: VMPluginCodeGenerator>>generateV3RemapOopIn:on:indent: (in category 'C translation') ----- generateV3RemapOopIn: aNode on: aStream indent: level "Generate call on remapOop: for the variable oopOrList (or all of the variables in oopOrList) before evaluating aBlock, and restore them after. This keeps the oops valid if, as V3 will, there is a GC on allocation." | idList | pluginFunctionsUsed add: #pushRemappableOop:; add: #popRemappableOop. idList := aNode args first nameOrValue. idList class == Array ifFalse: [idList := Array with: idList]. idList do: [:each | aStream tab: level; nextPutAll: 'pushRemappableOop('; nextPutAll: each asString; nextPutAll: ');'] separatedBy: [aStream cr]. aStream cr. aNode args second emitCCodeOn: aStream level: level generator: self. - level timesRepeat: [aStream tab]. idList reversed do: [:each | aStream tab: level; nextPutAll: each asString; nextPutAll: ' = popRemappableOop();'] separatedBy: [aStream cr]! From lewis at mail.msen.com Sat Jul 25 20:57:21 2020 From: lewis at mail.msen.com (David T. Lewis) Date: Sat, 25 Jul 2020 16:57:21 -0400 Subject: [Vm-dev] Mac PPC Carbon VM resuscitation part 2: status and two questions In-Reply-To: <1F63DDCD-6583-4F48-A6A3-D9BA957A7E86@sonic.net> References: <1F63DDCD-6583-4F48-A6A3-D9BA957A7E86@sonic.net> Message-ID: <20200725205721.GA39973@shell.msen.com> Hi Tim, Nice to get this update from you, thanks :-) I cannot answer your specific questions, but here are a couple of things that might help. > Note that my build product, even at > 4.7.8, still can't natively launch & interpret a 6505-format image > like the release version of 4.6 from files.squeak.org. I have never actually tested the case of a big-endian interpreter VM loading a 6505 image that was saved from a little-endian machine. I tried to write the logic around ContextInterpreter>>normalizeFloatOrderingInImage: in anticipation of this, but I had no way to test it. So it is very possible that I may have gotten something wrong. But I think that I made later changes to this logic, so if possible I would prefer to debug the problem using a more up to date VMMaker. You seem to be seeing some problems that may be related to mismatches between the VMMaker generated code and the platforms support code. In general, there are not a lot of dependencies between the two over short time windows, but if you are trying to build with version X of the VMMaker sources against version Y of the platform sources from the Subversion repository, then things are going to get out of whack if the two versions are not reasonably close. There is no real control around this, but if you are trying to make a VM with version X of VMMaker, then you would probably want to check out a set of platforms source from Subversion with similar time stamp, or from maybe 6 to 12 months earlier. Overall, you are doing a stepwise progression from the old VM version, moving forward one chunk at a time. That is exactly how I would have attacked the problem. But with the advantage of my knowing a few things about what changed over the years, I would actually suggest that you try a short-cut to save some steps. My advice is to set aside your stepwise progression for a moment, and try going directly to the latest versions of VMMaker and the SVN support code, and see if that gets you reasonably close to a working VM. I do not know if this will work, but if it does it will save you some time. Dave Oe Sat, Jul 25, 2020 at 11:02:17AM -0700, Tim Johnson wrote: > > Hi all, > > Continuing down the dusty road of bringing the Mac Carbon VM back to > life on PowerPC for research and educational purposes. Here's a > status update and two questions. > > First, status update: > I've concluded that the VM will continue to build with very few > changes up to VMMaker 4.4.14, but then a VM that locks up at > interpret() as of 4.4.15. I then fast-forwarded to VMMaker 4.7.8 and > again have a working VM. But, this has required a few changes to > methods and I have had to stop building a few more plugins (to be > expected, I think!), namely B3DEnginePlugin and > SoundGenerationPlugin. The VM built with VMMaker 4.7.8 passes more > tests in Squeak 4.6 than those built with previous versions, but also > happens to be failing one test which may be consequential: > LargeNegativeIntegerTest>>#testMinimumNegativeIntegerArithmetic > > I've been working lately within a 4.6 image converted to 6504 format > (thanks for the tip, Dave!). Note that my build product, even at > 4.7.8, still can't natively launch & interpret a 6505-format image > like the release version of 4.6 from files.squeak.org. Nor can it > launch & interpret Squeak5.2-V3-18216.image. Squeak5.2-V3-18216.image > is already in 6504 format, so I suspect something else to be at fault > (I just force-quit it now, and found it having trouble at > _primDigitMultiplyNegative and _cDigitMultiplylenwithleninto). May be > worth further research on my part. > > By VMMaker 4.7.8, my VM build workspace is as follows: > > vmm := (Smalltalk at: #VMMaker) default. > " We can't cascade here. Maybe was fixed in later versions." > vmm deleteEntireGeneratedTree. > vmm makeAllModulesInternal. > vmm internalModules removeAll: #( ADPCMCodecPlugin B3DEnginePlugin > ClipboardExtendedPlugin CroquetPlugin FFIPlugin FloatMathPlugin > FileCopyPlugin ImmX11Plugin LocalePlugin Mpeg3Plugin QuicktimePlugin > SlangTestSupportSSIP SlangTestSupportPlugin SoundGenerationPlugin > TestOSAPlugin). > vmm generateEntire. > ((Smalltalk at: #Gnuifier) on: (FileDirectory default fullName), '/src/ > vm') gnuify. > > The script I used for getting a VMMaker build image going in a "stock" > Squeak 4.5/4.6 image is attached. It was based off of (and, I > believe, clarifies or codifies) the instructions found in platforms/ > Mac OS/vm/Documentation/readme.txt re: proper load order. > > > > > > Question 1: > > InterpreterPrimitives>>#signed64BitValueOf: > uses usqLong which wasn't defined in any of my platform support code: > > value := 0 - (self cCoerce: value to: 'usqLong'). > > I changed it to: > > value := 0 - (self cCoerce: value to: 'unsigned sqLong'). > > ...does that seem equivalent? > > Should I have usqLong defined somewhere in my platform support code? > It is used more heavily in opensmalltalk-vm, but I can't seem to find > where it is defined over there, either. > > Question 2: > > LargeIntegersPlugin>>#digitMontgomery:times:modulo:mInvModB: > was introduced in VMMaker 4.4.20 (VMMaker-dtl.233) and later bugfixed > in VMMaker 4.5.3 (VMMaker-dtl.239) > > However, this method calls "self error:" as follows: > > firstLen <= thirdLen ifFalse: [^self error: 'firstLarge must be less > than thirdLarge']. > secondLen <= thirdLen ifFalse: [^self error: 'secondLarge must be > less than thirdLarge']. > (mInv >= 0 and: [mInv <= 255]) ifFalse: [^self error: 'mInvMod256 > must be between 0 and 255']. > > which results in an undefined symbol _error when building this VM. > > What would be the proper way to address this? Find a place to > implement error() in the VM cross/ or platform/ sources (or steal from > newer support code)? Or to change the call to self error: to > something else? > > To get the VM building, I've just hand-patched LargeIntegers.c as > follows: > > if (!(firstLen <= thirdLen)) { > /* return error("firstLarge must be less than thirdLarge"); */ > return interpreterProxy->success(false); > } > if (!(secondLen <= thirdLen)) { > /* return error("secondLarge must be less than thirdLarge"); */ > return interpreterProxy->success(false); > } > if (!((mInv >= 0) && (mInv <= 255))) { > /* return error("mInvMod256 must be between 0 and 255"); */ > return interpreterProxy->success(false); > } > > Lastly: I'm tempted to ask if anybody ever tried controlling the > Xcode project via AppleScript, back when Xcode was still a big part of > building the Mac or iOS VM. Maybe maximum effort with minimum payoff, > but could be interesting or fun to automatically enable/disable plugin > sources based on VMMaker(Tool) selections, and automatically trigger > build/clean from within the Squeak image. > > Thanks, > a Tim > From noreply at github.com Sat Jul 25 21:19:15 2020 From: noreply at github.com (Eliot Miranda) Date: Sat, 25 Jul 2020 14:19:15 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] c53070: CogVM source as per VMMaker.oscog-eem.2780/ClosedV... Message-ID: Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: c53070d0c2e2bb09fe156cb6809b8138e816e22f https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/c53070d0c2e2bb09fe156cb6809b8138e816e22f Author: Eliot Miranda Date: 2020-07-25 (Sat, 25 Jul 2020) Changed paths: M nsspur64src/vm/cogit.h M nsspur64src/vm/cogitARMv8.c M nsspur64src/vm/cogitX64SysV.c M nsspur64src/vm/cogitX64WIN64.c M nsspur64src/vm/cointerp.c M nsspur64src/vm/cointerp.h M nsspur64src/vm/gcc3x-cointerp.c M nsspursrc/vm/cogit.h M nsspursrc/vm/cogitARMv5.c M nsspursrc/vm/cogitIA32.c M nsspursrc/vm/cogitMIPSEL.c M nsspursrc/vm/cointerp.c M nsspursrc/vm/cointerp.h M nsspursrc/vm/gcc3x-cointerp.c M nsspurstack64src/vm/gcc3x-interp.c M nsspurstack64src/vm/interp.c M nsspurstacksrc/vm/gcc3x-interp.c M nsspurstacksrc/vm/interp.c M spur64src/vm/cogit.h M spur64src/vm/cogitARMv8.c M spur64src/vm/cogitX64SysV.c M spur64src/vm/cogitX64WIN64.c M spur64src/vm/cointerp.c M spur64src/vm/cointerp.h M spur64src/vm/cointerpmt.c M spur64src/vm/cointerpmt.h M spur64src/vm/gcc3x-cointerp.c M spur64src/vm/gcc3x-cointerpmt.c M spurlowcode64src/vm/cogit.h M spurlowcode64src/vm/cogitARMv8.c M spurlowcode64src/vm/cogitX64SysV.c M spurlowcode64src/vm/cogitX64WIN64.c M spurlowcode64src/vm/cointerp.c M spurlowcode64src/vm/cointerp.h M spurlowcode64src/vm/gcc3x-cointerp.c M spurlowcodesrc/vm/cogit.h M spurlowcodesrc/vm/cogitARMv5.c M spurlowcodesrc/vm/cogitIA32.c M spurlowcodesrc/vm/cogitMIPSEL.c M spurlowcodesrc/vm/cointerp.c M spurlowcodesrc/vm/cointerp.h M spurlowcodesrc/vm/gcc3x-cointerp.c M spurlowcodestack64src/vm/gcc3x-interp.c M spurlowcodestack64src/vm/interp.c M spurlowcodestacksrc/vm/gcc3x-interp.c M spurlowcodestacksrc/vm/interp.c M spursista64src/vm/cogit.h M spursista64src/vm/cogitARMv8.c M spursista64src/vm/cogitX64SysV.c M spursista64src/vm/cogitX64WIN64.c M spursista64src/vm/cointerp.c M spursista64src/vm/cointerp.h M spursista64src/vm/gcc3x-cointerp.c M spursistasrc/vm/cogit.h M spursistasrc/vm/cogitARMv5.c M spursistasrc/vm/cogitIA32.c M spursistasrc/vm/cogitMIPSEL.c M spursistasrc/vm/cointerp.c M spursistasrc/vm/cointerp.h M spursistasrc/vm/gcc3x-cointerp.c M spursrc/vm/cogit.h M spursrc/vm/cogitARMv5.c M spursrc/vm/cogitIA32.c M spursrc/vm/cogitMIPSEL.c M spursrc/vm/cointerp.c M spursrc/vm/cointerp.h M spursrc/vm/cointerpmt.c M spursrc/vm/cointerpmt.h M spursrc/vm/gcc3x-cointerp.c M spursrc/vm/gcc3x-cointerpmt.c M spurstack64src/vm/gcc3x-interp.c M spurstack64src/vm/interp.c M spurstack64src/vm/validImage.c M spurstacksrc/vm/gcc3x-interp.c M spurstacksrc/vm/interp.c M spurstacksrc/vm/validImage.c M src/plugins/BitBltPlugin/BitBltPlugin.c M src/plugins/FileAttributesPlugin/FileAttributesPlugin.c M src/plugins/FilePlugin/FilePlugin.c M src/plugins/IA32ABI/IA32ABI.c M src/plugins/LargeIntegers/LargeIntegers.c M src/plugins/MacMenubarPlugin/MacMenubarPlugin.c M src/plugins/Matrix2x3Plugin/Matrix2x3Plugin.c M src/plugins/SqueakFFIPrims/ARM32FFIPlugin.c M src/plugins/SqueakFFIPrims/ARM64FFIPlugin.c M src/plugins/SqueakFFIPrims/IA32FFIPlugin.c M src/plugins/SqueakFFIPrims/X64SysVFFIPlugin.c M src/plugins/SqueakFFIPrims/X64Win64FFIPlugin.c M src/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c M src/plugins/VMProfileMacSupportPlugin/VMProfileMacSupportPlugin.c M src/plugins/XDisplayControlPlugin/XDisplayControlPlugin.c M src/vm/cogit.h M src/vm/cogitARMv5.c M src/vm/cogitIA32.c M src/vm/cogitMIPSEL.c M src/vm/cointerp.c M src/vm/cointerp.h M src/vm/cointerpmt.c M src/vm/cointerpmt.h M src/vm/gcc3x-cointerp.c M src/vm/gcc3x-cointerpmt.c M stacksrc/vm/gcc3x-interp.c M stacksrc/vm/interp.c Log Message: ----------- CogVM source as per VMMaker.oscog-eem.2780/ClosedVMMaker-eem.96 ARMv8 Cogit: Update initial cache flushing to accomodate Apple silicon. Slang: Implement and support cppIf:ifTrue:cppIf:ifTrue:ifFalse: for ARMv8 cache flushing. Due to the changes to generateInlineCppIfElse:asArgument:on:indent: clean-up generating indents and terminating semicolons. Clean up generating switches, avoiding emitting a bogus newline before hand, and a newline before break jumps. From builds at travis-ci.org Sat Jul 25 21:40:34 2020 From: builds at travis-ci.org (Travis CI) Date: Sat, 25 Jul 2020 21:40:34 +0000 Subject: [Vm-dev] Errored: OpenSmalltalk/opensmalltalk-vm#2124 (Cog - c53070d) In-Reply-To: Message-ID: <5f1ca6d3d5b7_13fcf03bb607c13339b@travis-tasks-74877867c5-fbtnp.mail> Build Update for OpenSmalltalk/opensmalltalk-vm ------------------------------------- Build: #2124 Status: Errored Duration: 20 mins and 46 secs Commit: c53070d (Cog) Author: Eliot Miranda Message: CogVM source as per VMMaker.oscog-eem.2780/ClosedVMMaker-eem.96 ARMv8 Cogit: Update initial cache flushing to accomodate Apple silicon. Slang: Implement and support cppIf:ifTrue:cppIf:ifTrue:ifFalse: for ARMv8 cache flushing. Due to the changes to generateInlineCppIfElse:asArgument:on:indent: clean-up generating indents and terminating semicolons. Clean up generating switches, avoiding emitting a bogus newline before hand, and a newline before break jumps. View the changeset: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/bbbe44d700a8...c53070d0c2e2 View the full build log and details: https://travis-ci.org/github/OpenSmalltalk/opensmalltalk-vm/builds/711809339?utm_medium=notification&utm_source=email -- You can unsubscribe from build emails from the OpenSmalltalk/opensmalltalk-vm repository going to https://travis-ci.org/account/preferences/unsubscribe?repository=8795279&utm_medium=notification&utm_source=email. Or unsubscribe from *all* email updating your settings at https://travis-ci.org/account/preferences/unsubscribe?utm_medium=notification&utm_source=email. Or configure specific recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications. -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits at source.squeak.org Sun Jul 26 03:56:05 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Sun, 26 Jul 2020 03:56:05 0000 Subject: [Vm-dev] VM Maker: VMMaker.oscog-eem.2781.mcz Message-ID: Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2781.mcz ==================== Summary ==================== Name: VMMaker.oscog-eem.2781 Author: eem Time: 25 July 2020, 8:55:54.857642 pm UUID: 8de36fd4-d64f-4396-8948-140acaa8cdb4 Ancestors: VMMaker.oscog-eem.2780 Miscellaneous tweaks. InterpreterPrimitives: fix some similation slips in canBeImmutable:. Have primitiveHighBit use cppIf:ifTrue:cppIf:ifTrue:ifFalse:. Sionara asIEEE64BitWord; it's now in trunk. Harmonise the two simulator primitiveExecuteMethodArgsArray's, adding a useful doit to turn off the halt. Slang: add some potentially useful names to namesDefinedAtCompileTime =============== Diff against VMMaker.oscog-eem.2780 =============== Item was changed: ----- Method: CogVMSimulator>>primitiveExecuteMethodArgsArray (in category 'control primitives') ----- primitiveExecuteMethodArgsArray (InitializationOptions at: #haltOnExecuteMethod ifAbsent: [true]) ifTrue: [self halt: thisContext selector]. + ^super primitiveExecuteMethodArgsArray + + "InitializationOptions at: #haltOnExecuteMethod put: false"! - ^super primitiveExecuteMethodArgsArray! Item was removed: - ----- Method: Float>>asIEEE64BitWord (in category '*VMMaker-Cog tests') ----- - asIEEE64BitWord - ^((self basicAt: 1) bitShift: 32) + (self basicAt: 2)! Item was changed: ----- Method: InterpreterPrimitives>>canBeImmutable: (in category 'object access primitives') ----- canBeImmutable: oop | scheduler processLists | self assert: (objectMemory isNonImmediate: oop). "For now we fail the primitive for contexts to we ensure there are no immutable contexts. Later we can consider having immutable contexts and send cannotReturn callback when returning to an immutable context. That would mean that setting a context to immutable would require a divorce and returns to immutable context are necessarily across stack pages" + (objectMemory isContext: oop) ifTrue: [^ false]. - (objectMemory isContext: oop) ifTrue: [ ^ false ]. "Weak structures can't be immutable" (objectMemory isEphemeron: oop) ifTrue: [^ false]. (objectMemory isWeakNonImm: oop) ifTrue: [^ false]. "No clue what is going on for semaphores so they can't be immutable" (objectMemory isSemaphoreObj: oop) ifTrue: [^ false]. "Simple version of process management: we forbid Process and LinkedList instances to be immutable as well as the Processor and the array of activeProcess" + scheduler := objectMemory fetchPointer: ValueIndex ofObject: (objectMemory splObj: SchedulerAssociation). - scheduler := self fetchPointer: ValueIndex ofObject: (objectMemory splObj: SchedulerAssociation). processLists := objectMemory fetchPointer: ProcessListsIndex ofObject: scheduler. + oop = scheduler ifTrue: [^ false]. + oop = processLists ifTrue: [^ false]. - oop = scheduler ifTrue: [ ^ false ]. - oop = processLists ifTrue: [ ^ false ]. "Is it a linkedList ?" + (objectMemory classIndexOf: (objectMemory fetchPointer: 1 ofObject: processLists)) = (objectMemory classIndexOf: oop) ifTrue: [^ false]. - (objectMemory classIndexOf: (objectMemory fetchPointer: 1 ofObject: processLists)) = (objectMemory classIndexOf: oop) ifTrue: [ ^ false ]. "is it a Process ?" + (objectMemory classIndexOf: (objectMemory fetchPointer: ActiveProcessIndex ofObject: scheduler)) = (objectMemory classIndexOf: oop) ifTrue: [^ false]. - (objectMemory classIndexOf: (objectMemory fetchPointer: ActiveProcessIndex ofObject: scheduler)) = (objectMemory classIndexOf: oop) ifTrue: [ ^ false ]. "The rest of the code is relative to process management: the Processor (the active process scheduler) can't be immutable, as well as all the objects relative to Process management " "scheduler := self fetchPointer: ValueIndex ofObject: (self splObj: SchedulerAssociation). processLists := objectMemory fetchPointer: ProcessListsIndex ofObject: scheduler. ((objectMemory formatOf: oop) = objectMemory nonIndexablePointerFormat) ifFalse: + [ (objectMemory isArrayNonImm: oop) ifFalse: [^ true]. - [ (objectMemory isArrayNonImm: oop) ifFalse: [ ^ true ]. ^ (oop = processLists) not ]. + (objectMemory numSlotsOf: oop) >= 2 ifFalse: [^ true]. - (objectMemory numSlotsOf: oop) >= 2 ifFalse: [ ^ true ]. ""is the oop the scheduler itself ?"" + oop = scheduler ifTrue: [^ false]. - oop = scheduler ifTrue: [ ^ false ]. 1 to: (objectMemory numSlotsOf: processLists) do: [ :i | ""is the oop one of the linked lists ?"" (list := processLists at: i) = oop ifTrue: [^ false]. ""is the oop one of the runnable process ?"" first := objectMemory fetchPointer: FirstLinkIndex ofObject: list. first = objectMemory nilObject ifFalse: [ last := objectMemory fetchPointer: LastLinkIndex ofObject: list. link := first. [ link = last ] whileFalse: + [ link = oop ifTrue: [^ false]. - [ link = oop ifTrue: [ ^ false ]. link := objectMemory fetchPointer: NextLinkIndex ofObject: link. ] ] ]." ^ true! Item was changed: ----- Method: InterpreterPrimitives>>primitiveHighBit (in category 'arithmetic integer primitives') ----- primitiveHighBit | integerReceiverOop leadingZeroCount highestBitZeroBased | integerReceiverOop := self stackTop. "Convert the receiver Oop to use a single tag bit" objectMemory numSmallIntegerTagBits > 1 ifTrue: [integerReceiverOop := (integerReceiverOop >>> (objectMemory numSmallIntegerTagBits-1) bitOr: 1)]. self cppIf: #'__GNUC__' defined ifTrue: ["Note: in gcc, result is undefined if input is zero (for compatibility with BSR fallback when no CLZ instruction available). but input is never zero because we pass the oop with tag bits set, so we are safe" objectMemory wordSize = 4 ifTrue: [leadingZeroCount := self __builtin_clz: integerReceiverOop] ifFalse: [leadingZeroCount := self __builtin_clzll: integerReceiverOop]. + leadingZeroCount = 0 ifTrue: "highBit is not defined for negative Integer" + [self primitiveFail]. + "Nice bit trick: 1-based high-bit is (32 - clz) - 1 to account for tag bit. + This is like two-complement - clz - 1 on 5 bits, or in other words a bit-invert operation clz ^16r1F" + self pop: 1 thenPushInteger: (leadingZeroCount bitXor: (BytesPerWord * 8 - 1))] + cppIf: #'_MSC_VER' defined | #'__ICC' defined - leadingZeroCount = 0 - ifTrue: - ["highBit is not defined for negative Integer" - self primitiveFail] - ifFalse: - ["Nice bit trick: 1-based high-bit is (32 - clz) - 1 to account for tag bit. - This is like two-complement - clz - 1 on 5 bits, or in other words a bit-invert operation clz ^16r1F" - self pop: 1 thenPushInteger: (leadingZeroCount bitXor: (BytesPerWord * 8 - 1))]. - ^self]. - self cppIf: #'__GNUC__' defined not & (#'_MSC_VER' defined | #'__ICC' defined) ifTrue: ["In MSVC, _lzcnt and _lzcnt64 builtins do not fallback to BSR when not supported by CPU Instead of messing with __cpuid() we always use the BSR intrinsic" "Trick: we test the oop sign rather than the integerValue. Assume oop are signed (so far, they are, sqInt are signed)" + integerReceiverOop < 0 ifTrue: + [^self primitiveFail]. - integerReceiverOop < 0 ifTrue: [self primitiveFail] ifFalse: [ "Setting this variable is useless, but VMMaker will generate an automatic initialization at a worse place if this isn't initialized explicitly." highestBitZeroBased := 0. "We do not even test the return value, because integerReceiverOop is never zero" + objectMemory wordSize = 4 - self cCode: [objectMemory wordSize = 4 ifTrue: [self _BitScanReverse: (self addressOf: highestBitZeroBased) _: integerReceiverOop] + ifFalse: [self _BitScanReverse64: (self addressOf: highestBitZeroBased) _: integerReceiverOop]. - ifFalse: [self _BitScanReverse64: (self addressOf: highestBitZeroBased) _: integerReceiverOop]] - inSmalltalk: [highestBitZeroBased := integerReceiverOop highBit - 1]. "thanks to the tag bit, the +1 operation for getting 1-based rank is not necessary" + self pop: 1 thenPushInteger: highestBitZeroBased] + ifFalse: + ["not gcc/clang, nor MSVC/ICC, you have to implement if your compiler provides useful builtins" - self pop: 1 thenPushInteger: highestBitZeroBased]. - ^self]. - self cppIf: #'__GNUC__' defined not & #'_MSC_VER' defined not & #'__ICC' defined not - ifTrue: - ["not gcc/clang, nor MSVC/ICC, you have to implement if your compiler provide useful builtins" self cCode: [self primitiveFail] + inSmalltalk: "Simulate so that the simulator is closer to the actual VM" + [integerReceiverOop < 0 ifTrue: + [^self primitiveFail]. + self pop: 1 thenPushInteger: integerReceiverOop highBit - 1]]! - inSmalltalk: "Simulate so that the simulatror is closer to the actual VM" - [integerReceiverOop < 0 - ifTrue: [self primitiveFail] - ifFalse: [self pop: 1 thenPushInteger: integerReceiverOop highBit - 1]]]! Item was changed: ----- Method: StackInterpreterSimulator>>primitiveExecuteMethodArgsArray (in category 'control primitives') ----- primitiveExecuteMethodArgsArray + (InitializationOptions at: #haltOnExecuteMethod ifAbsent: [true]) ifTrue: + [self halt: thisContext selector]. + ^super primitiveExecuteMethodArgsArray + + "InitializationOptions at: #haltOnExecuteMethod put: false"! - self halt: thisContext selector. - "(objectMemory isOopCompiledMethod: self stackTop) ifFalse: - [self halt]." - ^super primitiveExecuteMethodArgsArray! Item was changed: ----- Method: VMBasicConstants class>>namesDefinedAtCompileTime (in category 'C translation') ----- namesDefinedAtCompileTime "Answer the set of names for variables that should be defined at compile time. Some of these get default values during simulation, and hence get defaulted in the various initializeMiscConstants methods. But that they have values should /not/ cause the code generator to do dead code elimination based on their default values. In particular, methods marked with + will be emitted within #if defined(ANameDefinedAtCompileTime)...#endif. + + And of course this is backwards. We'd like to define names that are defined at translation time." + ^#(VMBIGENDIAN - will be emitted within #if defined(ANameDefinedAtCompileTime)...#endif." - ^#( VMBIGENDIAN IMMUTABILITY STACKVM COGVM COGMTVM SPURVM PharoVM "Pharo vs Squeak" TerfVM "Terf vs Squeak" EnforceAccessControl "Newspeak" CheckRememberedInTrampoline "IMMUTABILITY" BIT_IDENTICAL_FLOATING_POINT LLDB "As of lldb-370.0.42 Swift-3.1, passing function parameters to printOopsSuchThat fails with Internal error [IRForTarget]: Couldn't rewrite one of the arguments of a function call. Turning off link time optimization with -fno-lto has no effect. hence we define some debugging functions as being " "processor related" __ARM_ARCH__ __arm__ __arm32__ ARM32 __arm64__ ARM64 _M_I386 _X86_ i386 i486 i586 i686 __i386__ __386__ X86 I386 x86_64 __amd64 __x86_64 __amd64__ __x86_64__ _M_AMD64 _M_X64 + __mips__ __mips + __powerpc __powerpc__ __powerpc64__ __POWERPC__ + __ppc__ __ppc64__ __PPC__ __PPC64__ + __sparc__ __sparc __sparc_v8__ __sparc_v9__ __sparcv8 __sparcv9 "Compiler brand related" + __ACK__ + __CC_ARM + __clang__ __GNUC__ _MSC_VER __ICC + __SUNPRO_C "os related" ACORN + _AIX + __ANDROID__ + __BEOS__ __linux__ __MINGW32__ + __FreeBSD__ __NetBSD__ __OpenBSD__ - __OpenBSD__ __osf__ + EPLAN9 + __unix__ __unix UNIX - UNIX WIN32 _WIN32 _WIN32_WCE WIN64 _WIN64 _WIN64_WCE)! From digit at sonic.net Sun Jul 26 17:17:22 2020 From: digit at sonic.net (Tim Johnson) Date: Sun, 26 Jul 2020 10:17:22 -0700 Subject: [Vm-dev] Mac PPC Carbon VM resuscitation part 2: status and two questions In-Reply-To: <20200725205721.GA39973@shell.msen.com> References: <1F63DDCD-6583-4F48-A6A3-D9BA957A7E86@sonic.net> <20200725205721.GA39973@shell.msen.com> Message-ID: Hi Dave, On Jul 25, 2020, at 1:57 PM, David T. Lewis wrote: > Nice to get this update from you, thanks :-) > > I cannot answer your specific questions, but here are a couple of > things that might help. > >> Note that my build product, even at >> 4.7.8, still can't natively launch & interpret a 6505-format image >> like the release version of 4.6 from files.squeak.org. > > I have never actually tested the case of a big-endian interpreter VM > loading a 6505 image that was saved from a little-endian machine. I > tried > to write the logic around > ContextInterpreter>>normalizeFloatOrderingInImage: > in anticipation of this, but I had no way to test it. So it is very > possible that I may have gotten something wrong. But I think that I > made > later changes to this logic, so if possible I would prefer to debug > the problem using a more up to date VMMaker. OK. And yes, I saw there were some updates to this functionality over time, even through the 4.4 to 4.7 versions of VMMaker. > You seem to be seeing some problems that may be related to mismatches > between the VMMaker generated code and the platforms support code. > In general, there are not a lot of dependencies between the two over > short time windows, but if you are trying to build with version X of > the VMMaker sources against version Y of the platform sources from > the Subversion repository, then things are going to get out of whack > if the two versions are not reasonably close. > > There is no real control around this, but if you are trying to make > a VM with version X of VMMaker, then you would probably want to check > out a set of platforms source from Subversion with similar time > stamp, or from maybe 6 to 12 months earlier. This is an interesting point. I had (mistakenly) thought that SVN was frozen in time, around the point when the GitHub repo began and (I believe) some/all of its history was imported there. But now that I am looking at the current SVN repo (rather than the circa-2010 snapshot fork I'd found elsewhere on GitHub and was using), I am finding all kinds of treasures. The files in Glue/image seem particularly interesting at first glance. I had a vague decade-old memory that these files existed somewhere. Now I need to brush up on my SVN skills. :) > Overall, you are doing a stepwise progression from the old VM version, > moving forward one chunk at a time. That is exactly how I would have > attacked the problem. But with the advantage of my knowing a few > things > about what changed over the years, I would actually suggest that you > try a short-cut to save some steps. My advice is to set aside your > stepwise progression for a moment, and try going directly to the > latest versions of VMMaker and the SVN support code, and see if that > gets you reasonably close to a working VM. I do not know if this will > work, but if it does it will save you some time. Thanks for this. I'll see what I can do with it. Tim From commits at source.squeak.org Sun Jul 26 18:09:55 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Sun, 26 Jul 2020 18:09:55 0000 Subject: [Vm-dev] VM Maker: ImageFormat-dtl.42.mcz Message-ID: David T. Lewis uploaded a new version of ImageFormat to project VM Maker: http://source.squeak.org/VMMaker/ImageFormat-dtl.42.mcz ==================== Summary ==================== Name: ImageFormat-dtl.42 Author: dtl Time: 26 July 2020, 2:09:13.1382 pm UUID: 58998f37-e8f3-47a5-81c1-5f7e00cc5b5c Ancestors: ImageFormat-eem.41 Suggestion from David Stes - Let the ckformat program print information about known version numbers. When run with no argument, print usage and help information. Also change the wording in format descriptions from 'Sista' to 'multiple bytecode sets' which is more wordy but techncally more accurate. =============== Diff against ImageFormat-eem.41 =============== Item was changed: ----- Method: ImageFormat class>>generateCkFormatProgram:on: (in category 'ckformat') ----- generateCkFormatProgram: programName on: stream "Generate source code for an image format version reader. The program is intended for testing image file format from a unix shell script such that the shell script can decide what VM to run based on image requirements." | formatNumber | stream nextPutAll: '/* ', programName, ': Print the image format number on standard output */'; cr; nextPutAll: '/* for use in a shell script to test image format requirements. */'; cr; nextPutAll: '/* A non-zero return status code indicates failure. */'; cr; cr; nextPutAll: '/* Usage: ', programName, ' imageFileName */'; cr; cr; nextPutAll: '/* --- DO NOT EDIT THIS FILE --- */'; cr; nextPutAll: '/* --- Automatically generated from class ', self name, ' ', DateAndTime now asString, '--- */'; cr; nextPutAll: '/* --- Source code is in package ImageFormat in the VMMaker repository --- */'; cr; nextPutAll: '/* --- DO NOT EDIT THIS FILE --- */'; cr; cr; nextPutAll: '#include '; cr; nextPutAll: '#include '; cr; nextPutAll: '#include '; cr; cr; nextPutAll: 'int main(int argc, char **argv) {'; cr; tab; nextPutAll: 'FILE *f;'; cr; tab; nextPutAll: 'unsigned char buf[8];'; cr; tab; nextPutAll: 'int formatNumber;'; cr; tab; nextPutAll: 'unsigned char c;'; cr; tab; nextPutAll: 'int match;'; cr; tab; nextPutAll: 'if (argc !!= 2) {'; cr; tab; tab; nextPutAll: 'printf("usage: ', programName, ' imageFileName\n");'; cr; + tab; tab; nextPutAll: 'printf("answer the image format number for an image file or 0 if not known\n");'; cr; + tab; tab; nextPutAll: 'printf("known image formats:\n");'; cr. + KnownVersionNumbers do: [ :e | | s | + s := String streamContents: [ :strm | + strm nextPutAll: e asString, ': '. + (self fromInteger: e) printDescriptionOn: strm withVersionNumber: false ]. + stream tab; tab; nextPutAll: 'printf("', s, '\n");'; cr ]. + stream tab; tab; nextPutAll: 'exit(1);'; cr; tab; nextPutAll: '}'; cr; tab; nextPutAll: 'f = fopen(argv[1], "r");'; cr; tab; nextPutAll: 'if (f == NULL) {'; cr; tab; tab; nextPutAll: 'perror(argv[1]);'; cr; tab; tab; nextPutAll: 'exit(2);'; cr; tab; nextPutAll: '}'; cr. { 0. 512 } do: [:offset | stream tab; nextPutAll: 'if(fseek(f, '; nextPutAll: offset asString; nextPutAll: 'L, SEEK_SET) !!= 0) {';cr; tab; tab; nextPutAll: 'fprintf(stderr, "cannot go to pos %d in %s\n", '; nextPutAll: offset asString; nextPutAll: ', argv[1]);'; cr; tab; tab; nextPutAll: 'exit(3);'; cr; tab; nextPutAll: '}'; cr; tab; nextPutAll: 'if (fread(buf, 1, 8, f) < 8) {'; cr; tab; tab; nextPutAll: 'fprintf(stderr, "cannot read %s\n", argv[1]);'; cr; tab; tab; nextPutAll: 'exit(3);'; cr; tab; nextPutAll: '}'; cr. self versionNumberByteArrays withIndexDo: [ :v :tag | | b | formatNumber := (self fromBytes: v) asInteger. b := 'b_', formatNumber asString, '_', tag asString. stream tab; nextPutAll: '{'; cr; tab; nextPutAll: 'unsigned char ', b, '[', v size asString, ']= { '. v inject: true into: [:first : elem | first ifFalse: [stream nextPutAll: ', ']. stream nextPutAll: elem asString. false]. stream nextPutAll: '};'; cr; tab; nextPutAll: 'if (memcmp(buf, ', b, ', ', v size asString, ') == 0) {'; cr; tab; tab; nextPutAll: 'printf("%d\n", ', formatNumber, ');'; cr; tab; tab; nextPutAll: 'exit(0);'; cr; tab; nextPutAll: '}'; cr; tab; nextPutAll: '}'; cr]]. stream tab; nextPutAll: 'printf("0\n"); /* print an invalid format number */';cr; tab; nextPutAll: 'exit (-1); /* not found, exit with error code */'; cr; nextPutAll: '}'; cr ! Item was removed: - ----- Method: ImageFormat class>>storeCkstatusOnFile: (in category 'ckformat') ----- - storeCkstatusOnFile: fileName - "Deprecated 07-Dec-2012, use storeCkFormatOnFile:" - ^self storeCkFormatOnFile: fileName - ! Item was changed: ----- Method: ImageFormat>>printDescriptionOn: (in category 'printing') ----- printDescriptionOn: stream " The classic squeak image, aka V3, is 32-bit with magic 6502. The first 64-bit Squeak image was generated from V3 image made by Dan Ingalls and Ian Piumarta in 2005. Later, the magic code was changed to 68000. After full closure support came to Squeak, the magic code changed to 6504 for 32-bit and 68002 for 64-bit images by setting a capability bit. Cog VM introduced a native order for floats under 6505 magic code. Its corresponding 64b code would have been 68003 but no such image was produced. Older Interpreter VMs would simply load 6505 by flipping word order back. Cog VM also introduced a new object layout for 64-bit images called Spur layout under a new magic code - 68021. A few images were also generated with 68019, but this magic is now considered obsolete and deprecated. " + ^ self printDescriptionOn: stream withVersionNumber: true. - stream nextPutAll: 'a '; - nextPutAll: (wordSize * 8) asString; - nextPutAll: '-bit '; - nextPutAll: (self requiresSpurSupport - ifTrue: [ 'Spur' ] - ifFalse: [ 'V3' ]); - nextPutAll: ' image with '. - self requiresClosureSupport ifFalse: [stream nextPutAll: 'no ']. - stream nextPutAll: 'closure support and '. - self requiresNativeFloatWordOrder - ifTrue: [stream nextPutAll: 'float words stored in native platform order'] - ifFalse: [stream nextPutAll: 'no native platform float word order requirement']. - self requiresSpurSupport - ifTrue: [stream nextPutAll: ' using Spur object format'. - (self is64Bit and: [self requiresNewSpur64TagAssignment not]) - ifTrue: [stream nextPutAll: ' (obsolete)']]. - self requiresMultipleBytecodeSupport - ifTrue: [ stream nextPutAll: ' and Sista ' ]. - stream nextPutAll: ' ('; - nextPutAll: self asInteger asString; - nextPut: $). - ^ stream ! Item was added: + ----- Method: ImageFormat>>printDescriptionOn:withVersionNumber: (in category 'printing') ----- + printDescriptionOn: stream withVersionNumber: aBoolean + " + The classic squeak image, aka V3, is 32-bit with magic 6502. The first 64-bit + Squeak image was generated from V3 image made by Dan Ingalls and Ian Piumarta + in 2005. Later, the magic code was changed to 68000. + + After full closure support came to Squeak, the magic code changed to 6504 for + 32-bit and 68002 for 64-bit images by setting a capability bit. + + Cog VM introduced a native order for floats under 6505 magic code. Its + corresponding 64b code would have been 68003 but no such image was produced. + Older Interpreter VMs would simply load 6505 by flipping word order back. + + Cog VM also introduced a new object layout for 64-bit images called Spur layout + under a new magic code - 68021. A few images were also generated with 68019, + but this magic is now considered obsolete and deprecated. + " + stream nextPutAll: 'a '; + nextPutAll: (wordSize * 8) asString; + nextPutAll: '-bit '; + nextPutAll: (self requiresSpurSupport + ifTrue: [ 'Spur' ] + ifFalse: [ 'V3' ]); + nextPutAll: ' image with '. + self requiresClosureSupport ifFalse: [stream nextPutAll: 'no ']. + stream nextPutAll: 'closure support and '. + self requiresNativeFloatWordOrder + ifTrue: [stream nextPutAll: 'float words stored in native platform order'] + ifFalse: [stream nextPutAll: 'no native platform float word order requirement']. + self requiresSpurSupport + ifTrue: [stream nextPutAll: ' using Spur object format'. + (self is64Bit and: [self requiresNewSpur64TagAssignment not]) + ifTrue: [stream nextPutAll: ' (obsolete)']]. + self requiresMultipleBytecodeSupport + ifTrue: [ stream nextPutAll: ' and multiple bytecode sets ' ]. + aBoolean ifTrue: [ + stream nextPutAll: ' ('; + nextPutAll: self asInteger asString; + nextPut: $)]. + ^ stream + ! From commits at source.squeak.org Sun Jul 26 19:45:17 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Sun, 26 Jul 2020 19:45:17 0000 Subject: [Vm-dev] VM Maker: VMMaker.oscog-eem.2782.mcz Message-ID: Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2782.mcz ==================== Summary ==================== Name: VMMaker.oscog-eem.2782 Author: eem Time: 26 July 2020, 12:45:07.232675 pm UUID: cc64f861-f102-4ce4-9ccb-d8c2268f3235 Ancestors: VMMaker.oscog-eem.2781 Simulaiton: The close methods must remove event listening. primitiveExecuteMethod should work the same as primitiveExecuteMethodArgsArray. The breakpoint in getErrorObjectFromPrimFailCode has served its purpose and is now a PITA. =============== Diff against VMMaker.oscog-eem.2781 =============== Item was changed: ----- Method: CogVMSimulator>>close (in category 'initialization') ----- close "close any files that ST may have opened, etc" pluginList do: [:assoc| | plugin | plugin := assoc value. plugin ~~ self ifTrue: [plugin close]]. "Ugh; at least some of this code belongs in the UI..." + displayView ifNotNil: + [displayView activeHand removeEventListener: self]. + ActiveHand removeEventListener: self. World submorphs do: [:submorph| (submorph model isVMObjectInspector and: [submorph model coInterpreter == self]) ifTrue: [submorph delete]. (submorph model isDebugger and: [(submorph model interruptedProcess suspendedContext ifNotNil: [:sctxt| sctxt findContextSuchThat: [:ctxt| (ctxt receiver == cogit and: [ctxt selector == #simulateCogCodeAt:]) or: [ctxt receiver == self and: [ctxt selector == #interpret]]]]) notNil]) ifTrue: [submorph model windowIsClosing. submorph delete]]! Item was changed: ----- Method: CogVMSimulator>>primitiveExecuteMethod (in category 'debugging traps') ----- primitiveExecuteMethod + (InitializationOptions at: #haltOnExecuteMethod ifAbsent: [true]) ifTrue: + [self halt: thisContext selector]. + ^super primitiveExecuteMethod + + "InitializationOptions at: #haltOnExecuteMethod put: false"! - self halt: thisContext selector. - ^super primitiveExecuteMethod! Item was changed: ----- Method: StackInterpreterSimulator>>close (in category 'initialization') ----- close "close any files that ST may have opened, etc" pluginList do: [:assoc| | plugin | plugin := assoc value. plugin ~~ self ifTrue: [plugin close]]. "Ugh; at least some of this code belongs in the UI..." + displayView ifNotNil: + [displayView activeHand removeEventListener: self]. + ActiveHand removeEventListener: self. World submorphs do: [:submorph| (submorph model isVMObjectInspector and: [submorph model coInterpreter == self]) ifTrue: [submorph delete]. (submorph model isDebugger and: [(submorph model interruptedProcess suspendedContext ifNotNil: [:sctxt| sctxt findContextSuchThat: [:ctxt| ctxt receiver == self and: [ctxt selector == #run]]]) notNil]) ifTrue: [submorph model windowIsClosing. submorph delete]]! Item was removed: - ----- Method: StackInterpreterSimulator>>getErrorObjectFromPrimFailCode (in category 'debugging traps') ----- - getErrorObjectFromPrimFailCode - (primFailCode > 1 and: [(#(primitiveNew primitiveNewWithArg primitiveFetchNextMourner primitiveAdoptInstance) includes: primitiveFunctionPointer) not]) ifTrue: [self halt]. - ^super getErrorObjectFromPrimFailCode! Item was changed: ----- Method: StackInterpreterSimulator>>primitiveExecuteMethod (in category 'control primitives') ----- primitiveExecuteMethod + (InitializationOptions at: #haltOnExecuteMethod ifAbsent: [true]) ifTrue: + [self halt: thisContext selector]. + ^super primitiveExecuteMethod + + "InitializationOptions at: #haltOnExecuteMethod put: false"! - self halt: thisContext selector. - ^super primitiveExecuteMethod! From commits at source.squeak.org Sun Jul 26 19:47:40 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Sun, 26 Jul 2020 19:47:40 0000 Subject: [Vm-dev] VM Maker: VMMakerUI-eem.27.mcz Message-ID: Eliot Miranda uploaded a new version of VMMakerUI to project VM Maker: http://source.squeak.org/VMMaker/VMMakerUI-eem.27.mcz ==================== Summary ==================== Name: VMMakerUI-eem.27 Author: eem Time: 26 July 2020, 12:47:38.901108 pm UUID: ac8c4a65-9aef-4923-a182-41cee05503b1 Ancestors: VMMakerUI-eem.26 Fix several bugs in SimulatorEventTransformer. The UI is now "usable", i.e. I managed to bring up the About dialog. Now I at least have a chance of debugging the corrupted fixed pitch font output bug observed in the System reporter. =============== Diff against VMMakerUI-eem.26 =============== Item was changed: ----- Method: CogVMSimulator>>handleListenEvent: (in category '*VMMakerUI-I/O primitive support') ----- handleListenEvent: aMorphicEvent "openAsMorph[NoTranscript] registered me for listen events via HandMorph>>addEventListener. Transform the listen event and add it to my event queue. ALso check if the displayForm should resize." (displayForm ~~ fakeForm and: [displayForm extent ~= displayView extent]) ifTrue: [| newForm | newForm := Form extent: displayView extent depth: displayForm depth. displayForm displayOn: newForm. displayForm := newForm. displayView image: displayForm]. ((aMorphicEvent isMouse or: [aMorphicEvent isKeyboard]) and: [displayView bounds containsPoint: aMorphicEvent position]) ifTrue: + [[eventTransformer degenerateEvent: aMorphicEvent for: self] + on: Error + do: [:ex| + displayView activeHand removeEventListener: self. + ex pass]]! - [eventTransformer degenerateEvent: aMorphicEvent for: self]! Item was changed: Object subclass: #SimulatorEventTransformer + instanceVariableNames: 'buttons modifiers lastMouseMoveEvent' - instanceVariableNames: 'buttons modifiers' classVariableNames: 'Default' poolDictionaries: 'EventSensorConstants' category: 'VMMakerUI-InterpreterSimulation-Morphic'! !SimulatorEventTransformer commentStamp: 'eem 7/14/2015 17:05' prior: 0! A SimulatorEventTransformer takes events as wrapped by HandMorph and converts them to a form a StackInterpreterSimulator can deal with. See HandMorph >> handleEvent to see what the wrapping entails. See HandMorph >> ProcessEvents or EventSensor >> fetchMoreEvents for examples of what an unwrapped event looks like when given to the system for pre-wrapping. Instance Variables ! Item was changed: ----- Method: SimulatorEventTransformer>>degenerateKeyboardEvent:for: (in category 'event transformation') ----- degenerateKeyboardEvent: aMorphicEvent for: aClient "Convert the keyboard event into a low-level event for the VM simulator (aClient). See HandMorph>>generateKeyboardEvent and EventSensor class comment" aClient queueForwardedEvent: + { EventTypeKeyboard. + aClient ioUTCMicroseconds // 1000. + aMorphicEvent keyValue. "<--this is wrong. See nextCharFrom:firstEvt: for what needs to be undone. hooo boy" - { 2. - aMorphicEvent timeStamp. - aMorphicEvent keyValue. "<--this is wrong. See Sensor FirstEvt: for what needs to happen. hooo boy" aMorphicEvent type caseOf: { [#keyDown] -> [EventKeyDown]. [#keyUp] -> [EventKeyUp]. [#keystroke] -> [EventKeyChar] }. modifiers. aMorphicEvent keyValue. 0. self windowIndex }! Item was changed: ----- Method: SimulatorEventTransformer>>degenerateMouseEvent:for: (in category 'event transformation') ----- degenerateMouseEvent: aMorphicEvent for: aClient "Convert the mouse event into low-level events for the VM simulator (aClient). Filter-out mouse moves, and generate a fake mouse move before each button press. See HandMorph>>generateMouseEvent" | translated | - translated := aMorphicEvent position - aClient displayView bounds origin. modifiers := aMorphicEvent buttons >> 3. "Sad, but modifiers come in on mouse move events..." + "filter-out mouse moves unless buttons are pressed, so simulation doesn't get window leave events when we leave its window" + aMorphicEvent type == #mouseMove ifTrue: + [(aClient displayView bounds containsPoint: aMorphicEvent position) ifFalse: + [^self]. + "If buttons (which includes modifiers) change, or are pressed, communicate the event, otherwise (at least potentially) filter it out." + (aMorphicEvent buttons = 0 + and: [lastMouseMoveEvent notNil + and: [lastMouseMoveEvent buttons = 0]]) ifTrue: + [lastMouseMoveEvent := aMorphicEvent copy. + lastMouseMoveEvent timeStamp: (aClient ioUTCMicroseconds // 1000). + lastMouseMoveEvent position: lastMouseMoveEvent position - aClient displayView bounds origin. + ^self]]. + lastMouseMoveEvent ifNotNil: + [aClient queueForwardedEvent: + { EventTypeMouse. + lastMouseMoveEvent timeStamp. + lastMouseMoveEvent position x. + lastMouseMoveEvent position y. + lastMouseMoveEvent buttons bitAnd: 7. + lastMouseMoveEvent buttons >> 3. + 0. + self windowIndex }. + lastMouseMoveEvent := nil]. + buttons := aMorphicEvent buttons. + translated := aMorphicEvent position - aClient displayView bounds origin. - aMorphicEvent type == #mouseMove - ifTrue: "filter-out mouse moves unless buttons are pressed, so simulation doesn't get window leave events when we leave its window" - [buttons = 0 ifTrue: [^nil]] - ifFalse:"If the buttons are going down, make sure to add a mouse move event to the current position before the buttons are pressed." - [((buttons bitAnd: 7) = 0 and: [(aMorphicEvent buttons bitAnd: 7) ~= 0]) ifTrue: - [aClient queueForwardedEvent: - { 1. - aMorphicEvent timeStamp. - translated x. - translated y. - 0. - buttons >> 3. "Thanks dtl" - 0. - self windowIndex }]. - buttons := aMorphicEvent buttons]. aClient queueForwardedEvent: + { EventTypeMouse. + aClient ioUTCMicroseconds // 1000. - { 1. - aMorphicEvent timeStamp. translated x. translated y. + buttons bitAnd: 7. "thanks Ron T." + buttons >> 3. "Thanks dtl" - buttons bitAnd: 7. "thanks Ron T." - buttons >> 3. "Thanks dtl" 0. self windowIndex }! Item was changed: ----- Method: StackInterpreterSimulator>>handleListenEvent: (in category '*VMMakerUI-I/O primitive support') ----- handleListenEvent: aMorphicEvent "openAsMorph[NoTranscript] registered me for listen events via HandMorph>>addEventListener. Transform the listen event and add it to my event queue. ALso check if the displayForm should resize." (displayForm ~~ fakeForm and: [displayForm extent ~= displayView extent]) ifTrue: [| newForm | newForm := Form extent: displayView extent depth: displayForm depth. displayForm displayOn: newForm. displayForm := newForm. displayView image: displayForm]. ((aMorphicEvent isMouse or: [aMorphicEvent isKeyboard]) and: [displayView bounds containsPoint: aMorphicEvent position]) ifTrue: + [[eventTransformer degenerateEvent: aMorphicEvent for: self] + on: Error + do: [:ex| + displayView activeHand removeEventListener: self. + ex pass]]! - [eventTransformer degenerateEvent: aMorphicEvent for: self]! From tim at rowledge.org Sun Jul 26 19:58:55 2020 From: tim at rowledge.org (tim Rowledge) Date: Sun, 26 Jul 2020 12:58:55 -0700 Subject: [Vm-dev] VM Maker: VMMakerUI-eem.27.mcz In-Reply-To: References: Message-ID: > On 2020-07-26, at 12:47 PM, commits at source.squeak.org wrote: > Now I at least have a chance of debugging the corrupted fixed pitch font output bug observed in the System reporter. The weird thing is that I *still* don't see it on any of my machines - Mac OS 64bit image (5.3 & latest 6alpha), Pi (32bit only), x86 linux (64 bit only). A colleague doesn't see it on Windows either. tim -- tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim Strange OpCodes: SEOB: Set Every Other Bit From commits at source.squeak.org Sun Jul 26 23:55:27 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Sun, 26 Jul 2020 23:55:27 0000 Subject: [Vm-dev] VM Maker: VMMaker-dtl.417.mcz Message-ID: David T. Lewis uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker-dtl.417.mcz ==================== Summary ==================== Name: VMMaker-dtl.417 Author: dtl Time: 26 July 2020, 7:55:15.52 pm UUID: 14446c08-7d2a-41a6-9370-2f5eba5ac1e8 Ancestors: VMMaker-dtl.416 Update to remove call to deprecated method in ImageFormat. =============== Diff against VMMaker-dtl.416 =============== Item was changed: ----- Method: VMMaker>>generateUtilityPrograms (in category 'generate sources') ----- generateUtilityPrograms "Any additional sources not directly part of the VM may be generated here" Smalltalk at: #ImageFormat ifPresent: [:cls | "generate ckformat utility program" + cls storeCkFormatOnFile: (self sourceDirectory fullNameFor: 'ckformat.c')]! - cls storeCkstatusOnFile: (self sourceDirectory fullNameFor: 'ckformat.c')]! From commits at source.squeak.org Sun Jul 26 23:58:33 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Sun, 26 Jul 2020 23:58:33 0000 Subject: [Vm-dev] VM Maker: ImageFormat-dtl.43.mcz Message-ID: David T. Lewis uploaded a new version of ImageFormat to project VM Maker: http://source.squeak.org/VMMaker/ImageFormat-dtl.43.mcz ==================== Summary ==================== Name: ImageFormat-dtl.43 Author: dtl Time: 26 July 2020, 7:58:32.916 pm UUID: 3675b184-d74a-495a-8461-28784e447c8b Ancestors: ImageFormat-dtl.42 Restore deprecated method prematurely removed in the last commit, still refrenced prior to VMMaker-dtl.417. Fix two minor formatting issues. =============== Diff against ImageFormat-dtl.42 =============== Item was changed: ----- Method: ImageFileHeader>>readImageVersionFrom:startingAt: (in category 'reading') ----- readImageVersionFrom: aStream startingAt: imageOffset "Look for image format in the next 4 or 8 bytes and set imageFormat. Answer true if the header is written in little endian format." (aStream nextNumber: 4) caseOf: { [ 16r00001966 "6502" ] -> [ imageFormat := ImageFormat fromInteger: 6502. ^false ] . [ 16r66190000 "6502" ] -> [ imageFormat := ImageFormat fromInteger: 6502. ^true ] . [ 16r00001968 "6504" ] -> [ imageFormat := ImageFormat fromInteger: 6504. ^false ] . [ 16r68190000 "6504" ] -> [ imageFormat := ImageFormat fromInteger: 6504. ^true ] . [ 16r00001969 "6505" ] -> [ imageFormat := ImageFormat fromInteger: 6505. ^false ] . [ 16r69190000 "6505" ] -> [ imageFormat := ImageFormat fromInteger: 6505. ^true ] . [ 16r00001979 "6521" ] -> [ imageFormat := ImageFormat fromInteger: 6521. ^false ] . [ 16r79190000 "6521" ] -> [ imageFormat := ImageFormat fromInteger: 6521. ^true ] . [ 16rA0090100 "68000" ] -> [ imageFormat := ImageFormat fromInteger: 68000. aStream next: 4. ^true ] . [ 16rA2090100 "68002" ] -> [ imageFormat := ImageFormat fromInteger: 68002. aStream next: 4. ^true ] . [ 16rA3090100 "68003" ] -> [ imageFormat := ImageFormat fromInteger: 68003. aStream next: 4. ^true ] . [ 16rB3090100 "68019" ] -> [ imageFormat := ImageFormat fromInteger: 68019. aStream next: 4. ^true ] . [ 16r000109B3 "68019" ] -> [ imageFormat := ImageFormat fromInteger: 68019. aStream next: 4. ^false ] . [ 16rB5090100 "68021" ] -> [ imageFormat := ImageFormat fromInteger: 68021. aStream next: 4. ^true ] . [ 16r000109B5 "68021" ] -> [ imageFormat := ImageFormat fromInteger: 68021. aStream next: 4. ^false ] . [ 16r00000000 ] -> [ "Standard interpreter VM puts the format number in the first 64 bits for a 64 bit image, so the leading 4 bytes are zero in this case. Cog/Spur VMs put the format number in the first 32 bits for both 32 and 64 bit images." (aStream nextNumber: 4) caseOf: { [ 16r000109A0 "68000" ] -> [ imageFormat := ImageFormat fromInteger: 68000. ^false ] . [ 16r000109A2 "68002" ] -> [ imageFormat := ImageFormat fromInteger: 68002. ^false ] . [ 16r000109A3 "68003" ] -> [ imageFormat := ImageFormat fromInteger: 68003. ^false ] . + [ 16r000109B3 "68019" ] -> [ imageFormat := ImageFormat fromInteger: 68019. ^false ] - [ 16r000109B3 "68019" ] -> [ imageFormat := ImageFormat fromInteger: 68019. ^false ] . } otherwise: [self error: self asString , ' unrecognized format number'] ] } otherwise: [self error: self asString , ' unrecognized format number'] "ImageFormat versionNumberByteArrays do: [:e | Transcript cr; show: e printString , ': ', (ImageFormat fromBytes: e) description] #[0 0 25 102]: a 32-bit image with no closure support and no native platform float word order requirement (6502) #[102 25 0 0]: a 32-bit image with no closure support and no native platform float word order requirement (6502) #[0 0 25 104]: a 32-bit image with closure support and no native platform float word order requirement (6504) #[104 25 0 0]: a 32-bit image with closure support and no native platform float word order requirement (6504) #[0 0 0 0 0 1 9 160]: a 64-bit image with no closure support and no native platform float word order requirement (68000) #[160 9 1 0 0 0 0 0]: a 64-bit image with no closure support and no native platform float word order requirement (68000) #[0 0 0 0 0 1 9 162]: a 64-bit image with closure support and no native platform float word order requirement (68002) #[162 9 1 0 0 0 0 0]: a 64-bit image with closure support and no native platform float word order requirement (68002) #[0 0 25 105]: a 32-bit image with closure support and float words stored in native platform order (6505) #[105 25 0 0]: a 32-bit image with closure support and float words stored in native platform order (6505) #[0 0 0 0 0 1 9 163]: a 64-bit image with closure support and float words stored in native platform order (68003) #[163 9 1 0 0 0 0 0]: a 64-bit image with closure support and float words stored in native platform order (68003) #[0 0 25 121]: a 32-bit image with closure support and float words stored in native platform order using Spur object format (6521) #[121 25 0 0]: a 32-bit image with closure support and float words stored in native platform order using Spur object format (6521) #[0 0 0 0 0 1 9 179]: a 64-bit image with closure support and float words stored in native platform order using Spur object format (obsolete) (68019) #[179 9 1 0 0 0 0 0]: a 64-bit image with closure support and float words stored in native platform order using Spur object format (obsolete) (68019) #[0 0 0 0 0 1 9 181]: a 64-bit image with closure support and float words stored in native platform order using Spur object format (68021) #[181 9 1 0 0 0 0 0]: a 64-bit image with closure support and float words stored in native platform order using Spur object format (68021) " ! Item was changed: ----- Method: ImageFormat class>>knownVersionNumbers (in category 'image formats') ----- knownVersionNumbers "Version numbers currently in use or likely to be used (e.g. 64-bit Cog formats)" "ImageFormat knownVersionNumbers collect: [:e | (ImageFormat fromInteger: e) description]" ^ ( self baseVersionNumbers, "the original format number variants" { 6505 . "Cog and StackVM" 68003 . "Cog and StackVM running 64-bit image" 6521 . "Spur 32 bit object memory" 7033 . "Spur 32 bit with Sista bytecodes" 68019 . "Spur 64 bit object memory (early)" 68021 . "Spur 64 bit object memory" + 68533 "Spur 64 bit with Sista bytecodes" - 68533 . "Spur 64 bit with Sista bytecodes" " ... add others here as bits are allocated to represent requirements of other image formats" } ) sort. ! Item was added: + ----- Method: ImageFormat class>>storeCkstatusOnFile: (in category 'ckformat') ----- + storeCkstatusOnFile: fileName + "Deprecated 07-Dec-2012, use storeCkFormatOnFile:" + ^self storeCkFormatOnFile: fileName + ! From eliot.miranda at gmail.com Mon Jul 27 17:33:46 2020 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon, 27 Jul 2020 10:33:46 -0700 Subject: [Vm-dev] VM Maker: VMMaker-dtl.417.mcz In-Reply-To: References: Message-ID: Hi David, what directory are you generating ckformat.c to? I'll try and match it in VMMaker.oscog. On Sun, Jul 26, 2020 at 4:55 PM wrote: > > David T. Lewis uploaded a new version of VMMaker to project VM Maker: > http://source.squeak.org/VMMaker/VMMaker-dtl.417.mcz > > ==================== Summary ==================== > > Name: VMMaker-dtl.417 > Author: dtl > Time: 26 July 2020, 7:55:15.52 pm > UUID: 14446c08-7d2a-41a6-9370-2f5eba5ac1e8 > Ancestors: VMMaker-dtl.416 > > Update to remove call to deprecated method in ImageFormat. > > =============== Diff against VMMaker-dtl.416 =============== > > Item was changed: > ----- Method: VMMaker>>generateUtilityPrograms (in category 'generate > sources') ----- > generateUtilityPrograms > "Any additional sources not directly part of the VM may be > generated here" > > Smalltalk > at: #ImageFormat > ifPresent: [:cls | "generate ckformat utility program" > + cls storeCkFormatOnFile: (self sourceDirectory > fullNameFor: 'ckformat.c')]! > - cls storeCkstatusOnFile: (self sourceDirectory > fullNameFor: 'ckformat.c')]! > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: From lewis at mail.msen.com Mon Jul 27 19:01:07 2020 From: lewis at mail.msen.com (David T. Lewis) Date: Mon, 27 Jul 2020 15:01:07 -0400 Subject: [Vm-dev] VM Maker: VMMaker-dtl.417.mcz In-Reply-To: References: Message-ID: <20200727190107.GA16788@shell.msen.com> Hi Eliot, On Mon, Jul 27, 2020 at 10:33:46AM -0700, Eliot Miranda wrote: > > Hi David, > > what directory are you generating ckformat.c to? I'll try and match it > in VMMaker.oscog. > In the old VMMaker, the ckformat.c file gets generated to the ./src directory, and the compiled ckformat is included in lib/squeak// along with the VM executable and plugins. The ckformat.c source gets checked in with other generated sources here: http://squeakvm.org/cgi-bin/viewvc.cgi/squeak/trunk/src/ckformat.c?revision=3782&view=markup The /usr/local/squeak script (Ian's) uses the ckformat that it finds in the lib folder, and the "vmrun" script that I wrote later on for my own use takes advantage of it indirectly by using whatever ckformat that it finds in a folder identified by "squeak -version". Dave From lewis at mail.msen.com Mon Jul 27 19:09:25 2020 From: lewis at mail.msen.com (David T. Lewis) Date: Mon, 27 Jul 2020 15:09:25 -0400 Subject: [Vm-dev] VM Maker: VMMaker-dtl.417.mcz In-Reply-To: <20200727190107.GA16788@shell.msen.com> References: <20200727190107.GA16788@shell.msen.com> Message-ID: <20200727190925.GB16788@shell.msen.com> The actual code generation in VMMaker comes from: VMMaker>>generateUtilityPrograms "Any additional sources not directly part of the VM may be generated here" Smalltalk at: #ImageFormat ifPresent: [:cls | "generate ckformat utility program" cls storeCkFormatOnFile: (self sourceDirectory fullNameFor: 'ckformat.c')] And this is just called from VMMaker>>generateEntire Dave On Mon, Jul 27, 2020 at 03:01:07PM -0400, David T. Lewis wrote: > > Hi Eliot, > > On Mon, Jul 27, 2020 at 10:33:46AM -0700, Eliot Miranda wrote: > > > > Hi David, > > > > what directory are you generating ckformat.c to? I'll try and match it > > in VMMaker.oscog. > > > > In the old VMMaker, the ckformat.c file gets generated to the ./src directory, > and the compiled ckformat is included in lib/squeak// along with > the VM executable and plugins. > > The ckformat.c source gets checked in with other generated sources here: > http://squeakvm.org/cgi-bin/viewvc.cgi/squeak/trunk/src/ckformat.c?revision=3782&view=markup > > The /usr/local/squeak script (Ian's) uses the ckformat that it finds in > the lib folder, and the "vmrun" script that I wrote later on for my own > use takes advantage of it indirectly by using whatever ckformat that it > finds in a folder identified by "squeak -version". > > Dave > From commits at source.squeak.org Mon Jul 27 21:42:37 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Mon, 27 Jul 2020 21:42:37 0000 Subject: [Vm-dev] VM Maker: VMMaker.oscog-eem.2783.mcz Message-ID: Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2783.mcz ==================== Summary ==================== Name: VMMaker.oscog-eem.2783 Author: eem Time: 27 July 2020, 2:42:27.399676 pm UUID: dcea91a9-4a6e-4ec1-aefc-a4ee18389e99 Ancestors: VMMaker.oscog-eem.2782 CoInterpreter: Fix a bug in not setting desiredCogCodeSize to the size supplied in the header, hence fixing vm parameter 47's value. =============== Diff against VMMaker.oscog-eem.2782 =============== Item was changed: ----- Method: CoInterpreter>>readImageFromFile:HeapSize:StartingAt: (in category 'image save/restore') ----- readImageFromFile: f HeapSize: desiredHeapSize StartingAt: imageOffset "Read an image from the given file stream, allocating an amount of memory to its object heap. V3: desiredHeapSize is the total size of the heap. Fail if the image has an unknown format or requires more than the specified amount of memory. Spur: desiredHeapSize is ignored; this routine will attempt to provide at least extraVMMemory's ammount of free space after the image is loaded, taking any free space in the image into account. extraVMMemory is stored in the image header and is accessible as vmParameterAt: 23. If extraVMMemory is 0, the value defaults to the default grow headroom. Fail if the image has an unknown format or if sufficient memory cannot be allocated. Details: This method detects when the image was stored on a machine with the opposite byte ordering from this machine and swaps the bytes automatically. Furthermore, it allows the header information to start 512 bytes into the file, since some file transfer programs for the Macintosh apparently prepend a Mac-specific header of this size. Note that this same 512 bytes of prefix area could also be used to store an exec command on Unix systems, allowing one to launch Smalltalk by invoking the image name as a command." | swapBytes headerStart headerSize dataSize oldBaseAddr minimumMemory heapSize bytesRead bytesToShift firstSegSize hdrNumStackPages hdrEdenBytes hdrCogCodeSize headerFlags hdrMaxExtSemTabSize allocationReserve | metaclassNumSlots := 6. "guess Metaclass instSize" classNameIndex := 6. "guess (Class instVarIndexFor: 'name' ifAbsent: []) - 1" swapBytes := self checkImageVersionFrom: f startingAt: imageOffset. headerStart := (self sqImageFilePosition: f) - 4. "record header start position" headerSize := self getWord32FromFile: f swap: swapBytes. dataSize := self getLongFromFile: f swap: swapBytes. oldBaseAddr := self getLongFromFile: f swap: swapBytes. objectMemory specialObjectsOop: (self getLongFromFile: f swap: swapBytes). objectMemory lastHash: (self getLongFromFile: f swap: swapBytes). "N.B. not used." savedWindowSize := self getLongFromFile: f swap: swapBytes. headerFlags := self getLongFromFile: f swap: swapBytes. self setImageHeaderFlagsFrom: headerFlags. extraVMMemory := self getWord32FromFile: f swap: swapBytes. "N.B. ignored in V3." hdrNumStackPages := self getShortFromFile: f swap: swapBytes. "4 stack pages is small. Should be able to run with as few as three. 4 should be comfortable but slow. 8 is a reasonable default. Can be changed via vmParameterAt: 43 put: n. Can be set as a preference (Info.plist, VM.ini, command line etc). If desiredNumStackPages is already non-zero then it has been set as a preference. Ignore (but preserve) the header's default." numStackPages := desiredNumStackPages ~= 0 ifTrue: [desiredNumStackPages] ifFalse: [hdrNumStackPages = 0 ifTrue: [self defaultNumStackPages] ifFalse: [hdrNumStackPages]]. desiredNumStackPages := hdrNumStackPages. "This slot holds the size of the native method zone in 1k units. (pad to word boundary)." hdrCogCodeSize := (self getShortFromFile: f swap: swapBytes) * 1024. cogCodeSize := desiredCogCodeSize ~= 0 ifTrue: [desiredCogCodeSize] ifFalse: [hdrCogCodeSize = 0 ifTrue: [cogit defaultCogCodeSize] + ifFalse: [desiredCogCodeSize := hdrCogCodeSize]]. "set for vmParameter 47" - ifFalse: [hdrCogCodeSize]]. cogCodeSize > cogit maxCogCodeSize ifTrue: [cogCodeSize := cogit maxCogCodeSize]. hdrEdenBytes := self getWord32FromFile: f swap: swapBytes. objectMemory edenBytes: (desiredEdenBytes ~= 0 ifTrue: [desiredEdenBytes] ifFalse: [hdrEdenBytes = 0 ifTrue: [objectMemory defaultEdenBytes] ifFalse: [hdrEdenBytes]]). desiredEdenBytes := hdrEdenBytes. hdrMaxExtSemTabSize := self getShortFromFile: f swap: swapBytes. hdrMaxExtSemTabSize ~= 0 ifTrue: [self setMaxExtSemSizeTo: hdrMaxExtSemTabSize]. "pad to word boundary. This slot can be used for anything else that will fit in 16 bits. Preserve it to be polite to other VMs." the2ndUnknownShort := self getShortFromFile: f swap: swapBytes. firstSegSize := self getLongFromFile: f swap: swapBytes. objectMemory firstSegmentSize: firstSegSize. "compare memory requirements with availability" allocationReserve := self interpreterAllocationReserveBytes. minimumMemory := cogCodeSize "no need to include the stackZone; this is alloca'ed" + dataSize + objectMemory newSpaceBytes + allocationReserve. objectMemory hasSpurMemoryManagerAPI ifTrue: [| freeOldSpaceInImage headroom | freeOldSpaceInImage := self getLongFromFile: f swap: swapBytes. headroom := objectMemory initialHeadroom: extraVMMemory givenFreeOldSpaceInImage: freeOldSpaceInImage. heapSize := objectMemory roundUpHeapSize: cogCodeSize "no need to include the stackZone; this is alloca'ed" + dataSize + headroom + objectMemory newSpaceBytes + (headroom > allocationReserve ifTrue: [0] ifFalse: [allocationReserve])] ifFalse: [heapSize := cogCodeSize "no need to include the stackZone; this is alloca'ed" + desiredHeapSize + objectMemory newSpaceBytes + (desiredHeapSize - dataSize > allocationReserve ifTrue: [0] ifFalse: [allocationReserve]). heapSize < minimumMemory ifTrue: [self insufficientMemorySpecifiedError]]. "allocate a contiguous block of memory for the Squeak heap and ancilliary data structures" objectMemory memory: (self allocateMemory: heapSize minimum: minimumMemory imageFile: f headerSize: headerSize) asUnsignedInteger. objectMemory memory ifNil: [self insufficientMemoryAvailableError]. heapBase := objectMemory setHeapBase: objectMemory memory + cogCodeSize memoryLimit: objectMemory memory + heapSize endOfMemory: objectMemory memory + cogCodeSize + dataSize. "position file after the header" self sqImageFile: f Seek: headerStart + headerSize. "read in the image in bulk, then swap the bytes if necessary" bytesRead := objectMemory readHeapFromImageFile: f dataBytes: dataSize. bytesRead ~= dataSize ifTrue: [self unableToReadImageError]. self ensureImageFormatIsUpToDate: swapBytes. "compute difference between old and new memory base addresses" bytesToShift := objectMemory memoryBaseForImageRead - oldBaseAddr. self initializeInterpreter: bytesToShift. "adjusts all oops to new location" self initializeCodeGenerator. ^dataSize! From commits at source.squeak.org Tue Jul 28 21:00:44 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Tue, 28 Jul 2020 21:00:44 0000 Subject: [Vm-dev] VM Maker: ImageFormat-eem.44.mcz Message-ID: Eliot Miranda uploaded a new version of ImageFormat to project VM Maker: http://source.squeak.org/VMMaker/ImageFormat-eem.44.mcz ==================== Summary ==================== Name: ImageFormat-eem.44 Author: eem Time: 28 July 2020, 2:00:42.760999 pm UUID: 700ba6ea-81f3-4754-975b-dc2ca3283048 Ancestors: ImageFormat-dtl.43 Conditionalize version stamping of ckformat.c so that in VMMaker.oscog it uses a Monticello stamp, not a generation-time stamp. =============== Diff against ImageFormat-dtl.43 =============== Item was changed: ----- Method: ImageFormat class>>generateCkFormatProgram:on: (in category 'ckformat') ----- generateCkFormatProgram: programName on: stream "Generate source code for an image format version reader. The program is intended for testing image file format from a unix shell script such that the shell script can decide what VM to run based on image requirements." + | fileID formatNumber | + fileID := (CCodeGenerator respondsTo: #monticelloDescriptionFor:) + ifTrue: [CCodeGenerator monticelloDescriptionFor: self] "VMMaker.oscog style..." + ifFalse: [self name, ' ', DateAndTime now asString]. "VMMaker style..." - | formatNumber | stream nextPutAll: '/* ', programName, ': Print the image format number on standard output */'; cr; nextPutAll: '/* for use in a shell script to test image format requirements. */'; cr; nextPutAll: '/* A non-zero return status code indicates failure. */'; cr; cr; nextPutAll: '/* Usage: ', programName, ' imageFileName */'; cr; cr; nextPutAll: '/* --- DO NOT EDIT THIS FILE --- */'; cr; + nextPutAll: '/* --- Automatically generated from class ', fileID, '--- */'; cr; - nextPutAll: '/* --- Automatically generated from class ', self name, ' ', DateAndTime now asString, '--- */'; cr; nextPutAll: '/* --- Source code is in package ImageFormat in the VMMaker repository --- */'; cr; nextPutAll: '/* --- DO NOT EDIT THIS FILE --- */'; cr; cr; nextPutAll: '#include '; cr; nextPutAll: '#include '; cr; nextPutAll: '#include '; cr; cr; nextPutAll: 'int main(int argc, char **argv) {'; cr; tab; nextPutAll: 'FILE *f;'; cr; tab; nextPutAll: 'unsigned char buf[8];'; cr; tab; nextPutAll: 'int formatNumber;'; cr; tab; nextPutAll: 'unsigned char c;'; cr; tab; nextPutAll: 'int match;'; cr; tab; nextPutAll: 'if (argc !!= 2) {'; cr; tab; tab; nextPutAll: 'printf("usage: ', programName, ' imageFileName\n");'; cr; tab; tab; nextPutAll: 'printf("answer the image format number for an image file or 0 if not known\n");'; cr; tab; tab; nextPutAll: 'printf("known image formats:\n");'; cr. KnownVersionNumbers do: [ :e | | s | s := String streamContents: [ :strm | strm nextPutAll: e asString, ': '. (self fromInteger: e) printDescriptionOn: strm withVersionNumber: false ]. stream tab; tab; nextPutAll: 'printf("', s, '\n");'; cr ]. stream tab; tab; nextPutAll: 'exit(1);'; cr; tab; nextPutAll: '}'; cr; tab; nextPutAll: 'f = fopen(argv[1], "r");'; cr; tab; nextPutAll: 'if (f == NULL) {'; cr; tab; tab; nextPutAll: 'perror(argv[1]);'; cr; tab; tab; nextPutAll: 'exit(2);'; cr; tab; nextPutAll: '}'; cr. { 0. 512 } do: [:offset | stream tab; nextPutAll: 'if(fseek(f, '; nextPutAll: offset asString; nextPutAll: 'L, SEEK_SET) !!= 0) {';cr; tab; tab; nextPutAll: 'fprintf(stderr, "cannot go to pos %d in %s\n", '; nextPutAll: offset asString; nextPutAll: ', argv[1]);'; cr; tab; tab; nextPutAll: 'exit(3);'; cr; tab; nextPutAll: '}'; cr; tab; nextPutAll: 'if (fread(buf, 1, 8, f) < 8) {'; cr; tab; tab; nextPutAll: 'fprintf(stderr, "cannot read %s\n", argv[1]);'; cr; tab; tab; nextPutAll: 'exit(3);'; cr; tab; nextPutAll: '}'; cr. self versionNumberByteArrays withIndexDo: [ :v :tag | | b | formatNumber := (self fromBytes: v) asInteger. b := 'b_', formatNumber asString, '_', tag asString. stream tab; nextPutAll: '{'; cr; tab; nextPutAll: 'unsigned char ', b, '[', v size asString, ']= { '. v inject: true into: [:first : elem | first ifFalse: [stream nextPutAll: ', ']. stream nextPutAll: elem asString. false]. stream nextPutAll: '};'; cr; tab; nextPutAll: 'if (memcmp(buf, ', b, ', ', v size asString, ') == 0) {'; cr; tab; tab; nextPutAll: 'printf("%d\n", ', formatNumber, ');'; cr; tab; tab; nextPutAll: 'exit(0);'; cr; tab; nextPutAll: '}'; cr; tab; nextPutAll: '}'; cr]]. stream tab; nextPutAll: 'printf("0\n"); /* print an invalid format number */';cr; tab; nextPutAll: 'exit (-1); /* not found, exit with error code */'; cr; nextPutAll: '}'; cr ! From commits at source.squeak.org Tue Jul 28 21:25:23 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Tue, 28 Jul 2020 21:25:23 0000 Subject: [Vm-dev] VM Maker: ImageFormat-eem.45.mcz Message-ID: Eliot Miranda uploaded a new version of ImageFormat to project VM Maker: http://source.squeak.org/VMMaker/ImageFormat-eem.45.mcz ==================== Summary ==================== Name: ImageFormat-eem.45 Author: eem Time: 28 July 2020, 2:25:22.501872 pm UUID: 5c29675a-5d64-40de-b535-ae98b04d2f37 Ancestors: ImageFormat-eem.44 And VMMaker.oscog badly needs a class timeStamp. This is harmless to VMMaker. =============== Diff against ImageFormat-eem.44 =============== Item was changed: Object subclass: #ImageFormat instanceVariableNames: 'wordSize requiresClosureSupport requiresNativeFloatWordOrder requiresSpurSupport requiresNewSpur64TagAssignment requiresMultipleBytecodeSupport' classVariableNames: 'BaseVersionMask BaseVersionNumbers CapabilitiesBitsMask KnownVersionNumbers MultipleBytecodeBit PlatformByteOrderBit ReservedBitsMask SpurObjectBit' poolDictionaries: '' category: 'ImageFormat-Header'! + ImageFormat class + instanceVariableNames: 'timeStamp'! !ImageFormat commentStamp: 'dtl 11/7/2010 22:13' prior: 0! ImageFormat represents the requirements of the image in terms of capabilities that must be supported by the virtual machine. The image format version is saved as an integer value in the header of an image file. When an image is loaded, the virtual machine checks the image format version to determine whether it is capable of supporting the requirements of that image. The image format version value is treated as a bit map of size 32, derived from the 32-bit integer value saved in the image header. Bits in the bit map represent image format requirements. For example, if the image sets bit 15 to indicate that it requires some capability from the VM, then the VM can check bit 15 and decide whether it is able to satisfy that requirement. The base image format numbers (6502, 6504, 68000, and 68002) utiliize 10 of the 32 available bits. The high order bit is reserved as an extension bit for future use. The remaining 21 bits are used to represent additional image format requirements. For example, the low order bit is used to indication that the image uses (and requires support for) the platform byte ordering implemented in the StackInterpreter (Cog) VM. "(ImageFormat fromFile: Smalltalk imageName) description" ! + ImageFormat class + instanceVariableNames: 'timeStamp'! Item was added: + ----- Method: ImageFormat class>>noteCompilationOf:meta: (in category 'translation') ----- + noteCompilationOf: aSelector meta: isMeta + "note the recompiliation by resetting the timeStamp " + timeStamp := Time totalSeconds. + ^super noteCompilationOf: aSelector meta: isMeta! Item was added: + ----- Method: ImageFormat class>>timeStamp (in category 'translation') ----- + timeStamp + ^timeStamp ifNil:[0]! Item was added: + ----- Method: ImageFormat class>>touch (in category 'translation') ----- + touch + "Reset the timeStamp" + "Smalltalk allClasses select: + [:c| (c category includesSubString: 'VMMaker-JIT') ifTrue: [c touch]]" + "InterpreterPlugin withAllSubclassesDo:[:pl| pl touch]" + timeStamp := Time totalSeconds! From commits at source.squeak.org Tue Jul 28 21:38:20 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Tue, 28 Jul 2020 21:38:20 0000 Subject: [Vm-dev] VM Maker: VMMaker.oscog-eem.2784.mcz Message-ID: Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2784.mcz ==================== Summary ==================== Name: VMMaker.oscog-eem.2784 Author: eem Time: 28 July 2020, 2:38:11.381837 pm UUID: 5c810cae-a07a-469a-b68a-9a901ca3545c Ancestors: VMMaker.oscog-eem.2783 StackInterpreter: introspection for the Qwaq Croquet high-priority ticker/tickee mechanism. VMMaker: Generate ckformat.c to the src directory if ImageFormat is in the image. =============== Diff against VMMaker.oscog-eem.2783 =============== Item was added: + ----- Method: StackInterpreterPrimitives>>getVMTickeeCallCount (in category 'system control primitives') ----- + getVMTickeeCallCount + ^self cppIf: #VM_TICKER + ifTrue: [self positiveMachineIntegerFor: self ioVMTickeeCallCount] + ifFalse: [ConstZero]! Item was added: + ----- Method: StackInterpreterPrimitives>>getVMTickerCount (in category 'system control primitives') ----- + getVMTickerCount + ^self cppIf: #VM_TICKER + ifTrue: [self positiveMachineIntegerFor: self ioVMTickerCount] + ifFalse: [ConstZero]! Item was added: + ----- Method: StackInterpreterPrimitives>>getVMTickerStartUSecs (in category 'system control primitives') ----- + getVMTickerStartUSecs + ^self cppIf: #VM_TICKER + ifTrue: [self positive64BitIntegerFor: self ioVMTickerStartUSecs] + ifFalse: [ConstZero]! Item was changed: ----- Method: StackInterpreterPrimitives>>primitiveAllVMParameters: (in category 'system control primitives') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StackInterpreterPrimitives>>primitiveGetVMParameter: (in category 'system control primitives') ----- primitiveGetVMParameter: arg "See primitiveVMParameter method comment. N.B. written as a returning case to avoid branch limits in the V3 bytecode set." arg caseOf: { [1] -> [^self positiveMachineIntegerFor: objectMemory oldSpaceSize]. [2] -> [^objectMemory integerObjectOf: objectMemory newSpaceSize]. [3] -> [^self positiveMachineIntegerFor: objectMemory totalMemorySize]. [6] -> [^objectMemory integerObjectOf: objectMemory tenuringThreshold]. [7] -> [^objectMemory integerObjectOf: objectMemory statFullGCs]. [8] -> [^objectMemory integerObjectOf: objectMemory statFullGCUsecs + 500 // 1000]. [9] -> [^objectMemory integerObjectOf: (objectMemory hasSpurMemoryManagerAPI ifTrue: [objectMemory statScavenges] ifFalse: [objectMemory statIncrGCs])]. [10] -> [^objectMemory integerObjectOf: (objectMemory hasSpurMemoryManagerAPI ifTrue: [objectMemory statScavengeGCUsecs] ifFalse: [objectMemory statIncrGCUsecs]) + 500 // 1000]. [11] -> [^objectMemory integerObjectOf: objectMemory statTenures]. [12] -> [^ConstZero]. "Was JITTER VM info" + [13] -> [^self getVMTickerStartUSecs]. + [14] -> [^self getVMTickerCount]. + [15] -> [^self getVMTickeeCallCount]. - [13] -> [^ConstZero]. "Was JITTER VM info" - [14] -> [^ConstZero]. "Was JITTER VM info" - [15] -> [^ConstZero]. "Was JITTER VM info" [16] -> [^self positive64BitIntegerFor: statIdleUsecs]. [17] -> [^(SistaVM and: [self isCog]) ifTrue: [objectMemory floatObjectOf: self getCogCodeZoneThreshold] ifFalse: [ConstZero]]. [18] -> [^objectMemory hasSpurMemoryManagerAPI ifTrue: [objectMemory integerObjectOf: objectMemory statCompactionUsecs + 500 // 1000] ifFalse: [ConstZero]]. [19] -> [^objectMemory hasSpurMemoryManagerAPI ifTrue: [objectMemory integerObjectOf: objectMemory scavengeThresholdAsExtent] ifFalse: [ConstZero]]. [20] -> [^objectMemory positive64BitIntegerFor: self ioUTCStartMicroseconds]. [21] -> [^objectMemory integerObjectOf: objectMemory rootTableCount]. [22] -> [^objectMemory integerObjectOf: objectMemory statRootTableOverflows]. [23] -> [^objectMemory integerObjectOf: extraVMMemory]. [24] -> [^objectMemory integerObjectOf: objectMemory shrinkThreshold]. [25] -> [^objectMemory integerObjectOf: objectMemory growHeadroom]. [26] -> [^objectMemory integerObjectOf: self ioHeartbeatMilliseconds]. [27] -> [^objectMemory integerObjectOf: objectMemory statMarkCount]. [28] -> [^objectMemory integerObjectOf: objectMemory statSweepCount]. [29] -> [^objectMemory integerObjectOf: objectMemory statMkFwdCount]. [30] -> [^objectMemory integerObjectOf: objectMemory statCompMoveCount]. [31] -> [^objectMemory integerObjectOf: objectMemory statGrowMemory]. [32] -> [^objectMemory integerObjectOf: objectMemory statShrinkMemory]. [33] -> [^objectMemory integerObjectOf: objectMemory statRootTableCount]. [34] -> [^objectMemory hasSpurMemoryManagerAPI ifTrue:"was statAllocationCount" [objectMemory positive64BitIntegerFor: objectMemory currentAllocatedBytes]]. [35] -> [^objectMemory integerObjectOf: objectMemory statSurvivorCount]. [36] -> [^objectMemory integerObjectOf: (self microsecondsToMilliseconds: objectMemory statGCEndUsecs)]. [37] -> [^objectMemory integerObjectOf: objectMemory statSpecialMarkCount]. [38] -> [^objectMemory integerObjectOf: objectMemory statIGCDeltaUsecs + 500 // 1000]. [39] -> [^objectMemory integerObjectOf: statPendingFinalizationSignals]. [40] -> [^objectMemory integerObjectOf: objectMemory wordSize]. [41] -> [^objectMemory integerObjectOf: self imageFormatVersion]. [42] -> [^objectMemory integerObjectOf: numStackPages]. [43] -> [^objectMemory integerObjectOf: desiredNumStackPages]. [44] -> [^objectMemory integerObjectOf: objectMemory edenBytes]. [45] -> [^objectMemory integerObjectOf: desiredEdenBytes]. [46] -> [^self getCogCodeSize]. [47] -> [^self getDesiredCogCodeSize]. [48] -> [^self getCogVMFlags]. [49] -> [^objectMemory integerObjectOf: self ioGetMaxExtSemTableSize]. [52] -> [^objectMemory integerObjectOf: objectMemory rootTableCapacity]. [53] -> [^objectMemory hasSpurMemoryManagerAPI ifTrue: [objectMemory integerObjectOf: objectMemory numSegments]]. [54] -> [^objectMemory hasSpurMemoryManagerAPI ifTrue: [objectMemory integerObjectOf: objectMemory freeSize]]. [55] -> [^objectMemory hasSpurMemoryManagerAPI ifTrue: [objectMemory floatObjectOf: objectMemory getHeapGrowthToSizeGCRatio]]. [56] -> [^self positive64BitIntegerFor: statProcessSwitch]. [57] -> [^self positive64BitIntegerFor: statIOProcessEvents]. [58] -> [^self positive64BitIntegerFor: statForceInterruptCheck]. [59] -> [^self positive64BitIntegerFor: statCheckForEvents]. [60] -> [^self positive64BitIntegerFor: statStackOverflow]. [61] -> [^self positive64BitIntegerFor: statStackPageDivorce]. [62] -> [^self getCodeCompactionCount]. [63] -> [^self getCodeCompactionMSecs]. [64] -> [^self getCogMethodCount]. [65] -> [^self getCogVMFeatureFlags]. [66] -> [^objectMemory integerObjectOf: self stackPageByteSize]. [67] -> [^objectMemory hasSpurMemoryManagerAPI ifTrue: [self positiveMachineIntegerFor: objectMemory maxOldSpaceSize]]. [68] -> [^objectMemory floatObjectOf: stackPages statAverageLivePagesWhenMapping]. [69] -> [^objectMemory integerObjectOf: stackPages statMaxPageCountWhenMapping]. [70] -> [^objectMemory integerObjectOf: self vmProxyMajorVersion]. [71] -> [^objectMemory integerObjectOf: self vmProxyMinorVersion]. [72] -> [^objectMemory integerObjectOf: objectMemory statMarkUsecs + 500 // 1000]. [73] -> [^objectMemory integerObjectOf: objectMemory statSweepUsecs + 500 // 1000]. [74] -> [^objectMemory hasSpurMemoryManagerAPI ifTrue: [objectMemory integerObjectOf: objectMemory statMaxAllocSegmentTime + 500 // 1000]]. [75] -> [^objectMemory booleanObjectOf: self primitiveDoMixedArithmetic] } otherwise: [^nil]! Item was changed: ----- Method: StackInterpreterPrimitives>>primitiveVMParameter (in category 'system control primitives') ----- primitiveVMParameter "Behaviour depends on argument count: 0 args: return an Array of VM parameter values; 1 arg: return the indicated VM parameter; 2 args: set the VM indicated parameter. VM parameters are numbered as follows: 1 end (v3)/size(Spur) of old-space (0-based, read-only) 2 end (v3)/size(Spur) of young/new-space (read-only) 3 end (v3)/size(Spur) of heap (read-only) 4 nil (was allocationCount (read-only)) 5 nil (was allocations between GCs (read-write) 6 survivor count tenuring threshold (read-write) 7 full GCs since startup (read-only) 8 total milliseconds in full GCs since startup (read-only) 9 incremental GCs (SqueakV3) or scavenges (Spur) since startup (read-only) 10 total milliseconds in incremental GCs (SqueakV3) or scavenges (Spur) since startup (read-only) 11 tenures of surving objects since startup or reset (read-write) + 12-20 were specific to ikp's JITTER VM, now 12 16 open for use + 13 if started, the start time in utc microseconds of the high-priority ticker + 14 if started, the number of checkHighPriorityTickees calls + 15 if started, the number of tickee calls from checkHighPriorityTickees - 12-20 were specific to ikp's JITTER VM, now 12-15 are open for use 16 total microseconds at idle since start-up (if non-zero) 17 fraction of the code zone to use (Sista only; used to control code zone use to preserve sendAndBranchData on counter tripped callback) 18 total milliseconds in compaction phase of full GC since start-up (Spur only) 19 scavenge threshold, the effective size of eden. When eden fills to the threshold a scavenge is scheduled. Newer Spur VMs only. 20 utc microseconds at VM start-up (actually at time initialization, which precedes image load). 21 root/remembered table size (occupancy) (read-only) 22 root table overflows since startup (read-only) 23 bytes of extra memory to reserve for VM buffers, plugins, etc (stored in image file header). 24 memory threshold above which shrinking object memory (rw) 25 memory headroom when growing object memory (rw) 26 interruptChecksEveryNms - force an ioProcessEvents every N milliseconds (rw) 27 number of times mark loop iterated for current IGC/FGC (read-only) includes ALL marking 28 number of times sweep loop iterated for current IGC/FGC (read-only) 29 number of times make forward loop iterated for current IGC/FGC (read-only) 30 number of times compact move loop iterated for current IGC/FGC (read-only) 31 number of grow memory requests (read-only) 32 number of shrink memory requests (read-only) 33 number of root table entries used for current IGC/FGC (read-only) 34 Spur: bytes allocated in total since start-up or reset (read-write) (Used to be number of allocations done before current IGC/FGC (read-only)) 35 number of survivor objects after current IGC/FGC (read-only) 36 millisecond clock when current IGC/FGC completed (read-only) 37 number of marked objects for Roots of the world, not including Root Table entries for current IGC/FGC (read-only) 38 milliseconds taken by current IGC (read-only) 39 Number of finalization signals for Weak Objects pending when current IGC/FGC completed (read-only) 40 BytesPerOop for this image 41 imageFormatVersion for the VM 42 number of stack pages in use 43 desired number of stack pages (stored in image file header, max 65535) 44 size of eden, in bytes 45 desired size of eden, in bytes (stored in image file header) 46 machine code zone size, in bytes (Cog only; otherwise nil) 47 desired machine code zone size (stored in image file header; Cog only; otherwise nil) 48 various header flags. See getCogVMFlags. 49 max size the image promises to grow the external semaphore table to (0 sets to default, which is 256 as of writing) 50-51 nil; reserved for VM parameters that persist in the image (such as eden above) 52 root/remembered table capacity 53 number of segments (Spur only; otherwise nil) 54 total size of free old space (Spur only, otherwise nil) 55 ratio of growth and image size at or above which a GC will be performed post scavenge 56 number of process switches since startup (read-only) 57 number of ioProcessEvents calls since startup (read-only) 58 number of ForceInterruptCheck calls since startup (read-only) 59 number of check event calls since startup (read-only) 60 number of stack page overflows since startup (read-only) 61 number of stack page divorces since startup (read-only) 62 compiled code compactions since startup (read-only; Cog only; otherwise nil) 63 total milliseconds in compiled code compactions since startup (read-only; Cog only; otherwise nil) 64 the number of methods that currently have jitted machine-code 65 whether the VM supports a certain feature, MULTIPLE_BYTECODE_SETS is bit 0, IMMUTABILITY is bit 1 66 the byte size of a stack page 67 the max allowed size of old space (Spur only; nil otherwise; 0 implies no limit except that of the underlying platform) 68 the average number of live stack pages when scanned by GC (at scavenge/gc/become et al) (read-write) 69 the maximum number of live stack pages when scanned by GC (at scavenge/gc/become et al) (read-write) 70 the vmProxyMajorVersion (the interpreterProxy VM_MAJOR_VERSION) 71 the vmProxyMinorVersion (the interpreterProxy VM_MINOR_VERSION) 72 total milliseconds in full GCs Mark phase since startup (read-only) 73 total milliseconds in full GCs Sweep phase since startup (read-only, can be 0 depending on compactors) 74 maximum pause time due to segment allocation 75 whether the arithmetic primitives perform conversion in case of mixed SmallInteger/Float (true) or fail (false) Note: Thanks to Ian Piumarta for this primitive." | paramsArraySize index | paramsArraySize := 75. argumentCount = 0 ifTrue: [^self primitiveAllVMParameters: paramsArraySize]. argumentCount > 2 ifTrue: [^self primitiveFailFor: PrimErrBadNumArgs]. "index read & checks" index := self stackValue: (argumentCount = 1 ifTrue: [0] ifFalse: [1]). (objectMemory isIntegerObject: index) ifFalse: [^self primitiveFailFor: PrimErrBadArgument]. index := objectMemory integerValueOf: index. (index < 1 or: [index > paramsArraySize]) ifTrue: [^self primitiveFailFor: PrimErrBadIndex]. argumentCount = 1 ifTrue: "read VM parameter; written this way to avoid branch limits in V3 bytecode set" [| result | result := self primitiveGetVMParameter: index. ^self methodReturnValue: (result ifNil: [objectMemory nilObject])]. "write a VM parameter" self primitiveSetVMParameter: index arg: self stackTop! Item was changed: ----- Method: VMBasicConstants class>>namesDefinedAtCompileTime (in category 'C translation') ----- namesDefinedAtCompileTime "Answer the set of names for variables that should be defined at compile time. Some of these get default values during simulation, and hence get defaulted in the various initializeMiscConstants methods. But that they have values should /not/ cause the code generator to do dead code elimination based on their default values. In particular, methods marked with will be emitted within #if defined(ANameDefinedAtCompileTime)...#endif. And of course this is backwards. We'd like to define names that are defined at translation time." ^#(VMBIGENDIAN IMMUTABILITY STACKVM COGVM COGMTVM SPURVM PharoVM "Pharo vs Squeak" + TerfVM VM_TICKER "Terf vs Squeak & Qwaq/Teleplace/Terf high-priority thread support" - TerfVM "Terf vs Squeak" EnforceAccessControl "Newspeak" CheckRememberedInTrampoline "IMMUTABILITY" + BIT_IDENTICAL_FLOATING_POINT PLATFORM_SPECIFIC_FLOATING_POINT "Alternatives for using fdlibm for floating-point" - BIT_IDENTICAL_FLOATING_POINT LLDB "As of lldb-370.0.42 Swift-3.1, passing function parameters to printOopsSuchThat fails with Internal error [IRForTarget]: Couldn't rewrite one of the arguments of a function call. Turning off link time optimization with -fno-lto has no effect. hence we define some debugging functions as being " "processor related" __ARM_ARCH__ __arm__ __arm32__ ARM32 __arm64__ ARM64 _M_I386 _X86_ i386 i486 i586 i686 __i386__ __386__ X86 I386 x86_64 __amd64 __x86_64 __amd64__ __x86_64__ _M_AMD64 _M_X64 __mips__ __mips __powerpc __powerpc__ __powerpc64__ __POWERPC__ __ppc__ __ppc64__ __PPC__ __PPC64__ __sparc__ __sparc __sparc_v8__ __sparc_v9__ __sparcv8 __sparcv9 "Compiler brand related" __ACK__ __CC_ARM __clang__ __GNUC__ _MSC_VER __ICC __SUNPRO_C "os related" ACORN _AIX __ANDROID__ __BEOS__ __linux__ __MINGW32__ __FreeBSD__ __NetBSD__ __OpenBSD__ __osf__ EPLAN9 __unix__ __unix UNIX WIN32 _WIN32 _WIN32_WCE WIN64 _WIN64 _WIN64_WCE)! Item was changed: ----- Method: VMMaker class>>generateAllConfigurationsUnderVersionControl (in category 'configurations') ----- generateAllConfigurationsUnderVersionControl self executeDisplayingProgress: (OrderedDictionary with: 'Generate all newspeak configurations under VCS' -> [ self generateAllNewspeakConfigurationsUnderVersionControl ] with: 'Generate all squeak configurations under VCS' -> [ self generateAllSqueakConfigurationsUnderVersionControl ] with: 'Generate all spur lowcode configurations' -> [ self generateAllSpurLowcodeConfigurations ] with: 'Generate VM plugins' -> [ self generateVMPlugins ] + with: 'Generate utilities' -> [ self generateSpur32LeakChecker; generateSpur64LeakChecker; generateUtilityPrograms ])! - with: 'Generate spur leak checkers' -> [ self generateSpur32LeakChecker; generateSpur64LeakChecker ])! Item was added: + ----- Method: VMMaker class>>generateUtilityPrograms (in category 'configurations') ----- + generateUtilityPrograms + ^(self + makerFor: nil + and: nil + with: #() + to: self sourceTree, '/src' + platformDir: self sourceTree, '/platforms') + generateUtilityPrograms! Item was added: + ----- Method: VMMaker>>generateUtilityPrograms (in category 'generate sources') ----- + generateUtilityPrograms + "Any additional sources not directly part of the VM may be generated here" + + Smalltalk + at: #ImageFormat + ifPresent: + [:cls | "generate ckformat utility program" + (self needsToRegenerateCheckFormatFile: cls named: 'ckformat.c') ifTrue: + [cls storeCkFormatOnFile: (self sourceDirectory fullNameFor: 'ckformat.c')]]! Item was added: + ----- Method: VMMaker>>needsToRegenerateCheckFormatFile:named: (in category 'generate sources') ----- + needsToRegenerateCheckFormatFile: cls named: fileName + "Check the timestamp for ImageFormat and then the timestamp for ckformat.c if it already exists. Answer if the file needs regenerating." + + | tStamp | + tStamp := cls timeStamp. + + "don't translate if the file is newer than my timeStamp" + (self sourceDirectory entryAt: fileName ifAbsent: [nil]) ifNotNil: + [:fstat| | mTime | + mTime := fstat modificationTime. + mTime isInteger ifFalse: [mTime := mTime asSeconds]. + tStamp < mTime ifTrue: + [^self confirm: (cls name, ' has not been modified since\', fileName, ' was last generated.\Do you still want to regenerate it?') withCRs]]. + ^true! From lewis at mail.msen.com Tue Jul 28 22:36:19 2020 From: lewis at mail.msen.com (David T. Lewis) Date: Tue, 28 Jul 2020 18:36:19 -0400 Subject: [Vm-dev] VM Maker: VMMaker.oscog-eem.2784.mcz In-Reply-To: References: Message-ID: <20200728223619.GA33077@shell.msen.com> On Tue, Jul 28, 2020 at 09:38:20PM +0000, commits at source.squeak.org wrote: > > VMMaker: Generate ckformat.c to the src directory if ImageFormat is in the image. > Thanks :-) Dave From noreply at github.com Tue Jul 28 22:37:14 2020 From: noreply at github.com (Eliot Miranda) Date: Tue, 28 Jul 2020 15:37:14 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 097109: CogVM source as per VMMaker.oscog-eem.2784 Message-ID: Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: 097109aa0bf5bf7d19fd4d104e62f9ad7feff769 https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/097109aa0bf5bf7d19fd4d104e62f9ad7feff769 Author: Eliot Miranda Date: 2020-07-28 (Tue, 28 Jul 2020) Changed paths: M .gitignore M nsspur64src/vm/cogit.h M nsspur64src/vm/cogitARMv8.c M nsspur64src/vm/cointerp.c M nsspur64src/vm/cointerp.h M nsspur64src/vm/gcc3x-cointerp.c M nsspursrc/vm/cogit.h M nsspursrc/vm/cointerp.c M nsspursrc/vm/cointerp.h M nsspursrc/vm/gcc3x-cointerp.c M nsspurstack64src/vm/gcc3x-interp.c M nsspurstack64src/vm/interp.c M nsspurstacksrc/vm/gcc3x-interp.c M nsspurstacksrc/vm/interp.c M platforms/Cross/vm/sq.h M platforms/Cross/vm/sqTicker.c M spur64src/vm/cogit.h M spur64src/vm/cogitARMv8.c M spur64src/vm/cointerp.c M spur64src/vm/cointerp.h M spur64src/vm/cointerpmt.c M spur64src/vm/cointerpmt.h M spur64src/vm/gcc3x-cointerp.c M spur64src/vm/gcc3x-cointerpmt.c M spurlowcode64src/vm/cogit.h M spurlowcode64src/vm/cogitARMv8.c M spurlowcode64src/vm/cointerp.c M spurlowcode64src/vm/cointerp.h M spurlowcode64src/vm/gcc3x-cointerp.c M spurlowcodesrc/vm/cogit.h M spurlowcodesrc/vm/cointerp.c M spurlowcodesrc/vm/cointerp.h M spurlowcodesrc/vm/gcc3x-cointerp.c M spurlowcodestack64src/vm/gcc3x-interp.c M spurlowcodestack64src/vm/interp.c M spurlowcodestacksrc/vm/gcc3x-interp.c M spurlowcodestacksrc/vm/interp.c M spursista64src/vm/cogit.h M spursista64src/vm/cogitARMv8.c M spursista64src/vm/cointerp.c M spursista64src/vm/cointerp.h M spursista64src/vm/gcc3x-cointerp.c M spursistasrc/vm/cogit.h M spursistasrc/vm/cointerp.c M spursistasrc/vm/cointerp.h M spursistasrc/vm/gcc3x-cointerp.c M spursrc/vm/cogit.h M spursrc/vm/cointerp.c M spursrc/vm/cointerp.h M spursrc/vm/cointerpmt.c M spursrc/vm/cointerpmt.h M spursrc/vm/gcc3x-cointerp.c M spursrc/vm/gcc3x-cointerpmt.c M spurstack64src/vm/gcc3x-interp.c M spurstack64src/vm/interp.c M spurstack64src/vm/validImage.c M spurstacksrc/vm/gcc3x-interp.c M spurstacksrc/vm/interp.c M spurstacksrc/vm/validImage.c A src/ckformat.c M src/vm/cogit.h M src/vm/cointerp.c M src/vm/cointerp.h M src/vm/cointerpmt.c M src/vm/cointerpmt.h M src/vm/gcc3x-cointerp.c M src/vm/gcc3x-cointerpmt.c M stacksrc/vm/gcc3x-interp.c M stacksrc/vm/interp.c Log Message: ----------- CogVM source as per VMMaker.oscog-eem.2784 StackInterpreter: introspection for the Qwaq Croquet high-priority ticker/tickee mechanism. Simplify checkHighPriorityTickees, eliminating the per-tickee inProgress flag in favour of a single flag preventing reentrancy into checkHighPriorityTickees. Add ckformat.c from ImageFormat. Add the .vs visual studio directory to .gitignore. From builds at travis-ci.org Tue Jul 28 22:58:02 2020 From: builds at travis-ci.org (Travis CI) Date: Tue, 28 Jul 2020 22:58:02 +0000 Subject: [Vm-dev] Errored: OpenSmalltalk/opensmalltalk-vm#2125 (Cog - 097109a) In-Reply-To: Message-ID: <5f20ad7a402ff_13ffbaa31f05c253848@travis-tasks-5cc64fd4bd-68lwk.mail> Build Update for OpenSmalltalk/opensmalltalk-vm ------------------------------------- Build: #2125 Status: Errored Duration: 20 mins and 18 secs Commit: 097109a (Cog) Author: Eliot Miranda Message: CogVM source as per VMMaker.oscog-eem.2784 StackInterpreter: introspection for the Qwaq Croquet high-priority ticker/tickee mechanism. Simplify checkHighPriorityTickees, eliminating the per-tickee inProgress flag in favour of a single flag preventing reentrancy into checkHighPriorityTickees. Add ckformat.c from ImageFormat. Add the .vs visual studio directory to .gitignore. View the changeset: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/c53070d0c2e2...097109aa0bf5 View the full build log and details: https://travis-ci.org/github/OpenSmalltalk/opensmalltalk-vm/builds/712732747?utm_medium=notification&utm_source=email -- You can unsubscribe from build emails from the OpenSmalltalk/opensmalltalk-vm repository going to https://travis-ci.org/account/preferences/unsubscribe?repository=8795279&utm_medium=notification&utm_source=email. Or unsubscribe from *all* email updating your settings at https://travis-ci.org/account/preferences/unsubscribe?utm_medium=notification&utm_source=email. Or configure specific recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications. -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits at source.squeak.org Tue Jul 28 23:26:36 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Tue, 28 Jul 2020 23:26:36 0000 Subject: [Vm-dev] VM Maker: ImageFormat-dtl.46.mcz Message-ID: David T. Lewis uploaded a new version of ImageFormat to project VM Maker: http://source.squeak.org/VMMaker/ImageFormat-dtl.46.mcz ==================== Summary ==================== Name: ImageFormat-dtl.46 Author: dtl Time: 28 July 2020, 7:26:36.004 pm UUID: c105c2f9-ab5a-4289-8785-f7e439342da5 Ancestors: ImageFormat-eem.45 Let version stamping in ckformat work in VMMaker the same as VMMaker.oscog, using old style only if CCodeGenerator is not present in the image to avoid package dependency. =============== Diff against ImageFormat-eem.45 =============== Item was changed: ----- Method: ImageFormat class>>generateCkFormatProgram:on: (in category 'ckformat') ----- generateCkFormatProgram: programName on: stream "Generate source code for an image format version reader. The program is intended for testing image file format from a unix shell script such that the shell script can decide what VM to run based on image requirements." | fileID formatNumber | + fileID := (Smalltalk classNamed: #CCodeGenerator) + ifNotNil: [ :ccg | ccg monticelloDescriptionFor: self ] + ifNil: [ self name, ' ', DateAndTime now asString ]. - fileID := (CCodeGenerator respondsTo: #monticelloDescriptionFor:) - ifTrue: [CCodeGenerator monticelloDescriptionFor: self] "VMMaker.oscog style..." - ifFalse: [self name, ' ', DateAndTime now asString]. "VMMaker style..." stream nextPutAll: '/* ', programName, ': Print the image format number on standard output */'; cr; nextPutAll: '/* for use in a shell script to test image format requirements. */'; cr; nextPutAll: '/* A non-zero return status code indicates failure. */'; cr; cr; nextPutAll: '/* Usage: ', programName, ' imageFileName */'; cr; cr; nextPutAll: '/* --- DO NOT EDIT THIS FILE --- */'; cr; nextPutAll: '/* --- Automatically generated from class ', fileID, '--- */'; cr; nextPutAll: '/* --- Source code is in package ImageFormat in the VMMaker repository --- */'; cr; nextPutAll: '/* --- DO NOT EDIT THIS FILE --- */'; cr; cr; nextPutAll: '#include '; cr; nextPutAll: '#include '; cr; nextPutAll: '#include '; cr; cr; nextPutAll: 'int main(int argc, char **argv) {'; cr; tab; nextPutAll: 'FILE *f;'; cr; tab; nextPutAll: 'unsigned char buf[8];'; cr; tab; nextPutAll: 'int formatNumber;'; cr; tab; nextPutAll: 'unsigned char c;'; cr; tab; nextPutAll: 'int match;'; cr; tab; nextPutAll: 'if (argc !!= 2) {'; cr; tab; tab; nextPutAll: 'printf("usage: ', programName, ' imageFileName\n");'; cr; tab; tab; nextPutAll: 'printf("answer the image format number for an image file or 0 if not known\n");'; cr; tab; tab; nextPutAll: 'printf("known image formats:\n");'; cr. KnownVersionNumbers do: [ :e | | s | s := String streamContents: [ :strm | strm nextPutAll: e asString, ': '. (self fromInteger: e) printDescriptionOn: strm withVersionNumber: false ]. stream tab; tab; nextPutAll: 'printf("', s, '\n");'; cr ]. stream tab; tab; nextPutAll: 'exit(1);'; cr; tab; nextPutAll: '}'; cr; tab; nextPutAll: 'f = fopen(argv[1], "r");'; cr; tab; nextPutAll: 'if (f == NULL) {'; cr; tab; tab; nextPutAll: 'perror(argv[1]);'; cr; tab; tab; nextPutAll: 'exit(2);'; cr; tab; nextPutAll: '}'; cr. { 0. 512 } do: [:offset | stream tab; nextPutAll: 'if(fseek(f, '; nextPutAll: offset asString; nextPutAll: 'L, SEEK_SET) !!= 0) {';cr; tab; tab; nextPutAll: 'fprintf(stderr, "cannot go to pos %d in %s\n", '; nextPutAll: offset asString; nextPutAll: ', argv[1]);'; cr; tab; tab; nextPutAll: 'exit(3);'; cr; tab; nextPutAll: '}'; cr; tab; nextPutAll: 'if (fread(buf, 1, 8, f) < 8) {'; cr; tab; tab; nextPutAll: 'fprintf(stderr, "cannot read %s\n", argv[1]);'; cr; tab; tab; nextPutAll: 'exit(3);'; cr; tab; nextPutAll: '}'; cr. self versionNumberByteArrays withIndexDo: [ :v :tag | | b | formatNumber := (self fromBytes: v) asInteger. b := 'b_', formatNumber asString, '_', tag asString. stream tab; nextPutAll: '{'; cr; tab; nextPutAll: 'unsigned char ', b, '[', v size asString, ']= { '. v inject: true into: [:first : elem | first ifFalse: [stream nextPutAll: ', ']. stream nextPutAll: elem asString. false]. stream nextPutAll: '};'; cr; tab; nextPutAll: 'if (memcmp(buf, ', b, ', ', v size asString, ') == 0) {'; cr; tab; tab; nextPutAll: 'printf("%d\n", ', formatNumber, ');'; cr; tab; tab; nextPutAll: 'exit(0);'; cr; tab; nextPutAll: '}'; cr; tab; nextPutAll: '}'; cr]]. stream tab; nextPutAll: 'printf("0\n"); /* print an invalid format number */';cr; tab; nextPutAll: 'exit (-1); /* not found, exit with error code */'; cr; nextPutAll: '}'; cr ! From no-reply at appveyor.com Tue Jul 28 23:53:25 2020 From: no-reply at appveyor.com (AppVeyor) Date: Tue, 28 Jul 2020 23:53:25 +0000 Subject: [Vm-dev] Build failed: opensmalltalk-vm 1.0.2123 Message-ID: <20200728235325.1.9B53EB6238D13E2E@appveyor.com> An HTML attachment was scrubbed... URL: From lewis at mail.msen.com Wed Jul 29 03:24:59 2020 From: lewis at mail.msen.com (David T. Lewis) Date: Tue, 28 Jul 2020 23:24:59 -0400 Subject: [Vm-dev] Probably pointless endianness question re: Float changes circa 4.6 In-Reply-To: <2C49B96A-C7B5-4009-B57B-351B1A13C358@sonic.net> References: <2C49B96A-C7B5-4009-B57B-351B1A13C358@sonic.net> Message-ID: <20200729032459.GA82275@shell.msen.com> On Sun, Jul 05, 2020 at 12:52:24PM -0700, Tim Johnson wrote: > > FWIW, I did try the old Darwin/PPC port of 4.10.2 [3] with both 4.6 > and David T Lewis's "Squeak 5.2-in-V3 format" image (which is no > longer available on the 'net!) Following up on a detail from an old thread, the image referenced above is now avaiable again: http://files.squeak.org/various_images/SqueakV3Images/ Dave From edgardec2005 at gmail.com Wed Jul 29 09:32:36 2020 From: edgardec2005 at gmail.com (Edgar J. De Cleene) Date: Wed, 29 Jul 2020 06:32:36 -0300 Subject: [Vm-dev] Probably pointless endianness question re: Float changes circa 4.6 In-Reply-To: <20200729032459.GA82275@shell.msen.com> Message-ID: Just download Image ----- /Users/edgardecleene/Documents/AtlantisSqueak/5.3/Squeak5.3-V3-19432/squeak- 5.3-v3.image Squeak5.3rc3 latest update: #19432 Current Change Set: HomeProject Image format 6505 (32 bit) Virtual Machine --------------- /Applications/Cog 3312.app/Contents/MacOS/Squeak Croquet Closure Cog VM [CoInterpreterPrimitives VMMaker.oscog-eem.1207] Squeak Cog 4.0.3312 Mac OS X built on Apr 17 2015 20:21:10 UTC Compiler: 4.2.1 (Apple Inc. build 5666) (dot 3) platform sources revision VM: r3312 http://www.squeakvm.org/svn/squeak/branches/Cog Date: 2015-04-17 12:34:25 -0700 Plugins: r3275 http://squeakvm.org/svn/squeak/trunk/platforms/Cross/plugins CoInterpreter VMMaker.oscog-eem.1207 uuid: 4a338677-029f-42ac-b38d-2bc5ecc213f1 Apr 17 2015 StackToRegisterMappingCogit VMMaker.oscog-eem.1207 uuid: 4a338677-029f-42ac-b38d-2bc5ecc213f1 Apr 17 2015 To Build A Similar Virtual Machine ---------------------------------- Visit https://github.com/OpenSmalltalk/opensmalltalk-vm; follow the "Clone or download" instructions, then read the top-level README.md and HowToBuild files in the top-level build directory for your platform(s), build.macos64x64/HowToBuild, build.win32x86/HowToBuild, etc. But raise some debuggers. I like chase then and fix if possible. How you prefer manage , send directly to you or to list Edgar @morplenauta From notifications at github.com Thu Jul 30 16:49:52 2020 From: notifications at github.com (David Stes) Date: Thu, 30 Jul 2020 16:49:52 +0000 (UTC) Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Sunupdate (#496) In-Reply-To: References: Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 This is a reminder about https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/496 Currently I apply manually this small patch before building the OpenSmalltalk VM on Solaris 11. My understanding from the feedback so far "let's keep it", this means that it is (hopefully) acceptable to merge it into Cog. That would be useful as I don't have to manually apply the patch any longer. It's not a disaster if it cannot be merged into Cog for some reason, as I can continue to just apply the patch of course, but I'm submitting the patch with the hope that it can be integrated ! Thanks, David Stes -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJfIvoPAAoJEAwpOKXMq1Ma8KMIAIVrViG/cNkzqHRp7B0HVCvI BROJsxFyT5tvfMpB1wI3kj+QmMZ7aK7vnEg2q8kZ5f2rMFV7Zm+xk3gfO1qER1NK HZV40QBNAld/QDekwK0KJ37hNPN7DBvfp9B4VVdlmX9B6YNbQjOL3TyS1T6jaXbe XwaiktsQ0OGpWuxrYmjxLOHOkyfoFqJn/CmU6mbU9/wdw4Dh5qX2UKBmoaKXs8KU FSyx5OS2b5PrXbXqsz0vrkBfevY92kiPY8p5BaGhh+qRvC2fyf/9qmvmHeTFw7aA TcnKStO+7Cgn9hcE/pNhxrIGuJYLZbOShZkHoUfCsn6d34RPs89dCVgHxD4JqJw= =+OzJ -----END PGP SIGNATURE----- -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/496#issuecomment-666519878 -------------- next part -------------- An HTML attachment was scrubbed... URL: From noreply at github.com Thu Jul 30 18:42:03 2020 From: noreply at github.com (Eliot Miranda) Date: Thu, 30 Jul 2020 11:42:03 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] dc650a: Add Apple Silicon build environment [ci skip] Message-ID: Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: dc650af040fdd90f30e9c08d958674522ca89c6a https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/dc650af040fdd90f30e9c08d958674522ca89c6a Author: Eliot Miranda Date: 2020-07-30 (Thu, 30 Jul 2020) Changed paths: A build.macos64ARMv8/HowToBuild A build.macos64ARMv8/bochsx64/conf.COG A build.macos64ARMv8/bochsx64/conf.COG.dbg A build.macos64ARMv8/bochsx64/exploration/Makefile A build.macos64ARMv8/bochsx64/makeclean A build.macos64ARMv8/bochsx64/makeem A build.macos64ARMv8/bochsx86/conf.COG A build.macos64ARMv8/bochsx86/conf.COG.dbg A build.macos64ARMv8/bochsx86/exploration/Makefile A build.macos64ARMv8/bochsx86/makeclean A build.macos64ARMv8/bochsx86/makeem A build.macos64ARMv8/common/Makefile.app A build.macos64ARMv8/common/Makefile.app.newspeak A build.macos64ARMv8/common/Makefile.app.squeak A build.macos64ARMv8/common/Makefile.flags A build.macos64ARMv8/common/Makefile.lib.extra A build.macos64ARMv8/common/Makefile.plugin A build.macos64ARMv8/common/Makefile.rules A build.macos64ARMv8/common/Makefile.sources A build.macos64ARMv8/common/Makefile.vm A build.macos64ARMv8/gdbarm32/clean A build.macos64ARMv8/gdbarm32/conf.COG A build.macos64ARMv8/gdbarm32/makeem A build.macos64ARMv8/gdbarm64/clean A build.macos64ARMv8/gdbarm64/conf.COG A build.macos64ARMv8/gdbarm64/makeem A build.macos64ARMv8/makeall A build.macos64ARMv8/makeallinstall A build.macos64ARMv8/makeproduct A build.macos64ARMv8/makeproductinstall A build.macos64ARMv8/makesista A build.macos64ARMv8/makespur A build.macos64ARMv8/pharo.stack.spur.lowcode/Makefile A build.macos64ARMv8/pharo.stack.spur.lowcode/mvm A build.macos64ARMv8/pharo.stack.spur.lowcode/plugins.ext A build.macos64ARMv8/pharo.stack.spur.lowcode/plugins.int A build.macos64ARMv8/pharo.stack.spur/Makefile A build.macos64ARMv8/pharo.stack.spur/mvm A build.macos64ARMv8/pharo.stack.spur/plugins.ext A build.macos64ARMv8/pharo.stack.spur/plugins.int A build.macos64ARMv8/squeak.cog.spur.immutability/Makefile A build.macos64ARMv8/squeak.cog.spur.immutability/mvm A build.macos64ARMv8/squeak.cog.spur.immutability/plugins.ext A build.macos64ARMv8/squeak.cog.spur.immutability/plugins.int A build.macos64ARMv8/squeak.cog.spur/Makefile A build.macos64ARMv8/squeak.cog.spur/mvm A build.macos64ARMv8/squeak.cog.spur/plugins.ext A build.macos64ARMv8/squeak.cog.spur/plugins.int A build.macos64ARMv8/squeak.sista.spur/Makefile A build.macos64ARMv8/squeak.sista.spur/mvm A build.macos64ARMv8/squeak.sista.spur/plugins.ext A build.macos64ARMv8/squeak.sista.spur/plugins.int A build.macos64ARMv8/squeak.stack.spur/Makefile A build.macos64ARMv8/squeak.stack.spur/mvm A build.macos64ARMv8/squeak.stack.spur/plugins.ext A build.macos64ARMv8/squeak.stack.spur/plugins.int Log Message: ----------- Add Apple Silicon build environment [ci skip] From noreply at github.com Thu Jul 30 20:43:54 2020 From: noreply at github.com (Eliot Miranda) Date: Thu, 30 Jul 2020 13:43:54 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 1ce12f: Get compilation working on macos64ARMv8 by hacking... Message-ID: Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: 1ce12f6521f1f344050aeed3234a23efbcefffa6 https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/1ce12f6521f1f344050aeed3234a23efbcefffa6 Author: Eliot Miranda Date: 2020-07-30 (Thu, 30 Jul 2020) Changed paths: M build.macos64ARMv8/common/Makefile.flags Log Message: ----------- Get compilation working on macos64ARMv8 by hacking in the right define for the processor. [ci skip] From noreply at github.com Fri Jul 31 01:05:05 2020 From: noreply at github.com (Eliot Miranda) Date: Thu, 30 Jul 2020 18:05:05 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 0eecdf: MacOS SoundPlugin: get/set volume correctly (webrt... Message-ID: Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: 0eecdf0251a4120d9ef5972f5e05c75fea50e3c6 https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/0eecdf0251a4120d9ef5972f5e05c75fea50e3c6 Author: Eliot Miranda Date: 2020-07-30 (Thu, 30 Jul 2020) Changed paths: M platforms/iOS/plugins/SoundPlugin/sqSqueakSoundCoreAudio.m Log Message: ----------- MacOS SoundPlugin: get/set volume correctly (webrtc has a version of the truth). From builds at travis-ci.org Fri Jul 31 01:27:03 2020 From: builds at travis-ci.org (Travis CI) Date: Fri, 31 Jul 2020 01:27:03 +0000 Subject: [Vm-dev] Errored: OpenSmalltalk/opensmalltalk-vm#2126 (Cog - 0eecdf0) In-Reply-To: Message-ID: <5f237366cc597_13fd1c76459285751a@travis-tasks-8579b6769b-6l2d9.mail> Build Update for OpenSmalltalk/opensmalltalk-vm ------------------------------------- Build: #2126 Status: Errored Duration: 21 mins and 22 secs Commit: 0eecdf0 (Cog) Author: Eliot Miranda Message: MacOS SoundPlugin: get/set volume correctly (webrtc has a version of the truth). View the changeset: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/1ce12f6521f1...0eecdf0251a4 View the full build log and details: https://travis-ci.org/github/OpenSmalltalk/opensmalltalk-vm/builds/713523278?utm_medium=notification&utm_source=email -- You can unsubscribe from build emails from the OpenSmalltalk/opensmalltalk-vm repository going to https://travis-ci.org/account/preferences/unsubscribe?repository=8795279&utm_medium=notification&utm_source=email. Or unsubscribe from *all* email updating your settings at https://travis-ci.org/account/preferences/unsubscribe?utm_medium=notification&utm_source=email. Or configure specific recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications. -------------- next part -------------- An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Fri Jul 31 01:32:03 2020 From: no-reply at appveyor.com (AppVeyor) Date: Fri, 31 Jul 2020 01:32:03 +0000 Subject: [Vm-dev] Build failed: opensmalltalk-vm 1.0.2124 Message-ID: <20200731013203.1.D1D352D10118AE76@appveyor.com> An HTML attachment was scrubbed... URL: From noreply at github.com Fri Jul 31 02:28:16 2020 From: noreply at github.com (Eliot Miranda) Date: Thu, 30 Jul 2020 19:28:16 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 149275: MacOS SoundPlugin: Make sure the device names are ... Message-ID: Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: 1492758f44d4b68c661f1c48dd0cb868c03960c1 https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/1492758f44d4b68c661f1c48dd0cb868c03960c1 Author: Eliot Miranda Date: 2020-07-30 (Thu, 30 Jul 2020) Changed paths: M platforms/iOS/plugins/SoundPlugin/sqSqueakSoundCoreAudio.m Log Message: ----------- MacOS SoundPlugin: Make sure the device names are null-terminated. From no-reply at appveyor.com Fri Jul 31 02:48:29 2020 From: no-reply at appveyor.com (AppVeyor) Date: Fri, 31 Jul 2020 02:48:29 +0000 Subject: [Vm-dev] Build failed: opensmalltalk-vm 1.0.2125 Message-ID: <20200731024829.1.CF140D9B7F752F50@appveyor.com> An HTML attachment was scrubbed... URL: From builds at travis-ci.org Fri Jul 31 02:49:19 2020 From: builds at travis-ci.org (Travis CI) Date: Fri, 31 Jul 2020 02:49:19 +0000 Subject: [Vm-dev] Errored: OpenSmalltalk/opensmalltalk-vm#2127 (Cog - 1492758) In-Reply-To: Message-ID: <5f2386af3dfa9_13f8b489a8ff411919e@travis-tasks-8579b6769b-cpzft.mail> Build Update for OpenSmalltalk/opensmalltalk-vm ------------------------------------- Build: #2127 Status: Errored Duration: 20 mins and 29 secs Commit: 1492758 (Cog) Author: Eliot Miranda Message: MacOS SoundPlugin: Make sure the device names are null-terminated. View the changeset: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/0eecdf0251a4...1492758f44d4 View the full build log and details: https://travis-ci.org/github/OpenSmalltalk/opensmalltalk-vm/builds/713537960?utm_medium=notification&utm_source=email -- You can unsubscribe from build emails from the OpenSmalltalk/opensmalltalk-vm repository going to https://travis-ci.org/account/preferences/unsubscribe?repository=8795279&utm_medium=notification&utm_source=email. Or unsubscribe from *all* email updating your settings at https://travis-ci.org/account/preferences/unsubscribe?utm_medium=notification&utm_source=email. Or configure specific recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications. -------------- next part -------------- An HTML attachment was scrubbed... URL: