Hi,

I found something interesting in the v8 source code. They store the true
and false as integers: 1 and 0. Actually it was a surprise to me, but
"true + 1" is "2" in JavaScript, so this kind of object handling seems ok.

Advantage of their approach: they don't need to care about boolean values
for all arithmetic and conditional operations in JIT. This could reduce
the source code (maintainability), and probably faster, since you don't
need to check boolean values.

Disadvantage: type resolving is a bit more difficult, but since that is a
rare operation, I think the gain could be bigger.

What is your opinion about it? Would it be possible to implement something
like this for JSValue32_64? Would it worth it?

Regards,
Zoltan


_______________________________________________
squirrelfish-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/squirrelfish-dev

Reply via email to