Reviewers: scottb,

Message:
Incorporated your comments.


http://gwt-code-reviews.appspot.com/34822/diff/1/2
File dev/core/src/com/google/gwt/dev/jjs/ast/JClassLiteral.java (right):

http://gwt-code-reviews.appspot.com/34822/diff/1/2#newcode68
Line 68: if (type instanceof JClassType && !(type instanceof
JArrayType)) {
Done.

http://gwt-code-reviews.appspot.com/34822/diff/1/3
File dev/core/src/com/google/gwt/dev/jjs/ast/JNameOf.java (right):

http://gwt-code-reviews.appspot.com/34822/diff/1/3#newcode48
Line 48: visitor.visit(this, ctx);
Done.

http://gwt-code-reviews.appspot.com/34822/diff/1/7
File dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java
(right):

http://gwt-code-reviews.appspot.com/34822/diff/1/7#newcode1044
Line 1044: push(jsProgram.getNullLiteral());
Cannot make this happen; changed it to an assertion.

http://gwt-code-reviews.appspot.com/34822/diff/1/12
File dev/core/src/com/google/gwt/dev/js/ast/JsNameOf.java (right):

http://gwt-code-reviews.appspot.com/34822/diff/1/12#newcode56
Line 56: visitor.visit(this, ctx);
Done.

http://gwt-code-reviews.appspot.com/34822/diff/33/1003
File dev/core/src/com/google/gwt/dev/jjs/ast/JClassLiteral.java (right):

http://gwt-code-reviews.appspot.com/34822/diff/33/1003#newcode60
Line 60: // There's only one seed function for all arrays
Do you think this is the right way to handle this?

Description:
This patch changes the behavior of Class.getName() when class metadata
has been disabled.  Instantiable classes will return a value "Class$xyz"
where xyz is the name of the type's seed function, which can be
deobfuscated using the symbol data emitted by the complier.
Non-instantiable classes will return "Class$123" where 123 is the class
object's hashcode.

The upshot, is you can definitively know the type of an object anytime
you can say "obj.getClass().getName()".

There are also some formatting fixups.

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

Affected files:
   M dev/core/src/com/google/gwt/dev/jjs/ast/JClassLiteral.java
   A dev/core/src/com/google/gwt/dev/jjs/ast/JNameOf.java
   M dev/core/src/com/google/gwt/dev/jjs/ast/JVisitor.java
   M dev/core/src/com/google/gwt/dev/jjs/impl/CloneExpressionVisitor.java
   M dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaAST.java
   M dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java
   M dev/core/src/com/google/gwt/dev/jjs/impl/Pruner.java
   M dev/core/src/com/google/gwt/dev/jjs/impl/ToStringGenerationVisitor.java
   M dev/core/src/com/google/gwt/dev/js/JsHoister.java
   M dev/core/src/com/google/gwt/dev/js/JsToStringGenerationVisitor.java
   A dev/core/src/com/google/gwt/dev/js/ast/JsNameOf.java
   M dev/core/src/com/google/gwt/dev/js/ast/JsVisitor.java
   M user/super/com/google/gwt/emul/java/lang/Class.java



--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to