lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Hi Mike,

On Dec 17, 2008, at 10:12 AM, Mike Pall wrote:
The hope is that with Lua 5.2 we get a "bit" library in the core
distribution. Consider the Lua BitOp docs, and in particular the
section on operational semantics and rationale as my contribution
to this effort.

Thank you.

I notice that you use ((SBits)b >> n) to implement bit.arshift. C89 and C99 don't specify how signed right shifts are performed; it is "implementation-defined behavior." It seems that to insure the operational semantics you specify, either a more robust implementation for arshift is needed (as in my Plea at or at least an arshift test should be added at initialization.