Re: dual issues

2017-06-03 Thread Alex Harui
On 6/3/17, 2:02 PM, "Harbs" wrote: >I just ran into another issue. > >I’m not sure why dual would have changed this, but I’m now getting an >(erroneous) error when trying to use Promises: > >Incorrect number of arguments. Expected no more than 0 > >

[FlexJS] more on undefined / non initialised values

2017-06-03 Thread Justin Mclean
Hi, So if you run this code on AS public var s:String; public var o:Object; public var i:int; public var n:Number; public var b:Boolean; public function init():void { trace(s); trace(o); trace(i); trace(n); trace(b); } You get: null null 0 NaN false null but on JS you get:

Re: Private properties are undefined in JS and null in AS

2017-06-03 Thread Justin Mclean
Hi, So here’s some data for you: In string_old.js: var s; for (var i = 0; i < 1e8; i++) { if (s == "") { } } In string.js: var s = ""; for (var i = 0; i < 1e8; i++) { if (s === "") { } } time node string.js real0m0.246s user0m0.114s sys 0m0.046s time node

Re: Private properties are undefined in JS and null in AS

2017-06-03 Thread Justin Mclean
Hi, > I'm not sure it is always one-off. I think every function call will need > to initialize its local variables. Yep that may also need to be done in some cases. > Also, we have to remember that the final optimization is done by Google > and not us. We are type annotating the output and

Re: [FlexJS] Accordion broken

2017-06-03 Thread Harbs
I worked around the Promise issue (by copying js.swc to my project and not using the one in the SDK). There’s at least 2 issues still: 1. The title property from the model is not being applied to the view of the item renderer. 2. The collapsed height of the collapsed items are 0 instead of the

Re: [FlexJS] Accordion broken

2017-06-03 Thread Harbs
Yishay did the implementation of this so I was a bit shaky on the details. I just looked at our code, and it appears that we did not actually use panels for the children. It turns out the children are actually Containers which have a TitleBarModel bead. Sorry about the confusion. It might make

Re: dual issues

2017-06-03 Thread Harbs
I just ran into another issue. I’m not sure why dual would have changed this, but I’m now getting an (erroneous) error when trying to use Promises: Incorrect number of arguments. Expected no more than 0 return new Promise(function(resolve:*,reject:*):void{

Re: [FlexJS] Why FlexJS compiler statically looks for 'src' folder

2017-06-03 Thread Josh Tynjala
I re-read your description of outputFolderMap, and I now I understand how my proposal can be included as its default. - Josh On Fri, Jun 2, 2017 at 10:04 PM, Alex Harui wrote: > Hmm. We seem to be miscommunicating. My proposal is to implement your > proposal via

Re: Private properties are undefined in JS and null in AS

2017-06-03 Thread Alex Harui
On 6/2/17, 11:59 PM, "Justin Mclean" wrote: > >> 2) How much slower and fatter is initializing properties to null? > >Given it’s a one off and a comparison is likely to be made several time I >would assume the cost of setting to null would be a lot lower. I'm not sure

Re: [7/7] git commit: [flex-asjs] [refs/heads/develop] - make getValue a lot faster - 30ms down to 5ms in a complex app for JS in Chrome

2017-06-03 Thread justin
Hi, > No reason to be :-) Knowing what evacuates to true with == and false with != > is hard to remember and get right. Evaluates was meant obviously. Autocorrect can sometime give amusing results. thanks, Justin

Re: [7/7] git commit: [flex-asjs] [refs/heads/develop] - make getValue a lot faster - 30ms down to 5ms in a complex app for JS in Chrome

2017-06-03 Thread Justin Mclean
Hi, > Ahh!! You are right. Stupid. Sorry about that. No reason to be :-) Knowing what evacuates to true with == and false with != is hard to remember and get right. Thanks, Justin

Re: [7/7] git commit: [flex-asjs] [refs/heads/develop] - make getValue a lot faster - 30ms down to 5ms in a complex app for JS in Chrome

2017-06-03 Thread piotrz
Ahh!! You are right. Stupid. Sorry about that. Piotr - Apache Flex PMC piotrzarzyck...@gmail.com -- View this message in context:

Re: [7/7] git commit: [flex-asjs] [refs/heads/develop] - make getValue a lot faster - 30ms down to 5ms in a complex app for JS in Chrome

2017-06-03 Thread Justin Mclean
Hi, > if(styleable.style !== 'undefined' && styleable.style != null) > > You will have both cases handled. (styleable.style != null) will cover both cases as well - and probably a few you may not want :-) Until we sort out the way to do this I've just put in something that worked on both

Re: Private properties are undefined in JS and null in AS

2017-06-03 Thread Justin Mclean
Hi, > Do you find cycles to perform some tests and present numbers? There are existing tests out there see for example JSPerf.com [1] For instance on Safari != vs !== and == vs === is 99% slower (yikes!) when comparing different types. Chrome give similar results. Now hopefully most

Re: Private properties are undefined in JS and null in AS

2017-06-03 Thread piotrz
Justin, Do you find cycles to perform some tests and present numbers? Piotr - Apache Flex PMC piotrzarzyck...@gmail.com -- View this message in context: http://apache-flex-development.247.n4.nabble.com/Private-properties-are-undefined-in-JS-and-null-in-AS-tp62033p62042.html Sent

Re: Private properties are undefined in JS and null in AS

2017-06-03 Thread Justin Mclean
HI, > 1) how much slower is === than == (and similarly !== vs !=) in AS and JS? In AS I don’t know but in JS in most browsers it’s in general 5-20% faster but does vary in what you are comparing. > I seem to recall that certain types and values did a lot of implicit > coercions in "==" and

Re: Private properties are undefined in JS and null in AS

2017-06-03 Thread piotrz
Hi, I would be really interested to have answer to each of this questions. It can give us answer what actually need to be used. I would suggest till then do not change anything - apart of obvious bugs. Piotr - Apache Flex PMC piotrzarzyck...@gmail.com -- View this message in context:

Re: [7/7] git commit: [flex-asjs] [refs/heads/develop] - make getValue a lot faster - 30ms down to 5ms in a complex app for JS in Chrome

2017-06-03 Thread piotrz
Hi Justin, I saw your commit. Why in that case you cannot have? if(styleable.style !== 'undefined' && styleable.style != null) You will have both cases handled. Piotr - Apache Flex PMC piotrzarzyck...@gmail.com -- View this message in context: