You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2018/03/08 09:18:52 UTC

[royale-compiler] branch develop updated (07309b5 -> 05c5564)

This is an automated email from the ASF dual-hosted git repository.

aharui pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git.


    from 07309b5  copy theme files from assets folder to destination folder
     new f765ce6  allow override to be specified in a separate conditional compilation block to ease writing multi-platform AS
     new 179b777  refactor so we don't have to generate instructionlists
     new 05c5564  allow simple member access expressions as values in conditional compilation

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../royale/compiler/clients/JSConfiguration.java   |  3 +-
 .../internal/projects/RoyaleJSProject.java         | 11 +++++
 .../internal/as/codegen/ABCGeneratingReducer.java  |  2 +
 .../internal/as/codegen/DirectiveProcessor.java    | 52 ++++++++++++++++++++++
 .../internal/definitions/VariableDefinition.java   |  4 ++
 .../compiler/internal/parsing/as/BaseASParser.java |  4 +-
 .../internal/parsing/as/ConfigProcessor.java       | 47 ++++++++++++++-----
 .../compiler/internal/projects/RoyaleProject.java  |  9 ++++
 .../projects/RoyaleProjectConfigurator.java        |  2 +-
 .../compiler/internal/tree/as/ConfigConstNode.java |  2 +-
 .../royale/compiler/projects/IRoyaleProject.java   |  4 ++
 11 files changed, 124 insertions(+), 16 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
aharui@apache.org.

[royale-compiler] 02/03: refactor so we don't have to generate instructionlists

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git

commit 179b777346ba90a1649575865875c9edcf810f6a
Author: Alex Harui <ah...@apache.org>
AuthorDate: Wed Mar 7 14:51:43 2018 -0800

    refactor so we don't have to generate instructionlists
---
 .../internal/as/codegen/ABCGeneratingReducer.java  | 49 +-------------------
 .../internal/as/codegen/DirectiveProcessor.java    | 52 ++++++++++++++++++++++
 2 files changed, 53 insertions(+), 48 deletions(-)

diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/as/codegen/ABCGeneratingReducer.java b/compiler/src/main/java/org/apache/royale/compiler/internal/as/codegen/ABCGeneratingReducer.java
index cbfba57..4204a9b 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/as/codegen/ABCGeneratingReducer.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/as/codegen/ABCGeneratingReducer.java
@@ -6702,54 +6702,7 @@ public class ABCGeneratingReducer
 
     public InstructionList transform_name_to_expression(IASNode iNode, Binding name)
     {
-    	// hack to allow override as a separate keyword in a conditional compile block.
-    	// the AST thinks it is a property on the class named override.
-    	// This allows less coding when in SWF the base class has a method that needs
-    	// overriding but the JS base class does not.  Instead of writing
-    	// COMPILE::SWF
-    	// override public function foo() {
-    	//   method body
-    	// }
-    	// COMPILE::JS
-    	// public function foo() {
-    	//   an exact copy of method body
-    	// }
-    	// we want to allow:
-    	// COMPILE::SWF { override }
-        // public function foo() {
-    	//   method body
-    	// }
-    	if (iNode.getNodeID() == ASTNodeID.IdentifierID)
-    	{
-    		IdentifierNode node = (IdentifierNode)iNode;
-    		if (node.getName().equals("override"))
-    		{
-    			IASNode parent = node.getParent();
-    			if (parent.getNodeID() == ASTNodeID.ConfigBlockID)
-    			{
-    				IASNode parentOfMethods = parent.getParent();
-    				int functionCount = parentOfMethods.getChildCount();
-    				for (int i = 0; i < functionCount; i++)
-    				{
-    					IASNode child = parentOfMethods.getChild(i);
-    					if (child == parent)
-    					{
-    						// examine the next node
-    						child = parentOfMethods.getChild(i + 1);
-    						if (child instanceof IFunctionNode)
-    						{
-    							// convince the compiler that this is now an override
-    							IFunctionNode fnode = (IFunctionNode)child;
-    							FunctionDefinition fdef = (FunctionDefinition)fnode.getDefinition();
-    							fdef.setOverride();
-    							// return no instructions
-    							return new InstructionList();
-    						}    						
-    					}
-    				}
-    			}
-    		}
-    	}
+
         return generateAccess(name, determineAccessType(iNode));
     }
 
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/as/codegen/DirectiveProcessor.java b/compiler/src/main/java/org/apache/royale/compiler/internal/as/codegen/DirectiveProcessor.java
index 22b6df9..d199a88 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/as/codegen/DirectiveProcessor.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/as/codegen/DirectiveProcessor.java
@@ -23,8 +23,11 @@ import java.util.Collection;
 
 
 
