Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: 5dd7668b8d91f0bf789537cfc435a15c8935acc1
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/5dd7668b8d91f0bf78…
Author: Eliot Miranda <eliot.miranda(a)gmail.com>
Date: 2017-05-28 (Sun, 28 May 2017)
Changed paths:
M build.macos32x86/common/Makefile.plugin
M build.macos64x64/common/Makefile.plugin
M build.win32x86/common/Makefile
M build.win32x86/common/Makefile.plugin
M build.win64x64/common/Makefile
M build.win64x64/common/Makefile.plugin
M platforms/win32/plugins/BochsIA32Plugin/Makefile.plugin
M platforms/win32/plugins/BochsX64Plugin/Makefile.plugin
Log Message:
-----------
Implement the PREREQUISITES plugin exclusion mechanism for win32/64.
Provide the same mechanism for Pharo dylib plugins on Mac OS X.
Restore the dependency on the plugin makefile for win32. If the plugin
makefile changes in any way we *should* rebuild the plugin; flags may have
been changed, etc.
Branch: refs/heads/MSVCCodeGenerationBug
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: dd5609c1b82c41348df3a2d070def1241ad75292
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/dd5609c1b82c41348d…
Author: Nicolas Cellier <nicolas.cellier.aka.nice(a)gmail.com>
Date: 2017-05-28 (Sun, 28 May 2017)
Changed paths:
M spur64src/vm/cogitX64WIN64.c
Log Message:
-----------
Fix error C2466: impossible d'allouer un tableau de taille constante 0
Commit: e9020ec82ffd6156371c03a0c16e7a785481b605
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/e9020ec82ffd615637…
Author: Nicolas Cellier <nicolas.cellier.aka.nice(a)gmail.com>
Date: 2017-05-28 (Sun, 28 May 2017)
Changed paths:
M platforms/Cross/plugins/FilePlugin/FilePlugin.h
M platforms/Cross/plugins/FilePlugin/sqFilePluginBasicPrims.c
Log Message:
-----------
Make recent FilePlugin changes MSVC compatible
mode_t is not defined, it's int, and authorization flags will be different than unix
Commit: 627c53527859a3d9e6ca8dddabb3d9c431eb2d9c
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/627c53527859a3d9e6…
Author: Nicolas Cellier <nicolas.cellier.aka.nice(a)gmail.com>
Date: 2017-05-28 (Sun, 28 May 2017)
Changed paths:
M spur64src/vm/cointerp.c
Log Message:
-----------
Provide a MSVC compatible setjmp in WIN64
Note: this change should be in VMMaker source
Compare: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/28c247870337...62…
Branch: refs/heads/MSVCCodeGenerationBug
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: 28c247870337656f0bdb0e8566480400b3a2159c
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/28c247870337656f0b…
Author: Nicolas Cellier <nicolas.cellier.aka.nice(a)gmail.com>
Date: 2017-05-28 (Sun, 28 May 2017)
Changed paths:
A build.msvc/Croquet.ico
A build.msvc/GreenCogSqueak.ico
A build.msvc/MSVCCodeGenerationBug/MSVCCodeGenerationBug.c
A build.msvc/MSVCCodeGenerationBug/MSVCCodeGenerationBug.sln
A build.msvc/MSVCCodeGenerationBug/MSVCCodeGenerationBug/MSVCCodeGenerationBug.vcxproj
A build.msvc/MSVCCodeGenerationBug/MSVCCodeGenerationBug/MSVCCodeGenerationBug.vcxproj.filters
A build.msvc/SqueakCogSpur.sln
A build.msvc/SqueakCogSpur32.vcxproj
A build.msvc/SqueakCogSpur32.vcxproj.filters
A build.msvc/SqueakCogSpur64.vcxproj
A build.msvc/SqueakCogSpur64.vcxproj.filters
A build.msvc/SqueakStackSpur32.vcxproj
A build.msvc/SqueakStackSpur32.vcxproj.filters
A build.msvc/SqueakStackSpur64.vcxproj
A build.msvc/SqueakStackSpur64.vcxproj.filters
A build.msvc/sqNamedPrims.h
A build.msvc/squeak.ico
A build.msvc/squeak2.ico
A build.msvc/squeak3.ico
Log Message:
-----------
Add MSVC project demonstrating MSVC2017 code generation bug
Nicolas Cellier uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-nice.2224.mcz
==================== Summary ====================
Name: VMMaker.oscog-nice.2224
Author: nice
Time: 28 May 2017, 9:32:26.516807 am
UUID: fe6e83f5-ab7e-4c20-af1f-b784e4ef14f0
Ancestors: VMMaker.oscog-eem.2223
Revert leafCallStackPointerDelta change which was a bad guess for WIN64.
Incorporate Monty's file plugin changes: add a new primitiveFileOpenNew to open an unexisting file atomically without race condition.
=============== Diff against VMMaker.oscog-eem.2223 ===============
Item was changed:
----- Method: CogX64Compiler>>leafCallStackPointerDelta (in category 'abi') -----
leafCallStackPointerDelta
"Answer the delta from the stack pointer after a call to the stack pointer
immediately prior to the call. This is used to compute the stack pointer
immediately prior to call from within a leaf routine, which in turn is used
+ to capture the c stack pointer to use in trampolines back into the C run-time."
+ ^8!
- to capture the c stack pointer to use in trampolines back into the C run-time.
- In Win64 ABI, also count the stack reserved for saving 4 register arguments."
- ^SysV
- ifTrue: [8]
- ifFalse: [8 + 32]!
Item was added:
+ ----- Method: FilePlugin>>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."
+ | file fileOop okToOpen |
+ <var: #file type: 'SQFile *'>
+ <var: 'nameIndex' type: 'char *'>
+ <export: true>
+ fileOop := interpreterProxy instantiateClass: interpreterProxy classByteArray indexableSize: self fileRecordSize.
+ file := self fileValueOf: fileOop.
+ interpreterProxy failed
+ ifFalse: [ secureFlag ifTrue: [
+ "If the security plugin can be loaded, use it to check for permission.
+ If not, assume it's ok"
+ sCOFfn ~= 0
+ ifTrue: [okToOpen := self cCode: '((sqInt (*) (char *, sqInt, sqInt)) sCOFfn)(nameIndex, nameSize, true)' inSmalltalk:[true].
+ okToOpen
+ ifFalse: [interpreterProxy primitiveFail]]]].
+ interpreterProxy failed
+ ifFalse: [self cCode: 'sqFileOpenNew(file, nameIndex, nameSize)' inSmalltalk: [file]].
+ ^ fileOop!
Item was added:
+ ----- Method: FilePlugin>>primitiveFileOpenNew (in category 'file primitives') -----
+ primitiveFileOpenNew
+ | namePointer filePointer nameIndex nameSize |
+ <var: 'nameIndex' type: 'char *'>
+ <export: true>
+ namePointer := interpreterProxy stackValue: 0.
+ (interpreterProxy isBytes: namePointer)
+ ifFalse: [^ interpreterProxy primitiveFail].
+ nameIndex := interpreterProxy firstIndexableField: namePointer.
+ nameSize := interpreterProxy byteSizeOf: namePointer.
+ filePointer := self fileOpenNewName: nameIndex size: nameSize secure: true.
+ interpreterProxy failed
+ ifFalse: [
+ interpreterProxy
+ pop: 2 "rcvr, name"
+ thenPush: filePointer]
+ !
Item was added:
+ ----- 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 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 | Error signal: 'File already exists: ', nameIndex].
+ f ifNil: [^interpreterProxy primitiveFail].
+ f binary.
+ index := openFiles size + 1.
+ openFiles at: index put: f.
+ ^interpreterProxy integerObjectOf: index!
Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: 4d3f02655d68964e1fe4ed2b533658fe38168936
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/4d3f02655d68964e1f…
Author: Eliot Miranda <eliot.miranda(a)gmail.com>
Date: 2017-05-26 (Fri, 26 May 2017)
Changed paths:
M build.win64x64/common/Makefile.plugin
M build.win64x64/common/Makefile.tools
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 platforms/unix/vm/aio.c
M platforms/win32/vm/sqConfig.h
M platforms/win32/vm/sqWin32DnsInfo.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/gcc3x-cointerp.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/gcc3x-cointerp.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/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.2222
StackInterpreter:
Add time primitives to answer the UTC and local microsecond clocks as updated
by the heartbeat (as the Cog VM was originally before David changed the
primitives to access the time now). This access is much faster (of the order
of 20 nsecs per invocartion vs 450 nsecs per invocatuon on a 2.3 GHz Mac Mini).
Terf demands very fast clock times but is not concerned with fine granularity.
The primitive numbers are 245 for UTC and 246 for local.
primitiveMakePoint should fail if its /argument/ is not a SmallInteger or
Float. Since the primitive is on Number we know the receiver is valid, and
there is no point checking it.
Fix warnings for addIdleUsecs: on WIN32/64 (must not be marked exporrt to
avoid declspec being added).
Fix display pixel reversal (for debug). Modern implementation of displayBits
is (void *). We can't calculate an offset (dispalyBits + n) because we don't
know the size of void! At least it fails on MSVC compiler. So it's necessary
to convert it to char *, int *, or just sqInt. While at it, as calculated,
the range is a pixel range (assumed on the first display line) not a word
range, but this range will be rounded to a whole word boundary.
Cogit:
Modified with Sophie K the collectCogConstituents primitive to take a boolean
parameter "withDetails". If false or no parameter, the primitive does the same
thing as before. If true, the primitive maps each CogMethod that is frameful
to an array starting with the cogMethod address followed by a mapping between
the mcpc and the bcpc instead of just the cogMethod address.
Fix the method for getting the stack pointer in Win64 ABI. The generated
ceCaptureCStackPointers must account for the 32 bytes reserved for saving
the 4 register parameters which are allocated whatever the real number of
parameters.
Minor fix in register in branchIfInstanceOf: in SistaCogit for Characters.
Plugins:
Fix slips in the SoundPlugin code.
Win64 build. Do not define WIN32. Fix the win32 sqConfig.h file to work around
the clang preprocessor's failure to default undefined identifiers to 0L.