Alistair Grant uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-akg.2466.mcz
==================== Summary ====================
Name: VMMaker.oscog-akg.2466
Author: akg
Time: 19 October 2018, 11:22:03.527998 am
UUID: 5b9d1c96-2ed0-4621-809b-8d0d954099c1
Ancestors: VMMaker.oscog-AlistairGrant.2465
VMMaker Unicode strings
Add VMClass>>asByteArray:size:.
Modify:
- FilePluginSimulator>>fileOpenName:size:write:secure:
- FilePluginSimulator>>fileOpenNewName:size:secure:
to utf8Decode the paths supplied by the in-simulation image. This is required otherwise the simulation, which uses the same code, will attempt to reencode the string with utf8, corrupting the file name.
=============== Diff against VMMaker.oscog-AlistairGrant.2465 ===============
Item was changed:
----- Method: FilePluginSimulator>>fileOpenName:size:write:secure: (in category 'file primitives') -----
fileOpenName: nameIndex size: nameSize write: writeFlag secure: secureFlag
"Open the named file, possibly checking security. Answer the file oop."
| path f index |
openFiles size >= maxOpenFiles ifTrue:
[^interpreterProxy primitiveFailFor: PrimErrLimitExceeded].
+ path := (interpreterProxy asByteArray: nameIndex size: nameSize) utf8Decoded.
- path := interpreterProxy asString: nameIndex size: nameSize.
f := writeFlag
ifTrue: [FileStream fileNamed: path]
ifFalse:
[(StandardFileStream isAFileNamed: path) ifTrue:
[FileStream readOnlyFileNamed: path]].
f ifNil: [^interpreterProxy primitiveFail].
f binary.
index := (3 to: openFiles size + 1) detect: [:n| (openFiles includesKey: n) not].
openFiles at: index put: f.
^interpreterProxy integerObjectOf: index!
Item was changed:
----- Method: FilePluginSimulator>>fileOpenNewName:size:secure: (in category 'file primitives') -----
fileOpenNewName: nameIndex size: nameSize secure: secureFlag
"Open the new named file, possibly checking security. Answer the file oop."
| path f index |
openFiles size >= maxOpenFiles ifTrue:
[^interpreterProxy primitiveFailFor: PrimErrLimitExceeded].
+ path := (interpreterProxy interpreter asByteArray: nameIndex size: nameSize) utf8Decoded.
- path := interpreterProxy interpreter asString: nameIndex size: nameSize.
"the #defaultAction for FileExistsException creates a dialog,
so it is caught and resignaled as a generic Error"
[f := FileStream newFileNamed: nameIndex]
on: FileExistsException
do: [:error | ^ interpreterProxy primitiveFailFor: PrimErrInappropriate].
f ifNil: [^interpreterProxy primitiveFail].
f binary.
index := (3 to: openFiles size + 1) detect: [:n| (openFiles includesKey: n) not].
openFiles at: index put: f.
^interpreterProxy integerObjectOf: index!
Item was added:
+ ----- Method: VMClass>>asByteArray:size: (in category 'C library extensions') -----
+ asByteArray: baIndex size: baSize
+ "baIndex is an address in the heap. Create a ByteArray of the requested length
+ form the bytes in the heap starting at baIndex."
+ <doNotGenerate>
+ ^self strncpy: (ByteArray new: baSize) _: baIndex _: baSize!
Hi Everyone,
I have an update for VMConstruction-Plugins-OSProcessPlugin which
provides minimal simulator support for UnixOSProcessPlugin, but don't
have write access to:
http://www.squeaksource.com/OSProcessPlugin
Where should I submit this?
Thanks,
Alistair
--
Name: VMConstruction-Plugins-OSProcessPlugin.oscog-AlistairGrant.59
Author: AlistairGrant
Time: 15 October 2018, 7:38:54.900463 pm
UUID: 19992832-7cf7-4948-8302-d5b6cb58a160
Ancestors: VMConstruction-Plugins-OSProcessPlugin.oscog-eem.58
Add UnixOSProcessPluginSimulator.
This provides enough functionality to allow an image in the simulator
to call UnixOSProcessPlugin>>primitiveGetCurrentWorkingDirectory
Alistair Grant uploaded a new version of VMConstruction-Plugins-OSProcessPlugin to project OSProcessPlugin:
http://www.squeaksource.com/OSProcessPlugin/VMConstruction-Plugins-OSProces…
==================== Summary ====================
Name: VMConstruction-Plugins-OSProcessPlugin.oscog-AlistairGrant.60
Author: AlistairGrant
Time: 19 October 2018, 8:11:15.371465 am
UUID: 7e6069be-0df0-48e2-aac6-a274cbe40a18
Ancestors: VMConstruction-Plugins-OSProcessPlugin.oscog-eem.59
UnixOSProcessPluginSimulator
Provides a minimal implementation to allow UnixOSProcessPlugin>>primitiveGetCurrentWorkingDirectory to be used in the VM simulator.
Also:
- add error checking and fail if object allocation fails in #primitiveGetCurrentWorkingDirectory.
- Use the new C method naming (getcwd:_:)
Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: 15341b57924ab32f52c68c58ab275f17f8928caf
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/15341b57924ab32f52…
Author: Eliot Miranda <eliot.miranda(a)gmail.com>
Date: 2018-10-18 (Thu, 18 Oct 2018)
Changed paths:
M nsspur64src/vm/cogitX64SysV.c
M nsspur64src/vm/cogitX64WIN64.c
M spur64src/vm/cogitX64SysV.c
M spur64src/vm/cogitX64WIN64.c
M spursista64src/vm/cogitX64SysV.c
M spursista64src/vm/cogitX64WIN64.c
Log Message:
-----------
CogVm source as per VMMaker.oscog-eem.2464
Cogit Slang Reflection:
Fix nasty bug with CogAbstractInstruction computing opcodes via reflection
caused by full blocks. We must use method allLiterals to include literals
in blocks now. SysV is referenced only from blocks in
CogX64Compiler class>>#initialize and so with full blocks SysV was being
moved to Undeclared, causing invalid source generation for the X64 cogits.
**NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/
Functionality will be removed from GitHub.com on January 31st, 2019.
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2464.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.2464
Author: eem
Time: 18 October 2018, 9:01:58.401001 pm
UUID: 0b1fa0a3-a781-4fd5-b1cf-1809796ccbbf
Ancestors: VMMaker.oscog-eem.2463
Cogit Slang Reflection:
Fix nasty bug with CogAbstractInstruction computing opcodes via reflection caused by full blocks. We must use method allLiterals to include literals in blocks now. SysV is referenced only from blocks in CogX64Compiler class>>#initialize and so with full blocks SysV was being moved to Undeclared, causing invalid source generation for the X64 cogits.
=============== Diff against VMMaker.oscog-eem.2463 ===============
Item was changed:
----- Method: CogAbstractInstruction class>>initializeSpecificOpcodes:in: (in category 'class initialization') -----
initializeSpecificOpcodes: opcodeSymbolSequence in: initializeMethod
"Declare as class variables, the opcodes in opcodeSymbolSequence.
Assign values to them from LastRTLOpcode on. Undeclare any obsolete
class vars. The assumption is that initializeMethod defines all class vars
in the class. This method should be used by subclasses wishing to declare
their own specific opcodes."
| pool classVariablesDefinedInMethod |
self assert: self ~~ CogAbstractInstruction.
pool := initializeMethod methodClass classPool.
LastRTLCode ifNil:
[CogRTLOpcodes initialize].
+ classVariablesDefinedInMethod := (initializeMethod allLiterals select: [:l| l isVariableBinding and: [pool includesKey: l key]]) collect:
- classVariablesDefinedInMethod := (initializeMethod literals select: [:l| l isVariableBinding and: [pool includesKey: l key]]) collect:
[:ea| ea key].
"Undeclare any class var not defined in opcodeSymbolSequence or by the method."
(pool keys reject: [:k| (opcodeSymbolSequence includes: k) or: [classVariablesDefinedInMethod includes: k]]) do:
[:k|
Undeclared declare: k from: pool].
"Declare opcodeSymbolSequence's elements from LastRTLCode on up."
opcodeSymbolSequence withIndexDo:
[:classVarName :value|
pool
declare: classVarName from: Undeclared;
at: classVarName put: value + LastRTLCode - 1]!
Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: e39b2091ccae1c021ceefed68822d1634162610e
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/e39b2091ccae1c021c…
Author: Eliot Miranda <eliot.miranda(a)gmail.com>
Date: 2018-10-18 (Thu, 18 Oct 2018)
Changed paths:
M image/VM Simulation Workspace.text
M nsspur64src/vm/cogit.h
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/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/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/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 spurstacksrc/vm/gcc3x-interp.c
M spurstacksrc/vm/interp.c
M src/plugins/AioPlugin/AioPlugin.c
M src/plugins/BitBltPlugin/BitBltPlugin.c
M src/plugins/ImmX11Plugin/ImmX11Plugin.c
M src/plugins/JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.c
M src/plugins/Mpeg3Plugin/Mpeg3Plugin.c
M src/plugins/SqueakFFIPrims/ARM32FFIPlugin.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/Win32OSProcessPlugin/Win32OSProcessPlugin.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.2463
Plugins:
BitBltSimulation
Fix a bug where the copyBits primitive read past the end of the source bitmap.
sourceSkewAndPointerInit would sometimes compute preload true and skew true
before then setting skew to -32. There was a hack fix in copyLoop, but the real
bug in copyLoop was the inner loop special case for rule 3 (over, or STORE). It
must fall back to the loop beginning "thisWord := self srcLongAt: sourceIndex."
when preload is false, only using the loop beginning "self dstLongAt: destIndex
put: prevWord." when preload and: [hDr = 1] is true.
Simplify the preload calculation in sourceSkewAndPointerInit by computing a mask
similar to mask1 and comparing it against mask1 to see that no bits would be
lost (if the mask computed for source is larger than mask1 then a preload is
necessary). Hence simplify the unskew and skewMask setup in copyLoop.
Improve the performance of primitiveDisplayString by pulling the lockSurfaces
and unlockSurfaces implicit in copyBits out of the loop and replacing copyBits
with copyBitsLockedAndClipped in the loop.
Fix primitivePixelValueAt so that it simulates correctly.
Other plugins:
Remove null implementations of initialiseModule and/or shutdownModule. The
loader/unloader invokes these only if they exist, consequently null versions
are simply a waste of time and space.
**NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/
Functionality will be removed from GitHub.com on January 31st, 2019.