[Webkit-unassigned] [Bug 160970] New: Variable::isReadOnly() and Variable::isConst() are almost the same
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Aug 18 13:29:28 PDT 2016
https://bugs.webkit.org/show_bug.cgi?id=160970
Bug ID: 160970
Summary: Variable::isReadOnly() and Variable::isConst() are
almost the same
Classification: Unclassified
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: jfbastien at apple.com
It looks like BytecodeGenerator::emitReadOnlyExceptionIfNeeded() is the only one that uses Variable::isConst() in: `isStrictMode() || variable.isConst()`.
isConst is: `isReadOnly() && m_isLexicallyScoped`.
All calls to emitReadOnlyExceptionIfNeeded are guarded by isReadOnly().
This means that the code for emitReadOnlyExceptionIfNeeded is equivalent to: `isReadOnly && (isStrictMode || (isReadOnly && m_isLexicallyScoped))`.
isReadOnly is only set by BytecodeGenerator::variable
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160818/1cb321c3/attachment.html>
More information about the webkit-unassigned
mailing list