0 Replies Latest reply on Apr 8, 2008 1:56 PM by (Paul_Reilly)

    [svn] 1150: More direct syntax tree generation work-in-progress.

    Level 1
      Revision: 1150
      Author: preilly@adobe.com
      Date: 2008-04-08 14:56:01 -0700 (Tue, 08 Apr 2008)

      Log Message:
      -----------
      More direct syntax tree generation work-in-progress. FlexStore now
      compiles and runs with -generate-abstract-syntax-tree set to true, but
      we still parse AS in a few places, like data bindings and styles,
      where it isn't always necessary. The unnecessary cases will be
      removed in the future to maximize performance.

      Asserts have been added to the places that will need an implementation
      before the full compiler test suite will pass.

      checkintests Passed: YES

      Needs QA: Not yet

      Needs DOC: NO

      API Change: NO

      Code-level description of changes:

      compiler/as3/AbstractSyntaxTreeUtil.java

      Added generateAssignment(), generateIdentifier(),
      generateMetaData(), generateParameter(), generateTypeExpression(),
      generateVariable(), generateVariableNew(), and parse().

      Combined generateConstructorDefinition() and
      generateConstructorCommon() into generateConstructor().

      compiler/as3/binding/DataBindingExtension.java

      Modified generateClassDefinition() to call
      nodeFactory.StartClassDefs() to fix a downstream FlowAnalyzer null
      pointer exception.

      Removed generateParameter(), which was added to AbstractSyntaxTreeUtil.

      compiler/mxml/builder/AbstractDocumentBuilder.java

      Modified analyze(BindingNode) to call setFromBindingNode().

      compiler/mxml/rep/Model.java

      Added getSubInitializerIterator().

      compiler/mxml/rep/AtResource.java

      Added getValueExpression().

      compiler/mxml/rep/MxmlDocument.java

      Made getTopLevelInitializerIterator() public and added some
      additional generics usage.

      compiler/mxml/rep/Array.java

      Added getSubInitializerIterator() and some additional generics
      usage.

      compiler/mxml/rep/init/EffectInitializer.java

      Added generateAssignExpr().

      compiler/mxml/rep/init/ValueInitializer.java

      Added generateValueExpr(), generateInlineRValue(),
      generateDefinitionBody(), generateDefinitions(), and AST versions
      of addAssignExprs(), formatExpr(), asArrayLiteral(),
      asObjectLiteral(), asXmlLiteral(), and asXMLList().

      compiler/mxml/rep/init/Initializer.java

      Added generateValueExpr(), generateAssignExpr(), and
      generateDefinitions().

      compiler/mxml/rep/init/StyleInitializer.java

      Added generateAssignExpr().

      compiler/mxml/rep/init/EventInitializer.java

      Added generateValueExpr(), generateAssignExpr(),
      generateDefinitionBody(), and generateDefinitions().

      compiler/mxml/rep/init/NamedInitializer.java

      Added generateAssignExpr().

      compiler/mxml/rep/init/VisualChildInitializer.java

      Added generateAssignExpr().

      compiler/mxml/rep/init/ArrayElementInitializer.java

      Added generateAssignExpr().

      compiler/mxml/rep/decl/InitializedPropertyDeclaration.java

      Added generateAssignExpr().

      compiler/mxml/rep/MovieClip.java

      Added getSubInitializerIterator().

      compiler/mxml/rep/BindingExpression.java

      Added isFromBindingNode variable and accessors.

      Created ensureHighestLevelModelDeclared() from common code.

      Added generateDestinationAssignment(),
      generateDestinationSetStyle(), and generateDestinationPathRoot().

      compiler/mxml/ImplementationCompiler.java

      Added short circuit to parse1() for the generate AST case.

      compiler/mxml/gen/ClassDefLib.vm

      Removed unnecessary variable declaration.

      compiler/mxml/ImplementationGenerator.java

      Added a truck load of new methods and implemented numerous
      previously stubbed out methods.

      Modified Paths:
      --------------
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/AbstractSyntaxTreeUtil.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/DataBindingExtension. java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/ImplementationCompiler.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/ImplementationGenerator.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/AbstractDocumentBuil der.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/gen/ClassDefLib.vm
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/Array.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/AtResource.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/BindingExpression.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/Model.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/MovieClip.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/MxmlDocument.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/decl/InitializedProperty Declaration.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/ArrayElementInitial izer.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/EffectInitializer.j ava
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/EventInitializer.ja va
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/Initializer.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/NamedInitializer.ja va
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/StyleInitializer.ja va
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/ValueInitializer.ja va
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/VisualChildInitiali zer.java