[squeak-dev] The Trunk: Kernel-eem.1407.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Jul 9 21:46:21 UTC 2021

Eliot Miranda uploaded a new version of Kernel to project The Trunk:

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

Name: Kernel-eem.1407
Author: eem
Time: 9 July 2021, 2:46:18.688883 pm
UUID: 48a520fa-d6a2-44fa-8508-3405e7e0b8b9
Ancestors: Kernel-mt.1406

Have scanForInstructionSequence: descend into full blocks.  Eliminate cases handled by otherwise clause in installVirtualKeyTable. Add error code to resue primitive invocation.

=============== Diff against Kernel-mt.1406 ===============

Item was changed:
  ----- Method: EventSensor class>>installVirtualKeyTable (in category 'class initialization') -----
  	VirtualKeyTable := Smalltalk windowSystemName
  			caseOf: {
  				['Windows'] -> [self virtualKeysOnWindows].
  				['Win32' "older VMs"] -> [self virtualKeysOnWindows].
  				['Aqua'] -> [self virtualKeysOnMacOS].
  				['X11'] -> [self virtualKeysOnX11].
- 				['RiscOS'] -> [Dictionary new].
- 				['Quartz'] -> [Dictionary new].
  			} otherwise: [Dictionary new].
  	"Shift 8 bits to not overwrite virtual-key mappings from above."
  	self mapControlKeysToCommandKeys ifTrue: [		
  			at: (2r0010 "ctrl" bitShift: 8)
  			put: (2r1010 "cmd+ctrl").
  			at: (2r0011 "ctrl+shift" bitShift: 8)
  			put: (2r1011 "cmd+ctrl+shift")].
  	self mapAltKeysToOptionKeys ifTrue: [
  			at: (2r1000 "cmd/alt" bitShift: 8)
  			put: (2r1100 "cmd/alt+opt").
  			at: (2r1001 "cmd/alt+shift" bitShift: 8)
  			put: (2r1101 "cmd/alt+opt+shift")].!

Item was changed:
  ----- Method: InstructionStream>>scanForInstructionSequence: (in category 'scanning') -----
  scanForInstructionSequence: naryBlock
  	"naryBlock is a block taking one or more arguments.
  	 Evaluate it for each sequence of instructions of length
  	 n in the receiver until naryBlock evaluates to true.
  	 Answer if naryBlock evaluated to true."
  	| instructions |
  	instructions := OrderedCollection withAll: ((1 to: naryBlock numArgs) collect:
+ 						 self atEnd ifFalse:
+ 							[self nextInstruction]]).
+ 	instructions last ifNil: "not enough instructions, so no match in this method, but must check for blocks"
+ 		[instructions do:
+ 			[:instOrNil|
+ 			  instOrNil ifNil: [^false].
+ 			  (instOrNil selector == #pushFullClosure:numCopied:
+ 			  and: [(self class on: instOrNil argument) scanForInstructionSequence: naryBlock]) ifTrue:
+ 				[^true]]].
- 						 self atEnd ifTrue: [^false].
- 						 self nextInstruction]).
  	[(naryBlock valueWithArguments: instructions asArray) ifTrue:
+ 	 (instructions first selector == #pushFullClosure:numCopied:
+ 	  and: [(self class on: instructions first argument) scanForInstructionSequence: naryBlock]) ifTrue:
+ 		[^true].
  	 self atEnd] whileFalse:
  		[instructions removeFirst; addLast: self nextInstruction].

Item was changed:
  ----- Method: Process>>resume (in category 'changing process state') -----
  	"Primitive. Allow the process that the receiver represents to continue. Put 
  	 the receiver in line to become the activeProcess.  Fail if the receiver is 
  	 already waiting in a queue (in a Semaphore or ProcessScheduler).  Fail if
  	 the receiver's suspendedContext is not a context.
  	 Essential. See Object documentation whatIsAPrimitive."
+ 	<primitive: 87 error: ec>
- 	<primitive: 87>
  	self primitiveFailed!

More information about the Squeak-dev mailing list