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/11/19 19:35:12 UTC
[royale-compiler] branch develop updated: don't get nodes except on
AS files. If you ask for a node on an MXML file it starts parsing the MXML,
but if you hit this code while already parsing the MXML then you are
effectively stuck and the compiler will hang waiting for the first parse
request to finish
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
The following commit(s) were added to refs/heads/develop by this push:
new 8e6a6c2 don't get nodes except on AS files. If you ask for a node on an MXML file it starts parsing the MXML, but if you hit this code while already parsing the MXML then you are effectively stuck and the compiler will hang waiting for the first parse request to finish
8e6a6c2 is described below
commit 8e6a6c2254065760f6a084d6e7a93b1e05109b3a
Author: Alex Harui <ah...@apache.org>
AuthorDate: Mon Nov 19 11:34:56 2018 -0800
don't get nodes except on AS files. If you ask for a node on an MXML file it starts parsing the MXML, but if you hit this code while already parsing the MXML then you are effectively stuck and the compiler will hang waiting for the first parse request to finish
---
.../internal/projects/RoyaleJSProject.java | 33 ++++++++++++----------
1 file changed, 18 insertions(+), 15 deletions(-)
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 2c2b52c..b1d6c62 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
@@ -110,22 +110,25 @@ public class RoyaleJSProject extends RoyaleProject
IDefinition def = dp.get(0);
IDefinition actualDef = ((DefinitionPromise) def).getActualDefinition();
- IDefinitionNode defNode = actualDef != null ? actualDef.getNode() : null;
- if (to.getCompilationUnitType() == UnitType.AS_UNIT && (defNode instanceof IClassNode || defNode instanceof IInterfaceNode))
+ if (to.getCompilationUnitType() == UnitType.AS_UNIT)
{
- String defname = def.getQualifiedName();
- IASDocComment asDoc = (defNode instanceof IClassNode) ?
- (IASDocComment) ((IClassNode)defNode).getASDocComment() :
- (IASDocComment) ((IInterfaceNode)defNode).getASDocComment();
- if (asDoc != null && (asDoc instanceof ASDocComment))
- {
- String asDocString = ((ASDocComment)asDoc).commentNoEnd();
- if (asDocString.contains(JSRoyaleEmitterTokens.EXTERNS.getToken()))
- {
- if (!sourceExterns.contains(defname))
- sourceExterns.add(defname);
- }
- }
+ IDefinitionNode defNode = actualDef != null ? actualDef.getNode() : null;
+ if (defNode instanceof IClassNode || defNode instanceof IInterfaceNode)
+ {
+ String defname = def.getQualifiedName();
+ IASDocComment asDoc = (defNode instanceof IClassNode) ?
+ (IASDocComment) ((IClassNode)defNode).getASDocComment() :
+ (IASDocComment) ((IInterfaceNode)defNode).getASDocComment();
+ if (asDoc != null && (asDoc instanceof ASDocComment))
+ {
+ String asDocString = ((ASDocComment)asDoc).commentNoEnd();
+ if (asDocString.contains(JSRoyaleEmitterTokens.EXTERNS.getToken()))
+ {
+ if (!sourceExterns.contains(defname))
+ sourceExterns.add(defname);
+ }
+ }
+ }
}
// IDefinition def = to.getDefinitionPromises().get(0);
boolean isInterface = (actualDef instanceof InterfaceDefinition) && (dt == DependencyType.INHERITANCE);