diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2015-11-24 14:27:53 +1000 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2015-11-24 21:46:51 +1000 |
commit | f5f777e6ce94e4e105ee70463e63d2238dedd2be (patch) | |
tree | d72c3033dd718726b386eb7c427fb570acd11a5c /project/Osgi.scala | |
parent | 543ebf6a0a930ec9e85bba1a4ad6df26ba541e6e (diff) | |
download | scala-f5f777e6ce94e4e105ee70463e63d2238dedd2be.tar.gz scala-f5f777e6ce94e4e105ee70463e63d2238dedd2be.tar.bz2 scala-f5f777e6ce94e4e105ee70463e63d2238dedd2be.zip |
DRY-er trees in pattern matcher code gen.
Rather than building a cascade of if/elses, push additional conditions
into a conjunction in the condition of a single if/else. This is
possible when emitting conditions for the list of arguments of a
pattern.
Here's an example of the improvement to post-pattern matcher trees:
https://gist.github.com/retronym/0d8f7126157061d72b81
While we could try to rely on the optimizer to coalesce the repeated
else clauses, it seems wasteful to emit the code in that way in
the first place.
Diffstat (limited to 'project/Osgi.scala')
0 files changed, 0 insertions, 0 deletions