Browser (and dart2js) support.
Workarounds for problems with >32bit arithmetic when compiling to JS.