Open GoogleCodeExporter opened 9 years ago
Created patch for java-only injection of public methods and submitted for
review:
http://codereview.appspot.com/49046
Original comment by aragos
on 22 Apr 2009 at 6:36
This is still a major issue but is mitigated somewhat by the fix mentioned in
the
previous comment. Next step requires changes in the GWT compiler.
Original comment by aragos
on 25 May 2009 at 2:29
Well, and if a client is concerned about the bloat, he can always just make
methods
public for now.
Original comment by bsto...@google.com
on 25 May 2009 at 6:52
Brian, is there a GWT issue filed describing the compiler changes needed? Can
it get
linked here?
Original comment by rj...@google.com
on 26 May 2009 at 3:21
I don't think there is an issue filed with GWT. I was discussing possible
solutions
with Lex a few weeks back and we agreed that an additional conversion in the AST
seems best, i.e. replacing a JSNI AST branch with a java AST branch where
possible. I
haven't had much time to work on it, but here is an example by Lex how this
might work:
=============
Attached is a patch for the pattern I was describing. It includes
conversion of "return 0" as a sample. I tried it on a hacked Hello
sample, and got trace output like this (abbreviated):
---------------------------
JAVA INITIAL:
---------------------------
public static native int returnZero() /*-{
return 0;
}-*/;
---------------------------
JAVA INITIAL:
---------------------------
public void onModuleLoad(){
Window.alert("Zero is " + Hello.returnZero());
}
---------------------------
ConvertJsniToJava:
---------------------------
public static int returnZero(){
return 0;
}
---------------------------
InliningVisitor:
---------------------------
public static final void $onModuleLoad(Hello this$static){
Window.alert("Zero is " + ((0)));
}
---------------------------
DeadCodeVisitor:
---------------------------
public static final void $onModuleLoad(Hello this$static){
Window.alert("Zero is 0");
}
Original comment by aragos
on 26 May 2009 at 3:31
http://code.google.com/p/google-web-toolkit/issues/detail?id=3696
Original comment by rj...@google.com
on 26 May 2009 at 3:39
As of r95, injections of public members don't use JSNI. So you can always avoid
this
code bloat by making things public. Lowering priority thusly. (Also, future
improvement will likely come from changes in GWT.)
Original comment by bstoler+code@google.com
on 31 May 2009 at 10:22
Original issue reported on code.google.com by
aragos
on 21 Apr 2009 at 2:53