On Jan 9, 8:15 pm, misham <[email protected]> wrote:
> kPointerSize -> sizeof(void*) = 4
> kIntSize -> sizeof(int)   = 4

If kPointerSize == kIntSize == 4 then you should define
V8_HOST_ARCH_32_BIT. The pseudosmi accessors code which triggers these
static assertions is for 64bit arch.

> Thanks, that makes sense.  I'll work on implementing StaticAssertion.

You should _not_ implement StaticAssertion. It is already implemented
and StaticAssertion<false> definition is omitted on purpose --- to
trigger compilation errors.

Let me show you an example... If you see something like

src/objects-inl.h:2873: error: invalid application of 'sizeof' to
incomplete type 'StaticAssertion<false>'

you should open the file in question, look at the line and then locate
relevant STATIC_ASSERT(expr) macro. In this case it is clearly the one
on line 2868

STATIC_ASSERT(holder::offset % kPointerSize == kIntSize);

Then you should look at the expression passed to STATIC_ASSERT and try
to figure out why it evaluates to false. In this case it evaluates to
false because kPointerSize == kIntSize. And PSEUDO_SMI_ACCESSORS_HI/
PSEUDO_SMI_ACCESSORS_LO are written in assumption that kPointerSize ==
2*kIntSize (+ little endianess assumption which is not documented or
checked by any assertion in this code).

Hope this helps.

--
Vyacheslav Egorov

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to