[Pkg] The Trunk: Kernel-mt.1245.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Jul 12 08:02:24 UTC 2019
Marcel Taeumel uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-mt.1245.mcz
==================== Summary ====================
Name: Kernel-mt.1245
Author: mt
Time: 12 July 2019, 10:02:20.401568 am
UUID: 2ce0ef20-a760-4d4a-b6bd-c4383a6efd4d
Ancestors: Kernel-mt.1244
Refactoring of #literalsDo: - Step 3 of 3.
For more information, see http://forum.world.st/Please-Review-Refactoring-for-literalsDo-etc-tp5099756p5100896.html.
=============== Diff against Kernel-mt.1244 ===============
Item was removed:
- ----- Method: AdditionalMethodState>>hasLiteralThorough: (in category 'testing') -----
- hasLiteralThorough: literal
- "Answer true if any literal in these properties is literal,
- even if embedded in array structure."
- 1 to: self basicSize do: [:i |
- | propertyOrPragma "<Association|Pragma>" |
- propertyOrPragma := self basicAt: i.
- (propertyOrPragma isVariableBinding
- ifTrue: [propertyOrPragma key == literal
- or: [propertyOrPragma value == literal
- or: [propertyOrPragma value isArray
- and: [propertyOrPragma value hasLiteral: literal]]]]
- ifFalse: [propertyOrPragma hasLiteral: literal]) ifTrue:
- [^true]].
- ^false!
Item was changed:
----- Method: Behavior>>whichSelectorsReferTo: (in category 'testing method dictionary') -----
whichSelectorsReferTo: literal
"Answer a Set of selectors whose methods access the argument as a literal."
+ | who |
+ who := IdentitySet new.
+ self selectorsAndMethodsDo: [:selector :method |
+ (method hasLiteral: literal)
+ ifTrue: [who add: selector]].
+ ^ who
- ^self whichSelectorsReferTo: literal thorough: false
"Rectangle whichSelectorsReferTo: #+."!
Item was removed:
- ----- Method: Behavior>>whichSelectorsReferTo:thorough: (in category 'testing method dictionary') -----
- whichSelectorsReferTo: aLiteral thorough: thorough
- "Answer a set of selectors whose methods access the argument as a literal.
- If thorough is true, then dives into the compact literal notation, and pragmas,
- etc, making it slow but thorough "
-
- | who |
- who := IdentitySet new.
- CompiledCode
- scanBlocksForLiteral: aLiteral
- do: [:primaryScanner :secondaryScanner |
- self selectorsAndMethodsDo:
- [ :selector :method |
- (method
- refersTo: aLiteral
- primaryBytecodeScanner: primaryScanner
- secondaryBytecodeScanner: secondaryScanner
- thorough: thorough) ifTrue:
- [who add: selector]]].
- ^who!
Item was removed:
- ----- Method: CompiledMethod>>refersTo:bytecodeScanner:thorough: (in category 'scanning') -----
- refersTo: literal bytecodeScanner: scanBlockOrNil thorough: thorough
- "Override to check method properties"
- | maybeProperties |
- (super refersTo: literal bytecodeScanner: scanBlockOrNil thorough: thorough) ifTrue:
- [^true].
- ^thorough
- and: [(maybeProperties := self penultimateLiteral) isSymbol not
- and: [(maybeProperties hasLiteralThorough: literal)
- or: [literal isVariableBinding
- and: [literal key isSymbol
- and: [maybeProperties hasLiteralThorough: literal key]]]]]!
More information about the Packages
mailing list