[Vm-dev] VM Maker: VMMaker.oscog-eem.2939.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Jan 22 19:49:30 UTC 2021


Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2939.mcz

==================== Summary ====================

Name: VMMaker.oscog-eem.2939
Author: eem
Time: 22 January 2021, 11:49:18.757235 am
UUID: f054050f-19cd-41d1-9a3e-7cfd1a2e6e0a
Ancestors: VMMaker.oscog-eem.2938

Extend the HostWindowPlugin with a primitive to answer an array of screen rectangles for the available monitors.

=============== Diff against VMMaker.oscog-eem.2938 ===============

Item was added:
+ ----- Method: HostWindowPlugin>>primitiveScreenRectangles (in category 'system primitives') -----
+ primitiveScreenRectangles
+ 	<option: #TerfVM>
+ 	"Answer an Array of pairs of packed x,y repreeentation origins and extents for all the available monitors."
+ 	self primitive: 'primitiveScreenRectangles'.
+ 	self ioScreenRectangles
+ 		ifNil: [interpreterProxy primitiveFailFor: PrimErrNoMemory]
+ 		ifNotNil: [:screenRectangles| interpreterProxy methodReturnValue: screenRectangles]!

Item was added:
+ ----- Method: HostWindowPluginSimulator>>ioScreenRectangles (in category 'primitive simulation') -----
+ ioScreenRectangles
+ 	self ioScreenRectanglesPrimitive
+ 		ifNil: [interpreterProxy primitiveFailFor: PrimErrNoMemory]
+ 		ifNotNil:
+ 			[:a|
+ 			(interpreterProxy instantiateClass: interpreterProxy classArray indexableSize: a size)
+ 				ifNil: [interpreterProxy primitiveFailFor: PrimErrNoMemory]
+ 				ifNotNil:
+ 					[:result|
+ 					1 to: a size do:
+ 						[:i| interpreterProxy storeInteger: i - 1 ofObject: result withValue: (a at: i)].
+ 					^result]].
+ 	^nil!

Item was added:
+ ----- Method: HostWindowPluginSimulator>>ioScreenRectanglesPrimitive (in category 'primitive simulation') -----
+ ioScreenRectanglesPrimitive
+ 	<primitive: 'primitiveScreenRectangles' module: 'HostWindowPlugin' error: ec>
+ 	^nil
+ 
+ 	"self basicNew ioScreenRectanglesPrimitive"
+ 	"self basicNew ioScreenRectanglesPrimitive collect:
+ 		[:pp| | x y |
+ 		x := pp bitShift: -16.
+ 		y := pp bitAnd: 16rFFFF.
+ 		y > 32767 ifTrue: [y := y - 65536].
+ 		x at y]"!



More information about the Vm-dev mailing list