Reviewers: Lex, scottb,

Message:
Review requested.  I'm going to be AFK Tuesday-Thursday, so it's likely
I won't be able to get back to this until next week.

Description:
This is a compiler infrastructure patch that enables annotations to be
selectively recorded within the Java AST.  Compiler features that are
driven by annotations should no longer involve hacking on
GenerateJavaAST and adding random fields to existing nodes.

Overview:
  - Add JAnnotation to hold annotation data as flat AST nodes.
  - JAnnotation.createAnnotation() will wrap the data in a JAnnotation
in a reflection-based Proxy object as a convenience to developers.
  - Existing AST nodes are updated to implement the HasAnnotations
interface and to visit their annotations in traverse().
  - A JExternalType node is added to represent external / binary-only
types.
  - GenerateJavaAST is updated to selectively extract annotation data
from the JDT data
  - Adds a test case using OptimizerTestBase.

In a subsequent patch to proof the design and implementation, I'm going
to unwind @ArtificialRescue out of GenerateJavaAST.

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

Affected files:
  A dev/core/src/com/google/gwt/dev/jjs/ast/HasAnnotations.java
  A dev/core/src/com/google/gwt/dev/jjs/ast/JAnnotation.java
  M dev/core/src/com/google/gwt/dev/jjs/ast/JDeclaredType.java
  A dev/core/src/com/google/gwt/dev/jjs/ast/JExternalType.java
  M dev/core/src/com/google/gwt/dev/jjs/ast/JField.java
  M dev/core/src/com/google/gwt/dev/jjs/ast/JLocal.java
  M dev/core/src/com/google/gwt/dev/jjs/ast/JMethod.java
  M dev/core/src/com/google/gwt/dev/jjs/ast/JParameter.java
  M dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java
  M dev/core/src/com/google/gwt/dev/jjs/ast/JVariable.java
  M dev/core/src/com/google/gwt/dev/jjs/ast/JVisitor.java
  M dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaAST.java
  M dev/core/src/com/google/gwt/dev/jjs/impl/ToStringGenerationVisitor.java
  A dev/core/test/com/google/gwt/dev/jjs/impl/JAnnotationTest.java
  M dev/core/test/com/google/gwt/dev/jjs/impl/OptimizerTestBase.java


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

Reply via email to