Once again I hit the wrong button… Forwarding.
-------- Message transféré --------
Sujet : Re: [Moose-dev] Re: Time to clean old compatibility code?
Date : Sun, 24 Sep 2017 10:45:42 +0200
De : Cyril Ferlicot D. <
[hidden email]>
Pour : Stéphane Ducasse <
[hidden email]>
Le 24/09/2017 à 09:11, Stéphane Ducasse a écrit :
> can you send the code so that we really understand what is the double
> cache lookup?
numberOfStatements
<MSEProperty: #numberOfStatements type: #Number>
<MSEComment: 'The number of statements in a method'>
^ self
lookUpPropertyNamed: #numberOfStatements
computedAs: [
"This is needed for providing backward compatibility to exporters
that use NOS as a property name"
self
lookUpPropertyNamed: #NOS
computedAs: [
self mooseModel isSmalltalk
ifTrue: [
| parser |
parser := RBVisitorForFAMIXMetrics new.
parser processMethod: self usingImporter: nil inModel: nil.
parser numberOfStatements ]
ifFalse: [ self notExistentMetricValue ] ] ]
--
Cyril Ferlicot
https://ferlicot.frhttp://www.synectique.eu2 rue Jacques Prévert 01,
59650 Villeneuve d'ascq France
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev