
Signature
programmer, author http://www.midnightbeach.com
and father http://www.midnightbeach.com/hs
The evaluation stack uses the natural word size of the machine, but the
types themselves can have a different in-memory representations, and as a
result will get expanded when they will be loaded into the evaluation stack
(via ldloc, ldfld, etc.). In the case of the Boolean type, this can save
you 3 bytes on 32bit machines (assuming you have other small types to pack
the structure with).
-- Ori.
--------------------
>Message-ID: <3F7E41BC.6F333EC5@midnightbeach.com>
>Date: Fri, 03 Oct 2003 20:42:52 -0700
[quoted text clipped - 22 lines]
>int32 on the stack; the brtrue and brfalse instructions take 32-bit
>values, not a 1-byte boolean.

Signature
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
Jon Shemitz - 07 Oct 2003 05:04 GMT
> The evaluation stack uses the natural word size of the machine, but the
> types themselves can have a different in-memory representations, and as a
> result will get expanded when they will be loaded into the evaluation stack
> (via ldloc, ldfld, etc.). In the case of the Boolean type, this can save
> you 3 bytes on 32bit machines (assuming you have other small types to pack
> the structure with).
Thx. I'd already found that C# could ld a bool and brtrue or brfalse
it, and seen a line or two in the docs that sort of allude to this -
this is a deeper explanation than I've seen.

Signature
programmer, author http://www.midnightbeach.com
and father http://www.midnightbeach.com/hs