+primitive restrictions - int, long, and float
+---------------------------------------------
+
+int
+
+For performance reasons, int addition and multiplication do not by default overflow to
+negative values. Instead, they just get bigger. Java code that relies on overflow to
+negative values should be surrounded by ()|0 -- an OR with integer 0:
+
+
+int bigI, bigJ;
+...
+
+bigI = (bigI + bigJ)|0;
+
+bigI = (bigI + 1)|0; //instead of bigI++
+
+
+Thus, in Java, the following is true:
+
+ 2000000000 + 2000000000 == -294967296
+
+But in SwingJS, that will be 4000000000. So, for example, the following
+strategy will fail in SwingJS:
+
+ int newLength = lineBuf.length * 2;
+ if (newLength < 0) {
+ newLength = Integer.MAX_VALUE;
+ }
+
+This is because, generally, "-1" in JavaScript is not 0xFFFFFFFF. The simple ()|0 takes
+caes of this:
+
+ int newLength = (lineBuf.length * 2)|0;
+ if (newLength < 0) {
+ newLength = Integer.MAX_VALUE;
+ }
+
+JavaScript does process bitwise operators & | ^ ~ properly for int values. There is no issue using
+these operations.
+
+Note that int 1/0 in Java throws "java.lang.ArithmeticException: / by zero", but in JavaScript is just Infinity.
+
+Importantly, the JavaScript Int32Array does behave properly. From the Firefox developer console:
+
+>> x = new Int32Array(1)
+<- Int32Array(1) [ 0 ]
+>> x[0] = 4000000000
+<- 4000000000
+>> x[0]
+<- -294967296
+
+Notice that, perhaps unexpectedly, the following two constructs produce
+different results in JavaScript:
+
+x = new Int32Array(1);
+b = x[0] = 4000000000;
+
+(b will be 4000000000)
+
+and
+
+x = new Int32Array(1);
+x[0] = 4000000000;
+b = x[0];
+
+(b will be -294967296)
+
+
+SwingJS leverages array typing to handle all byte and short arithmetic so as
+to ensure that any byte or short operation in JavaScript does give the same
+result in Java.
+
+long
+
+Java's 64-bit long type is fully supported, starting with java2script 3.3.1 (2020.12.31)
+The transpiler handles all conversions to and from long appropriately. See the discussion
+at https://github.com/BobHanson/java2script/issues/202 for how this is done.
+
+float
+
+SwingJS does not distinguish between float and double. Everything is double.
+
+