You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by GitBox <gi...@apache.org> on 2019/02/04 07:26:29 UTC

[GitHub] greg-dove commented on issue #74: Assign to int or uint variable does not convert Number from floating point to integer

greg-dove commented on issue #74: Assign to int or uint variable does not convert Number from floating point to integer
URL: https://github.com/apache/royale-compiler/issues/74#issuecomment-460152926
 
 
   I think this is probably an extreme example, because the original code was ported from javascript and presumably 'optimized' to a degree in its original javascript source, but I just added another small change (https://github.com/apache/royale-asjs/commit/4c27828483a6c6e9a712caa65b55e14fa944a794) to avoid this:
   ```
   org/apache/royale/net/remoting/amf/AMFBinaryData.js:678: WARNING - Suspicious code. The result of the ‘rsh’ operator is not being used.
    v < 0 && (v = (-(v ^ org.apache.royale.net.remoting.amf.AMFBinaryData.UINT_MAX_VALUE) - 1)) >> 0;
   ```
   I presume the original code is valid actionscript, although I think this type of thing is best left for GCC to do with something more like what I changed it to. But I am not sure if the coercion was correctly placed in the above example (maybe it is ?) I know this issue is closed, but I am adding this here as it seems to be the best place to add it for now... If this is an issue, I don't think it is high priority.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services