You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Erik de Bruin <er...@ixsoftware.nl> on 2014/10/10 17:50:44 UTC

[Falcon/FalconJX] object literal property != class property

Hi,

I have:

<code>
public class MyClass
{
private var myObject:Object = { visible: true };

private var _visible:Boolean;
 public function get visible():Boolean
{
return _visible;
}
 public function set visible(value:Boolean):void
{
_visible = value;
}
}
</code>

When I feed this to Falcon/FalconJX (with FlexJS output type set), I get
something weird for the ‘myObject’ line: somehow either Falcon or FalconJX
thinks the property ‘visible’ of the object literal is a reference to the
‘visible’ property of MyClass. It therefor parses the object literal to
“{this.get_visible():true}” instead of the “{visible:true}” I was expecting.

I tried stepping through the code, but I got completely lost in Falcon.

Am I doing/expecting something wrong, or is this actually an issue with the
compiler?

EdB



-- 
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl

Re: [Falcon/FalconJX] object literal property != class property

Posted by Erik de Bruin <er...@ixsoftware.nl>.
It was.

Down to 10 GCC errors when cross-compiling the SDK with FalconJX ;-)

EdB



On Fri, Oct 10, 2014 at 7:42 PM, Alex Harui <ah...@adobe.com> wrote:

> Sounds right to me.
>
> On 10/10/14, 10:33 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>
> >Yeah, I know it “lands” there … Got it: the compiler actually marks the
> >object literal prop as ‘NonResolvingIdentifierNode’, which is currently no
> >special cased, so FalconJX treats it as an accessor node: guess I’m going
> >to make ‘emitIdentifier' a bit more complex ;-)
> >
> >EdB
> >
> >
> >
> >On Fri, Oct 10, 2014 at 6:58 PM, Alex Harui <ah...@adobe.com> wrote:
> >
> >> Did you look at emitIdentifier in JSFlexJSEmitter.java?  I would expect
> >>it
> >> would all come down to the logic in there.
> >>
> >> On 10/10/14, 8:50 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
> >>
> >> >Hi,
> >> >
> >> >I have:
> >> >
> >> ><code>
> >> >public class MyClass
> >> >{
> >> >private var myObject:Object = { visible: true };
> >> >
> >> >private var _visible:Boolean;
> >> > public function get visible():Boolean
> >> >{
> >> >return _visible;
> >> >}
> >> > public function set visible(value:Boolean):void
> >> >{
> >> >_visible = value;
> >> >}
> >> >}
> >> ></code>
> >> >
> >> >When I feed this to Falcon/FalconJX (with FlexJS output type set), I
> >>get
> >> >something weird for the ŒmyObject¹ line: somehow either Falcon or
> >>FalconJX
> >> >thinks the property Œvisible¹ of the object literal is a reference to
> >>the
> >> >Œvisible¹ property of MyClass. It therefor parses the object literal to
> >> >³{this.get_visible():true}² instead of the ³{visible:true}² I was
> >> >expecting.
> >> >
> >> >I tried stepping through the code, but I got completely lost in Falcon.
> >> >
> >> >Am I doing/expecting something wrong, or is this actually an issue with
> >> >the
> >> >compiler?
> >> >
> >> >EdB
> >> >
> >> >
> >> >
> >> >--
> >> >Ix Multimedia Software
> >> >
> >> >Jan Luykenstraat 27
> >> >3521 VB Utrecht
> >> >
> >> >T. 06-51952295
> >> >I. www.ixsoftware.nl
> >>
> >>
> >
> >
> >--
> >Ix Multimedia Software
> >
> >Jan Luykenstraat 27
> >3521 VB Utrecht
> >
> >T. 06-51952295
> >I. www.ixsoftware.nl
>
>


-- 
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl

Re: [Falcon/FalconJX] object literal property != class property

Posted by Alex Harui <ah...@adobe.com>.
Sounds right to me.

On 10/10/14, 10:33 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:

