You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@royale.apache.org by Harbs <ha...@gmail.com> on 2018/09/12 09:42:09 UTC
Re: [royale-compiler] branch develop updated: Fixed #50
Is there a better way of finding whether a function is a top level function than checking whether its parent is null?
Thanks,
Harbs
> On Sep 12, 2018, at 12:34 PM, harbs@apache.org wrote:
>
> This is an automated email from the ASF dual-hosted git repository.
>
> harbs 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 634bd37 Fixed #50
> 634bd37 is described below
>
> commit 634bd370616029dcac40acc45eea4a36815ab25f
> Author: Harbs <ha...@in-tools.com>
> AuthorDate: Wed Sep 12 12:34:26 2018 +0300
>
> Fixed #50
> ---
> .../royale/compiler/internal/codegen/js/jx/FunctionCallEmitter.java | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/FunctionCallEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/FunctionCallEmitter.java
> index 0dd6769..e7488fc 100644
> --- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/FunctionCallEmitter.java
> +++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/FunctionCallEmitter.java
> @@ -185,7 +185,8 @@ public class FunctionCallEmitter extends JSSubEmitter implements ISubEmitter<IFu
> if (def != null)
> {
> boolean isInt = def.getBaseName().equals(IASGlobalFunctionConstants._int);
> - if (isInt || def.getBaseName().equals(IASGlobalFunctionConstants.trace)
> + boolean isTrace = def.getParent() == null && def.getBaseName().equals(IASGlobalFunctionConstants.trace);
> + if (isInt || isTrace
> || def.getBaseName().equals(IASGlobalFunctionConstants.uint))
> {
> ICompilerProject project = this.getProject();
>