+import org.apache.royale.abc.instructionlist.InstructionList;
+import org.apache.royale.compiler.internal.definitions.FunctionDefinition;
 import org.apache.royale.compiler.internal.tree.as.ClassNode;
 import org.apache.royale.compiler.internal.tree.as.FunctionNode;
+import org.apache.royale.compiler.internal.tree.as.IdentifierNode;
 import org.apache.royale.compiler.internal.tree.as.ImportNode;
 import org.apache.royale.compiler.internal.tree.as.InterfaceNode;
 import org.apache.royale.compiler.internal.tree.as.NamespaceIdentifierNode;
@@ -37,7 +40,9 @@ import static org.apache.royale.abc.ABCConstants.TRAIT_Setter;
 import org.apache.royale.compiler.problems.BURMDiagnosticNotAllowedHereProblem;
 import org.apache.royale.compiler.problems.ICompilerProblem;
 
+import org.apache.royale.compiler.tree.ASTNodeID;
 import org.apache.royale.compiler.tree.as.IASNode;
+import org.apache.royale.compiler.tree.as.IFunctionNode;
 import org.apache.royale.compiler.tree.mxml.IMXMLDocumentNode;
 
 
@@ -237,6 +242,53 @@ class DirectiveProcessor
                 processConfigBlock(n);
                 break;
             default:
+            	// hack to allow override as a separate keyword in a conditional compile block.
+            	// the AST thinks it is a property on the class named override.
+            	// This allows less coding when in SWF the base class has a method that needs
+            	// overriding but the JS base class does not.  Instead of writing
+            	// COMPILE::SWF
+            	// override public function foo() {
+            	//   method body
+            	// }
+            	// COMPILE::JS
+            	// public function foo() {
+            	//   an exact copy of method body
+            	// }
+            	// we want to allow:
+            	// COMPILE::SWF { override }
+                // public function foo() {
+            	//   method body
+            	// }
+            	if (n.getNodeID() == ASTNodeID.IdentifierID)
+            	{
+            		IdentifierNode node = (IdentifierNode)n;
+            		if (node.getName().equals("override"))
+            		{
+            			IASNode parent = node.getParent();
+            			if (parent.getNodeID() == ASTNodeID.ConfigBlockID)
+            			{
+            				IASNode parentOfMethods = parent.getParent();
+            				int functionCount = parentOfMethods.getChildCount();
+            				for (int i = 0; i < functionCount; i++)
+            				{
+            					IASNode child = parentOfMethods.getChild(i);
+            					if (child == parent)
+            					{
+            						// examine the next node
+            						child = parentOfMethods.getChild(i + 1);
+            						if (child instanceof IFunctionNode)
+            						{
+            							// convince the compiler that this is now an override
+            							IFunctionNode fnode = (IFunctionNode)child;
+            							FunctionDefinition fdef = (FunctionDefinition)fnode.getDefinition();
+            							fdef.setOverride();
+            							return;
+            						}    						
+            					}
+            				}
+            			}
+            		}
+            	}
                 processDirective(n);
         }
     }

-- 
To stop receiving notification emails like this one, please contact
aharui@apache.org.

[royale-compiler] 01/03: allow override to be specified in a separate conditional compilation block to ease writing multi-platform AS

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git

commit f765ce6e5b2e2decdc12f01b0db788cb5d6bf656
Author: Alex Harui <ah...@apache.org>
AuthorDate: Wed Mar 7 13:03:47 2018 -0800

    allow override to be specified in a separate conditional compilation block to ease writing multi-platform AS
---
 .../internal/as/codegen/ABCGeneratingReducer.java  | 49 ++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/as/codegen/ABCGeneratingReducer.java b/compiler/src/main/java/org/apache/royale/compiler/internal/as/codegen/ABCGeneratingReducer.java
index 2d5e5e6..cbfba57 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/as/codegen/ABCGeneratingReducer.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/as/codegen/ABCGeneratingReducer.java
@@ -71,6 +71,7 @@ import org.apache.royale.compiler.problems.UnknownBreakTargetProblem;
 import org.apache.royale.compiler.problems.UnknownContinueTargetProblem;
 import org.apache.royale.compiler.problems.VoidTypeProblem;
 import org.apache.royale.compiler.projects.ICompilerProject;
+import org.apache.royale.compiler.tree.ASTNodeID;
 import org.apache.royale.compiler.tree.as.IASNode;
 import org.apache.royale.compiler.tree.as.IDynamicAccessNode;
 import org.apache.royale.compiler.tree.as.IBinaryOperatorNode;
