scala/scala — pull request #2397 by adriaanm (2013-04-16 01:54:09+00:00)
Title: Optimize matching on tuples

```
(e1,...,eN) match {
case (p1, ..., pN) if g =>
...
case (q1, ..., qN) if g' =>
case _ if g'' =>
}
```

is compiled by introducing the prelude

```
val x1 = e1
...
val xN = eN
```

and then referring directly to the `xi` that corresponding to the `i`th subpattern,
in the translation of the match, rather than selecting the `_i` component of the tuple.

This eliminates the allocation of the tuple and the indirection of accessing its fields.

review by @paulp