• Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: P4 P4
    • 8
    • None
    • core-libs
    • None
    • b89
    • Verified

      We currently implement these operations in JSType using a long/int cast and a bitmask operation to squeeze them into 32 or 16 bits. But ECMA spec requires to follow IEEE 754 standard which yields different results for some numbers.

      This should fix the following:

      9223372036854775807|0
      => should return 0

      9223372036854775807>>>0
      => should return 0 instead of 4294967295

      Also visible in other places where ToUint32() is used, e.g.
      Array.prototype.map.call({length: 9223372036854775807, get 0(){print("get 0")}}, function(){}).length
      => should return 0 instead of 4294967295

      parseInt("10",9223372036854775807)
      => should return 10 instead of NaN

            hannesw Hannes Wallnoefer
            hannesw Hannes Wallnoefer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: