Merge: metrics: `--nullables` distinguishes safe and unsafe calls on `null`
authorJean Privat <jean@pryen.org>
Sat, 23 May 2015 01:01:37 +0000 (21:01 -0400)
committerJean Privat <jean@pryen.org>
Sat, 23 May 2015 01:01:37 +0000 (21:01 -0400)
commit52ecf977412e09bbee42bcf7b4268c393e9a8a3e
tree3d6cb8c18cf8e713d83a341bfbb3a7ae8281999d
parentb70c8c44a35fcd949f60ebf812af2dd8522811c6
parent70ae7c72014574efe7bd505bc6e7522a3232190a
Merge: metrics: `--nullables` distinguishes safe and unsafe calls on `null`

In reaction of recent updates on #394 I wanted to have some up-to-date numbers.

`nitmetrics --nullable` can count the sends on nullable receivers but safe and unsafe calls where merged. Note: safe calls on nullable are things like `x == null`, that is safe even if `x` is a nullable thing.
So this PR distinguishes safe and unsafe calls.

Some numbers:

~~~
nitmetrics --nullables ../lib ../src/nit*.nit
Total number of sends: 60262
Number of sends on a unsafe nullable receiver: 1750 (2.90%)
Number of sends on a safe nullable receiver: 2639 (4.37%)
~~~

Pull-Request: #1375
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>