Make class BitField able to use 32 bits of a uint32.
authorfschneider@chromium.org <fschneider@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 19 Feb 2010 10:02:04 +0000 (10:02 +0000)
committerfschneider@chromium.org <fschneider@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 19 Feb 2010 10:02:04 +0000 (10:02 +0000)
commitec865135191a55e051d03547b9348dc3953222e2
treed54e994407d300ab2dd50a59b0adfa5e72dcb5c5
parent62d62cb8e2ad1880273a38967041d17571e68e2a
Make class BitField able to use 32 bits of a uint32.

Although algorithmically correct, the compiler would not allow to instantiate
a BitField that uses all 32 bits without warnings about a too large shift
count. As a consequence we were limited to 31 bit values when using BitField.

This happened when instantiating a bitfield BitField<T, shift, size> with
[shift=0, size=32] or [shift=31, size=1] or more general any
[shift=X, size=32-X]

As side-effect of the new implementation the compiler now warns if we ever
try instantiating a bitfield with size 0.

Review URL: http://codereview.chromium.org/606063

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3910 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/codegen.h
src/frame-element.h
src/objects.h
src/register-allocator.h
src/utils.h