Ah! The enum clinits were driving me crazy, to the point that I was considering reverting a bunch of code to get rid of them.
This is great, thanks. On Mar 12, 10:11 pm, [email protected] wrote: > Reviewers: Lex, cromwellian, > > Message: > Hey guys, > > I was working on a patch to JsInlining and it really started to bug me > how many silly clinits are just hanging around. So I wrote this patch > that does a couple of neat things: > > 1) A trivial clinit that merely delegates to a superclass doesn't emit > code; instead, call sites that would have targeted the subclass will > target the superclass instead. > > 2) As an added bonus, in situations where you have two classes that > sharing a supertype, where only the supertype has a clinit, calls > between the two classes won't trigger clinit checks anymore. This also > works when a supetype calls into a subtype when only the supertype has a > clinit, which is exactly the case that enums are currently tripping > over. > > Description: > Hey guys, > > I was working on a patch to JsInlining and it really started to bug me > how many silly clinits are just hanging around. So I wrote this patch > that does a couple of neat things: > > 1) A trivial clinit that merely delegates to a superclass doesn't emit > code; instead, call sites that would have targeted the subclass will > target the superclass instead. > > 2) As an added bonus, in situations where you have two classes that > sharing a supertype, where only the supertype has a clinit, calls > between the two classes won't trigger clinit checks anymore. This also > works when a supetype calls into a subtype when only the supertype has a > clinit, which is exactly the case that enums are currently tripping > over. > > Please review this athttp://gwt-code-reviews.appspot.com/184802 > > Affected files: > M dev/core/src/com/google/gwt/dev/jjs/ast/JDeclaredType.java > M dev/core/src/com/google/gwt/dev/jjs/ast/JTypeOracle.java > M dev/core/src/com/google/gwt/dev/jjs/impl/DeadCodeElimination.java > M dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java > M dev/core/src/com/google/gwt/dev/jjs/impl/MethodInliner.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
