gwt /
gwt /
9840c42bec280b95f98b310c088f57f0a52a12fa This is a patch to remove catch blocks for globally uninstantiable
exception types. It does not do any control flow analysis to determine
what exceptions could be thrown from a particular try block (that would be
a good idea for the future). My first try at implementing this was to
simply use the typeOracle.isInstantiatedType() test; this did not work.
The reason is that the catch arg had already been tightened to the
nullType by global pruning. What's really weird is that during
CaseNormalizer, we were actually generating code for "x instanceof
nullType" which is totally bogus. I added in assertions into
CastNormalizer to ensure that instanceof and casts to the nullType don't
reach there. Had those assertions been in before, it would have forced
the catch block optimization.
Review by: mmendez
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@391 8db76d5a-ed1c-0410-87a9-c151d255dfc7
2 files changed