>Yeah, I know it “lands” there … Got it: the compiler actually marks the
>object literal prop as ‘NonResolvingIdentifierNode’, which is currently no
>special cased, so FalconJX treats it as an accessor node: guess I’m going
>to make ‘emitIdentifier' a bit more complex ;-)
>
>EdB
>
>
>
>On Fri, Oct 10, 2014 at 6:58 PM, Alex Harui <ah...@adobe.com> wrote:
>
>> Did you look at emitIdentifier in JSFlexJSEmitter.java?  I would expect
>>it
>> would all come down to the logic in there.
>>
>> On 10/10/14, 8:50 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>
>> >Hi,
>> >
>> >I have:
>> >
>> ><code>
>> >public class MyClass
>> >{
>> >private var myObject:Object = { visible: true };
>> >
>> >private var _visible:Boolean;
>> > public function get visible():Boolean
>> >{
>> >return _visible;
>> >}
>> > public function set visible(value:Boolean):void
>> >{
>> >_visible = value;
>> >}
>> >}
>> ></code>
>> >
>> >When I feed this to Falcon/FalconJX (with FlexJS output type set), I
>>get
>> >something weird for the ŒmyObject¹ line: somehow either Falcon or
>>FalconJX
>> >thinks the property Œvisible¹ of the object literal is a reference to
>>the
>> >Œvisible¹ property of MyClass. It therefor parses the object literal to
>> >³{this.get_visible():true}² instead of the ³{visible:true}² I was
>> >expecting.
>> >
>> >I tried stepping through the code, but I got completely lost in Falcon.
>> >
>> >Am I doing/expecting something wrong, or is this actually an issue with
>> >the
>> >compiler?
>> >
>> >EdB
>> >
>> >
>> >
>> >--
>> >Ix Multimedia Software
>> >
>> >Jan Luykenstraat 27
>> >3521 VB Utrecht
>> >
>> >T. 06-51952295
>> >I. www.ixsoftware.nl
>>
>>
>
>
>-- 
>Ix Multimedia Software
>
>Jan Luykenstraat 27
>3521 VB Utrecht
>
>T. 06-51952295
>I. www.ixsoftware.nl


Re: [Falcon/FalconJX] object literal property != class property

Posted by Erik de Bruin <er...@ixsoftware.nl>.
Yeah, I know it “lands” there … Got it: the compiler actually marks the
object literal prop as ‘NonResolvingIdentifierNode’, which is currently no
special cased, so FalconJX treats it as an accessor node: guess I’m going
to make ‘emitIdentifier' a bit more complex ;-)

EdB



On Fri, Oct 10, 2014 at 6:58 PM, Alex Harui <ah...@adobe.com> wrote:

> Did you look at emitIdentifier in JSFlexJSEmitter.java?  I would expect it
> would all come down to the logic in there.
>
> On 10/10/14, 8:50 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>
> >Hi,
> >
> >I have:
> >
> ><code>
> >public class MyClass
> >{
> >private var myObject:Object = { visible: true };
> >
> >private var _visible:Boolean;
> > public function get visible():Boolean
> >{
> >return _visible;
> >}
> > public function set visible(value:Boolean):void
> >{
> >_visible = value;
> >}
> >}
> ></code>
> >
> >When I feed this to Falcon/FalconJX (with FlexJS output type set), I get
> >something weird for the ŒmyObject¹ line: somehow either Falcon or FalconJX
> >thinks the property Œvisible¹ of the object literal is a reference to the
> >Œvisible¹ property of MyClass. It therefor parses the object literal to
> >³{this.get_visible():true}² instead of the ³{visible:true}² I was
> >expecting.
> >
> >I tried stepping through the code, but I got completely lost in Falcon.
> >
> >Am I doing/expecting something wrong, or is this actually an issue with
> >the
> >compiler?
> >
> >EdB
> >
> >
> >
> >--
> >Ix Multimedia Software
> >
> >Jan Luykenstraat 27
> >3521 VB Utrecht
> >
> >T. 06-51952295
> >I. www.ixsoftware.nl
>
>


-- 
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl

Re: [Falcon/FalconJX] object literal property != class property

Posted by Alex Harui <ah...@adobe.com>.
Did you look at emitIdentifier in JSFlexJSEmitter.java?  I would expect it
would all come down to the logic in there.

On 10/10/14, 8:50 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:

>Hi,
>
>I have:
>
><code>
>public class MyClass
>{
>private var myObject:Object = { visible: true };
>
>private var _visible:Boolean;
> public function get visible():Boolean
>{
>return _visible;
>}
> public function set visible(value:Boolean):void
>{
>_visible = value;
>}
>}
></code>
>
>When I feed this to Falcon/FalconJX (with FlexJS output type set), I get
>something weird for the ŒmyObject¹ line: somehow either Falcon or FalconJX
>thinks the property Œvisible¹ of the object literal is a reference to the
>Œvisible¹ property of MyClass. It therefor parses the object literal to
>³{this.get_visible():true}² instead of the ³{visible:true}² I was
>expecting.
>
>I tried stepping through the code, but I got completely lost in Falcon.
>
>Am I doing/expecting something wrong, or is this actually an issue with
>the
>compiler?
>
>EdB
>
>
>
>-- 
>Ix Multimedia Software
>
>Jan Luykenstraat 27
>3521 VB Utrecht
>
>T. 06-51952295
>I. www.ixsoftware.nl