Bug 144456

Summary: TypeOfIsUndefined by-type folding should take advantage of the masquerades-as-undefined watchpoint
Product: WebKit Reporter: Filip Pizlo <fpizlo>
Component: JavaScriptCoreAssignee: Alexey Shvayka <ashvayka>
Status: NEW ---    
Severity: Enhancement CC: ashvayka, ews-watchlist, keith_miller, mark.lam, msaboff, saam, tzagallo
Priority: P2    
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Bug Depends on: 144409    
Bug Blocks:    
Attachments:
Description Flags
Patch fpizlo: review+

Description Filip Pizlo 2015-04-30 10:31:02 PDT
This would allow us to fold more things.
Comment 1 Alexey Shvayka 2021-08-04 14:52:44 PDT
Created attachment 434939 [details]
Patch
Comment 2 Alexey Shvayka 2021-08-04 14:53:30 PDT
(In reply to Alexey Shvayka from comment #1)
> Created attachment 434939 [details]
> Patch

                                                    r280626                    patch

is-undefined-fold-tricky-spec-object-other      30.6171+-0.7028     ^     21.8494+-0.6913        ^ definitely 1.4013x faster
Comment 3 Filip Pizlo 2021-08-04 15:10:39 PDT
Comment on attachment 434939 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=434939&action=review

> Source/JavaScriptCore/ChangeLog:12
> +        TypeOfIsObject / TypeOfIsFunction by-type folding can't be improved in the same way:
> +        even if SpecObjectOther is a proven non-masquerader, we don't know if it's callable.

Can you replace the FIXME's with comments to this effect?  This is an easy detail to forget.  I would say something like - we could use the masquerade watchpoint to prove it's not undefined, but we don't have a trick for callability.