Method.st
changeset 5564 0f513f04c50f
parent 5562 76675d5a0da9
child 5582 737d121ae7de
equal deleted inserted replaced
5563:e65efbf51900 5564:0f513f04c50f
  2239 "/    ^ history at:self ifAbsent:nil
  2239 "/    ^ history at:self ifAbsent:nil
  2240 
  2240 
  2241     "Modified: 7.11.1996 / 19:06:22 / cg"
  2241     "Modified: 7.11.1996 / 19:06:22 / cg"
  2242 !
  2242 !
  2243 
  2243 
       
  2244 readsField:instVarIndex
       
  2245     "return true, if the instvar at instVarIndex is read by the receiver.
       
  2246      Uses parser (for now); could look at bytecode as well here..."
       
  2247 
       
  2248     |varName readInstVars|
       
  2249 
       
  2250     varName := (self mclass allInstVarNames) at:instVarIndex.
       
  2251     readInstVars := self parse:#'parseMethodSilent:' return:#readInstVars or:#().
       
  2252     ^ readInstVars includes:varName.
       
  2253 !
       
  2254 
  2244 resourceType
  2255 resourceType
  2245     "ST-80 compatibility:
  2256     "ST-80 compatibility:
  2246      return the methods first resource specs key; either nil, 
  2257      return the methods first resource specs key; either nil, 
  2247      or a single symbol containing in Method>>resourceTypes."
  2258      or a single symbol containing in Method>>resourceTypes."
  2248 
  2259 
  2536 
  2547 
  2537     WrappedMethod allInstancesDo:[:m |
  2548     WrappedMethod allInstancesDo:[:m |
  2538 	m originalMethod == self ifTrue:[^ m].
  2549 	m originalMethod == self ifTrue:[^ m].
  2539     ].
  2550     ].
  2540     ^ nil
  2551     ^ nil
       
  2552 !
       
  2553 
       
  2554 writesField:instVarIndex
       
  2555     "return true, if the instvar at instVarIndex is written (modified) by the receiver.
       
  2556      Uses parser (for now); could look at bytecode as well here..."
       
  2557 
       
  2558     |varName modifiedInstVars|
       
  2559 
       
  2560     varName := (self mclass allInstVarNames) at:instVarIndex.
       
  2561     modifiedInstVars := self parse:#'parseMethodSilent:' return:#modifiedInstVars or:#().
       
  2562     ^ modifiedInstVars includes:varName.
  2541 ! !
  2563 ! !
  2542 
  2564 
  2543 !Method methodsFor:'trap methods'!
  2565 !Method methodsFor:'trap methods'!
  2544 
  2566 
  2545 makeInvalid
  2567 makeInvalid
  2722 ! !
  2744 ! !
  2723 
  2745 
  2724 !Method class methodsFor:'documentation'!
  2746 !Method class methodsFor:'documentation'!
  2725 
  2747 
  2726 version
  2748 version
  2727     ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.203 2000-08-22 22:16:33 cg Exp $'
  2749     ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.204 2000-08-27 14:48:50 cg Exp $'
  2728 ! !
  2750 ! !
  2729 Method initialize!
  2751 Method initialize!