[webkit-reviews] review granted: [Bug 194583] Cache the results of BytecodeGenerator::getVariablesUnderTDZ : [Attachment 361900] patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Feb 14 14:23:56 PST 2019
Yusuke Suzuki <ysuzuki at apple.com> has granted Saam Barati <sbarati at apple.com>'s
request for review:
Bug 194583: Cache the results of BytecodeGenerator::getVariablesUnderTDZ
https://bugs.webkit.org/show_bug.cgi?id=194583
Attachment 361900: patch
https://bugs.webkit.org/attachment.cgi?id=361900&action=review
--- Comment #5 from Yusuke Suzuki <ysuzuki at apple.com> ---
Comment on attachment 361900
--> https://bugs.webkit.org/attachment.cgi?id=361900
patch
View in context: https://bugs.webkit.org/attachment.cgi?id=361900&action=review
r=me with one suggestion.
> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:1317
> + uint64_t m_tdzStackEpoch { 1 };
> + uint64_t m_cachedVariablesUnderTDZEpoch { 0 };
> + CompactVariableMap::Handle m_cachedVariablesUnderTDZ;
Why not clearing m_cachedVariablesUnderTDZ when changing tdz stack instead of
tracking the change with epoch? (Adding `explicit operator bool()` to
CompactVariableMap::Handle, and clear the cached handle instead of incrementing
epoch).
More information about the webkit-reviews
mailing list