WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
194912
Make JSScript:cacheBytecodeWithError update the cache when the script changes
https://bugs.webkit.org/show_bug.cgi?id=194912
Summary
Make JSScript:cacheBytecodeWithError update the cache when the script changes
Saam Barati
Reported
2019-02-21 12:21:08 PST
...
Attachments
WIP
(20.72 KB, patch)
2019-02-22 16:10 PST
,
Saam Barati
no flags
Details
Formatted Diff
Diff
patch
(22.19 KB, patch)
2019-02-22 16:40 PST
,
Saam Barati
mark.lam
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Saam Barati
Comment 1
2019-02-22 13:49:33 PST
gonna look at this now.
Saam Barati
Comment 2
2019-02-22 16:10:46 PST
Created
attachment 362778
[details]
WIP
Saam Barati
Comment 3
2019-02-22 16:40:34 PST
Created
attachment 362785
[details]
patch
Tadeu Zagallo
Comment 4
2019-02-23 05:01:26 PST
Comment on
attachment 362785
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=362785&action=review
Looks good to me. I just have a couple questions that are not directly related to the patch, and the windows build is broken.
> Source/JavaScriptCore/runtime/CachedTypes.cpp:221 > + , m_baseAddress(bitwise_cast<const uint8_t*>(baseAddress))
This should probably be `static_cast`, no?
> Source/JavaScriptCore/runtime/CachedTypes.cpp:338 > + return bitwise_cast<const uint8_t*>(this) + m_offset;
why do you need bitwise_cast here instead of reinterpret_cast?
> Source/JavaScriptCore/runtime/CachedTypes.cpp:2164 > + if (m_cacheVersion != JSC_BYTECODE_CACHE_VERSION) > + return false; > + if (m_bootSessionUUID.decode(decoder) != bootSessionUUIDString()) > + return false;
Do you think it's worth moving it into a helper method, since it's done here and in decode?
Saam Barati
Comment 5
2019-02-24 11:47:49 PST
Comment on
attachment 362785
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=362785&action=review
>> Source/JavaScriptCore/runtime/CachedTypes.cpp:221 >> + , m_baseAddress(bitwise_cast<const uint8_t*>(baseAddress)) > > This should probably be `static_cast`, no?
yeah it should be
>> Source/JavaScriptCore/runtime/CachedTypes.cpp:338 >> + return bitwise_cast<const uint8_t*>(this) + m_offset; > > why do you need bitwise_cast here instead of reinterpret_cast?
I like bitwise_cast because of the static assert it does that the from type should be the same size as the to type.
>> Source/JavaScriptCore/runtime/CachedTypes.cpp:2164 >> + return false; > > Do you think it's worth moving it into a helper method, since it's done here and in decode?
Yeah I do.
Mark Lam
Comment 6
2019-02-25 17:48:34 PST
Comment on
attachment 362785
[details]
patch LGTM
Saam Barati
Comment 7
2019-02-28 15:58:33 PST
landed in:
https://trac.webkit.org/changeset/242239/webkit
Radar WebKit Bug Importer
Comment 8
2019-02-28 15:59:18 PST
<
rdar://problem/48492608
>
Saam Barati
Comment 9
2019-02-28 17:44:38 PST
Attempting Windows build fix in:
https://trac.webkit.org/changeset/242247/webkit
Dominik Inführ
Comment 10
2019-03-01 02:35:36 PST
Hi, I think that patch broke debug builds with gcc: In Source/JavaScriptCore/runtime/CachedTypes.cpp ASSERT_NOT_REACHED (a non-constexpr function) is invoked from the constexpr-function tagFromSourceCodeType. See
https://trac.webkit.org/browser/webkit/trunk/Source/JavaScriptCore/runtime/CachedTypes.cpp#L1827
Dominik Inführ
Comment 11
2019-03-01 02:44:48 PST
Additional note: With "broken debug build" I meant that compilation is failing on (probably) all architectures (I tested x64 & ARM).
Saam Barati
Comment 12
2019-03-01 02:47:33 PST
(In reply to Dominik Inführ from
comment #11
)
> Additional note: With "broken debug build" I meant that compilation is > failing on (probably) all architectures (I tested x64 & ARM).
Can you land a fix to remove constexpr from it? FWIW, clang debug builds I think are fine
Dominik Inführ
Comment 13
2019-03-01 02:59:22 PST
Should we use ASSERT_UNDER_CONSTEXPR_CONTEXT instead?
Dominik Inführ
Comment 14
2019-03-01 03:01:33 PST
Nevermind this isn't building as well...
Dominik Inführ
Comment 15
2019-03-01 03:05:39 PST
Here is the patch for the build issue:
https://bugs.webkit.org/show_bug.cgi?id=195205
.
Dominik Inführ
Comment 16
2019-03-01 03:08:24 PST
BTW thanks for responding so fast!
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