[gwt-contrib] Comment on UsingOOPHM in google-web-toolkit
Comment by moldoe: Hi, I'm trying to use OOPHM on Windows XP, with IE7. I'm using revision 5631. I have registered oophm.dll. I'm running HostedMode successfully but when I try to access the URL http://localhost:/Client.html?gwt.hosted=128.96.198.63:9997 I get the message: GWT module 'tclient' needs to be (re)compiled, What am I missing here? For more information: http://code.google.com/p/google-web-toolkit/wiki/UsingOOPHM --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Comment on UsingOOPHM in google-web-toolkit
I am having the same problem. Until a fix is found you can hack the hosted.html that gets injected in to your module's output directory. var moduleFuncName = window.location.search.substring(1); if (!moduleFuncName || !$wnd[moduleFuncName]) { moduleFuncName = window.name; } moduleFuncName=your_module; // insert; around line 16; On Jun 25, 2:12 pm, codesite-nore...@google.com wrote: Comment by moldoe: Hi, I'm trying to use OOPHM on Windows XP, with IE7. I'm using revision 5631. I have registered oophm.dll. I'm running HostedMode successfully but when I try to access the URL http://localhost:/Client.html?gwt.hosted=128.96.198.63:9997I get the message: GWT module 'tclient' needs to be (re)compiled, What am I missing here? For more information:http://code.google.com/p/google-web-toolkit/wiki/UsingOOPHM --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r5632 - Fixed a typo in the template for the ant build files.
Author: a...@google.com Date: Thu Jun 25 12:16:13 2009 New Revision: 5632 Modified: trunk/user/src/com/google/gwt/user/tools/project.ant.xmlsrc Log: Fixed a typo in the template for the ant build files. review by: jat Modified: trunk/user/src/com/google/gwt/user/tools/project.ant.xmlsrc == --- trunk/user/src/com/google/gwt/user/tools/project.ant.xmlsrc (original) +++ trunk/user/src/com/google/gwt/user/tools/project.ant.xmlsrc Thu Jun 25 12:16:13 2009 @@ -57,7 +57,7 @@ /java /target - target name=oophm depends=javac description=Run OOPHNM hosted mode + target name=oophm depends=javac description=Run OOPHM hosted mode java failonerror=true fork=true classname=@shellClass classpath pathelement location=${gwt.sdk}/gwt-dev-oophm.jar/ --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Comment on EnumOptimizations in google-web-toolkit
Comment by cromwellian: Joel, wouldn't this transformation work? {{{ foo_Names = [FOO_0, FOO_1, FOO_2]; fooFuncs = { getMessage: [getMessage1, getMessage1, getMessage2] }; }}} Enum's then become integer ordinals. `FooEnumType.name()` would return `foo_Names[ordinal()]` `FooEnumType.func()` would invoke `fooFuncs[obfuscatedFuncName][ordinal](args)`. The problem is, by the time you reach the JS AST, you've lost any idea that these are enums. So it would have to be done at the JDT-Java AST stage I think. This is a special case of object inlining where you know that a given type can only be instantiated with N different permutations, all field values statically known at compile time. In which case, you can rip all of the object's fields out to global singleton and replace them with a pointer (integer or other reference) For more information: http://code.google.com/p/google-web-toolkit/wiki/EnumOptimizations --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r5634 - Edited wiki page through web user interface.
Author: cromwellian Date: Thu Jun 25 16:46:04 2009 New Revision: 5634 Modified: wiki/AdvancedCompilerOptimizations.wiki Log: Edited wiki page through web user interface. Modified: wiki/AdvancedCompilerOptimizations.wiki == --- wiki/AdvancedCompilerOptimizations.wiki (original) +++ wiki/AdvancedCompilerOptimizations.wiki Thu Jun 25 16:46:04 2009 @@ -518,7 +518,7 @@ And any reference to `Foo` may now be replaced with an ordinal index into `FooHoist`. e.g. `new Foo(5, Johnny);` becomes `2`. -This would allow the entire classtype for `Foo` to be pruned in many circumstances, the chief example being Enum classes. In the case where `Foo` is polymorphic, you need a separate dispatch table, but you can still eliminate the type and it's subtypes. +This would allow the entire classtype for `Foo` to be pruned in many circumstances, the chief example being Enum classes. In the case where `Foo` is polymorphic, you need a separate dispatch table, but you can still eliminate the type and it's subtypes. In cases where Foo is passed and upcast to Object or some supertype (say for collection usage), it may need a shim to wrap the ordinal, but this shim might be reusable across all such interned objects. This optimization is mostly useful for Enums and Type-Safe enums. --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r5633 - Added hypothetical global object interning/inlining optimization for enums
Author: cromwellian Date: Thu Jun 25 16:41:29 2009 New Revision: 5633 Modified: wiki/AdvancedCompilerOptimizations.wiki Log: Added hypothetical global object interning/inlining optimization for enums Modified: wiki/AdvancedCompilerOptimizations.wiki == --- wiki/AdvancedCompilerOptimizations.wiki (original) +++ wiki/AdvancedCompilerOptimizations.wiki Thu Jun 25 16:41:29 2009 @@ -484,6 +484,44 @@ The key point is that the usage of a type in one context would not affect how the type itself could be optimized in other contexts. As it stands today, we can't do the above optimization if anywhere in the program someone calls `BasicList#add()`. A great practical example is Widgets firing events. You want widgets to be *able* to fire events *if* someone actually wants to listen to them. In the cases where you can see that there are no listeners to a widget, you'd really like the entirely of the even-firing infrastructur to completely disappear. +=== Global Object Interning/Hoisted Inlining === + +Inspired by Joel's attempts to optimize Java Enums, consider that we have a class `Foo` + +{{{ +public class Foo { + final int field1; + final String field2; + + public Foo(int x, String y) { this.field1=x; this.field2=y; } + public int getField1() { return field1; } + public String getField2() { return field2; } +} +}}} + +and this class is provably only ever instantiated with compile time literal constants and contains no ability to mutate these fields. + +{{{ +new Foo(42, Adams); +new Foo(99, Agent); +new Foo(5, Johnny); +new Foo(10100, Google); +}}} + +Then the compiler may globally intern/hoist these field constants: +{{{ +public class FooHoist { + public static int[] field1= {42, 99, 5, 10100}; + public static String[] field2 = {Adams, Agent, Johnny, Google}; +} +}}} + +And any reference to `Foo` may now be replaced with an ordinal index into `FooHoist`. e.g. `new Foo(5, Johnny);` becomes `2`. + +This would allow the entire classtype for `Foo` to be pruned in many circumstances, the chief example being Enum classes. In the case where `Foo` is polymorphic, you need a separate dispatch table, but you can still eliminate the type and it's subtypes. + +This optimization is mostly useful for Enums and Type-Safe enums. + == Semantic Techniques == Let us call a method semantic, if it is recognized by the compiler by name, and the compiler has a heuristic for evaluating the same function, discarding the original implementation. Semantic techniques are used by a number of compilers to replace operations with intrinsically faster ones. Consider the Java library function `Math.sin()`. While the library could theoretically have an implementation of sin() using table lookup or power series expansion, in some architectures, there is a native CPU instruction for computing `sin`, and therefore, the JIT compiler can in many cases, detect the call to Math.sin(), and replace it with an inlined instruction. Let us call this technique _semantic inlining_. --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Comment on LightweightCollections in google-web-toolkit
Comment by sco...@google.com: Dude, this is awesome. Major kudos! For more information: http://code.google.com/p/google-web-toolkit/wiki/LightweightCollections --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Comment on LightweightCollections in google-web-toolkit
Comment by tamplinjohn: For `MutableArray.freeze`, essentially changing a `MutableArray` to an `ImmutableArray` (even for existing references to the `MutableArray`) seems awkward, and will promote manual copies. I think the builder pattern is probably better here, since it is explicit that it exists to create an `ImmutableArray` rather than also being useful as a `MutableArray` later. If `MutableArray` extended `ImmutableArrayBuilder`, then you could not pass a `ImmutableArrayBuilder` to code that expected a `MutableArray` (without an explicit cast), and therefore the latter could depend on being able to mutate it later. Otherwise it seems that any callees who want to mutate the array must still make defensive copies lest someone else freeze that same instance. Maybe it is better to not have them related by inheritance but put all the methods as static in a shared utility class. It seems like separate annotations for complexity measures are tricky beyond the obvious ones -- would it be better to have `...@complexity(n^1/3)` so there is a single way to specify them, especially in the case of `O(n*m)` etc? For more information: http://code.google.com/p/google-web-toolkit/wiki/LightweightCollections --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Comment on UsingOOPHM in google-web-toolkit
Comment by dan.kozlowski: I have successfully got the GWT and OOPHM working on Fedora 11 x86_64. here is what i did. Downloaded the latest GWT form subversion ( r5632 ) and built it according to the directions linked above. then i had to extract the created SDK ( build/dist/gwt-linux-0.0.0.tar.bz2 ) to some place in my home folder Downloaded the oophm svn branch {{{ svn checkout http://google-web-toolkit.googlecode.com/svn/branches/oophm oophm }}} Inside that project I had to make a few changes {{{ [...@enigma oophm]$ svn diff Index: plugins/firefox/ScriptableInstance.h === --- plugins/firefox/ScriptableInstance.h(revision 5634) +++ plugins/firefox/ScriptableInstance.h(working copy) @@ -70,6 +70,9 @@ JavaObject* createJavaWrapper(int objectId); void destroyJavaWrapper(JavaObject*); + // Fix virtural void problem + void sendFreeValues(HostChannel channel) { } + static const uint32_t VERSION = 1; private: // Map of object ID to JavaObject Index: plugins/firefox/Makefile === --- plugins/firefox/Makefile(revision 5634) +++ plugins/firefox/Makefile(working copy) @@ -1,6 +1,6 @@ INC=-I. -I../common -Inpapi -FLAG32BIT=$(shell ./get32bitflag arch) -CFLAGS=-Wall -g -O2 -fPIC $(INC) -rdynamic -m$(FLAG32BIT) -DLINUX -DBROWSER_NPAPI +FLAG32BIT=64 +CFLAGS=-Wall -g -O2 -fPIC $(INC) -rdynamic -m64 -DLINUX -DBROWSER_NPAPI CXXFLAGS=$(CFLAGS) INSTDIR := extension/platform/$(shell ./getarch arch)/plugins Index: plugins/firefox/install-template.rdf === --- plugins/firefox/install-template.rdf(revision 5634) +++ plugins/firefox/install-template.rdf(working copy) @@ -12,7 +12,7 @@ !-- Firefox 1.5-3.0 supported -- em:id{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/em:id em:minVersion1.5/em:minVersion -em:maxVersion3.0.*/em:maxVersion +em:maxVersion3.*/em:maxVersion /Description /em:targetApplication Index: plugins/common/Makefile === --- plugins/common/Makefile (revision 5634) +++ plugins/common/Makefile (working copy) @@ -26,7 +26,7 @@ OBJ64= $(patsubst %.cpp,obj64/%.o,$(SRCS)) #all:: libcommon32.a libcommon64.a -all:: libcommon32.a +all:: libcommon64.a libcommon32.a: $(OBJ32) obj32.dir ar -rv $@ $(OBJ32) }}} Then i entered the firefox folder and ran make {{{ make }}} then install the build .xpi file with firefox finally I downloaded the Google Plugin and created a default Web Application Project. For the GWT SDK i pointed it to the custom build one that i made earler ( it comes up as gwt-linux-0.0.0.0 ) After that I just put in the default app and let it fly, no problems so far For more information: http://code.google.com/p/google-web-toolkit/wiki/UsingOOPHM --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Comment on UsingOOPHM in google-web-toolkit
Comment by tamplinjohn: The NPAPI plugin (in the firefox directory) is pretty much dead in the water, since it can't handle changing scrolling on the top window -- try running the Mail sample and see if that works. For more information: http://code.google.com/p/google-web-toolkit/wiki/UsingOOPHM --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Comment on UsingOOPHM in google-web-toolkit
Comment by tamplinjohn: Also, just putting in an empty sendFreeValues method will cause memory leaks. For more information: http://code.google.com/p/google-web-toolkit/wiki/UsingOOPHM --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Continuous integration
Good question, I'd be interested in a nightly build of GWT trunk as well. -- Arthur Kalmenson On Thu, Jun 25, 2009 at 4:14 AM, nicolas de loofnicolas.del...@gmail.com wrote: Hi is there a pulic CI server for GWT 2.0 where I could get the latest 2.0 artifacts ? I'd like to improve the gwt-maven-plugin for gwt-2.0, but for Integration testing I'd like to use the latests code, not just the one I could build myself Cheers, Nicolas --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Comment on WAR_Design_1_6 in google-web-toolkit
Comment by tohanh82: I want to use GWT in Jdeveloper but I can't find examples for it. Can u help me??? For more information: http://code.google.com/p/google-web-toolkit/wiki/WAR_Design_1_6 --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---