Update README explanation about string const max

This commit is contained in:
Chad Retz 2018-07-26 00:08:40 -05:00
parent a66c05ad4a
commit 1127b61eb5

View File

@ -373,7 +373,9 @@ and the JVM:
* WebAssembly has a nice data section for byte arrays whereas the JVM does not. Right now we use a single-byte-char
string constant (i.e. ISO-8859 charset). This saves class file size, but this means we call `String::getBytes` on
init to load bytes from the string constant.
init to load bytes from the string constant. Due to the JVM using an unsigned 16-bit int as the string constant
length, the maximum length is 65536, so we chunk data sections into as many max-65500-byte lengths we need to load it
all.
* The JVM makes no guarantees about trailing bits being preserved on NaN floating point representations like WebAssembly
does. This causes some mismatch on WebAssembly tests depending on how the JVM "feels" (I haven't dug into why some
bit patterns stay and some don't when NaNs are passed through methods).