@@ -6701,6 +6702,54 @@ public class ABCGeneratingReducer
 
     public InstructionList transform_name_to_expression(IASNode iNode, Binding name)
     {
+    	// hack to allow override as a separate keyword in a conditional compile block.
+    	// the AST thinks it is a property on the class named override.
+    	// This allows less coding when in SWF the base class has a method that needs
+    	// overriding but the JS base class does not.  Instead of writing
+    	// COMPILE::SWF
+    	// override public function foo() {
+    	//   method body
+    	// }
+    	// COMPILE::JS
+    	// public function foo() {
+    	//   an exact copy of method body
+    	// }
+    	// we want to allow:
+    	// COMPILE::SWF { override }
+        // public function foo() {
+    	//   method body
+    	// }
+    	if (iNode.getNodeID() == ASTNodeID.IdentifierID)
+    	{
+    		IdentifierNode node = (IdentifierNode)iNode;
+    		if (node.getName().equals("override"))
+    		{
+    			IASNode parent = node.getParent();
+    			if (parent.getNodeID() == ASTNodeID.ConfigBlockID)
+    			{
+    				IASNode parentOfMethods = parent.getParent();
+    				int functionCount = parentOfMethods.getChildCount();
+    				for (int i = 0; i < functionCount; i++)
+    				{
+    					IASNode child = parentOfMethods.getChild(i);
+    					if (child == parent)
+    					{
+    						// examine the next node
+    						child = parentOfMethods.getChild(i + 1);
+    						if (child instanceof IFunctionNode)
+    						{
+    							// convince the compiler that this is now an override
+    							IFunctionNode fnode = (IFunctionNode)child;
+    							FunctionDefinition fdef = (FunctionDefinition)fnode.getDefinition();
+    							fdef.setOverride();
+    							// return no instructions
+    							return new InstructionList();
+    						}    						
+    					}
+    				}
+    			}
+    		}
+    	}
         return generateAccess(name, determineAccessType(iNode));
     }
 

-- 
To stop receiving notification emails like this one, please contact
aharui@apache.org.

[royale-compiler] 03/03: allow simple member access expressions as values in conditional compilation

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git

commit 05c5564f900447a6df4f1c5f2077c89ad850ee34
Author: Alex Harui <ah...@apache.org>
AuthorDate: Thu Mar 8 01:18:40 2018 -0800

    allow simple member access expressions as values in conditional compilation
---
 .../royale/compiler/clients/JSConfiguration.java   |  3 +-
 .../internal/projects/RoyaleJSProject.java         | 11 +++++
 .../internal/definitions/VariableDefinition.java   |  4 ++
 .../compiler/internal/parsing/as/BaseASParser.java |  4 +-
 .../internal/parsing/as/ConfigProcessor.java       | 47 +++++++++++++++++-----
 .../compiler/internal/projects/RoyaleProject.java  |  9 +++++
 .../projects/RoyaleProjectConfigurator.java        |  2 +-
 .../compiler/internal/tree/as/ConfigConstNode.java |  2 +-
 .../royale/compiler/projects/IRoyaleProject.java   |  4 ++
 9 files changed, 70 insertions(+), 16 deletions(-)

diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/JSConfiguration.java b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/JSConfiguration.java
index 9c63f4e..0e6caf5 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/JSConfiguration.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/JSConfiguration.java
@@ -263,8 +263,7 @@ public class JSConfiguration extends Configuration
     /**
      * @return A list of ConfigVars
      */
-    @Override
-    public Map<String, String> getCompilerDefine()
+    public Map<String, String> getJsCompilerDefine()
     {
     	if (jsconfigVars != null)
     		return jsconfigVars;
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/projects/RoyaleJSProject.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/projects/RoyaleJSProject.java
index fc466c9..c9d0afe 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/projects/RoyaleJSProject.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/projects/RoyaleJSProject.java
@@ -463,4 +463,15 @@ public class RoyaleJSProject extends RoyaleProject
         }
         return false;
 	}
+	
+    /**
+     * List of compiler defines so it can be overridden
+     */
+	@Override
+    public Map<String,String> getCompilerDefine(Configuration config)
+    {
+    	Map<String,String> list = ((JSConfiguration)config).getJsCompilerDefine();
+        return list;
+    }
+
 }
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/VariableDefinition.java b/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/VariableDefinition.java
index d350ec0..d0bd2cd 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/VariableDefinition.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/VariableDefinition.java
@@ -217,6 +217,10 @@ public class VariableDefinition extends DefinitionBase implements IVariableDefin
         }
     }
 
