slightly faster #resources access if there are no resources
authorClaus Gittinger <cg@exept.de>
Tue, 18 Jul 2000 13:40:49 +0200
changeset 1053 ecffa1f6ce6e
parent 1052 0a1e613468f5
child 1054 035067e8b90f
slightly faster #resources access if there are no resources
LazyMethod.st
--- a/LazyMethod.st	Wed Jul 05 17:49:44 2000 +0200
+++ b/LazyMethod.st	Tue Jul 18 13:40:49 2000 +0200
@@ -10,6 +10,8 @@
  hereby transferred.
 "
 
+"{ Package: 'stx:libcomp' }"
+
 Method variableSubclass:#LazyMethod
 	instanceVariableNames:''
 	classVariableNames:'CompilationFailedSignal'
@@ -174,6 +176,8 @@
 
     |m|
 
+    (self source includesString:'resource') ifFalse:[^ nil].
+
     (m := self asExecutableMethod) notNil ifTrue:[^ m resources].
     ^ nil
 
@@ -182,6 +186,6 @@
 !LazyMethod class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/LazyMethod.st,v 1.28 1999-10-07 16:43:29 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/LazyMethod.st,v 1.29 2000-07-18 11:40:49 cg Exp $'
 ! !
 LazyMethod initialize!