You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by jo...@apache.org on 2021/05/05 20:40:11 UTC

[royale-compiler] branch develop updated: prevent-rename-mxml-symbol-references

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

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


The following commit(s) were added to refs/heads/develop by this push:
     new 1711895  prevent-rename-mxml-symbol-references
1711895 is described below

commit 1711895d0ac9f863230c323af165e43bd630c1d4
Author: Josh Tynjala <jo...@apache.org>
AuthorDate: Wed May 5 13:38:04 2021 -0700

    prevent-rename-mxml-symbol-references
---
 .../jscomp/FindRoyaleMXMLPropertyNamesToKeep.java  | 384 +++++++++++++++++++++
 .../javascript/jscomp/RoyaleClosurePassConfig.java |  34 +-
 .../codegen/mxml/royale/MXMLRoyaleEmitter.java     |   6 +-
 .../codegen/mxml/royale/MXMLRoyalePublisher.java   |   1 +
 .../driver/js/goog/JSGoogConfiguration.java        |  19 +
 .../compiler/utils/JSClosureCompilerWrapper.java   |   9 +-
 .../junitvmwatcher4026980527665481323.properties   |   1 +
 .../resources/royale/files/MyInitialView_result.js |   6 +-
 8 files changed, 449 insertions(+), 11 deletions(-)

