Comment #16 on issue 615 by [email protected]: "instanceof" operator broken in V8 v2.0.6.4
http://code.google.com/p/v8/issues/detail?id=615

Sorry, I did mistype the "--".

instanceof is implemented as a simple loop in generated code which walks the
prototype chain. It could be that somehow the prototype chain of [] does not include
the prototype property of the function denoted by Array.  You could try:

new Array() instanceof Array

If that also doesn't work then I can take a look at the generated code, but it should
be the same in release and debug mode.

If you take your debug build (the one that works), you can use:

./shell_g --print-code-stubs -e "print([] instanceof Array)"

You will get a bunch of output (you may want to redirect it to a file). The last bit
printed will begin:

Instanceof
kind = STUB
name = Instanceof

that's the code for instanceof. Now, please try the same thing with a release build,
but you have to enable the disassembler at build time:

scons arch=x64 library=shared sample=shell disassembler=on
./shell --print-code-stubs -e "print([] instanceof Array)"

If you could attach the relevant parts of the two disassemblies as files on this bug (just the Instanceof STUB part to the end), I'll take a look at them to verify that
they're the same (modulo different addresses).


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

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

Reply via email to