[Pkg] The Trunk: Kernel-eem.1057.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Feb 8 02:21:11 UTC 2017


Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.1057.mcz

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

Name: Kernel-eem.1057
Author: eem
Time: 7 February 2017, 6:20:56.634789 pm
UUID: 5768ff81-113e-47b1-9855-a6d8277bf6b3
Ancestors: Kernel-dtl.1056

Provide a convenient method for scanning for arbitrary bytecode sequences, where each bytecode is provided as a message.

=============== Diff against Kernel-dtl.1056 ===============

Item was added:
+ ----- 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:
+ 						[:ign|
+ 						 self atEnd ifTrue: [^false].
+ 						 self nextInstruction]).
+ 	[(naryBlock valueWithArguments: instructions asArray) ifTrue:
+ 		[^true].
+ 	 self atEnd] whileFalse:
+ 		[instructions removeFirst; addLast: self nextInstruction].
+ 	^false!



More information about the Packages mailing list