WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
204149
[JSC] BlockDirectory's bits should be compact
https://bugs.webkit.org/show_bug.cgi?id=204149
Summary
[JSC] BlockDirectory's bits should be compact
Yusuke Suzuki
Reported
2019-11-13 02:26:05 PST
...
Attachments
Patch
(22.95 KB, patch)
2019-11-13 02:30 PST
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(27.02 KB, patch)
2019-11-13 02:55 PST
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(28.21 KB, patch)
2019-11-13 03:03 PST
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(28.04 KB, patch)
2019-11-13 03:15 PST
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(28.06 KB, patch)
2019-11-13 03:23 PST
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(48.26 KB, patch)
2019-11-13 13:53 PST
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(50.78 KB, patch)
2019-11-13 14:12 PST
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(58.24 KB, patch)
2019-11-13 14:52 PST
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(58.67 KB, patch)
2019-11-13 16:02 PST
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(60.48 KB, patch)
2019-11-13 16:31 PST
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(60.48 KB, patch)
2019-11-13 16:49 PST
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(60.57 KB, patch)
2019-11-13 16:56 PST
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(61.74 KB, patch)
2019-11-13 17:03 PST
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(62.20 KB, patch)
2019-11-13 17:14 PST
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(63.71 KB, patch)
2019-11-13 17:49 PST
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(63.72 KB, patch)
2019-11-13 18:01 PST
,
Yusuke Suzuki
rmorisset
: review+
Details
Formatted Diff
Diff
Show Obsolete
(15)
View All
Add attachment
proposed patch, testcase, etc.
Yusuke Suzuki
Comment 1
2019-11-13 02:30:18 PST
Created
attachment 383442
[details]
Patch
Yusuke Suzuki
Comment 2
2019-11-13 02:55:36 PST
Created
attachment 383443
[details]
Patch
Yusuke Suzuki
Comment 3
2019-11-13 03:03:25 PST
Created
attachment 383445
[details]
Patch
Yusuke Suzuki
Comment 4
2019-11-13 03:15:58 PST
Created
attachment 383446
[details]
Patch
Yusuke Suzuki
Comment 5
2019-11-13 03:23:19 PST
Created
attachment 383447
[details]
Patch
Mark Lam
Comment 6
2019-11-13 09:39:29 PST
Comment on
attachment 383447
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=383447&action=review
> Source/JavaScriptCore/heap/BlockDirectory.cpp:351 > + [&] (auto, const char* name) {
Are you intentionally passing by value here?
Yusuke Suzuki
Comment 7
2019-11-13 12:35:08 PST
Comment on
attachment 383447
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=383447&action=review
>> Source/JavaScriptCore/heap/BlockDirectory.cpp:351 >> + [&] (auto, const char* name) { > > Are you intentionally passing by value here?
Yes, this should be BlockDirectoryBitVectorRef. But I'm planning to change this to BlockDirectoryBitVectorRef to make it explicit.
Yusuke Suzuki
Comment 8
2019-11-13 12:51:06 PST
Comment on
attachment 383447
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=383447&action=review
>>> Source/JavaScriptCore/heap/BlockDirectory.cpp:351 >>> + [&] (auto, const char* name) { >> >> Are you intentionally passing by value here? > > Yes, this should be BlockDirectoryBitVectorRef. But I'm planning to change this to BlockDirectoryBitVectorRef to make it explicit.
Ah, we cannot. Each bitvector has different type.
Yusuke Suzuki
Comment 9
2019-11-13 13:53:31 PST
Created
attachment 383492
[details]
Patch WIP
Yusuke Suzuki
Comment 10
2019-11-13 14:12:05 PST
Created
attachment 383495
[details]
Patch WIP
Yusuke Suzuki
Comment 11
2019-11-13 14:52:40 PST
Created
attachment 383500
[details]
Patch WIP
Yusuke Suzuki
Comment 12
2019-11-13 16:02:13 PST
Created
attachment 383507
[details]
Patch
Yusuke Suzuki
Comment 13
2019-11-13 16:31:11 PST
Created
attachment 383514
[details]
Patch WIP
Yusuke Suzuki
Comment 14
2019-11-13 16:49:36 PST
Created
attachment 383518
[details]
Patch
Yusuke Suzuki
Comment 15
2019-11-13 16:56:12 PST
Created
attachment 383519
[details]
Patch
Yusuke Suzuki
Comment 16
2019-11-13 17:03:06 PST
Created
attachment 383520
[details]
Patch
Yusuke Suzuki
Comment 17
2019-11-13 17:14:01 PST
Created
attachment 383521
[details]
Patch
Yusuke Suzuki
Comment 18
2019-11-13 17:49:43 PST
Created
attachment 383528
[details]
Patch
Yusuke Suzuki
Comment 19
2019-11-13 18:01:42 PST
Created
attachment 383532
[details]
Patch
Robin Morisset
Comment 20
2019-11-13 18:36:59 PST
Comment on
attachment 383532
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=383532&action=review
r=me
> Source/JavaScriptCore/heap/BlockDirectoryBits.h:156 > + for (unsigned i = BlockDirectoryBitVectorView<kind>::arrayLength(); i--;)
Is there a reason for the previous function using Base::arrayLength() while this one is using BlockDirectoryBitVectorView<kind>::arrayLength() ?
> Source/JavaScriptCore/heap/BlockDirectoryBits.h:191 > + BlockDirectoryBitVectorRef<Kind::capitalBitName> lowerBitName() \
I don't think this function is useful as long as you have the one above. Either delete it, or make it return a const BlockDirectoryBitVectorRef<Kind::capitalBitName>
Yusuke Suzuki
Comment 21
2019-11-13 19:00:42 PST
Comment on
attachment 383532
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=383532&action=review
Thanks!
>> Source/JavaScriptCore/heap/BlockDirectoryBits.h:156 >> + for (unsigned i = BlockDirectoryBitVectorView<kind>::arrayLength(); i--;) > > Is there a reason for the previous function using Base::arrayLength() while this one is using BlockDirectoryBitVectorView<kind>::arrayLength() ?
No reason. Thanks, fixed.
>> Source/JavaScriptCore/heap/BlockDirectoryBits.h:191 >> + BlockDirectoryBitVectorRef<Kind::capitalBitName> lowerBitName() \ > > I don't think this function is useful as long as you have the one above. > Either delete it, or make it return a const BlockDirectoryBitVectorRef<Kind::capitalBitName>
Yeah, removing View version, since Ref one is used to modify the bits.
Yusuke Suzuki
Comment 22
2019-11-13 19:08:07 PST
Comment on
attachment 383532
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=383532&action=review
>>> Source/JavaScriptCore/heap/BlockDirectoryBits.h:191 >>> + BlockDirectoryBitVectorRef<Kind::capitalBitName> lowerBitName() \ >> >> I don't think this function is useful as long as you have the one above. >> Either delete it, or make it return a const BlockDirectoryBitVectorRef<Kind::capitalBitName> > > Yeah, removing View version, since Ref one is used to modify the bits.
I tried removing this but it brings much complexity like implementing `bool operator[] const`. For now, I'll just keep it since it just works anyway :)
Yusuke Suzuki
Comment 23
2019-11-14 01:37:16 PST
Committed
r252452
: <
https://trac.webkit.org/changeset/252452
>
Radar WebKit Bug Importer
Comment 24
2019-11-14 01:38:17 PST
<
rdar://problem/57184145
>
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