[squeak-dev] EventSensor>processEvent: has bogus code

tim Rowledge tim at rowledge.org
Sat Mar 2 23:49:52 UTC 2013


On 02-03-2013, at 3:22 AM, Bert Freudenberg <bert at freudenbergs.de> wrote:

> 
> The comment just says that *if* this gets reported as a keyboard event from the VM, it will *not* be passed on as an event from the Sensor, but *instead* signal the interruptSemaphore directly.

Yes but the VM code is supposed to have already signalled the interrupt semaphore; so there is certainly potential for a double-tap instead of a single signal and thus the specified VM requirement to not pass on the keypress. I remember working on this with Andreas something like 10 years ago and the whole idea was to avoid the input sensor being involved.

> 
>> Unless I'm missing things (it's Friday afternoon ok?) this clause really ought to be removed.
> 
> Why? It doesn't hurt anyone, even if no current VM sends these events.

It hurts my eyes to see wrong code. It wastes cycles, which matters to me as well, just on principal. It wastes other people's time because it is complication that distracts. 

> 
>> And really - we still have all those long obsolete io prims called in there too? Oh my. You can just about excuse the VMs having the code to support ancient images, but not modern images.
> 
> They shouldn't be called on a modern VM that supports events, true. But there are always new VM platforms, and implementing the polling on the VM side is certainly easier than the events, no?

Having done a few I think I'd say no. Clearly it strictly depends on the platform in extremis.


tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Strange OpCodes: RC: Rewind Core




More information about the Squeak-dev mailing list