ExecutableFunction.st
branchjv
changeset 18120 e3a375d5f6a8
parent 18011 deb0c3355881
parent 16270 2b544a163c71
child 18949 41f0cd5dc0ad
equal deleted inserted replaced
18119:cb7a12afe736 18120:e3a375d5f6a8
   200     ^ nil
   200     ^ nil
   201 
   201 
   202     "Created: 16.4.1996 / 16:31:15 / cg"
   202     "Created: 16.4.1996 / 16:31:15 / cg"
   203 !
   203 !
   204 
   204 
       
   205 hasCanvasResource
       
   206     "Return true, if this method is an canvas-resource method, false otherwise.
       
   207      This is done by looking for a #canvas key in the method's resources."
       
   208 
       
   209     ^ self hasResource:#canvas
       
   210 
       
   211     "Modified (comment): / 20-03-2014 / 16:58:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   212 !
       
   213 
   205 hasCode
   214 hasCode
   206     "return true, if this codeObject has machinecode to execute."
   215     "return true, if this codeObject has machinecode to execute."
   207 %{
   216 %{
   208     if (__INST(code_)) {
   217     if (__INST(code_)) {
   209         RETURN (true);
   218         RETURN (true);
   212     ^ false
   221     ^ false
   213 
   222 
   214     "Created: / 13.11.1998 / 23:13:29 / cg"
   223     "Created: / 13.11.1998 / 23:13:29 / cg"
   215 !
   224 !
   216 
   225 
       
   226 hasImageResource
       
   227     "return true, if this method is an image-resource method.
       
   228      This is done by looking for a #image key in the method's resources."
       
   229 
       
   230     ^ self hasResource:#image
       
   231 !
       
   232 
       
   233 hasMenuResource
       
   234     "return true, if this method is a menu-resource method.
       
   235      This is done by looking for a #image key in the method's resources."
       
   236 
       
   237     ^ self hasResource:#menu
       
   238 !
       
   239 
   217 hasResource
   240 hasResource
   218     "return true, if this codeObject has a resource (false here - only real methods have)."
   241     "return true, if this codeObject has a resource (false here - only real methods have)."
   219 
   242 
   220     ^ false
   243     ^ false
       
   244 !
       
   245 
       
   246 hasResource:aSymbol
       
   247     "return true if the method has a <resource> definition for aSymbol."
       
   248 
       
   249     ^ self hasResource and:[ (self resources ? #()) includesKey:aSymbol ]
       
   250 
       
   251     "
       
   252      Method allInstancesDo:[:m |
       
   253         (m hasResource:#image) ifTrue:[self halt]
       
   254      ].
       
   255     "
       
   256 
       
   257     "Modified: / 01-12-2010 / 13:59:58 / cg"
   221 !
   258 !
   222 
   259 
   223 isBreakpointed
   260 isBreakpointed
   224     "return true, if this is a wrapper method for a breakpoint.
   261     "return true, if this is a wrapper method for a breakpoint.
   225      False is returned here - this method is redefined in WrappedMethod"
   262      False is returned here - this method is redefined in WrappedMethod"
   367     "Modified: / 18.8.2000 / 21:18:43 / cg"
   404     "Modified: / 18.8.2000 / 21:18:43 / cg"
   368 !
   405 !
   369 
   406 
   370 refersToLiteral:aLiteral
   407 refersToLiteral:aLiteral
   371     "return true, if this executable references the literal directly or indirectly (i.e. a deep search).
   408     "return true, if this executable references the literal directly or indirectly (i.e. a deep search).
   372      Return false (we dont know) here, to allow alien code objects to be
   409      Return false (we don't know) here, to allow alien code objects to be
   373      handled by the browsers."
   410      handled by the browsers."
   374 
   411 
   375     ^ false
   412     ^ false
   376 
   413 
   377     "Modified: / 18.8.2000 / 21:18:03 / cg"
   414     "Modified: / 18.8.2000 / 21:18:03 / cg"
   414 ! !
   451 ! !
   415 
   452 
   416 !ExecutableFunction class methodsFor:'documentation'!
   453 !ExecutableFunction class methodsFor:'documentation'!
   417 
   454 
   418 version
   455 version
   419     ^ '$Header: /cvs/stx/stx/libbasic/ExecutableFunction.st,v 1.57 2012-07-26 14:34:24 cg Exp $'
   456     ^ '$Header: /cvs/stx/stx/libbasic/ExecutableFunction.st,v 1.59 2014-03-20 17:04:25 vrany Exp $'
   420 !
   457 !
   421 
   458 
   422 version_CVS
   459 version_CVS
   423     ^ '$Header: /cvs/stx/stx/libbasic/ExecutableFunction.st,v 1.57 2012-07-26 14:34:24 cg Exp $'
   460     ^ '$Header: /cvs/stx/stx/libbasic/ExecutableFunction.st,v 1.59 2014-03-20 17:04:25 vrany Exp $'
   424 ! !
   461 ! !
       
   462