Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
as yet unclassified
accessing
contains: aString caseSensitive: aBoolean exclude: aCollection do: aBlock

| separators |
Expand All @@ -7,5 +7,6 @@ contains: aString caseSensitive: aBoolean exclude: aCollection do: aBlock
separators := CharacterSet separators.
Symbol allSymbolTablesDo: [:each |
((each indexOfAnyOf: separators startingAt: 1) = 0 and: [(aCollection includes: each) not]
and: [each includesSubstring: aString caseSensitive: aBoolean])
and: [(each includesSubstring: aString caseSensitive: aBoolean)
and: [self isValidSelector: each]])
ifTrue: [aBlock value: each]].
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
testing
isValidSelector: aSymbol

"ct: ~24% faster than uncached (58ms vs 75ms for Symbol allSymbols)"
^ (SymbolValidities ifNil: [SymbolValidities := WeakIdentityKeyDictionary new])
at: aSymbol ifAbsentPut: [aSymbol isMessageSelector]
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"class" : {
"contains:caseSensitive:do:" : "LM 3/20/2019 15:22",
"contains:caseSensitive:exclude:do:" : "LM 3/20/2019 15:22" },
"contains:caseSensitive:exclude:do:" : "ct 12/21/2023 21:00",
"isValidSelector:" : "ct 12/21/2023 21:05" },
"instance" : {
} }
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"classinstvars" : [
],
"classvars" : [
],
"SymbolValidities" ],
"commentStamp" : "",
"instvars" : [
],
Expand Down