[gwt-contrib] Change in gwt[master]: Run JsInliner only on methods that are JSNI or that contain ...

2013-02-15 Thread Roberto Lublinerman

Roberto Lublinerman has posted comments on this change.

Change subject: Run JsInliner only on methods that are JSNI or that contain  
JSNI calls (not on the whole AST).

..


Patch Set 6:

(2 comments)

I have some preliminary measurements:

The only really time intensive visitor in JsInliner is JsInliningVisitor,  
all the other take the nominal .5s give or take.


With this patch it from ~60s traversing the whole ast to ~25sec traversing  
only "native" functions, however the code size (as measured at the end of  
the compile) increases by 1%. I don't have a clear explanation for why the  
code size increases.


I will look into the InliningVisitor in detail to see if its speed can be  
improved.



File dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java
Line 637: // either beign nativeor that contain classes to native  
methods are collected here.

Done


Line 2367:* Java AST and constructs a JavaScript AST while collection  
other useful information that

Done


--
To view, visit https://gwt-review.googlesource.com/1930
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iba3cedf4f001f216509f2c3d003ed7fe25725708
Gerrit-PatchSet: 6
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Roberto Lublinerman 
Gerrit-Reviewer: Brian Slesinsky 
Gerrit-Reviewer: John A. Tamplin 
Gerrit-Reviewer: Ray Cromwell 
Gerrit-Reviewer: Roberto Lublinerman 
Gerrit-Reviewer: Thomas Broyer 
Gerrit-HasComments: Yes

--
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Overhauls the generated code that is required by GWTTestCase...

2013-02-15 Thread Brian Slesinsky

Brian Slesinsky has posted comments on this change.

Change subject: Overhauls the generated code that is required by  
GWTTestCase to function.

..


Patch Set 2: Code-Review+1

Seems okay, but hard to tell the consequences. I think we'll need a global  
presubmit.


--
To view, visit https://gwt-review.googlesource.com/1960
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id3f9dbb2dbec9bc89cd415e4d3189e63c8e77b73
Gerrit-PatchSet: 2
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan 
Gerrit-Reviewer: Brian Slesinsky 
Gerrit-Reviewer: Goktug Gokdogan 
Gerrit-HasComments: No

--
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Overhauls the generated code that is required by GWTTestCase...

2013-02-15 Thread Goktug Gokdogan

