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

commits at source.squeak.org commits at source.squeak.org
Mon Oct 5 02:46:58 UTC 2020


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

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

Name: VMMaker.oscog-eem.2834
Author: eem
Time: 4 October 2020, 7:46:49.720371 pm
UUID: 6e752d78-e255-4b30-92b6-440c93abd885
Ancestors: VMMaker.oscog-eem.2833

Primitives:
Implement some simulation support for the HostWindowPlugin, mainly to test the subset used by Terf.  Make curasor warping generally available.

Remove cCode from primitiveSetDisplayMode

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

Item was changed:
  ----- Method: HostWindowPlugin>>primitiveSetCursorPositionX:Y: (in category 'system primitives') -----
  primitiveSetCursorPositionX: x Y: y
+ 	"Set the position of the cursor to the specified position on the desktop (*not* the display).
- 	<option: #TerfVM>
- 	"Set the position of the cursor to the specified position on the desktop.
  	 Fail if the platform routine returns -1 to indicate failure."
  	| result |
  	self primitive: 'primitiveSetCursorPosition'
  		parameters: #(SmallInteger SmallInteger).
  	result := self ioSetCursorPositionX: x Y: y.
  	result = -1 ifTrue:
  		[^interpreterProxy primitiveFail]!

Item was added:
+ HostWindowPlugin subclass: #HostWindowPluginSimulator
+ 	instanceVariableNames: ''
+ 	classVariableNames: ''
+ 	poolDictionaries: ''
+ 	category: 'VMMaker-InterpreterSimulation'!

Item was added:
+ ----- Method: HostWindowPluginSimulator>>ioPositionOfWindow: (in category 'primitive simulation') -----
+ ioPositionOfWindow: windowIndex
+ 	<primitive: 'primitiveHostWindowPosition' module: 'HostWindowPlugin' error: ec>
+ 	^-1
+ 
+ 	"self basicNew ioPositionOfWindow: 1"!

Item was added:
+ ----- Method: HostWindowPluginSimulator>>ioPositionOfWindowSet:x:y: (in category 'primitive simulation') -----
+ ioPositionOfWindowSet: windowIndex x: x y: y
+ 	<primitive: 'primitiveHostWindowPositionSet' module: 'HostWindowPlugin' error: ec>
+ 	^-1
+ 
+ 	"self basicNew ioPositionOfWindowSet: 1 x: 500 y: 500"
+ 	"self basicNew ioPositionOfWindowSet: 1 x: 64 y: 64"!

Item was added:
+ ----- Method: HostWindowPluginSimulator>>ioSetCursorPositionX:Y: (in category 'primitive simulation') -----
+ ioSetCursorPositionX: x Y: y
+ 	<primitive: 'primitiveSetCursorPosition' module: 'HostWindowPlugin' error: ec>
+ 	^-1
+ 
+ 	"self basicNew ioSetCursorPositionX: Display width // 2 Y: Display height // 2"!

Item was added:
+ ----- Method: HostWindowPluginSimulator>>ioSizeOfWindow: (in category 'primitive simulation') -----
+ ioSizeOfWindow: windowIndex
+ 	<primitive: 'primitiveHostWindowSize' module: 'HostWindowPlugin' error: ec>
+ 	^-1
+ 
+ 	"self basicNew ioSizeOfWindow: 1"!

Item was added:
+ ----- Method: HostWindowPluginSimulator>>ioSizeOfWindowSet:x:y: (in category 'primitive simulation') -----
+ ioSizeOfWindowSet: windowIndex x: x y: y
+ 	<primitive: 'primitiveHostWindowSizeSet' module: 'HostWindowPlugin' error: ec>
+ 	^-1
+ 
+ 	"self basicNew ioSizeOfWindowSet: 1 x: 500 y: 500"
+ 	"self basicNew ioSizeOfWindowSet: 1 x: 64 y: 64"!

Item was added:
+ ----- Method: HostWindowPluginSimulator>>pointFromCompactPointEncoding: (in category 'support') -----
+ pointFromCompactPointEncoding: encodedPoint
+ 	"For simplicity in the simulation invoking primitives that may or may not answer a point..."
+ 	<inline: #always>
+ 	encodedPoint isPoint ifTrue:
+ 		[^interpreterProxy
+ 			makePointwithxValue: encodedPoint x
+ 			yValue: encodedPoint y].
+ 	^super pointFromCompactPointEncoding: encodedPoint!

Item was changed:
  ----- Method: InterpreterPrimitives>>primitiveSetDisplayMode (in category 'I/O primitives') -----
  primitiveSetDisplayMode
+ 	"Ask trhe GUI to set the requested display mode.
+ 	 See DisplayScreen class depth:width:height:fullscreen:"
- 	"Set to OS to the requested display mode.
- 	See also DisplayScreen setDisplayDepth:extent:fullscreen:"
  	| fsFlag h w d okay |
+ 	fsFlag := self booleanValueOf: self stackTop.
- 	fsFlag := self booleanValueOf: (self stackTop).
  	h := self stackIntegerValue: 1.
  	w := self stackIntegerValue: 2.
  	d := self stackIntegerValue: 3.
+ 	self successful ifFalse:
+ 		[^self primitiveFailFor: PrimErrBadArgument].
+ 	okay := self ioSetDisplayMode: w _: h _: d _: fsFlag.
+ 	self successful ifFalse:
+ 		[^self primitiveFailFor: PrimErrOperationFailed].
+ 	self methodReturnBool: okay!
- 	self successful ifTrue: [okay := self cCode:'ioSetDisplayMode(w, h, d, fsFlag)'].
- 	self successful ifTrue: [self pop: 5 thenPushBool: okay "Pop args+rcvr"]!



More information about the Vm-dev mailing list