Currently JSValue::toBoolean() is implemented with a virtual call. While this is avoidable in general, due to the ability to override toBoolean() in the JavaScriptGlue API, we should be able to speed up the common case and use a bit in the StructureID TypeInfo for the slow case.
Created attachment 24456 [details] Patch for JavaScriptCore Maciej sent me his earlier toBoolean() patch, which ignored the fact that JavaScriptGlue exposes the ability to overload toBoolean(). It was a small speedup, but this new patch, which adds a TypeInfo bit to account for that, is a small slowdown. The way to speed it up is probably to inline the fast cases into machine code.
This will now be fixed by 67727. *** This bug has been marked as a duplicate of bug 67727 ***