WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
183435
[JSC] Optimize inherits<T> if T is final type
https://bugs.webkit.org/show_bug.cgi?id=183435
Summary
[JSC] Optimize inherits<T> if T is final type
Yusuke Suzuki
Reported
2018-03-08 01:32:56 PST
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>.
Attachments
Patch
(131.62 KB, patch)
2018-03-08 08:19 PST
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(130.93 KB, patch)
2018-03-08 09:22 PST
,
Yusuke Suzuki
mark.lam
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Yusuke Suzuki
Comment 1
2018-03-08 08:19:34 PST
Created
attachment 335299
[details]
Patch
Yusuke Suzuki
Comment 2
2018-03-08 09:22:47 PST
Created
attachment 335304
[details]
Patch
Mark Lam
Comment 3
2018-03-08 10:04:56 PST
Comment on
attachment 335304
[details]
Patch r=me
Yusuke Suzuki
Comment 4
2018-03-08 10:22:48 PST
Thanks!
Yusuke Suzuki
Comment 5
2018-03-08 10:24:14 PST
Committed
r229413
: <
https://trac.webkit.org/changeset/229413
>
Radar WebKit Bug Importer
Comment 6
2018-03-08 10:25:26 PST
<
rdar://problem/38267844
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug