WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
160970
Variable::isReadOnly() and Variable::isConst() are almost the same
https://bugs.webkit.org/show_bug.cgi?id=160970
Summary
Variable::isReadOnly() and Variable::isConst() are almost the same
JF Bastien
Reported
2016-08-18 13:29:28 PDT
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
Attachments
Add attachment
proposed patch, testcase, etc.
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