Harbs,

js-complex-implicit-coercions is on by default. The default behavior is
therefore now the same as swf. It is an optimization to turn it off.
You need to switch it off if you want to avoid it. But if you are seeing
runtime errors, then it is likely indicating something that would not work
at runtime in swf, so you may also want to review that first.

If you want code to work as before, you need to do this:

-js-complex-implicit-coercions=false;
-js-vector-index-checks=false;
-js-resolve-uncertain=false;

or to add them to the -config.xml

There is also the option to output Vector as Array, if you want the legacy
approach for Vectors. I outlined these in an earlier post, but I will add
something more detailed to docs this week.

For XML, I'm sorry if something is not working right now. I did port a lot
of your adhoc tests to the manualtests project. And added quite a few more
new tests. The implementation was not working correctly for quite a few
things. So while I addressed some new issues,there is still a lot more to
do. It's entirely possible that I broke something that did not have a test
yet. Unless we focus more on test coverage, it will be easy to break things
as other things get fixed, particularly with something like XML, which is
reasonably complex. With inadequate test coverage, it can even be possible
to start relying on an implementation that does not work as it should.
Yishay: can you please give me a simple test case for the XML issue you are
seeing? I will look into it today.





On Thu, Jun 20, 2019 at 8:33 AM Harbs <[email protected]> wrote:

> The code has /* implicit cast */ and we do not have the
> complex-implicit-coresions set.
>
> FYI, XML is also broken due to empty nodes which did not used to be there,
> but I’ll let Yishay comment on the details.
>
> > On Jun 19, 2019, at 11:29 PM, Greg Dove <[email protected]> wrote:
> >
> > Hi Yishay,
> >
> > If there's a problem with this I will address it asap.
> > The setting was not working correctly before. I think it is now, so that
> > may have affected the output, but perhaps there are some test cases I did
> > not cover.
> >
> > skipAsCoercions only relates to explicit coercions, and should not have
> an
> > effect on the implicit coercions
> >
> > (But it does make me wonder if I have implemented the new config level
> > option correctly, maybe it should be added as one of the
> > -js-output-optimization options instead of being another top level
> option.
> > I can revisit this in another thread.)
> >
> > For now, the equivalent is
> > <js-complex-implicit-coercions>false</js-complex-implicit-coercions>
> >
> > or
> > -js-complex-implicit-coercions=false
> >
> > Do you have either of those set? If so then you should not see the
> implicit
> > coercions unless they are toggled on locally and therefore it is an error
> >
> > Can you please also use 'find in files' with your js-debug output,
> > searching for the text:
> > /* implicit cast */
> > and inspect the site of the runtime error?
> >
> > Is it generating the right cast on the right for the expected type on the
> > left if it is assignment?
> >
> >
> >
> >
> >
> >
> >
> > On Thu, Jun 20, 2019 at 2:00 AM Yishay Weiss <[email protected]>
> wrote:
> >
> >> After updating the compiler we’re getting a runtime type coercion
> failure
> >> which didn’t exist before.
> >>
> >> A quick question: should ‘skipAsCoercions’ suppress implicit casts?
> Could
> >> the latest commit [1] have changed that?
> >>
> >> [1]
> >>
> https://github.com/apache/royale-compiler/commit/73caf20e03b72bb9e1717f2339c14cb79c6082b9
> >>
> >> Thanks.
> >>
>
>

Reply via email to