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. <cyril.ferlicot(a)gmail.com>
Pour : Stéphane Ducasse <stephane.ducasse(a)inria.fr>
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 ] ] ]
--------------------------------------------
Stéphane Ducasse
http://stephane.ducasse.free.fr
http://www.synectique.eu /
http://www.pharo.org
03 59 35 87 52
Assistant: Julie Jonas
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley,
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France
_______________________________________________
Moose-dev mailing list
Moose-dev(a)list.inf.unibe.ch
https://www.list.inf.unibe.ch/listinfo/moose-dev
--
Cyril Ferlicot
https://ferlicot.fr
http://www.synectique.eu
2 rue Jacques Prévert 01,
59650 Villeneuve d'ascq France