diff --git a/compiler-jx/src/main/java/com/google/javascript/jscomp/FindRoyaleMXMLPropertyNamesToKeep.java b/compiler-jx/src/main/java/com/google/javascript/jscomp/FindRoyaleMXMLPropertyNamesToKeep.java
new file mode 100644
index 0000000..6b1a63d
--- /dev/null
+++ b/compiler-jx/src/main/java/com/google/javascript/jscomp/FindRoyaleMXMLPropertyNamesToKeep.java
@@ -0,0 +1,384 @@
+/*
+ * Copyright 2008 The Closure Compiler Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.google.javascript.jscomp;
+
+import java.util.Set;
+
+import com.google.javascript.jscomp.NodeTraversal.AbstractPostOrderCallback;
+import com.google.javascript.rhino.Node;
+
+import org.apache.royale.compiler.mxml.IMXMLLanguageConstants;
+
+public class FindRoyaleMXMLPropertyNamesToKeep extends AbstractPostOrderCallback {
+
+	private final AbstractCompiler compiler;
+	private Set<String> propertyNamesToKeep;
+
+	public FindRoyaleMXMLPropertyNamesToKeep(AbstractCompiler compiler) {
+	  this.compiler = compiler;
+	}
+
+	public void process(Node externs, Node root, Set<String> propertyNamesToKeep) {
+		this.propertyNamesToKeep = propertyNamesToKeep;
+		NodeTraversal.traverse(compiler, root, this);
+	}
+
+	@Override
+	public void visit(NodeTraversal t, Node n, Node parent) {
+		checkForGenerateMXMLAttributes(t, n, parent);
+		checkForMXMLDescriptor(t, n, parent);
+		checkForBindings(t, n, parent);
+	}
+
+	private void checkForMXMLDescriptor(NodeTraversal t, Node n, Node parent) {
+		if(!n.isArrayLit()) {
+			return;
+		}
+
+		if(parent == null || !parent.isName()) {
+			return;
+		}
+
+		if(!"mxmldd".equals(parent.getQualifiedName())) {
+			return;
+		}
+
+		Node mxmlDescriptorNode = null;
+		if(parent.getGrandparent() != null
+				&& parent.getGrandparent().getGrandparent() != null
+				&& parent.getGrandparent().getGrandparent().getGrandparent() != null) {
+			mxmlDescriptorNode = parent.getGrandparent().getGrandparent().getGrandparent().getGrandparent();
+		}
+		if(mxmlDescriptorNode == null || !mxmlDescriptorNode.isStringKey() || mxmlDescriptorNode.getChildCount() == 0) {
+			return;
+		}
+		if(!"MXMLDescriptor".equals(mxmlDescriptorNode.getString())) {
+			return;
+		}
+		Node descriptorParent = mxmlDescriptorNode.getParent();
+		if(descriptorParent == null || !descriptorParent.isObjectLit()) {
+			return;
+		}
+		Node descriptorGP = mxmlDescriptorNode.getGrandparent();
+		if(descriptorGP == null) {
+			return;
+		}
+		if(descriptorGP.getIndexOfChild(descriptorParent) != 2) {
+			return;
+		}
+		Node prototype = descriptorGP.getChildBefore(descriptorParent);
+		String qualifiedName = prototype.getQualifiedName();
+		if(!qualifiedName.endsWith(".prototype")) {
+			return;
+		}
+		qualifiedName = qualifiedName.substring(0, qualifiedName.length() - 10);
+		Node defineProps = descriptorGP.getChildBefore(prototype);
+		if(!"Object.defineProperties".equals(defineProps.getQualifiedName())) {
+			return;
+		}
+		traverseMXMLAttributes(n, null);
+	}
+
+	private void checkForGenerateMXMLAttributes(NodeTraversal t, Node n, Node parent) {
+		if(!n.isGetProp()) {
+			return;
+		}
+		if(parent == null || !parent.isCall()) {
+			return;
+		}
+		if(!"this.generateMXMLAttributes".equals(n.getQualifiedName())) {
+			return;
+		}
+		if(parent.getChildCount() != 2) {
+			return;
+		}
+		Node arrayArg = parent.getChildAtIndex(1);
+		if(!arrayArg.isArrayLit()) {
+			return;
+		}
+		if(arrayArg.getChildCount() == 0) {
+			return;
+		}
+
+		Node functionNode = null;
+		if(parent.getGrandparent() != null) {
+			functionNode = parent.getGrandparent().getParent();
+		}
+		if(functionNode == null) {
+			return;
+		}
+		if(!functionNode.isFunction()) {
+			return;
+		}
+		String constructorName = functionNode.getOriginalName();
+		traverseMXMLAttributes(arrayArg, constructorName);
+	}
+
+	private void traverseMXMLAttributes(Node arrayArg, String qualifiedName) {
+		if(arrayArg.getChildCount() == 0) {
+			return;
+		}
+		boolean alreadyHadQualifiedName = qualifiedName != null;
+		int i = 0;
+		while(i < arrayArg.getChildCount()) {
+			if(qualifiedName == null) {
+				Node nameChild = arrayArg.getChildAtIndex(i);
+				i++;
+				if(!nameChild.isGetProp() && !nameChild.isName()) {
+					throwParseException(nameChild);
+				}
+				qualifiedName = nameChild.getQualifiedName();
+			}
+			Node numPropsChild = arrayArg.getChildAtIndex(i);
+			i++;
+			if(!numPropsChild.isNumber()) {
+				throwParseException(numPropsChild);
+			}
+			int numProps = (int) numPropsChild.getDouble();
+			int minNumPropsChildren = i + numProps * 3;
+			if(arrayArg.getChildCount() < minNumPropsChildren) {
+				throwParseException(arrayArg);
+			}
+			while(i < minNumPropsChildren) {
+				Node nameNode = arrayArg.getChildAtIndex(i);
+				i++;
+				if (!nameNode.isString()) {
+					throwParseException(nameNode);
+				}
+				String propName = nameNode.getString();
+				propertyNamesToKeep.add(propName);
+				Node propTypeNode = arrayArg.getChildAtIndex(i);
+				i++;
+				if((IMXMLLanguageConstants.ATTRIBUTE_ID.equals(propName) || "_id".equals(propName)) && propTypeNode.isTrue()) {
+					Node valueNode = arrayArg.getChildAtIndex(i);
+					if(valueNode.isString()) {
+						propertyNamesToKeep.add(valueNode.getString());
+					}
+				}
+				if(!propTypeNode.isTrue()) {
+					Node valueNode = arrayArg.getChildAtIndex(i);
+					i++;
+					if(valueNode.isArrayLit()) {
+						traverseMXMLAttributes(valueNode, null);
+					}
+				}
+				else {
+					i++; //skip value
+				}
+			}
+			if(i >= arrayArg.getChildCount()) {
+				throwParseException(arrayArg);
+			}
+			Node numStylesChild = arrayArg.getChildAtIndex(i);
+			i++;
+			if(!numStylesChild.isNumber()) {
+				throwParseException(numStylesChild);
+			}
+			int numStyles = (int) numStylesChild.getDouble();
+			if(numStyles != 0) {
+				throwParseException(numStylesChild);
+			}
+			if(i >= arrayArg.getChildCount()) {
+				throwParseException(arrayArg);
+			}
+			Node numEventsChild = arrayArg.getChildAtIndex(i);
+			i++;
+			if(!numEventsChild.isNumber()) {
+				throwParseException(numEventsChild);
+			}
+			int numEvents = (int) numEventsChild.getDouble();
+			i += numEvents * 2;
+			if(!alreadyHadQualifiedName) {
+				if(i >= arrayArg.getChildCount()) {
+					throwParseException(arrayArg);
+				}
+				Node childrenChild = arrayArg.getChildAtIndex(i);
+				i++;
+				if(!childrenChild.isNull() && !childrenChild.isArrayLit()) {
+					throwParseException(childrenChild);
+				}
+				if(childrenChild.isArrayLit()) {
+					traverseMXMLAttributes(childrenChild, null);
+				}
+				qualifiedName = null;
+			}
+		}
+	}
+
+	private void traverseWatchers(Node n, int startIndex) {
+		if(n.isNull()) {
+			//this is fine, just skip it
+			return;
+		}
+		if(!n.isArrayLit()) {
+			throwParseException(n);
+		}
+
+		int i = startIndex;
+		while(i < n.getChildCount()) {
+			Node indexNode = n.getChildAtIndex(i);
+			i++;
+			if(indexNode.isNull()) {
+				//this is the last child watcher
+				return;
+			}
+			if(!indexNode.isNumber()) {
+				throwParseException(indexNode);
+			}
+			Node watcherTypeNode = n.getChildAtIndex(i);
+			i++;
+			if(!watcherTypeNode.isNumber()) {
+				throwParseException(watcherTypeNode);
+			}
+			int watcherType = (int) watcherTypeNode.getDouble();
+			switch(watcherType) {
+				case 0: { //function
+					Node nameNode = n.getChildAtIndex(i);
+					i++;
+					if(!nameNode.isString()) {
+						throwParseException(nameNode);
+					}
+					String propName = nameNode.getString();
+					propertyNamesToKeep.add(propName);
+					i++; //skip function
+					i++; //skip event names
+					i++; //skip binding indices
+					break;
+				}
+				case 1: { //static property
+					Node nameNode = n.getChildAtIndex(i);
+					i++;
+					if(!nameNode.isString()) {
+						throwParseException(nameNode);
+					}
+					String propName = nameNode.getString();
+					propertyNamesToKeep.add(propName);
+					i++; //skip event names
+					i++; //skip binding indices
+					i++; //skip property getter function
+					i++; //skip mname
+					break;
+				}
+				case 2: { //property
+					Node nameNode = n.getChildAtIndex(i);
+					i++;
+					if(!nameNode.isString()) {
+						throwParseException(nameNode);
+					}
+					String propName = nameNode.getString();
+					propertyNamesToKeep.add(propName);
+					i++; //skip event names
+					i++; //skip binding indices
+					i++; //skip property getter function
+					break;
+				}
+				case 3: { //xml
+					Node nameNode = n.getChildAtIndex(i);
+					i++;
+					if(!nameNode.isString()) {
+						throwParseException(nameNode);
+					}
+					String propName = nameNode.getString();
+					propertyNamesToKeep.add(propName);
+					i++; //skip binding indices\
+				}
+				default: { //unknown!
+					throwParseException(watcherTypeNode);
+				}
+			}
+			Node watcherChildren = n.getChildAtIndex(i);
+			i++;
+			traverseWatchers(watcherChildren, 0);
+		}
+	}
+
+	private void throwParseException(Node unexpectedNode) {
+		throw new RuntimeException("Find MXML property names to keep parse failure: " + unexpectedNode);
+	}
+
+	private void checkForBindings(NodeTraversal t, Node n, Node parent) {
+		if(!n.isGetProp()) {
+			return;
+		}
+		if(parent == null || !parent.isAssign() || parent.getChildCount() < 2) {
+			return;
+		}
+		String qualifiedName = n.getQualifiedName();
+		if(qualifiedName == null) {
+			return;
+		}
+		if(!qualifiedName.endsWith(".prototype._bindings")) {
+			return;
+		}
+		Node bindingsNode = parent.getChildAtIndex(1);
+		if(!bindingsNode.isArrayLit()) {
+			throwParseException(bindingsNode);
+		}
+		int i = 0;
+		Node firstChild = bindingsNode.getChildAtIndex(i);
+		if(firstChild.isGetProp()) {
+			i++; //skip inherited bindings
+		}
+		Node numBindingsChild = bindingsNode.getChildAtIndex(i);
+		i++;
+		if(!numBindingsChild.isNumber()) {
+			throwParseException(numBindingsChild);
+		}
+		int numBindings = (int) numBindingsChild.getDouble();
+		int minNumBindingsChildren = i + numBindings * 3;
+		if(bindingsNode.getChildCount() < minNumBindingsChildren) {
+			throwParseException(bindingsNode);
+		}
+		while(i < minNumBindingsChildren) {
+			Node sourceNode = bindingsNode.getChildAtIndex(i);
+			i++;
+			if(sourceNode.isString()) {
+				String propName = sourceNode.getString();
+				propertyNamesToKeep.add(propName);
+			}
+			else if(sourceNode.isArrayLit()) {
+				for(int j = 0; j < sourceNode.getChildCount(); j++) {
+					Node child = sourceNode.getChildAtIndex(j);
+					if(child.isString()) {
+						String propName = child.getString();
+						if(!propName.contains(".")) {
+							propertyNamesToKeep.add(propName);
+						}
+					}
+				}
+			}
+			i++; //skip event
+			Node targetNode = bindingsNode.getChildAtIndex(i);
+			i++;
+			if(targetNode.isString()) {
+				String propName = targetNode.getString();
+				propertyNamesToKeep.add(propName);
+			}
+			else if(targetNode.isArrayLit()) {
+				for(int j = 0; j < sourceNode.getChildCount(); j++) {
+					Node child = sourceNode.getChildAtIndex(j);
+					if(child.isString()) {
+						String propName = child.getString();
+						if(!propName.contains(".")) {
+							propertyNamesToKeep.add(propName);
+						}
+					}
+				}
+			}
+		}
+		traverseWatchers(bindingsNode, i);
+	}
+}
\ No newline at end of file
diff --git a/compiler-jx/src/main/java/com/google/javascript/jscomp/RoyaleClosurePassConfig.java b/compiler-jx/src/main/java/com/google/javascript/jscomp/RoyaleClosurePassConfig.java
index 28281cb..fef8ed8 100644
--- a/compiler-jx/src/main/java/com/google/javascript/jscomp/RoyaleClosurePassConfig.java
+++ b/compiler-jx/src/main/java/com/google/javascript/jscomp/RoyaleClosurePassConfig.java
@@ -134,8 +134,12 @@ public final class RoyaleClosurePassConfig extends PassConfig {
   private Set<String> propertyNamesToKeep;
 
   private Set<String> extraSymbolNamesToExport;
+
+  private boolean preventRenameMxmlSymbolReferences;
   
-  public RoyaleClosurePassConfig(CompilerOptions options, String sourceFileName, File varRenameMapFile, Set<String> propertyNamesToKeep, Set<String> extraSymbolNamesToExport) {
+  public RoyaleClosurePassConfig(CompilerOptions options, String sourceFileName,
+      File varRenameMapFile, Set<String> propertyNamesToKeep,
+      Set<String> extraSymbolNamesToExport, boolean preventRenameMxmlSymbolReferences) {
     super(options);
 
     // The current approach to protecting "hidden" side-effects is to
@@ -145,8 +149,9 @@ public final class RoyaleClosurePassConfig extends PassConfig {
     preprocessorSymbolTableFactory = new PreprocessorSymbolTable.CachedInstanceFactory();
     this.varRenameMapFile = varRenameMapFile;
     this.sourceFileName = sourceFileName;
-    this.propertyNamesToKeep = propertyNamesToKeep;
+    this.propertyNamesToKeep = propertyNamesToKeep != null ? propertyNamesToKeep : new HashSet<String>();
     this.extraSymbolNamesToExport = extraSymbolNamesToExport;
+    this.preventRenameMxmlSymbolReferences = preventRenameMxmlSymbolReferences;
   }
 
   GlobalNamespace getGlobalNamespace() {
@@ -341,10 +346,12 @@ public final class RoyaleClosurePassConfig extends PassConfig {
       checks.add(angularPass);
     }
 
-    if (propertyNamesToKeep != null && propertyNamesToKeep.size() > 0) {
-      checks.add(keepRoyalePropertyNamesPass);
+    if (preventRenameMxmlSymbolReferences) {
+      checks.add(findRoyaleMxmlPropertiesToKeep);
     }
 
+    checks.add(keepRoyalePropertyNamesPass);
+
     if (extraSymbolNamesToExport != null) {
       checks.add(generateRoyaleExports);
     }
@@ -1287,6 +1294,25 @@ public final class RoyaleClosurePassConfig extends PassConfig {
         return ES_NEXT;
       }
     };
+  
+    private final PassFactory findRoyaleMxmlPropertiesToKeep = 
+      new PassFactory("find-royale-mxml-properties", true) {
+        @Override
+        protected CompilerPass create(final AbstractCompiler compiler) {
+          final FindRoyaleMXMLPropertyNamesToKeep pass = new FindRoyaleMXMLPropertyNamesToKeep(compiler);
+          return new CompilerPass() {
+            @Override
+            public void process(Node externs, Node root) {
+              pass.process(externs, root, propertyNamesToKeep);
+            }
+          };
+        }
+  
+        @Override
+        protected FeatureSet featureSet() {
+          return ES_NEXT;
+        }
+      };
 
     private final PassFactory keepRoyalePropertyNamesPass = 
         new PassFactory("keep-royale-property-names", true) {
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyaleEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyaleEmitter.java
index 462c3c8..33382ef 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyaleEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyaleEmitter.java
@@ -2342,7 +2342,7 @@ public class MXMLRoyaleEmitter extends MXMLEmitter implements
             writeNewline("var arr = " + formatQualifiedName(cname) + ".superClass_.get__MXMLDescriptor.apply(this);");
             writeNewline("/** @type {Array} */");
             indentPush();