+    public IExpressionNode getInitializer() {
+    	return initializer;
+	}
+    
     public void setInitializer(IExpressionNode initExpr)
     {
         if( initExpr != null )
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/as/BaseASParser.java b/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/as/BaseASParser.java
index 691c86e..a4f6a15 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/as/BaseASParser.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/as/BaseASParser.java
@@ -1032,7 +1032,7 @@ abstract class BaseASParser extends LLkParser implements IProblemReporter
         return new IASNode[0];
     }
 
-    protected final LiteralNode evaluateConstNodeExpression(final ConfigExpressionNode node)
+    protected final IASNode evaluateConstNodeExpression(final ConfigExpressionNode node)
     {
         return configProcessor.evaluateConstNodeExpression(node);
     }
@@ -1511,7 +1511,7 @@ abstract class BaseASParser extends LLkParser implements IProblemReporter
                     (NamespaceIdentifierNode)left,
                     (ASToken)op,
                     (IdentifierNode)right);
-            result = evaluateConstNodeExpression(cn);
+            result = (ExpressionNodeBase) evaluateConstNodeExpression(cn);
         }
         else
         {
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/as/ConfigProcessor.java b/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/as/ConfigProcessor.java
index fd431db..143e434 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/as/ConfigProcessor.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/as/ConfigProcessor.java
@@ -45,11 +45,13 @@ import org.apache.royale.compiler.internal.tree.as.ConfigExpressionNode;
 import org.apache.royale.compiler.internal.tree.as.ConfigNamespaceNode;
 import org.apache.royale.compiler.internal.tree.as.IdentifierNode;
 import org.apache.royale.compiler.internal.tree.as.LiteralNode;
+import org.apache.royale.compiler.internal.tree.as.MemberAccessExpressionNode;
 import org.apache.royale.compiler.internal.tree.as.NamespaceNode;
 import org.apache.royale.compiler.internal.tree.as.NodeBase;
 import org.apache.royale.compiler.internal.tree.as.NumericLiteralNode;
 import org.apache.royale.compiler.internal.tree.as.ScopedBlockNode;
 import org.apache.royale.compiler.internal.workspaces.Workspace;
+import org.apache.royale.compiler.parsing.IASToken;
 import org.apache.royale.compiler.problems.CannotResolveConfigExpressionProblem;
 import org.apache.royale.compiler.problems.CannotResolveProjectLevelConfigExpressionProblem;
 import org.apache.royale.compiler.problems.ConflictingNameInNamespaceProblem;
@@ -58,7 +60,9 @@ import org.apache.royale.compiler.problems.InternalCompilerProblem2;
 import org.apache.royale.compiler.problems.NonConstantConfigInitProblem;
 import org.apache.royale.compiler.problems.UndefinedConfigNamespaceProblem;
 import org.apache.royale.compiler.scopes.IDefinitionSet;
+import org.apache.royale.compiler.tree.ASTNodeID;
 import org.apache.royale.compiler.tree.as.IASNode;
+import org.apache.royale.compiler.tree.as.IExpressionNode;
 import org.apache.royale.compiler.tree.as.IIdentifierNode;
 import org.apache.royale.compiler.tree.as.ILiteralNode.LiteralType;
 import org.apache.royale.compiler.units.ICompilationUnit;
@@ -373,16 +377,24 @@ public class ConfigProcessor
             Object value = def.resolveValue(backingProject);
             if (value == ConfigConstNode.UNKNOWN_VALUE)
             {
-                // Get the real source node for the problem.
-                // If there isn't one, then don't make a problem - assume 
-                // someone else already found the cause and logged it.
-                IASNode problemLocationNode = node.getAssignedValueNode();
-                if (problemLocationNode != null)
+                if (def instanceof ConfigConstNode.ConfigDefinition)
                 {
-                    ICompilerProblem problem = new NonConstantConfigInitProblem(
-                            problemLocationNode);
-                    addProblem(problem);
-                }
+                	ConfigConstNode.ConfigDefinition cdef = (ConfigConstNode.ConfigDefinition)def;
+    	        	IExpressionNode initializer = cdef.getInitializer();
+    	        	if (initializer.getNodeID() != ASTNodeID.MemberAccessExpressionID)
+    	        	{
+    	                // Get the real source node for the problem.
+    	                // If there isn't one, then don't make a problem - assume 
+    	                // someone else already found the cause and logged it.
+    	                IASNode problemLocationNode = node.getAssignedValueNode();
+    	                if (problemLocationNode != null)
+    	                {
+    	                    ICompilerProblem problem = new NonConstantConfigInitProblem(
+    	                            problemLocationNode);
+    	                    addProblem(problem);
+    	                }
+    	        	}
+            	}
             }
         }
         // Check for redeclaration
