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