-            writeNewline("var data = [");
+            writeNewline("var mxmldd = [");
 
             mxmlDescriptorEmitter.emit(root);
             indentPop();
@@ -2352,12 +2352,12 @@ public class MXMLRoyaleEmitter extends MXMLEmitter implements
             indentPush();
             writeNewline("if (arr)");
             indentPop();
-            writeNewline("this.mxmldd = arr.concat(data);");
+            writeNewline("this.mxmldd = arr.concat(mxmldd);");
             indentPush();
             writeNewline("else");
             indentPop();
             indentPop();
-            writeNewline("this.mxmldd = data;");
+            writeNewline("this.mxmldd = mxmldd;");
             writeNewline("}");
             indentPop();
             writeNewline("return this.mxmldd;");
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyalePublisher.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyalePublisher.java
index 63b3680..3c93e7d 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyalePublisher.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyalePublisher.java
@@ -586,6 +586,7 @@ public class MXMLRoyalePublisher extends JSGoogPublisher implements IJSGoogPubli
             compilerWrapper.targetFilePath = projectReleaseMainFile.getCanonicalPath();
             compilerWrapper.setSourceMap(googConfiguration.getSourceMap());
             compilerWrapper.setVerbose(googConfiguration.isVerbose());
+            compilerWrapper.setPreventRenameMxmlSymbolReferences(googConfiguration.getPreventRenameMxmlSymbolReferences());
 
             ok = compilerWrapper.compile();
 
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/driver/js/goog/JSGoogConfiguration.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/driver/js/goog/JSGoogConfiguration.java
index 1f54cbc..5c00370 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/driver/js/goog/JSGoogConfiguration.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/driver/js/goog/JSGoogConfiguration.java
@@ -465,6 +465,25 @@ public class JSGoogConfiguration extends JSConfiguration
     }
 
     //
