On May 5, 4:19 pm, Salvador Diaz <[email protected]> wrote:
> I'm curious about this, could you compile in pretty or detailed and
> show us this duplicate functions ?
I think that would be hard, since it's quite difficult to map a
function to the actual method when looking at the obfuscated output.
However, my point was that wildly different methods gets converted to
the exact same obfuscated javascript code, and is therefore only
needed once. Take as an example the following two classes:
public class Foo {
private String name;
public String getName() { return name; }
}
public class Bar {
private int size;
public int getSize() { return size; }
}
In this case, both of these methods would be converted into something
like the following:
function xyz(b) { return b.a; }
function xyz(a) { return a.a; }
This is because the first member of a class is always called "a".
However, thanks to the fact that there are no types in Javascript, the
functions are interchangeable.
What I'm asking is whether the GWT compiler will take advantage of
this in later versions.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---