Levente Uzonyi uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-ul.368.mcz ==================== Summary ==================== Name: Tests-ul.368 Author: ul Time: 13 March 2017, 3:12:06.841229 pm UUID: abf86c3f-d3a7-4236-b37e-e005df609082 Ancestors: Tests-eem.367 SortedCollection Whack-a-mole =============== Diff against Tests-eem.367 =============== Item was changed: ----- Method: DecompilerTests>>decompileStringForParseTree: (in category 'utilities') ----- decompileStringForParseTree: aMethodNode "Renumber the temps in the tree in parse tree order to eliminate that as a source of extraneous difference." | visited count counter | visited := IdentitySet new. count := 0. counter := [:temp| (visited includes: temp) ifFalse: [temp name: 't', (count := count + 1) printString. visited add: temp]]. aMethodNode nodesDo: [:node| (node == aMethodNode or: [node isBlockNode and: [node optimized not]]) ifTrue: [node arguments do: counter]. node isTemp ifTrue: [counter value: node]]. aMethodNode nodesDo: [:node| (node == aMethodNode or: [node isBlockNode and: [node optimized not]]) ifTrue: [node temporaries do: counter. + node temporaries: (node temporaries sorted: ParseNode tempSortBlock) ]]. - node temporaries: (node temporaries asSortedCollection: ParseNode tempSortBlock) asArray]]. ^aMethodNode decompileString! Item was changed: ----- Method: MCSortingTest>>sortDefinitions: (in category 'actions') ----- sortDefinitions: aCollection + ^ aCollection sort! - ^ aCollection asSortedCollection asArray! Item was changed: ----- Method: PCCByCompilation>>methodsWithDisabledCall (in category 'ui querying') ----- methodsWithDisabledCall + "Answer a sorted collection of all the methods that contain, in source - "Answer a SortedCollection of all the methods that contain, in source code, the substring indicating a disabled prim." "The alternative implementation ^ SystemNavigation new allMethodsWithSourceString: self disabledPrimStartString matchCase: true also searches in class comments." + ^CurrentReadOnlySourceFiles cacheDuring: [ + | list string | + string := self disabledPrimStartString. + list := Set new. + 'Searching all method source code...' + displayProgressFrom: 0 + to: Smalltalk classNames size * 2 "classes with their metaclasses" + during: [:bar | | classCount | + classCount := 0. + SystemNavigation default + allBehaviorsDo: [:class | + bar value: (classCount := classCount + 1). + class + selectorsDo: [:sel | + | src | + "higher priority to avoid source file accessing + errors" + src := [class sourceCodeAt: sel] + valueAt: self higherPriority. + (src + findString: string + startingAt: 1 + caseSensitive: true) > 0 + ifTrue: [list add: (MethodReference class: class selector: sel)]]]]. + list sorted ]! - | list string | - string := self disabledPrimStartString. - list := Set new. - 'Searching all method source code...' - displayProgressFrom: 0 - to: Smalltalk classNames size * 2 "classes with their metaclasses" - during: [:bar | | classCount | - classCount := 0. - SystemNavigation default - allBehaviorsDo: [:class | - bar value: (classCount := classCount + 1). - class - selectorsDo: [:sel | - | src | - "higher priority to avoid source file accessing - errors" - src := [class sourceCodeAt: sel] - valueAt: self higherPriority. - (src - findString: string - startingAt: 1 - caseSensitive: true) > 0 - ifTrue: [list add: (MethodReference class: class selector: sel)]]]]. - ^ list asSortedCollection! |
Free forum by Nabble | Edit this page |