ClementBera uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-cb.1912.mcz
==================== Summary ====================
Name: VMMaker.oscog-cb.1912
Author: cb
Time: 28 July 2016, 11:10:23.800381 am
UUID: 43b9cbdf-2d05-4102-82c8-65b20fba0017
Ancestors: VMMaker.oscog-cb.1911
Fixed a register spill for remote inst var access.
Improved error code returns
=============== Diff against VMMaker.oscog-cb.1911 ===============
Item was changed:
----- Method: StackToRegisterMappingCogit>>genGenericStorePop:MaybeContextSlotIndex:needsStoreCheck:needsRestoreRcvr:needsImmutabilityCheck: (in category 'bytecode generator stores') -----
genGenericStorePop: popBoolean MaybeContextSlotIndex: slotIndex needsStoreCheck: needsStoreCheck needsRestoreRcvr: needsRestoreReceiver needsImmutabilityCheck: needsImmCheck
"Generates a store into an object that *may* be a context.
Multiple settings:
- needsStoreCheck (young into old object check)
- needRestoreRcvr (ensures the recevier is live across the store)
- needsImmCheck (do the call-back if the receiver is immutable)"
<inline: true>
| jmpSingle jmpDone |
<var: #jmpSingle type: #'AbstractInstruction *'>
<var: #jmpDone type: #'AbstractInstruction *'>
"The reason we need a frame here is that assigning to an inst var of a context may
involve wholesale reorganization of stack pages, and the only way to preserve the
execution state of an activation in that case is if it has a frame."
"Context stores do not require Imm checks as contexts can't be immutable"
self assert: needsFrame.
self ssPop: 1.
self ssAllocateCallReg: ClassReg and: SendNumArgsReg. "for ceStoreContextInstVarTrampoline"
self ssPush: 1.
objectRepresentation
genLoadSlot: SenderIndex
sourceReg: ReceiverResultReg
destReg: TempReg.
self ssStoreAndReplacePop: popBoolean toReg: ClassReg.
jmpSingle := objectRepresentation genJumpNotSmallIntegerInScratchReg: TempReg.
self MoveCq: slotIndex R: SendNumArgsReg.
self CallRT: ceStoreContextInstVarTrampoline.
jmpDone := self Jump: 0.
jmpSingle jmpTarget: self Label.
(IMMUTABILITY and: [needsImmCheck])
ifTrue:
[objectRepresentation
genStoreWithImmutabilityCheckSourceReg: ClassReg
slotIndex: slotIndex
destReg: ReceiverResultReg
scratchReg: TempReg
needsStoreCheck: needsStoreCheck
+ needRestoreRcvr: needsRestoreReceiver]
- needRestoreRcvr: true]
ifFalse:
[objectRepresentation
genStoreSourceReg: ClassReg
slotIndex: slotIndex
destReg: ReceiverResultReg
scratchReg: TempReg
inFrame: true
needsStoreCheck: needsStoreCheck].
jmpDone jmpTarget: self Label.
^0!
Item was changed:
----- Method: StackToRegisterMappingCogit>>genStorePop:LiteralVariable: (in category 'bytecode generator stores') -----
genStorePop: popBoolean LiteralVariable: litVarIndex
+ <inline: true>
- <inline: false>
^self
genStorePop: popBoolean
LiteralVariable: litVarIndex
needsStoreCheck: self ssTopNeedsStoreCheck
needsImmutabilityCheck: true "The generic store checks for IMMUTABILITY flag"
!
Item was changed:
----- Method: StackToRegisterMappingCogit>>genStorePop:LiteralVariable:needsStoreCheck:needsImmutabilityCheck: (in category 'bytecode generator stores') -----
genStorePop: popBoolean LiteralVariable: litVarIndex needsStoreCheck: needsStoreCheck needsImmutabilityCheck: needsImmCheck
<inline: false>
"We need a frame because the association has to be in ReceiverResultReg for the various trampolines
and ReceiverResultReg holds only the receiver in frameless methods."
self assert: needsFrame.
self genLoadLiteralVariable: litVarIndex in: ReceiverResultReg.
+ ^self
- self
genGenericStorePop: popBoolean
slotIndex: ValueIndex
destReg: ReceiverResultReg
needsStoreCheck: needsStoreCheck
needsRestoreRcvr: false
+ needsImmutabilityCheck: needsImmCheck
- needsImmutabilityCheck: needsImmCheck.
- ^ 0
!
Item was changed:
----- Method: StackToRegisterMappingCogit>>genStorePop:MaybeContextReceiverVariable: (in category 'bytecode generator stores') -----
genStorePop: popBoolean MaybeContextReceiverVariable: slotIndex
+ <inline: true>
- <inline: false>
^self
genStorePop: popBoolean
MaybeContextReceiverVariable: slotIndex
needsStoreCheck: self ssTopNeedsStoreCheck
needsImmutabilityCheck: true "The generic store checks for IMMUTABILITY flag"!
Item was changed:
----- Method: StackToRegisterMappingCogit>>genStorePop:MaybeContextReceiverVariable:needsStoreCheck:needsImmutabilityCheck: (in category 'bytecode generator stores') -----
genStorePop: popBoolean MaybeContextReceiverVariable: slotIndex needsStoreCheck: needsStoreCheck needsImmutabilityCheck: needsImmCheck
<inline: false>
"The reason we need a frame here is that assigning to an inst var of a context may
involve wholesale reorganization of stack pages, and the only way to preserve the
execution state of an activation in that case is if it has a frame."
self assert: needsFrame.
self ssFlushUpThroughReceiverVariable: slotIndex.
self ensureReceiverResultRegContainsSelf.
+ ^self
- self
genGenericStorePop: popBoolean
MaybeContextSlotIndex: slotIndex
needsStoreCheck: needsStoreCheck
needsRestoreRcvr: true
+ needsImmutabilityCheck: needsImmCheck!
- needsImmutabilityCheck: needsImmCheck.
- ^ 0!
Item was changed:
----- Method: StackToRegisterMappingCogit>>genStorePop:MaybeContextRemoteInstVar:ofObjectAt:needsStoreCheck:needsImmutabilityCheck: (in category 'bytecode generator stores') -----
genStorePop: popBoolean MaybeContextRemoteInstVar: slotIndex ofObjectAt: objectIndex needsStoreCheck: needsStoreCheck needsImmutabilityCheck: needsImmCheck
<inline: false>
"The reason we need a frame here is that assigning to an inst var of a context may
involve wholesale reorganization of stack pages, and the only way to preserve the
execution state of an activation in that case is if it has a frame."
self assert: needsFrame.
self genLoadTemp: objectIndex in: ReceiverResultReg.
+ ^self
- self
genGenericStorePop: popBoolean
MaybeContextSlotIndex: slotIndex
needsStoreCheck: needsStoreCheck
needsRestoreRcvr: false
+ needsImmutabilityCheck: needsImmCheck!
- needsImmutabilityCheck: needsImmCheck.
- ^ 0!
Item was changed:
----- Method: StackToRegisterMappingCogit>>genStorePop:ReceiverVariable: (in category 'bytecode generator stores') -----
genStorePop: popBoolean ReceiverVariable: slotIndex
+ <inline: true>
- <inline: false>
^self
genStorePop: popBoolean
ReceiverVariable: slotIndex
needsStoreCheck: self ssTopNeedsStoreCheck
needsImmutabilityCheck: true "The generic store checks for IMMUTABILITY flag"
!
Item was changed:
----- Method: StackToRegisterMappingCogit>>genStorePop:ReceiverVariable:needsStoreCheck:needsImmutabilityCheck: (in category 'bytecode generator stores') -----
genStorePop: popBoolean ReceiverVariable: slotIndex needsStoreCheck: needsStoreCheck needsImmutabilityCheck: needsImmCheck
<inline: false>
self ssFlushUpThroughReceiverVariable: slotIndex.
self ensureReceiverResultRegContainsSelf.
"In two path compilation the receiver is young AND mutable, hence no store check nor immutability check is needed"
+ ^self
- self
genGenericStorePop: popBoolean
slotIndex: slotIndex
destReg: ReceiverResultReg
needsStoreCheck: (useTwoPaths not and: [needsStoreCheck])
needsRestoreRcvr: true "ReceiverResultReg is kept live with the receiver across the operation"
+ needsImmutabilityCheck: (needsImmCheck and: [useTwoPaths not])
- needsImmutabilityCheck: (needsImmCheck and: [useTwoPaths not]).
- ^ 0
!
Item was changed:
----- Method: StackToRegisterMappingCogit>>genStorePop:RemoteInstVar:ofObjectAt:needsStoreCheck:needsImmutabilityCheck: (in category 'bytecode generator stores') -----
genStorePop: popBoolean RemoteInstVar: slotIndex ofObjectAt: objectIndex needsStoreCheck: needsStoreCheck needsImmutabilityCheck: needsImmCheck
<inline: false>
self assert: needsFrame.
self genLoadTemp: objectIndex in: ReceiverResultReg.
+ ^self
- self
genGenericStorePop: popBoolean
slotIndex: slotIndex
destReg: ReceiverResultReg
needsStoreCheck: needsStoreCheck
needsRestoreRcvr: false
+ needsImmutabilityCheck: needsImmCheck!
- needsImmutabilityCheck: needsImmCheck.
- ^ 0!
Item was changed:
----- Method: StackToRegisterMappingCogit>>genStorePop:RemoteTemp:At: (in category 'bytecode generator stores') -----
genStorePop: popBoolean RemoteTemp: slotIndex At: remoteTempIndex
+ <inline: true>
- <inline: false>
^ self genStorePop: popBoolean RemoteTemp: slotIndex At: remoteTempIndex needsStoreCheck: self ssTopNeedsStoreCheck!
Item was changed:
----- Method: StackToRegisterMappingCogit>>genStorePop:RemoteTemp:At:needsStoreCheck: (in category 'bytecode generator stores') -----
genStorePop: popBoolean RemoteTemp: slotIndex At: remoteTempIndex needsStoreCheck: needsStoreCheck
<inline: false>
"The only reason we assert needsFrame here is that in a frameless method
ReceiverResultReg must and does contain only self, but the ceStoreCheck
trampoline expects the target of the store to be in ReceiverResultReg. So
in a frameless method we would have a conflict between the receiver and
the temote temp store, unless we we smart enough to realise that
ReceiverResultReg was unused after the literal variable store, unlikely given
that methods return self by default."
self assert: needsFrame.
"N.B. No need to check the stack for references because we generate code for
remote temp loads that stores the result in a register, deferring only the register push."
self ssAllocateRequiredReg: ReceiverResultReg.
optStatus isReceiverResultRegLive: false.
self MoveMw: (self frameOffsetOfTemporary: remoteTempIndex) r: FPReg R: ReceiverResultReg.
+ ^self
- self
genGenericStorePop: popBoolean
slotIndex: slotIndex
destReg: ReceiverResultReg
needsStoreCheck: needsStoreCheck
needsRestoreRcvr: false "We don't keep ReceiverResultReg live with the receiver across this operation"
+ needsImmutabilityCheck: false "never do immutability check on temp vectors"!
- needsImmutabilityCheck: false. "never do immutability check on temp vectors"
- ^ 0!
Hi,
I merged the changes from Tobias too fast...
Despite the efforts, the win32 VM produced from HEAD are currently not
usable when compiled thru cygwin/mingw
I don't get a better health thru MSVC
The last functional VM I get (both win32 squeak.cog.spur and win64
squeak.stack.spur) are from
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/43dca8fe50b7cc7090…
This prevents me to focus on the VMaker LLP64 changes.
Maybe we'll have to revert... Thoughts?
Nicolas
Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: 6437fb3788a373d9ed733b9c2e23c500fed98505
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/6437fb3788a373d9ed…
Author: Tobias Pape <tobias(a)netshed.de>
Date: 2016-07-27 (Wed, 27 Jul 2016)
Changed paths:
M platforms/win32/vm/sqWin32Main.c
M platforms/win32/vm/sqWin32Window.c
Log Message:
-----------
Revert "Force unicode again"
This reverts commit cd6708a3b8c50ee686e4448239376da6a716e6c6.
Commit: 9e2bbd74c1c182a89562973b160be4af98271cc1
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/9e2bbd74c1c182a895…
Author: Tobias Pape <tobias(a)netshed.de>
Date: 2016-07-27 (Wed, 27 Jul 2016)
Changed paths:
M platforms/win32/vm/sqWin32Main.c
M platforms/win32/vm/sqWin32Window.c
Log Message:
-----------
Revert "Use W window proc directly"
This reverts commit 65100796a9ac3e1e1cb16f333f91af6902ca39a7.
Commit: d13677f7f7c2deec4b7491744c3e5e3a6d7330ca
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/d13677f7f7c2deec4b…
Author: Tobias Pape <tobias(a)netshed.de>
Date: 2016-07-27 (Wed, 27 Jul 2016)
Changed paths:
M platforms/Cross/vm/sqAtomicOps.h
M platforms/Cross/vm/sqMemoryFence.h
M platforms/win32/plugins/B3DAcceleratorPlugin/sqWin32OpenGL.c
M platforms/win32/plugins/FilePlugin/sqWin32File.h
M platforms/win32/plugins/FilePlugin/sqWin32FilePrims.c
M platforms/win32/plugins/HostWindowPlugin/sqWin32HostWindowPlugin.c
M platforms/win32/plugins/SecurityPlugin/sqWin32Security.c
M platforms/win32/vm/sqWin32.h
M platforms/win32/vm/sqWin32Directory.c
M platforms/win32/vm/sqWin32ExternalPrims.c
M platforms/win32/vm/sqWin32Main.c
M platforms/win32/vm/sqWin32PluginSupport.c
M platforms/win32/vm/sqWin32Prefs.c
M platforms/win32/vm/sqWin32Prefs.h
M platforms/win32/vm/sqWin32Threads.c
M platforms/win32/vm/sqWin32Window.c
Log Message:
-----------
Revert "Fix MSVC/WINAPI code, fix formatting"
This reverts commit 82d1c33a1c5756b0a76bd37539d15a4824368d59.
Commit: 6cb21ba2a3451eb41759b534a32874120f645252
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/6cb21ba2a3451eb417…
Author: Tobias Pape <tobias(a)netshed.de>
Date: 2016-07-27 (Wed, 27 Jul 2016)
Changed paths:
M platforms/Cross/plugins/IA32ABI/ia32abi.h
M platforms/Cross/vm/sqAtomicOps.h
M platforms/Cross/vm/sqHeapMap.c
M platforms/win32/plugins/B3DAcceleratorPlugin/sqWin32OpenGL.c
M platforms/win32/plugins/B3DAcceleratorPlugin/sqWin32OpenGL.h
M platforms/win32/plugins/HostWindowPlugin/sqWin32HostWindowPlugin.c
M platforms/win32/vm/sqConfig.h
M platforms/win32/vm/sqPlatformSpecific.h
M platforms/win32/vm/sqWin32.h
M platforms/win32/vm/sqWin32Backtrace.c
M platforms/win32/vm/sqWin32Main.c
Log Message:
-----------
[WIP] Revert "Unify Processor/OS detection a bit more, also a bit more complete"
This reverts commit 8060b80f72d2ecca1ec495247f51689f5b362645.
and also
18243a65b8d47740c48b4deb51c24b2eddec6cb5
342a4decac3274482613b74779a0114d12253f54
b5102062916cb8bfcfd16503b9e83495651f28be
c67b3f7a63190c5a6c1ddd1d8776b04dbf16399a
e1228fa39e0a175b43b6020d5fe6c070871c10e8
cd6708a3b8c50ee686e4448239376da6a716e6c6
f120e6204ea7b6da6df5b9c43cc32cceb987249b
6025d834e6b1a35c43153e0fe94bf3579cbcf52d
6773a26663e0a1f58188b8c5f2a7d6ee10e140f1
65100796a9ac3e1e1cb16f333f91af6902ca39a7
4bd80a5a35b6ac8a9e7244427ad6402fbb323711
3043ae83f552697b1019d2b02e9944de32628b62
d85a19df651b32934579efecf56c9afd0aabd443
ea931a79b88e17213808b4415700f6a5b1c40789
d4e3bc61e62091dc90904004f545d65812724932
e8b7b0125e7f581d184685a2835981a971e301ca
9c4f97fc3f604446241f5367f9e50f9156c274c6
9c628efa0357dd7ac2583a32065870584b50e49b
5da712ffc5af51b67c28400507b2d436681538fc
d5373c34ae8f0814a6435d2d9de6c367fb4c4b63
d11b90114ce2a1643d6112ade1fa26d4bd5c5c73
118342fe2e188194a60ac0205126c9c6e42b3975
82d1c33a1c5756b0a76bd37539d15a4824368d59
6f038ce094a9b8f7511206cc53bbcf51a63a0a1f
9d072341ffd49091d7b50da5b57597302b74df04
8060b80f72d2ecca1ec495247f51689f5b362645
[ci skip]
Compare: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/18243a65b8d4...6c…