mozilla/shumway — comment on commit dea2d3475cdf53fa2d2b52b9f44a2fe02b3a94c8
File: src/avm2/avm2.js line 55
By tobeytailor:

Its true, every negative value takes 5 bytes, see writeU30 in http://hg.mozilla.org/tamarin-central/file/fbecf6c8a86f/utils/abcasm/src/abcasm/AbcEmitter.java starting at line 567.

On Jan 8, 2012, at 9:09 PM, Michael Bebenita wrote:

> I changed it so that readU32() calls readS32() and then does a ">>> 0" to get an unsigned value (possibly a double). I'm guessing that readS32() can read 32 bit ints, actually it reads 36 bits and truncates the high 4 bits (5-8) of the 5th byte that is red. The 4th bit of the last byte happens to land on the sign bit of the result. It does indeed seem strange that -1 takes 5 bytes.
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/mozilla/shumway/commit/dea2d3475cdf53fa2d2b52b9f44a2fe02b3a94c8#commitcomment-847938