[Pkg] The Trunk: Kernel-ul.583.mcz
commits at source.squeak.org
commits at source.squeak.org
Sat May 7 01:36:27 UTC 2011
Levente Uzonyi uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-ul.583.mcz
==================== Summary ====================
Name: Kernel-ul.583
Author: ul
Time: 7 May 2011, 2:50:42.698 am
UUID: 51d4d8d1-1710-6d49-8633-eb60d4680c6a
Ancestors: Kernel-nice.582
- use #instVarIndexFor:ifAbsent: for getting the index of an instance variable
- fix: send #whichSelectorsStoreInto: to super instead of #whichMethodsStoreInto: from Class >> #whichSelectorsStoreInto:
- deprecated Behavior >> #whichSelectorsAssign:
=============== Diff against Kernel-nice.582 ===============
Item was changed:
----- Method: Behavior>>whichMethodsStoreInto: (in category 'testing method dictionary') -----
whichMethodsStoreInto: instVarName
+ "Answer a collection of CompiledMethod whose methods access the argument, instVarName, as a named instance variable."
+
- "Answer a collection of CompiledMethod whose methods access the argument,
- instVarName, as a named instance variable."
- "Point whichMethodsStoreInto: 'x'."
| instVarIndex |
+ instVarIndex := self instVarIndexFor: instVarName ifAbsent: [ ^Array new ].
+ ^self methodDict values select: [:eachMethod | eachMethod writesField: instVarIndex ]
+
+ "Point whichMethodsStoreInto: 'x'."!
- instVarIndex := self allInstVarNames
- indexOf: instVarName
- ifAbsent: [ ^ Array new ].
- ^self methodDict values select: [:eachMethod | eachMethod writesField: instVarIndex ]!
Item was changed:
----- Method: Behavior>>whichSelectorsAssign: (in category 'queries') -----
whichSelectorsAssign: instVarName
"Answer a Set of selectors whose methods store into the argument,
instVarName, as a named instance variable."
+
+ self deprecated: 'Use #whichSelectorsStoreInto:.'.
^self whichSelectorsStoreInto: instVarName!
Item was changed:
----- Method: Behavior>>whichSelectorsStoreInto: (in category 'testing method dictionary') -----
whichSelectorsStoreInto: instVarName
+ "Answer a collection of selectors whose methods access the argument, instVarName, as a named instance variable."
+
- "Answer a collection of selectors whose methods access the argument,
- instVarName, as a named instance variable."
| instVarIndex |
+ instVarIndex := self instVarIndexFor: instVarName ifAbsent: [ ^Array new ].
- instVarIndex := self allInstVarNames indexOf: instVarName ifAbsent: [^Array new].
^ self methodDict keys select:
[:sel | (self methodDict at: sel) writesField: instVarIndex]
"Point whichSelectorsStoreInto: 'x'."!
Item was changed:
----- Method: Class>>whichSelectorsStoreInto: (in category 'testing') -----
whichSelectorsStoreInto: varName
"Answer a collection of selectors whose methods access the argument, varName, as a named class variable. Or let super try with a named instance variable."
| ref |
ref := self classPool
associationAt: varName
+ ifAbsent: [ ^ super whichSelectorsStoreInto: varName ].
- ifAbsent: [ ^ super whichMethodsStoreInto: varName ].
^self methodDict keys select: [:eachMethod | eachMethod writesRef: ref ]!
More information about the Packages
mailing list