Goktug Gokdogan has uploaded a new patch set (#2).

Change subject: Overhauls the generated code that is required by  
GWTTestCase to function.

..

Overhauls the generated code that is required by GWTTestCase to function.

Benefits are:
 - Better stack traces
 - Reduces generated code
 - Simplifies the flow

Previously, each module following classes was generated:
 1. GwtRunnerImplXYZ (e.g. GWTRunnerImplSafari) extends GWTRunner adds a  
method
 that can instantiate a test by its name. Also adds getUserAgentProperty  
method

 which requires a new class to be generated for each permutation.

 2. __SomeTestClassName_unitTestImpl (__EditorTest_unitTestImpl) that  
extends user

 test class and add a method that can call a test method by its name.

The switching in these generated methods were based on a long chain if else  
java

statements that are making string comparison.

There is some potential performance impact but more importantly this was  
causing
stack traces that was confusing as test methods can be potentially inlined  
and disappear
from stack trace where the generated class name was showing up instead of  
the real test

class name.

This alternative solution uses a different approach for generating the  
necessary code
so that methods will not be inlined and real test class will not be  
replaced.


Following is new set of class generated:
 1. GwtRunnerProxyImpl implements GWTRunnerProxy and adds  
createTestAccessor method
 that returns a js object that provides a function map for calling  
constructor and

 test methods indexed by name.
 2. GwtRunnerProxyImplXyz (e.g. GwtRunnerProxyImplSafari) that extends  
generated

 GwtRunnerProxyImpl and implements getUserAgentPropery for each permutation.

As a side benefit it looks this approach also provides slight performance  
improvements

compared to previous one.

Note that this change will break gwt.benchmark if it was not broken already.

Change-Id: Id3f9dbb2dbec9bc89cd415e4d3189e63c8e77b73
Review-Link: https://gwt-review.googlesource.com/#/c/1960/
---
M user/src/com/google/gwt/junit/JUnit.gwt.xml
A user/src/com/google/gwt/junit/client/impl/GWTRunnerProxy.java
D user/src/com/google/gwt/junit/rebind/GWTRunnerGenerator.java
A user/src/com/google/gwt/junit/rebind/GWTRunnerProxyGenerator.java
M  
user/super/com/google/gwt/junit/translatable/com/google/gwt/junit/client/GWTTestCase.java
M  
user/super/com/google/gwt/junit/translatable/com/google/gwt/junit/client/impl/GWTRunner.java

6 files changed, 390 insertions(+), 244 deletions(-)


--
To view, visit https://gwt-review.googlesource.com/1960
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Id3f9dbb2dbec9bc89cd415e4d3189e63c8e77b73
Gerrit-PatchSet: 2
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan 
Gerrit-Reviewer: Brian Slesinsky 
Gerrit-Reviewer: Goktug Gokdogan 

--
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Overhauls the generated code that is required by GWTTestCase...

2013-02-15 Thread Goktug Gokdogan

Goktug Gokdogan has posted comments on this change.

Change subject: Overhauls the generated code that is required by  
GWTTestCase to function.

..


Patch Set 1:

(6 comments)

Thanks Brian. New patch is coming in a minute.


Commit Message
Line 43: Note that this change will break gwt.benchmark if it was not  
broken already.
Clean-up of benchmark might be more involved then I expected so I didn't  
want to wait until that part is done.

If I can finish that one before this, I'll remove the line.



File user/src/com/google/gwt/junit/client/impl/GWTRunnerProxy.java
Line 32: Object newInstance(String className) throws Throwable;
Done



File user/src/com/google/gwt/junit/rebind/GWTRunnerProxyGenerator.java
Line 204:   // Fall back to pulling in all types in the module.
I just copy-pasted the previous behavior (it might be easier to review in  
the internal patch which shows the diff instead of new file).


This code makes only sense if the test case is not created before the  
compilation. I don't know which scenario that is; eclipse plugin perhaps?



Line 265: logger.log(TreeLogger.INFO, "Error determining if test  
class '" + className

This is also copy paste, not something I changed.



File  
user/super/com/google/gwt/junit/translatable/com/google/gwt/junit/client/impl/GWTRunner.java

Line 241:   private GWTRunnerProxy createProxy() {
Done


Line 293:   public void executeTestMethod(TestCase testCase, String  
className, String methodName)

Done
(An artifact my previous implementation.)


--
To view, visit https://gwt-review.googlesource.com/1960
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id3f9dbb2dbec9bc89cd415e4d3189e63c8e77b73
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan 
Gerrit-Reviewer: Brian Slesinsky 
Gerrit-Reviewer: Goktug Gokdogan 
Gerrit-HasComments: Yes

--
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Overhauls the generated code that is required by GWTTestCase...

2013-02-15 Thread Brian Slesinsky

Brian Slesinsky has posted comments on this change.

Change subject: Overhauls the generated code that is required by  
GWTTestCase to function.

..


Patch Set 1:

(6 comments)


Commit Message
Line 43: Note that this change will break gwt.benchmark if it was not  
broken already.
Perhaps we should delete the benchmark code first; since it's deprecated in  
2.5.1 is out it should be okay.




File user/src/com/google/gwt/junit/client/impl/GWTRunnerProxy.java
Line 32: Object newInstance(String className) throws Throwable;
Should this return GWTTestCase (for better slightly type checking)? Also  
the Object parameter of the next method.




File user/src/com/google/gwt/junit/rebind/GWTRunnerProxyGenerator.java
Line 204:   // Fall back to pulling in all types in the module.
When is this necessary? Maybe we should we should just report an error?


Line 265: logger.log(TreeLogger.INFO, "Error determining if test  
class '" + className

Should we just fail with an error?



File  
user/super/com/google/gwt/junit/translatable/com/google/gwt/junit/client/impl/GWTRunner.java

Line 241:   private GWTRunnerProxy createProxy() {
only called once; inline?


Line 293:   public void executeTestMethod(TestCase testCase, String  
className, String methodName)

Why not GWTTestCase?


--
To view, visit https://gwt-review.googlesource.com/1960
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id3f9dbb2dbec9bc89cd415e4d3189e63c8e77b73
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan 
Gerrit-Reviewer: Brian Slesinsky 
Gerrit-HasComments: Yes

--
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Run JsInliner only on methods that are JSNI or that contain ...

2013-02-15 Thread Brian Slesinsky

Brian Slesinsky has posted comments on this change.

Change subject: Run JsInliner only on methods that are JSNI or that contain  
JSNI calls (not on the whole AST).

..


Patch Set 6: Code-Review+1

(2 comments)


File dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java
Line 637: // either beign nativeor that contain classes to native  
methods are collected here.

typo: "being native", "classes" -> "calls"
But perhaps say it this way:
"Methods where inlining hasn't happened yet because they are native or  
contain calls to native methods."


Similarly below.


Line 2367:* Java AST and constructs a JavaScript AST while collection  
other useful information that

"while collecting"


--
To view, visit https://gwt-review.googlesource.com/1930
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iba3cedf4f001f216509f2c3d003ed7fe25725708
Gerrit-PatchSet: 6
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Roberto Lublinerman 
Gerrit-Reviewer: Brian Slesinsky 
Gerrit-Reviewer: John A. Tamplin 
Gerrit-Reviewer: Ray Cromwell 
Gerrit-Reviewer: Roberto Lublinerman 
Gerrit-Reviewer: Thomas Broyer 
Gerrit-HasComments: Yes

--
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] GWT Messages can support SafeHtml output. Add this support to the FakeMessagesMaker as well. (issue1890803)

2013-02-15 Thread jasonmheim

Reviewers: skybrian,

Description:
GWT Messages can support SafeHtml output. Add this support to the
FakeMessagesMaker as well.


Please review this at http://gwt-code-reviews.appspot.com/1890803/

Affected files:
  M user/src/com/google/gwt/junit/FakeMessagesMaker.java
  M user/test/com/google/gwt/junit/FakeMessagesMakerTest.java


Index: user/src/com/google/gwt/junit/FakeMessagesMaker.java
===
--- user/src/com/google/gwt/junit/FakeMessagesMaker.java(revision 11517)
+++ user/src/com/google/gwt/junit/FakeMessagesMaker.java(working copy)
@@ -16,6 +16,8 @@
 package com.google.gwt.junit;

 import com.google.gwt.i18n.client.Messages;
+import com.google.gwt.safehtml.shared.SafeHtml;
+import com.google.gwt.safehtml.shared.SafeHtmlUtils;

 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.Method;
@@ -57,7 +59,11 @@
   throws Throwable {
 String name = method.getName();

-return (args == null || args.length == 0) ? name : name
+String result = (args == null || args.length == 0) ? name : name
 + Arrays.asList(args);
+if (SafeHtml.class.isAssignableFrom(method.getReturnType())) {
+  return SafeHtmlUtils.fromString(result);
+}
+return result;
   }
 }
Index: user/test/com/google/gwt/junit/FakeMessagesMakerTest.java
===
--- user/test/com/google/gwt/junit/FakeMessagesMakerTest.java	(revision  
11517)

+++ user/test/com/google/gwt/junit/FakeMessagesMakerTest.java   (working copy)
@@ -16,6 +16,7 @@
 package com.google.gwt.junit;

 import com.google.gwt.i18n.client.Messages;
+import com.google.gwt.safehtml.shared.SafeHtml;

 import junit.framework.TestCase;

@@ -27,21 +28,30 @@
 @DefaultMessage("Isn''t this the fakiest?")
 @Description("A sample message to be tested.")
 String myMessage();
-
+
 @DefaultMessage("Isn''t this the fakiest? Pick one: {1} or {2}?")
 @Description("A sample message with parameters.")
 String myArgumentedMessage(@Example("yes") String yes,
 @Example("no") String no);
+
+@DefaultMessage("This should be safe HTML")
+@Description("A sample SafeHtml message.")
+SafeHtml mySafeHtmlMessage();
   }
-
+
   public void testSimple() {
 MyMessages messages = FakeMessagesMaker.create(MyMessages.class);
 assertEquals("myMessage", messages.myMessage());
   }
-
+
   public void testArgs() {
 MyMessages messages = FakeMessagesMaker.create(MyMessages.class);
 assertEquals("myArgumentedMessage[oui, non]",
 messages.myArgumentedMessage("oui", "non"));
   }
+
+  public void testSafeHtml() {
+MyMessages messages = FakeMessagesMaker.create(MyMessages.class);
+assertEquals("mySafeHtmlMessage",  
messages.mySafeHtmlMessage().asString());

+  }
 }


--
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Run JsInliner only on methods that are JSNI or that contain ...

2013-02-15 Thread Roberto Lublinerman

Roberto Lublinerman has posted comments on this change.

Change subject: Run JsInliner only on methods that are JSNI or that contain  
JSNI calls (not on the whole AST).

..


Patch Set 5:

(7 comments)


File dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java
Line 2348:   public static  Pair>  
exec(JProgram program,

Done


Line 2630:   private Pair>  
execImpl() {

I am using Set instead now. (that is what the inliner expects).


Line 2637: GenerateJavaScriptVisitor generator = new  
GenerateJavaScriptVisitor();

Much nicer. Thanks.


Line 2669: return (Pair) Pair.create(new JavaToJavaScriptMap() {
Done



File dev/core/src/com/google/gwt/dev/js/JsInliner.java
Line 1704:   public static OptimizerStats exec(JsProgram program) {
Still used for the tests; it would make sense to rewrite the test but the  
exec calls in the OptimizerTestBase user reflection to call exec for each  
relevant pass.


I'll create a proxy class in the Test that does that.


Line 1767: for (JsNode fn : toInline) {
I am working on parallelizing JVisitors as Java optimization is more  
expensive but I agree that these should follow.


Inliner is parallelizable but needs to be done with care, as one thread  
might be examining a call while the other is modifying the called function.



Line 1779: for (JsNode fn : inline) {
True. I'll use a LinkedHashSet here and where the functions are initially  
collected, That would make the output of the inliner deterministic.



--
To view, visit https://gwt-review.googlesource.com/1930
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iba3cedf4f001f216509f2c3d003ed7fe25725708
Gerrit-PatchSet: 5
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Roberto Lublinerman 
Gerrit-Reviewer: Brian Slesinsky 
Gerrit-Reviewer: John A. Tamplin 
Gerrit-Reviewer: Ray Cromwell 
Gerrit-Reviewer: Roberto Lublinerman 
Gerrit-Reviewer: Thomas Broyer 
Gerrit-HasComments: Yes

--
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Run JsInliner only on methods that are JSNI or that contain ...

2013-02-15 Thread Roberto Lublinerman

Hello Ray Cromwell,

I'd like you to reexamine a change.  Please visit

https://gwt-review.googlesource.com/1930

to look at the new patch set (#6).

Change subject: Run JsInliner only on methods that are JSNI or that contain  
JSNI calls (not on the whole AST).

..

Run JsInliner only on methods that are JSNI or that contain JSNI calls (not  
on the whole AST).


JsInliner is the single most time consuming java script optimization pass,  
amounting for
85% of time spent optimizing JavaScript. Additionally JavaScript inlining  
might also lead

to code size bloat.

Probably most of the productive inlining is already done in the Java  
inlining pass, so we
only try to inline methods and call sites that were not considered by the  
Java inliner

because they where JSNI.

Change-Id: Iba3cedf4f001f216509f2c3d003ed7fe25725708
Review-Link: https://gwt-review.googlesource.com/#/c/1930/
---
M dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java
M dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java
M dev/core/src/com/google/gwt/dev/js/JsInliner.java
M dev/core/test/com/google/gwt/dev/jjs/impl/CodeSplitter2Test.java
M dev/core/test/com/google/gwt/dev/js/JsInlinerTest.java
5 files changed, 119 insertions(+), 27 deletions(-)


--
To view, visit https://gwt-review.googlesource.com/1930
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iba3cedf4f001f216509f2c3d003ed7fe25725708
Gerrit-PatchSet: 6
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Roberto Lublinerman 
Gerrit-Reviewer: Brian Slesinsky 
Gerrit-Reviewer: John A. Tamplin 
Gerrit-Reviewer: Ray Cromwell 
Gerrit-Reviewer: Roberto Lublinerman 
Gerrit-Reviewer: Thomas Broyer 

--
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Introduce ImmutableAnnotations to reduce memory usage.

2013-02-15 Thread Brian Slesinsky

Brian Slesinsky has abandoned this change.

Change subject: Introduce ImmutableAnnotations to reduce memory usage.
..


Abandoned

committed

--
To view, visit https://gwt-review.googlesource.com/1920
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: abandon
Gerrit-Change-Id: Id70da4aca286c2da1a5ba423f750cecb14aa11eb
Gerrit-PatchSet: 2
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Brian Slesinsky 
Gerrit-Reviewer: Brian Slesinsky 
Gerrit-Reviewer: John A. Tamplin 
Gerrit-Reviewer: Matthew Dempsky 
Gerrit-Reviewer: Ray Cromwell 

--
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Overhauls the generated code that is required by GWTTestCase...

2013-02-15 Thread Goktug Gokdogan

Goktug Gokdogan has uploaded a new change for review.

  https://gwt-review.googlesource.com/1960


Change subject: Overhauls the generated code that is required by  
GWTTestCase to function.

..

Overhauls the generated code that is required by GWTTestCase to function.

Benefits are:
 - Better stack traces
 - Reduces generated code
 - Simplifies the flow

Previously, each module following classes was generated:
 1. GwtRunnerImplXYZ (e.g. GWTRunnerImplSafari) extends GWTRunner adds a  
method
 that can instantiate a test by its name. Also adds getUserAgentProperty  
method

 which requires a new class to be generated for each permutation.

 2. __SomeTestClassName_unitTestImpl (__EditorTest_unitTestImpl) that  
extends user

 test class and add a method that can call a test method by its name.

The switching in these generated methods were based on a long chain if else  
java

statements that are making string comparison.

There is some potential performance impact but more importantly this was  
causing
stack traces that was confusing as test methods can be potentially inlined  
and disappear
from stack trace where the generated class name was showing up instead of  
the real test

class name.

This alternative solution uses a different approach for generating the  
necessary code
so that methods will not be inlined and real test class will not be  
replaced.


Following is new set of class generated:
 1. GwtRunnerProxyImpl implements GWTRunnerProxy and adds  
createTestAccessor method
 that returns a js object that provides a function map for calling  
constructor and

 test methods indexed by name.
 2. GwtRunnerProxyImplXyz (e.g. GwtRunnerProxyImplSafari) that extends  
generated

 GwtRunnerProxyImpl and implements getUserAgentPropery for each permutation.

As a side benefit it looks this approach also provides slight performance  
improvements

compared to previous one.

Note that this change will break gwt.benchmark if it was not broken already.

Change-Id: Id3f9dbb2dbec9bc89cd415e4d3189e63c8e77b73
---
M user/src/com/google/gwt/junit/JUnit.gwt.xml
A user/src/com/google/gwt/junit/client/impl/GWTRunnerProxy.java
D user/src/com/google/gwt/junit/rebind/GWTRunnerGenerator.java
A user/src/com/google/gwt/junit/rebind/GWTRunnerProxyGenerator.java
M  
user/super/com/google/gwt/junit/translatable/com/google/gwt/junit/client/GWTTestCase.java
M  
user/super/com/google/gwt/junit/translatable/com/google/gwt/junit/client/impl/GWTRunner.java

6 files changed, 395 insertions(+), 244 deletions(-)



diff --git a/user/src/com/google/gwt/junit/JUnit.gwt.xml  
b/user/src/com/google/gwt/junit/JUnit.gwt.xml

index 0e30089..cfc2a90 100644
--- a/user/src/com/google/gwt/junit/JUnit.gwt.xml
+++ b/user/src/com/google/gwt/junit/JUnit.gwt.xml
@@ -24,12 +24,8 @@

   

-  
-
-  
-
-  class="com.google.gwt.junit.rebind.JUnitTestCaseStubGenerator">

-
+  class="com.google.gwt.junit.rebind.GWTRunnerProxyGenerator">

+
   

   
diff --git a/user/src/com/google/gwt/junit/client/impl/GWTRunnerProxy.java  
b/user/src/com/google/gwt/junit/client/impl/GWTRunnerProxy.java

new file mode 100644
index 000..91bdaaf
--- /dev/null
+++ b/user/src/com/google/gwt/junit/client/impl/GWTRunnerProxy.java
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2013 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may  
not
+ * use this file except in compliance with the License. You may obtain a  
copy of

+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
WITHOUT

+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations  
under

+ * the License.
+ */
+package com.google.gwt.junit.client.impl;
+
+import com.google.gwt.core.client.JavaScriptObject;
+import com.google.gwt.core.client.SingleJsoImpl;
+
+/**
+ * A proxy generated by code generator to provide access to user agent  
property and reflective

+ * capabilities for GWTTestCase.
+ */
+public interface GWTRunnerProxy {
+
+  /**
+   * A helper to provide create/execute functionality over GWTTestCase  
using names.

+   */
+  @SingleJsoImpl(JsniTestAccessor.class)
+  interface TestAccessor {
+Object newInstance(String className) throws Throwable;
+Object invoke(Object object, String className, String methodName)  
throws Throwable;

+  }
+
+  /**
+   * Creates a new {@link TestAccessor} for the module under test.
+   */
+  TestAccessor createTestAccessor();
+
+  /**
+   * Return the user agent property.
+   */
+  String getUserAgentProperty();
+
+
+  /**
+   * A JSNI + codegen based {@link TestAccessor} implementation.
+   */
+  class JsniTestAccessor extends JavaScriptObject implements TestAccessor {
+
+protected JsniTestAccessor() 

[gwt-contrib] Change in gwt[master]: make unsink event work correctly in widget

2013-02-15 Thread Goktug Gokdogan

Goktug Gokdogan has posted comments on this change.

Change subject: make unsink event work correctly in widget
..


Patch Set 2: Code-Review+1

--
To view, visit https://gwt-review.googlesource.com/1950
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If4341e0bf33b4c7b36d55024b3f66fce11ff1ac6
Gerrit-PatchSet: 2
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Daniel Kurka 
Gerrit-Reviewer: Daniel Kurka 
Gerrit-Reviewer: Goktug Gokdogan 
Gerrit-HasComments: No

--
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: make unsink event work correctly in widget

2013-02-15 Thread Daniel Kurka

Daniel Kurka has posted comments on this change.

Change subject: make unsink event work correctly in widget
..


Patch Set 2:

added: test cleans up the DOM

--
To view, visit https://gwt-review.googlesource.com/1950
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If4341e0bf33b4c7b36d55024b3f66fce11ff1ac6
Gerrit-PatchSet: 2
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Daniel Kurka 
Gerrit-Reviewer: Daniel Kurka 
Gerrit-Reviewer: Goktug Gokdogan 
Gerrit-HasComments: No

--
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: make unsink event work correctly in widget

2013-02-15 Thread Daniel Kurka

Hello Goktug Gokdogan,

I'd like you to reexamine a change.  Please visit

https://gwt-review.googlesource.com/1950

to look at the new patch set (#2).

Change subject: make unsink event work correctly in widget
..

make unsink event work correctly in widget

if events were unsunk before a widget was attached
to the dom, event bits would still be sunk, due to
the event bits being cached in sinkEvent() in Widget

fixes ISSUE 7882

Change-Id: If4341e0bf33b4c7b36d55024b3f66fce11ff1ac6
---
M user/src/com/google/gwt/user/client/ui/Widget.java
M user/test/com/google/gwt/user/client/ui/WidgetTest.java
2 files changed, 34 insertions(+), 0 deletions(-)


--
To view, visit https://gwt-review.googlesource.com/1950
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: If4341e0bf33b4c7b36d55024b3f66fce11ff1ac6
Gerrit-PatchSet: 2
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Daniel Kurka 
Gerrit-Reviewer: Goktug Gokdogan 

--
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.