eslint/eslint — pull request #1136 by btmills (2014-08-02 17:48:43+00:00)
Title: Fix: Speed up no-unreachable (fixes #1135)

Rather than iterating forward through every statement of a BlockStatement's body or SwitchCase's consequent, this change iterates backwards so that no nodes are checked unnecessarily. Starting at the end checks only hoisted declarations and the return/throw/break/continue itself, immediately reporting any unreachable statements without looping through every other child first.

`npm run perf` on `master`:

```
CPU Speed is 2200 with multiplier 7500000
Performance Run #1: 1990.606506ms
Performance Run #2: 1994.0910669999998ms
Performance Run #3: 1901.250357ms
Performance Run #4: 1992.7809849999999ms
Performance Run #5: 1918.564006ms
Performance budget ok: 1990.606506ms (limit: 3409.090909090909ms)
```

with this change:

```
CPU Speed is 2200 with multiplier 7500000
Performance Run #1: 797.273161ms
Performance Run #2: 819.342614ms
Performance Run #3: 790.95953ms
Performance Run #4: 793.833308ms
Performance Run #5: 791.022419ms
Performance budget ok: 793.833308ms (limit: 3409.090909090909ms)
```