+    // 'prevent-rename-mxml-symbol-references'
+    //
+
+    private boolean preventRenameMxmlSymbolReferences = true;
+
+    public boolean getPreventRenameMxmlSymbolReferences()
+    {
+        return preventRenameMxmlSymbolReferences;
+    }
+
+    @Config
+    @Mapping("prevent-rename-mxml-symbol-references")
+    public void setPreventRenameMxmlSymbolReferences(ConfigurationValue cv, boolean value)
+            throws ConfigurationException
+    {
+    	preventRenameMxmlSymbolReferences = value;
+    }
+
+    //
     // 'prevent-rename-public-symbols'
     //
 
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/utils/JSClosureCompilerWrapper.java b/compiler-jx/src/main/java/org/apache/royale/compiler/utils/JSClosureCompilerWrapper.java
index 638317e..b93f276 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/utils/JSClosureCompilerWrapper.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/utils/JSClosureCompilerWrapper.java
@@ -94,6 +94,7 @@ public class JSClosureCompilerWrapper
     private boolean skipTypeInference;
     private boolean sourceMap = false;
     private boolean verbose = false;
+    private boolean preventRenameMxmlSymbolReferences = true;
     
     public String targetFilePath;
     
@@ -127,6 +128,11 @@ public class JSClosureCompilerWrapper
         verbose = enabled;
     }
 
