Bug 211140

Summary: [JSC] Align upon the name isCallable instead of isFunction
Product: WebKit Reporter: Ross Kirsling <ross.kirsling>
Component: New BugsAssignee: Ross Kirsling <ross.kirsling>
Status: RESOLVED FIXED    
Severity: Normal CC: calvaris, cdumez, darin, eric.carlson, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, jer.noble, keith_miller, mark.lam, msaboff, philipj, saam, sergio, tzagallo, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=211037
Attachments:
Description Flags
Patch
none
Patch
none
Patch for landing none

Description Ross Kirsling 2020-04-28 12:24:57 PDT
[JSC] Align upon the name isCallable instead of isFunction
Comment 1 Ross Kirsling 2020-04-28 12:28:07 PDT
Created attachment 397868 [details]
Patch
Comment 2 Ross Kirsling 2020-04-28 12:31:39 PDT
Created attachment 397870 [details]
Patch
Comment 3 Darin Adler 2020-04-28 12:33:38 PDT
Comment on attachment 397870 [details]
Patch

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

r=me assuming the EWS confirms this compiles everywhere

> Source/JavaScriptCore/runtime/JSCJSValueInlines.h:894
>      if (!isCell())
>          return false;
> -    return asCell()->isFunction(vm);
> +    return asCell()->isCallable(vm);

I really like && for functions like this:

    return isCell() && asCell()->isCallable(vm);

Obviously that has nothing to do with this patch.
Comment 4 Ross Kirsling 2020-04-28 14:16:10 PDT
Created attachment 397885 [details]
Patch for landing
Comment 5 EWS 2020-04-28 14:51:43 PDT
Committed r260848: <https://trac.webkit.org/changeset/260848>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 397885 [details].
Comment 6 Radar WebKit Bug Importer 2020-04-28 14:52:17 PDT
<rdar://problem/62548189>
Comment 7 Saam Barati 2020-04-29 14:52:48 PDT
Comment on attachment 397885 [details]
Patch for landing

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

> Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:17902
> +    LValue isCallable(LValue cell, SpeculatedType type = SpecFullTop)

This is wrong, this one really is "isFunction".

You could rename this to "isJSFunction" or keep it as "isFunction"
Comment 8 Ross Kirsling 2020-04-29 15:16:45 PDT
Committed r260919: <https://trac.webkit.org/changeset/260919>