scala-js/scala-js — pull request #240 by sjrd (2014-02-10 10:02:09+00:00)
Title: Fix #217: toHexString wrong for negative numbers.

For values in the normal range of Int (-2^31..2^31-1), the
result is the same as on the JVM, i.e., it is shown as though
the value had been wildly cast to an unsigned 32-bit integer.

For values outside the range, the result is an explicitly
signed representation. For example, "+fffffffe" or "-80000001".

This supersedes #217.
Note that the methods `toHexString` and co are not defined on `Byte` and `Short` in the JDK, so no need to implement them there; and the implementation in `Long` already relies on the correct implementation in `RuntimeLong`, so nothing to there either.