+    public void setPreventRenameMxmlSymbolReferences(boolean enabled)
+    {
+        preventRenameMxmlSymbolReferences = enabled;
+    }
+
     public void setPropertyNamesToKeep(Set<String> propertyNames)
     {
         propertyNamesToKeep = propertyNames;
@@ -173,7 +179,8 @@ public class JSClosureCompilerWrapper
 
         compiler_.setPassConfig(new RoyaleClosurePassConfig(options_, 
         		jsSourceFiles_.get(jsSourceFiles_.size() - 1).getName(), 
-        		variableMapInputPath == null ? null : new File(outputFolder, variableMapInputPath), propertyNamesToKeep, extraSymbolNamesToExport));
+        		variableMapInputPath == null ? null : new File(outputFolder, variableMapInputPath),
+                propertyNamesToKeep, extraSymbolNamesToExport, preventRenameMxmlSymbolReferences));
         Result result = compiler_.compile(jsExternsFiles_, jsSourceFiles_, options_);
         
         try
diff --git a/compiler-jx/src/test/junitvmwatcher4026980527665481323.properties b/compiler-jx/src/test/junitvmwatcher4026980527665481323.properties
new file mode 100644
index 0000000..f3a5a15
--- /dev/null
+++ b/compiler-jx/src/test/junitvmwatcher4026980527665481323.properties
@@ -0,0 +1 @@
+terminated successfully
diff --git a/compiler-jx/src/test/resources/royale/files/MyInitialView_result.js b/compiler-jx/src/test/resources/royale/files/MyInitialView_result.js
index 5afeced..95dba6f 100644
--- a/compiler-jx/src/test/resources/royale/files/MyInitialView_result.js
+++ b/compiler-jx/src/test/resources/royale/files/MyInitialView_result.js
@@ -485,7 +485,7 @@ Object.defineProperties(MyInitialView.prototype, /** @lends {MyInitialView.proto
         /** @type {Array} */
         var arr = MyInitialView.superClass_.get__MXMLDescriptor.apply(this);
         /** @type {Array} */
-        var data = [
+        var mxmldd = [
           org.apache.royale.html.Label,
           4,
           'id',
@@ -961,9 +961,9 @@ Object.defineProperties(MyInitialView.prototype, /** @lends {MyInitialView.proto
           null
         ];
         if (arr)
-          this.mxmldd = arr.concat(data);
+          this.mxmldd = arr.concat(mxmldd);
         else
-          this.mxmldd = data;
+          this.mxmldd = mxmldd;
       }
       return this.mxmldd;
     }