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 2020/03/25 17:57:14 UTC
[royale-compiler] 03/05: Revert "JSGoogConfiguration: added
mxml-reflect-object-property option to enable/disable
goog.reflect.objectProperty() in JS output"
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
commit 9d337b2ed2978ac655f7c677202eded5b1d0486f
Author: Josh Tynjala <jo...@apache.org>
AuthorDate: Wed Mar 25 10:24:33 2020 -0700
Revert "JSGoogConfiguration: added mxml-reflect-object-property option to enable/disable goog.reflect.objectProperty() in JS output"
This reverts commit 7097ac045051639bda1bc72761b8fe94494ea743.
---
.../mxml/royale/MXMLDescriptorSpecifier.java | 29 +++++++---------------
.../codegen/mxml/royale/MXMLRoyaleEmitter.java | 6 ++---
.../driver/js/goog/JSGoogConfiguration.java | 19 --------------
3 files changed, 11 insertions(+), 43 deletions(-)
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLDescriptorSpecifier.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLDescriptorSpecifier.java
index 633f642..7f347b4 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLDescriptorSpecifier.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLDescriptorSpecifier.java
@@ -125,8 +125,6 @@ public class MXMLDescriptorSpecifier extends MXMLNodeSpecifier
private int currentIndent = 0;
- public boolean useGoogReflectObjectProperty = false;
-
//--------------------------------------------------------------------------
//
// Methods
@@ -204,24 +202,15 @@ public class MXMLDescriptorSpecifier extends MXMLNodeSpecifier
{
if (isProperty)
{
- if(useGoogReflectObjectProperty)
- {
- write(JSGoogEmitterTokens.GOOG_REFLECT_OBJECTPROPERTY);
- write(ASEmitterTokens.PAREN_OPEN);
- write(ASEmitterTokens.SINGLE_QUOTE);
- write(name);
- write(ASEmitterTokens.SINGLE_QUOTE);
- write(ASEmitterTokens.COMMA);
- write(ASEmitterTokens.SPACE);
- write(ASEmitterTokens.THIS);
- write(ASEmitterTokens.PAREN_CLOSE);
- }
- else
- {
- write(ASEmitterTokens.SINGLE_QUOTE);
- write(name);
- write(ASEmitterTokens.SINGLE_QUOTE);
- }
+ write(JSGoogEmitterTokens.GOOG_REFLECT_OBJECTPROPERTY);
+ write(ASEmitterTokens.PAREN_OPEN);
+ write(ASEmitterTokens.SINGLE_QUOTE);
+ write(name);
+ write(ASEmitterTokens.SINGLE_QUOTE);
+ write(ASEmitterTokens.COMMA);
+ write(ASEmitterTokens.SPACE);
+ write(ASEmitterTokens.THIS);
+ write(ASEmitterTokens.PAREN_CLOSE);
}
else
{
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 cff5c9a..86083af 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
@@ -38,6 +38,7 @@ import org.apache.commons.lang.StringEscapeUtils;
import org.apache.royale.abc.ABCConstants;
import org.apache.royale.abc.instructionlist.InstructionList;
import org.apache.royale.abc.semantics.Instruction;
+import org.apache.royale.abc.semantics.MethodInfo;
import org.apache.royale.abc.semantics.Name;
import org.apache.royale.abc.semantics.Namespace;
import org.apache.royale.abc.semantics.OneOperandInstruction;
@@ -2123,7 +2124,7 @@ public class MXMLRoyaleEmitter extends MXMLEmitter implements
if (instanceId != null)
{
indentPush();
- writeNewline("/** @export */");
+ writeNewline("/** @export */");
writeNewline(instanceId + ": {");
writeNewline("/** @this {" + formattedCName + "} */");
indentPush();
@@ -2867,8 +2868,6 @@ public class MXMLRoyaleEmitter extends MXMLEmitter implements
if (isStateDependent(node, null, true))
return;
-
- RoyaleJSProject project = (RoyaleJSProject)getMXMLWalker().getProject();
IDefinition cdef = node.getDefinition();
@@ -2878,7 +2877,6 @@ public class MXMLRoyaleEmitter extends MXMLEmitter implements
MXMLDescriptorSpecifier currentPropertySpecifier = new MXMLDescriptorSpecifier();
currentPropertySpecifier.isProperty = true;
- currentPropertySpecifier.useGoogReflectObjectProperty = project.config != null && project.config.getMxmlReflectObjectProperty();
currentPropertySpecifier.name = cdef != null ? cdef.getQualifiedName() : node.getName();
currentPropertySpecifier.parent = currentInstance;
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 d06475c..9942bd0 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
@@ -446,25 +446,6 @@ public class JSGoogConfiguration extends JSConfiguration
exportProtectedSymbols = value;
}
- //
- // 'mxml-reflect-object-property'
- //
-
- private boolean mxmlReflectObjectProperty = true;
-
- public boolean getMxmlReflectObjectProperty()
- {
- return mxmlReflectObjectProperty;
- }
-
- @Config
- @Mapping("mxml-reflect-object-property")
- public void setMxmlReflectObjectProperty(ConfigurationValue cv, boolean value)
- throws ConfigurationException
- {
- mxmlReflectObjectProperty = value;
- }
-
//
// 'warn-public-vars'