Bug 211140 - [JSC] Align upon the name isCallable instead of isFunction
Summary: [JSC] Align upon the name isCallable instead of isFunction
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ross Kirsling
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-04-28 12:24 PDT by Ross Kirsling
Modified: 2020-04-29 15:16 PDT (History)
18 users (show)

See Also:


Attachments
Patch (48.78 KB, patch)
2020-04-28 12:28 PDT, Ross Kirsling
no flags Details | Formatted Diff | Diff
Patch (46.16 KB, patch)
2020-04-28 12:31 PDT, Ross Kirsling
no flags Details | Formatted Diff | Diff
Patch for landing (46.38 KB, patch)
2020-04-28 14:16 PDT, Ross Kirsling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>