ExecutableFunction.st
changeset 21340 df3769bd1417
parent 20956 d8ed7f775615
child 21623 0fd2de531f9a
--- a/ExecutableFunction.st	Fri Feb 03 16:58:32 2017 +0100
+++ b/ExecutableFunction.st	Sun Feb 05 01:31:59 2017 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1994 by Claus Gittinger
 	      All Rights Reserved
@@ -444,6 +442,46 @@
 !
 
 sends:aSelectorSymbol
+    <resource: #obsolete>
+    
+    "return true, if this code object contains a message-send with aSelectorSymbol as selector. 
+     - due to the simple check in the literal array, also simple uses 
+       of aSelectorSymbol as symbol will return true.
+       Should ask compiler, if there is really a send."
+
+    self obsoleteFeatureWarning:'please use #sendsSelector:'.   
+    ^ self sendsSelector:aSelectorSymbol
+
+    "Created: / 16-04-1996 / 16:35:53 / cg"
+    "Modified: / 05-02-2017 / 01:21:26 / cg"
+!
+
+sendsAny:aCollectionOfSelectorSymbols
+    <resource: #obsolete>
+
+    "return true, if this method contains a message-send
+     to any of aCollectionOfSelectorSymbols."
+
+    self obsoleteFeatureWarning:'please use #sendsAnySelector:'.   
+    ^ self sendsAnySelector:aCollectionOfSelectorSymbols
+
+    "Created: / 08-08-2011 / 18:53:24 / cg"
+    "Modified: / 05-02-2017 / 01:31:22 / cg"
+!
+
+sendsAnySelector:aCollectionOfSelectorSymbols
+    "return true, if this method contains a message-send
+     to any of aCollectionOfSelectorSymbols."
+
+    (aCollectionOfSelectorSymbols contains:[:sym | self referencesLiteral:sym]) ifTrue:[
+        ^ true.
+    ].
+    ^ false
+
+    "Created: / 05-02-2017 / 01:27:11 / cg"
+!
+
+sendsSelector:aSelectorSymbol
     "return true, if this code object contains a message-send with aSelectorSymbol as selector. 
      - due to the simple check in the literal array, also simple uses 
        of aSelectorSymbol as symbol will return true.
@@ -451,7 +489,7 @@
 
     ^ self referencesLiteral:aSelectorSymbol
 
-    "Created: 16.4.1996 / 16:35:53 / cg"
+    "Created: / 05-02-2017 / 01:19:03 / cg"
 !
 
 usedGlobals