You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cf. dart-lang/sdk#42892 (comment), the appendix about the treatment of numbers in Dart when compiled to JavaScript needs to be updated such that it mentions that bit operations consider the operands to be unsigned 32 bit values rather than signed ones:
We chose to make all bit operations unsigned because it makes more code work
than accepting JavaScript's signed behaviour. In particular the following kinds of
code often have bugs with signed values: implementations of bit-arrays as an array
of 32-bit integers; code that packs bool or int fields into an integer; code that does
rotates by combining shifts.
If a signed result is needed it can be obtained via .toSigned(32), e.g. (-1 << 10).toSigned(32).
The current wording implies that Dart uses the JavaScript semantics.
The text was updated successfully, but these errors were encountered:
Cf. dart-lang/sdk#42892 (comment), the appendix about the treatment of numbers in Dart when compiled to JavaScript needs to be updated such that it mentions that bit operations consider the operands to be unsigned 32 bit values rather than signed ones:
The current wording implies that Dart uses the JavaScript semantics.
The text was updated successfully, but these errors were encountered: