Rename BytecodeGenerator's m_symbolTableStack to m_lexicalScopeStack.
authormark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Dec 2016 21:03:49 +0000 (21:03 +0000)
committermark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Dec 2016 21:03:49 +0000 (21:03 +0000)
commit4b198bc42e7975f1f3c29e83d26f8fc4c38a26ca
treea8473c456bd2b3476e837796300a3c183d4740a8
parenta00391e73c8074c09cb8167cb4bdc8195f04d040
Rename BytecodeGenerator's m_symbolTableStack to m_lexicalScopeStack.
https://bugs.webkit.org/show_bug.cgi?id=165768

Reviewed by Saam Barati.

The lexical scope in "m_lexicalScopeStack" here refers to a pair of { } in the
source code that bounds the scope of variables.

There are 4 places in the code where we call m_symbolTableStack.append() to
append a new stack entry.  In only 3 of the 4 cases, a symbol table is provided
in the new stack entry.  In all 4 cases, a scope register is provided in the new
stack entry.

Also, 3 of the 4 functions that appends an entry to this stack are named:
1. initializeVarLexicalEnvironment()
2. pushLexicalScopeInternal()
3. emitPushWithScope()

The 4th function is the BytecodeGenerator constructor where it pushes the scope
for a module environment.

Based on these details, m_lexicalScopeStack is a better name for this stack than
m_symbolTableStack.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::initializeArrowFunctionContextScopeIfNeeded):
(JSC::BytecodeGenerator::initializeVarLexicalEnvironment):
(JSC::BytecodeGenerator::pushLexicalScopeInternal):
(JSC::BytecodeGenerator::initializeBlockScopedFunctions):
(JSC::BytecodeGenerator::hoistSloppyModeFunctionIfNecessary):
(JSC::BytecodeGenerator::popLexicalScopeInternal):
(JSC::BytecodeGenerator::prepareLexicalScopeForNextForLoopIteration):
(JSC::BytecodeGenerator::variable):
(JSC::BytecodeGenerator::resolveType):
(JSC::BytecodeGenerator::emitResolveScope):
(JSC::BytecodeGenerator::emitPushWithScope):
(JSC::BytecodeGenerator::emitPopWithScope):
(JSC::BytecodeGenerator::pushFinallyContext):
(JSC::BytecodeGenerator::pushIteratorCloseContext):
(JSC::BytecodeGenerator::emitComplexPopScopes):
(JSC::BytecodeGenerator::popTryAndEmitCatch):
(JSC::BytecodeGenerator::emitPushFunctionNameScope):
* bytecompiler/BytecodeGenerator.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209723 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h