Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: ab8ac9c9cf84cb15b1e9094e1f53dcfd31c2067e
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/ab8ac9c9cf84cb15b1…
Author: Eliot Miranda <eliot.miranda(a)gmail.com>
Date: 2020-09-29 (Tue, 29 Sep 2020)
Changed paths:
M platforms/win32/plugins/FilePlugin/sqWin32FilePrims.c
Log Message:
-----------
Fix win32 sqImageFileClose; forgot to change the definition when the declaration
was changed in sqPlatformSpecific.h.
Build Update for OpenSmalltalk/opensmalltalk-vm
-------------------------------------
Build: #2217
Status: Still Failing
Duration: 1 hr, 12 mins, and 36 secs
Commit: 1f626d0 (Cog)
Author: Eliot Miranda
Message: CogVM source as per VMMaker.oscog-eem.2831
Author: eem
Time: 29 September 2020, 8:01:48.222992 pm
UUID: f4fed277-6b62-4e79-9147-c5405589f2b1
Ancestors: VMMaker.oscog-eem.2830
Cogit: (IAAM) correctly implement the fix in VMMaker.oscog-eem.2824. The
previous version of the fix used methodHeaderOf: to get what was intended
to be the pointer to the cog method, if newMethod was in fact cogged, but
methodHeaderOf: always answers the byetcoded method header. What is needed
here is the actual pointer to the cog method, i.e. rawHeaderOf:.
CameraPlugin MacOS, add the AVCaptureSessionPreset352x288 size.
win32: put function names at the start of the line.
View the changeset: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/5e3abc459071...1f…
View the full build log and details: https://travis-ci.org/github/OpenSmalltalk/opensmalltalk-vm/builds/73147940…
--
You can unsubscribe from build emails from the OpenSmalltalk/opensmalltalk-vm repository going to https://travis-ci.org/account/preferences/unsubscribe?repository=8795279&ut….
Or unsubscribe from *all* email updating your settings at https://travis-ci.org/account/preferences/unsubscribe?utm_medium=notificati….
Or configure specific recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications.
Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: 1f626d0e80f93dfc42de22efe74a83fa56bd728b
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/1f626d0e80f93dfc42…
Author: Eliot Miranda <eliot.miranda(a)gmail.com>
Date: 2020-09-29 (Tue, 29 Sep 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 platforms/iOS/plugins/CameraPlugin/AVFoundationVideoGrabber.m
M platforms/win32/plugins/CameraPlugin/winCameraOps.cpp
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/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.2831
Author: eem
Time: 29 September 2020, 8:01:48.222992 pm
UUID: f4fed277-6b62-4e79-9147-c5405589f2b1
Ancestors: VMMaker.oscog-eem.2830
Cogit: (IAAM) correctly implement the fix in VMMaker.oscog-eem.2824. The
previous version of the fix used methodHeaderOf: to get what was intended
to be the pointer to the cog method, if newMethod was in fact cogged, but
methodHeaderOf: always answers the byetcoded method header. What is needed
here is the actual pointer to the cog method, i.e. rawHeaderOf:.
CameraPlugin MacOS, add the AVCaptureSessionPreset352x288 size.
win32: put function names at the start of the line.
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2831.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.2831
Author: eem
Time: 29 September 2020, 8:01:48.222992 pm
UUID: f4fed277-6b62-4e79-9147-c5405589f2b1
Ancestors: VMMaker.oscog-eem.2830
Cogit: (IAAM) correctly implement the fix in VMMaker.oscog-eem.2824. The previous version of the fix used methodHeaderOf: to get what was intended to be the pointer to the cog method, if newMethod was in fact cogged, but methodHeaderOf: always answers the byetcoded method header. What is needed here is the actual pointer to the cog method, i.e. rawHeaderOf:.
=============== Diff against VMMaker.oscog-eem.2830 ===============
Item was changed:
----- Method: CoInterpreterPrimitives>>cloneContext: (in category 'primitive support') -----
cloneContext: aContext
"Copy a Context. There are complications here.
Fields of married contexts must be mapped to image-level values.
In mapping a machine code pc, a code compaction may occur.
In this case return through machine code is impossible without
updating a C call stack return address, since the machine code
method that invoked this primitive could have moved. So if this
happens, map to an interpreter frame and return to the interpreter."
| cloned couldBeCogMethod |
self assert: ((objectMemory isCompiledMethod: newMethod)
and: [(self primitiveIndexOf: newMethod) > 0]).
+ couldBeCogMethod := objectMemory rawHeaderOf: newMethod.
- couldBeCogMethod := objectMemory methodHeaderOf: newMethod.
cloned := super cloneContext: aContext.
"If the header has changed in any way then it is most likely that machine code
has been moved or reclaimed for this method and so normal return is impossible."
+ couldBeCogMethod ~= (objectMemory rawHeaderOf: newMethod) ifTrue:
- couldBeCogMethod ~= (objectMemory methodHeaderOf: newMethod) ifTrue:
[self convertToInterpreterFrame: 0.
self push: cloned.
cogit ceInvokeInterpret
"NOTREACHED"].
^cloned!
Item was changed:
----- Method: CoInterpreterPrimitives>>primitiveInstVarAt (in category 'object access primitives') -----
primitiveInstVarAt
"Override to deal with potential code compaction on accessing context pcs"
| index rcvr hdr fmt totalLength fixedFields value |
self assert: ((objectMemory isCompiledMethod: newMethod)
and: [(self primitiveIndexOf: newMethod) > 0]).
index := self stackTop.
rcvr := self stackValue: 1.
((objectMemory isNonIntegerObject: index)
or: [argumentCount > 1 "e.g. object:instVarAt:"
and: [objectMemory isOopForwarded: rcvr]]) ifTrue:
[^self primitiveFailFor: PrimErrBadArgument].
(objectMemory isImmediate: rcvr) ifTrue: [^self primitiveFailFor: PrimErrInappropriate].
index := objectMemory integerValueOf: index.
hdr := objectMemory baseHeader: rcvr.
fmt := objectMemory formatOfHeader: hdr.
totalLength := objectMemory lengthOf: rcvr baseHeader: hdr format: fmt.
fixedFields := objectMemory fixedFieldsOf: rcvr format: fmt length: totalLength.
(index >= 1 and: [index <= fixedFields]) ifFalse:
[^self primitiveFailFor: PrimErrBadIndex].
(fmt = objectMemory indexablePointersFormat
and: [objectMemory isContextHeader: hdr])
ifTrue:
+ [| couldBeCogMethod |
- [| methodHeader |
self externalWriteBackHeadFramePointers.
"Note newMethod's header to check for potential code compaction
in mapping the context's pc from machine code to bytecode."
index = InstructionPointerIndex ifTrue:
+ [couldBeCogMethod := objectMemory rawHeaderOf: newMethod].
- [methodHeader := objectMemory methodHeaderOf: newMethod].
value := self externalInstVar: index - 1 ofContext: rcvr.
"If the header has changed in any way then it is most likely that machine code
has been moved or reclaimed for this method and so normal return is impossible."
(index = InstructionPointerIndex
+ and: [couldBeCogMethod ~= (objectMemory rawHeaderOf: newMethod)]) ifTrue:
- and: [methodHeader ~= (objectMemory methodHeaderOf: newMethod)]) ifTrue:
[self pop: argumentCount + 1.
self convertToInterpreterFrame: 0.
self push: value.
cogit ceInvokeInterpret
"NOTREACHED"]]
ifFalse: [value := self subscript: rcvr with: index format: fmt].
self pop: argumentCount + 1 thenPush: value!
Item was changed:
----- Method: CoInterpreterPrimitives>>primitiveSlotAt (in category 'object access primitives') -----
primitiveSlotAt
"Answer a slot in an object. This numbers all slots from 1, ignoring the distinction between
named and indexed inst vars. In objects with both named and indexed inst vars, the named
inst vars precede the indexed ones. In non-object indexed objects (objects that contain
bits, not object references) this primitive answers the raw integral value at each slot.
e.g. for Strings it answers the character code, not the Character object at each slot."
"Override to deal with potential code compaction on accessing context pcs"
| index rcvr fmt numSlots |
self assert: ((objectMemory isCompiledMethod: newMethod)
and: [(self primitiveIndexOf: newMethod) > 0]).
index := self stackTop.
rcvr := self stackValue: 1.
(objectMemory isIntegerObject: index) ifFalse:
[^self primitiveFailFor: PrimErrBadArgument].
(objectMemory isImmediate: rcvr) ifTrue:
[^self primitiveFailFor: PrimErrBadReceiver].
fmt := objectMemory formatOf: rcvr.
index := (objectMemory integerValueOf: index) - 1.
fmt <= objectMemory lastPointerFormat ifTrue:
[numSlots := objectMemory numSlotsOf: rcvr.
(self asUnsigned: index) < numSlots ifTrue:
[| value numLiveSlots |
(objectMemory isContextNonImm: rcvr)
ifTrue:
[self externalWriteBackHeadFramePointers.
numLiveSlots := (self stackPointerForMaybeMarriedContext: rcvr) + CtxtTempFrameStart.
(self asUnsigned: index) < numLiveSlots
ifTrue:
+ [| couldBeCogMethod |
- [| methodHeader |
"Note newMethod's header to check for potential code compaction
in mapping the context's pc from machine code to bytecode."
index = InstructionPointerIndex ifTrue:
+ [couldBeCogMethod := objectMemory rawHeaderOf: newMethod].
- [methodHeader := objectMemory methodHeaderOf: newMethod].
value := self externalInstVar: index ofContext: rcvr.
"If the header has changed in any way then it is most likely that machine code
has been moved or reclaimed for this method and so normal return is impossible."
(index = InstructionPointerIndex
+ and: [couldBeCogMethod ~= (objectMemory rawHeaderOf: newMethod)]) ifTrue:
- and: [methodHeader ~= (objectMemory methodHeaderOf: newMethod)]) ifTrue:
[self pop: argumentCount + 1.
self convertToInterpreterFrame: 0.
self push: value.
cogit ceInvokeInterpret
"NOTREACHED"]]
ifFalse: [value := objectMemory nilObject]]
ifFalse:
[value := objectMemory fetchPointer: index ofObject: rcvr].
self pop: argumentCount + 1 thenPush: value.
^0].
^self primitiveFailFor: PrimErrBadIndex].
fmt >= objectMemory firstByteFormat ifTrue:
[fmt >= objectMemory firstCompiledMethodFormat ifTrue:
[^self primitiveFailFor: PrimErrUnsupported].
numSlots := objectMemory numBytesOfBytes: rcvr.
(self asUnsigned: index) < numSlots ifTrue:
[self pop: argumentCount + 1 thenPushInteger: (objectMemory fetchByte: index ofObject: rcvr).
^0].
^self primitiveFailFor: PrimErrBadIndex].
(objectMemory hasSpurMemoryManagerAPI
and: [fmt >= objectMemory firstShortFormat]) ifTrue:
[numSlots := objectMemory num16BitUnitsOf: rcvr.
(self asUnsigned: index) < numSlots ifTrue:
[self pop: argumentCount + 1 thenPushInteger: (objectMemory fetchUnsignedShort16: index ofObject: rcvr).
^0].
^self primitiveFailFor: PrimErrBadIndex].
fmt = objectMemory sixtyFourBitIndexableFormat ifTrue:
[numSlots := objectMemory num64BitUnitsOf: rcvr.
(self asUnsigned: index) < numSlots ifTrue:
[self pop: argumentCount + 1
thenPush: (self positive64BitIntegerFor: (objectMemory fetchLong64: index ofObject: rcvr)).
^0].
^self primitiveFailFor: PrimErrBadIndex].
fmt >= objectMemory firstLongFormat ifTrue:
[numSlots := objectMemory num32BitUnitsOf: rcvr.
(self asUnsigned: index) < numSlots ifTrue:
[self pop: argumentCount + 1
thenPush: (self positive32BitIntegerFor: (objectMemory fetchLong32: index ofObject: rcvr)).
^0].
^self primitiveFailFor: PrimErrBadIndex].
^self primitiveFailFor: PrimErrBadReceiver!
let's stop here.
it was just me trying to be cautious.
Eliot is investing time they obviously is better spend him doing his work than arguing with me/us.
:)
the case at hand is actually not that important
--
Sent from a mobile device
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/47b8d5202b835b5d9d…
David, with respect, I am currently trying to deploy an extremely complex Squeak application that includes C++, Objective-C, and mixed C++/Objective-C plugin code, threads, etc, on both MacOS and Windows. I am not trying to defeat autoconf or anything. I am trying to get the VM to compile. Trying to clean up inconsistencies, and breakages, so that our company can deploy a product and does not fail. I don't have time to suffer major disturbances in the VM code right now. Please Tobias, if you want to include config.h in front of ever file go ahead, but do it on a branch. I will note that only some projects take this approach, and many complex ones include config.h *after* system headers. And that this approach makes sense.
A given platform's headers provide an API, alas as a white box
Because the only guaranteed input to a platform's headers is compiler command-line switches, variations on the platform API, expressed through the system headers, are selected on the compiler command line (e.g. _GNU_SOURCE, POSIX, etc).
A config.h file from autoconf is a synopsis of a given variation of the system headers, defining to the program what facilities are available, without the rest of the program having to manually determine (often impossible at run-time, often hard to do so at compile-time). It is a communication to the program, not a communication to the headers.
This isn't me being obstructive or trying to sabotage config.h or autoconf. It is the architectural reality of C/C++/Objective-C, is it not?
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/47b8d5202b835b5d9d…
The point is, Tobias, that the flag must de defined on the command line, that some flags must be defined in the command line.
Further, the architectural pic t is that C headers are white box. They cannot provide encapsulation. Therefore when one includes a C header one is including implementation as well as API. Therefore, if one is only to see API one should not attempt to modify those headers prior to their inclusion other than by platform aprtoced Flags, such as _GNU_SOURCE, since otherwise one risks alteration in a way that will break later when the C header is modified.
This is exactly the case with my having to redefine the stellar define so that it avoided breaking a specific platform’s implementation of the redirect from abstract file offsets (ftell) to concrete 64-bit offsets.
The point is that architecturally a C file that is part of an application is compiled within an environment provided by a platform (different versions of macOS, Linux, Windows, etc, with different processors, etc) and that config.h serves *not* to alter that environment, but to provide ab abstract definition of the facilities provided by that platform. Therefore it is completely backwards to use config.h in any way to alter system includes. config.h tells one what is inside without having to look. configure does (expensive slow) black box testing on them to derive config.h. config.g is designed to inform the program of the facilities provided by the includes, not to be abused to modify those includes.
Therefore, the correct way to select between different alternatives a specific platform provides (32-bit vs 64-bit, c99 vs C11 vs C18, POSIX vs GNU, etc, is *external to the source code*. That means on the command line, issues either from a build environment or makefiles.
So given that one must and should use command line selection of alternatives can we please Adams in this idea of including our own header before everything else? C/C++/Objective-C etc are not designed to be written or compiled in this way.
--
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/47b8d5202b835b5d9d…
Is there anything that can be done to make finding a VM on the bintray site easier? I've just been looking to see where I can grab the latest successful build of a squeak cog 32 bit linux ARM vm and ... that really isn't fun at all. Surely there is some way to categorise builds, or at least have a list of the latest version of each option, or sometihng like that?
tim
--
tim Rowledge; tim(a)rowledge.org; http://www.rowledge.org/tim
Dreams are free, but you get soaked on the connect time.