WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
196133
[JSC] Shrink sizeof(RegExp)
https://bugs.webkit.org/show_bug.cgi?id=196133
Summary
[JSC] Shrink sizeof(RegExp)
Yusuke Suzuki
Reported
2019-03-21 23:59:17 PDT
[JSC] Shrink sizeof(RegExp)
Attachments
Patch
(14.36 KB, patch)
2019-03-22 00:04 PDT
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(14.41 KB, patch)
2019-03-22 11:44 PDT
,
Yusuke Suzuki
mark.lam
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Yusuke Suzuki
Comment 1
2019-03-22 00:04:43 PDT
Created
attachment 365685
[details]
Patch
Yusuke Suzuki
Comment 2
2019-03-22 11:44:09 PDT
Created
attachment 365752
[details]
Patch
Mark Lam
Comment 3
2019-03-22 13:19:06 PDT
Comment on
attachment 365752
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=365752&action=review
r=me with fixes.
> Source/JavaScriptCore/runtime/RegExp.cpp:266 > + auto& jitCode = createRegExpJITCodeIfNecessary();
Let's rename createRegExpJITCodeIfNecessary() to ensureRegExpJITCode(). See below.
> Source/JavaScriptCore/runtime/RegExp.cpp:324 > + auto& jitCode = createRegExpJITCodeIfNecessary();
Ditto: rename.
> Source/JavaScriptCore/runtime/RegExp.cpp:445 > + break;
Should this be a RELEASE_ASSERT_NOT_REACHED()? The pre-existing code implies that it is not expecting these cases to be possible.
> Source/JavaScriptCore/runtime/RegExp.h:164 > + Yarr::YarrCodeBlock& createRegExpJITCodeIfNecessary()
Let's call this ensureRegExpJITCode(). I believe that is the way we typically name this idiom.
Yusuke Suzuki
Comment 4
2019-03-23 00:55:41 PDT
Comment on
attachment 365752
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=365752&action=review
Thanks!
>> Source/JavaScriptCore/runtime/RegExp.cpp:266 >> + auto& jitCode = createRegExpJITCodeIfNecessary(); > > Let's rename createRegExpJITCodeIfNecessary() to ensureRegExpJITCode(). See below.
Fixed.
>> Source/JavaScriptCore/runtime/RegExp.cpp:324 >> + auto& jitCode = createRegExpJITCodeIfNecessary(); > > Ditto: rename.
Fixed.
>> Source/JavaScriptCore/runtime/RegExp.cpp:445 >> + break; > > Should this be a RELEASE_ASSERT_NOT_REACHED()? The pre-existing code implies that it is not expecting these cases to be possible.
This function is only called for debugging. And I think we should dump null address instead if ParseError or NotCompiled appears. I've changed jit8BitMatchOnlyAddr etc. to take an initializer, which makes content of this array zero-filled.
>> Source/JavaScriptCore/runtime/RegExp.h:164 >> + Yarr::YarrCodeBlock& createRegExpJITCodeIfNecessary() > > Let's call this ensureRegExpJITCode(). I believe that is the way we typically name this idiom.
Fixed.
Yusuke Suzuki
Comment 5
2019-03-23 00:58:10 PDT
Committed
r243408
: <
https://trac.webkit.org/changeset/243408
>
Radar WebKit Bug Importer
Comment 6
2019-03-23 17:49:32 PDT
<
rdar://problem/49191251
>
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