The Trunk: Kernel-mt.1254.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Kernel-mt.1254.mcz

commits-2
Marcel Taeumel uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-mt.1254.mcz

==================== Summary ====================

Name: Kernel-mt.1254
Author: mt
Time: 4 August 2019, 4:24:58.883226 pm
UUID: 196964fd-3ccf-a948-a547-59988b7fb079
Ancestors: Kernel-mt.1253

Adds a way to check deprecation state of code artifacts.

=============== Diff against Kernel-mt.1253 ===============

Item was added:
+ ----- Method: ClassDescription>>isDeprecated (in category 'testing') -----
+ isDeprecated
+
+ ^ self category includesSubstring: 'Deprecated'!

Item was added:
+ ----- Method: CompiledMethod>>isDeprecated (in category 'testing') -----
+ isDeprecated
+ "Note that #literalsDo: is faster than #hasLiteral: (and #hasLiteral:scanForSpecial:). We already know that 'self deprecated' should be the first statement in a deprecated method, which is directly accessible in this method's literals. No need to check compiled blocks or other nested structures.
+
+ Note that both #isQuick and is-this-method check make no sense performance-wise. Maybe bench again in the future."
+
+ self literalsDo: [:literal |
+ (#deprecated = literal or: [#deprecated: = literal])
+ ifTrue: [^ true]].
+ ^ false!