Bug 233415 - [JSC] Move m_incomingPolymorphicCalls out of CodeBlock::JITData
Summary: [JSC] Move m_incomingPolymorphicCalls out of CodeBlock::JITData
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: Yusuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-11-21 23:21 PST by Yusuke Suzuki
Modified: 2021-11-29 11:52 PST (History)
15 users (show)

See Also:


Attachments
Patch (18.28 KB, patch)
2021-11-21 23:23 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (18.93 KB, patch)
2021-11-21 23:28 PST, Yusuke Suzuki
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (18.69 KB, patch)
2021-11-21 23:53 PST, Yusuke Suzuki
mark.lam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2021-11-21 23:21:45 PST
[JSC] Move m_incomingPolymorphicCalls out of CodeBlock::JITData
Comment 1 Yusuke Suzuki 2021-11-21 23:23:28 PST
Created attachment 444946 [details]
Patch
Comment 2 Yusuke Suzuki 2021-11-21 23:28:06 PST
Created attachment 444947 [details]
Patch
Comment 3 Yusuke Suzuki 2021-11-21 23:53:26 PST
Created attachment 444949 [details]
Patch
Comment 4 Radar WebKit Bug Importer 2021-11-28 23:22:18 PST
<rdar://problem/85801379>
Comment 5 Mark Lam 2021-11-29 10:01:18 PST
Comment on attachment 444949 [details]
Patch

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

Nice.  r=me

> Tools/TestWebKitAPI/Tests/WTF/SentinelLinkedList.cpp:96
> +

Can you add the following here?
    EXPECT_TRUE(!first->isOnList());
    EXPECT_TRUE(!second->isOnList());
    EXPECT_TRUE(!third->isOnList());
    EXPECT_TRUE(!fourth->isOnList());

> Tools/TestWebKitAPI/Tests/WTF/SentinelLinkedList.cpp:100
> +TEST(WTF_SentinelLinkedList, RemoveAll)

I think `Remove` is a better name for this test (instead of `RemoveAll`) since it's testing the `remove` method.

> Tools/TestWebKitAPI/Tests/WTF/SentinelLinkedList.cpp:115
> +}

Can you add an `EXPECT_TRUE(i == 10);` here?
Comment 6 Darin Adler 2021-11-29 10:03:53 PST
Comment on attachment 444949 [details]
Patch

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

>> Tools/TestWebKitAPI/Tests/WTF/SentinelLinkedList.cpp:115
>> +}
> 
> Can you add an `EXPECT_TRUE(i == 10);` here?

Or more idiomatically:

    EXPECT_EQ(10, i);

> Tools/TestWebKitAPI/Tests/WTF/SentinelLinkedList.cpp:132
> +    EXPECT_EQ(list.begin()->value(), 0);

These are all backward. The macro writes out error messages assuming that the expected value is first and the expression is second. You’ll notice this in failing tests, so it’s slightly more elegant to do it in the order the macro exprects.
Comment 7 Yusuke Suzuki 2021-11-29 11:29:03 PST
Comment on attachment 444949 [details]
Patch

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

Thank you!

>> Tools/TestWebKitAPI/Tests/WTF/SentinelLinkedList.cpp:96
>> +
> 
> Can you add the following here?
>     EXPECT_TRUE(!first->isOnList());
>     EXPECT_TRUE(!second->isOnList());
>     EXPECT_TRUE(!third->isOnList());
>     EXPECT_TRUE(!fourth->isOnList());

Nice. Added.

>> Tools/TestWebKitAPI/Tests/WTF/SentinelLinkedList.cpp:100
>> +TEST(WTF_SentinelLinkedList, RemoveAll)
> 
> I think `Remove` is a better name for this test (instead of `RemoveAll`) since it's testing the `remove` method.

Make sense. Changed.

>>> Tools/TestWebKitAPI/Tests/WTF/SentinelLinkedList.cpp:115
>>> +}
>> 
>> Can you add an `EXPECT_TRUE(i == 10);` here?
> 
> Or more idiomatically:
> 
>     EXPECT_EQ(10, i);

Sounds good. Added.

>> Tools/TestWebKitAPI/Tests/WTF/SentinelLinkedList.cpp:132
>> +    EXPECT_EQ(list.begin()->value(), 0);
> 
> These are all backward. The macro writes out error messages assuming that the expected value is first and the expression is second. You’ll notice this in failing tests, so it’s slightly more elegant to do it in the order the macro exprects.

Good catch! Changed :)
Comment 8 Yusuke Suzuki 2021-11-29 11:52:01 PST
Committed r286248 (244611@main): <https://commits.webkit.org/244611@main>