@@ -423,6 +435,16 @@ public class ConfigProcessor
         Object result = node.resolveConfigValue(backingProject);
         if (result == null || result == ConfigConstNode.UNKNOWN_VALUE)
         {
+        	// try to allow simple memberaccessexpressions as well (a.b)
+            IDefinition definition = node.resolve(backingProject);
+            if (definition instanceof ConfigConstNode.ConfigDefinition)
+            {
+            	ConfigConstNode.ConfigDefinition def = (ConfigConstNode.ConfigDefinition)definition;
+	        	IExpressionNode initializer = def.getInitializer();
+	        	if (initializer.getNodeID() == ASTNodeID.MemberAccessExpressionID)
+	        		return initializer;
+        	}
+        	
             // If we can't get a value, log an error. If we are are processing System variables, then don't
             // use the problem type that requires a "site", as we don't know what it is
             ICompilerProblem problem = isFromProjectConfigVariables() ?
@@ -445,7 +467,7 @@ public class ConfigProcessor
     /**
      * turns a config expression into a synthesize LiteralNode
      */
-    protected LiteralNode evaluateConstNodeExpression(ConfigExpressionNode node)
+    protected IASNode evaluateConstNodeExpression(ConfigExpressionNode node)
     {
 
         final Object result = evaluateConstNodeExpressionToJavaObject(node);
@@ -477,6 +499,11 @@ public class ConfigProcessor
             literalNode.setSynthetic(true);
             return literalNode;
         }
+        else if (result instanceof MemberAccessExpressionNode)
+        {
+        	MemberAccessExpressionNode mae = (MemberAccessExpressionNode)result;
+        	return mae;
+        }
         return null;
     }
 
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/projects/RoyaleProject.java b/compiler/src/main/java/org/apache/royale/compiler/internal/projects/RoyaleProject.java
index 2182ecd..a2dff6f 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/projects/RoyaleProject.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/projects/RoyaleProject.java
@@ -2378,6 +2378,15 @@ public class RoyaleProject extends ASProject implements IRoyaleProject, ICompile
     	return config.getCompilerNamespacesManifestMappings();
     }
 
+    /**
+     * List of compiler defines so it can be overridden
+     */
+    public Map<String,String> getCompilerDefine(Configuration config)
+    {
+    	Map<String,String> list = config.getCompilerDefine();
+        return list;
+    }
+
 	@Override
 	public boolean isPlatformRule(ICSSRule rule) {
 		return true;
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/projects/RoyaleProjectConfigurator.java b/compiler/src/main/java/org/apache/royale/compiler/internal/projects/RoyaleProjectConfigurator.java
index edfc9e1..d8ec777 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/projects/RoyaleProjectConfigurator.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/projects/RoyaleProjectConfigurator.java
@@ -334,7 +334,7 @@ public class RoyaleProjectConfigurator extends Configurator
     
     protected void setupConfigVariables(IRoyaleProject project)
     {
-        final Map<String, String> compilerDefine = configuration.getCompilerDefine();
+        final Map<String, String> compilerDefine = project.getCompilerDefine(configuration);
         if (compilerDefine != null)
             project.setDefineDirectives(compilerDefine);
     }
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/as/ConfigConstNode.java b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/as/ConfigConstNode.java
index d57e6ee..8745021 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/as/ConfigConstNode.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/as/ConfigConstNode.java
@@ -93,7 +93,7 @@ public class ConfigConstNode extends VariableNode
     /**
      * Internal implementation of ConstantDefinition that caches its value.
      */
-    private static class ConfigDefinition extends ConstantDefinition
+    public static class ConfigDefinition extends ConstantDefinition
     {
         /**
          * Constructor.
diff --git a/compiler/src/main/java/org/apache/royale/compiler/projects/IRoyaleProject.java b/compiler/src/main/java/org/apache/royale/compiler/projects/IRoyaleProject.java
index f8f4553..c1c206a 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/projects/IRoyaleProject.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/projects/IRoyaleProject.java
@@ -229,4 +229,8 @@ public interface IRoyaleProject extends IASProject, IXMLNameResolver, IWriteOnly
      */
     boolean isPlatformRule(ICSSRule rule);
 
+    /**
+     * List of defined variables so it can be overridden
+     */
+    Map<String, String> getCompilerDefine(Configuration config);
 }

-- 
To stop receiving notification emails like this one, please contact
aharui@apache.org.