Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2946.mcz ==================== Summary ==================== Name: VMMaker.oscog-eem.2946 Author: eem Time: 5 March 2021, 12:30:49.883238 pm UUID: 461911e1-d450-4f05-8a40-7b0470487041 Ancestors: VMMaker.oscog-eem.2945 Nuke the obsolete polling input primitives primitiveMouseButtons, primitiveKbdNext et al. These really are irrelevant to all images that run on Cog VMs. Fix a couple of compiler warnings. =============== Diff against VMMaker.oscog-eem.2945 =============== Item was changed: ----- Method: CogMethodZone>>cogMethodContaining: (in category 'jit - api') ----- cogMethodContaining: mcpc "Answer the method containing mcpc for the purposes of code zone compaction, where mcpc is actually the value of instructionPointer at the time of a compaction." <var: 'mcpc' type: #usqInt> <api> | cogMethod prevMethod | mcpc > limitAddress ifTrue: [^nil]. mcpc < baseAddress ifTrue: [cogit assertMcpcIsPrimReturn: mcpc. ^nil]. + self assert: mcpc < self freeStart. - self assert: mcpc < self limitZony. cogMethod := coInterpreter cCoerceSimple: baseAddress to: #'CogMethod *'. [cogMethod asUnsignedInteger < mcpc] whileTrue: [prevMethod := cogMethod. cogMethod := self methodAfter: cogMethod]. "Since mcpc is actually instructionPointer we expect that it is either at the stack check (normal code zone reclamation invoked through checkForEventsMayContextSwitch:) or is in a primitive, immediately following the call of the C primitive routine." self assert: (prevMethod notNil and: [mcpc = (prevMethod asUnsignedInteger + prevMethod stackCheckOffset) or: [(cogit backEnd isCallPrecedingReturnPC: mcpc) and: [(coInterpreter primitiveIndexOfMethod: prevMethod methodObject header: prevMethod methodHeader) > 0 or: [(cogit backEnd callTargetFromReturnAddress: mcpc) = cogit ceCheckForInterruptTrampoline]]]]). ^prevMethod! Item was changed: ----- Method: InterpreterPrimitives>>primitiveKbdNext (in category 'I/O primitives') ----- primitiveKbdNext "Obsolete on virtually all platforms; old style input polling code. Return the next keycode and remove it from the input buffer. The low byte is the 8-bit ISO character. The next four bits are the Smalltalk modifier bits <cmd><option><ctrl><shift>." + <option: #Legacy> - | keystrokeWord | self pop: 1. keystrokeWord := self ioGetKeystroke. keystrokeWord >= 0 ifTrue: [self pushInteger: keystrokeWord] ifFalse: [self push: objectMemory nilObject].! Item was changed: ----- Method: InterpreterPrimitives>>primitiveKbdPeek (in category 'I/O primitives') ----- primitiveKbdPeek "Obsolete on virtually all platforms; old style input polling code. Return the next keycode and without removing it from the input buffer. The low byte is the 8-bit ISO character. The next four bits are the Smalltalk modifier bits <cmd><option><ctrl><shift>." + <option: #Legacy> - | keystrokeWord | self pop: 1. keystrokeWord := self ioPeekKeystroke. keystrokeWord >= 0 ifTrue: [self pushInteger: keystrokeWord] ifFalse: [self push: objectMemory nilObject].! Item was changed: ----- Method: InterpreterPrimitives>>primitiveMouseButtons (in category 'I/O primitives') ----- primitiveMouseButtons "Obsolete on virtually all platforms; old style input polling code. Return the mouse button state. The low three bits encode the state of the <red><yellow><blue> mouse buttons. The next four bits encode the Smalltalk modifier bits <cmd><option><ctrl><shift>." + <option: #Legacy> - | buttonWord | self pop: 1. buttonWord := self ioGetButtonState. self pushInteger: buttonWord.! Item was changed: ----- Method: InterpreterPrimitives>>primitiveMousePoint (in category 'I/O primitives') ----- primitiveMousePoint "Obsolete on virtually all platforms; old style input polling code. Return a Point indicating current position of the mouse. Note that mouse coordinates may be negative if the mouse moves above or to the left of the top-left corner of the Smalltalk window." + <option: #Legacy> - | pointWord x y | pointWord := self ioMousePoint. x := self signExtend16: ((pointWord >> 16) bitAnd: 16rFFFF). y := self signExtend16: (pointWord bitAnd: 16rFFFF). self pop: 1 thenPush: (self makePointwithxValue: x yValue: y)! Item was changed: ----- Method: InterpreterPrimitives>>traceInputEvent: (in category 'I/O primitive support') ----- traceInputEvent: evtBuf <var: #evtBuf declareC: 'sqIntptr_t evtBuf[8]'> | eventTypeNames | eventTypeNames := self cCoerce: #('None' 'Mouse' 'Keyboard' 'DragDropFiles' 'Menu' 'Window' 'Complex' 'MouseWheel' 'Plugin') to: #'char **'. 'Event%s/%d @ %u\t\t%d/%x %d/%x\n\t%d/%x %d/%x\t %d/%x %p\n' f: #stderr printf: { ((evtBuf at: 0) between: 0 and: 8) ifTrue: [eventTypeNames at: (evtBuf at: 0)] ifFalse: ['?']. evtBuf at: 0. evtBuf at: 1. "timestamp" evtBuf at: 2. evtBuf at: 2. evtBuf at: 3. evtBuf at: 3. evtBuf at: 4. evtBuf at: 4. evtBuf at: 5. evtBuf at: 5. evtBuf at: 6. evtBuf at: 6. + (evtBuf at: 7) asVoidPointer } "windowIndex"! - evtBuf at: 7 } "windowIndex"! Item was changed: ----- Method: StackInterpreter class>>initializePrimitiveTable (in category 'initialization') ----- (excessive size, no diff calculated) |
Free forum by Nabble | Edit this page |