0 Replies Latest reply on Mar 27, 2008 9:28 AM by (Paul_Reilly)

    [svn] 964: Added -generate-abstract-syntax-tree command line option and generated

    Level 1
      Revision: 964
      Author: preilly@adobe.com
      Date: 2008-03-27 10:28:13 -0700 (Thu, 27 Mar 2008)

      Log Message:
      -----------
      Added -generate-abstract-syntax-tree command line option and generated
      AST support for *WatcherSetupUtil. This isn't enabled by default yet,
      but it should speed up compilations.

      checkintests Passed: YES

      databinding mxunit Passed: YES, with -generate-abstract-syntax-tree
      true and false.

      Needs QA: Not yet.

      Needs DOC: Not yet.

      API Change: YES

      Code-level description of changes:

      flex2/compiler/Source.java

      Modified constructor to skip setting the fileTime if file is null.

      flex2/compiler/i18n/Compiler.java

      Modified anonymous flex2.compiler.as3.Configuration inner class by
      adding interface method getGenerateAbstractSyntaxTree().

      flex2/compiler/as3/Configuration.java

      Added getGenerateAbstractSyntaxTree().

      flex2/compiler/as3/Compiler.java

      Made CompilerHandler public.

      Modified parse1() to no longer punt if the syntaxTree is not null
      and to only create a new syntaxTree and compilationUnit if they
      are null.

      flex2/compiler/as3/BytecodeEmitter.java

      Modified DebugSlot() and DebugLine() to short circuit if cx.input
      is null.

      flex2/compiler/as3/binding/DataBindingExtension.java

      Added generateWatcherSetupUtilAST() and a truck load of helper
      methods used by it. Many of these helper methods will be moved to
      a common utility class in the near future.

      Modified generateWatcherSetupUtilClasses() to call
      generateWatcherSetupUtilAST() if generateAbstractSyntaxTree is
      true.

      flex2/compiler/as3/binding/PropertyWatcher.java

      Changed bindingExpressions from a Map to a Set.

      flex2/compiler/as3/binding/Watcher.java

      Added generics to changeEvents.

      flex2/compiler/common/CompilerConfiguration.java

      Added -generate-abstract-syntax-tree hidden option.

      flex2/compiler/mxml/rep/BindingExpression.java

      Made class Comparable.

      flex2/compiler/mxml/Configuration.java

      Added getGenerateAbstractSyntaxTree().

      flex2/compiler/mxml/ImplementationCompiler.java

      Modified constructor to pass generateAbstractSyntaxTree into
      DataBindingExtension.

      flex2/compiler/mxml/InterfaceCompiler.java

      Modified anonymous flex2.compiler.as3.Configuration inner class by
      adding getGenerateAbstractSyntaxTree() interface method.

      Modified Paths:
      --------------
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/Source.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/BytecodeEmitter.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/Compiler.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/Configuration.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/DataBindingExtension. java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/PropertyWatcher.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/Watcher.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/common/CompilerConfiguration.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/i18n/Compiler.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/Configuration.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/ImplementationCompiler.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/InterfaceCompiler.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/BindingExpression.java