[Webkit-unassigned] [Bug 183435] New: [JSC] Optimize inherits<T> if T is final type

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 8 01:32:56 PST 2018


https://bugs.webkit.org/show_bug.cgi?id=183435

            Bug ID: 183435
           Summary: [JSC] Optimize inherits<T> if T is final type
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: utatane.tea at gmail.com

If T is a final type, we do not need to traverse hierarchy.

Consider a final type T,

jsDynamicCast<T*>(vm, cell);

in this case,

if (cell->classInfo(vm) == T::info())
    return static_cast<T*>(cell);
return nullptr;

is enough. We can this optimization in JSCast.h with std::is_final<T>.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180308/1d4e7d11/attachment.html>


More information about the webkit-unassigned mailing list