Bug 165768 - Rename BytecodeGenerator's m_symbolTableStack to m_lexicalScopeStack.
Summary: Rename BytecodeGenerator's m_symbolTableStack to m_lexicalScopeStack.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords:
Depends on:
Blocks: 160168
  Show dependency treegraph
 
Reported: 2016-12-12 12:49 PST by Mark Lam
Modified: 2016-12-12 13:04 PST (History)
7 users (show)

See Also:


Attachments
proposed patch. (17.18 KB, patch)
2016-12-12 12:53 PST, Mark Lam
saam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2016-12-12 12:49:21 PST
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.
Comment 1 Mark Lam 2016-12-12 12:53:39 PST
Created attachment 296944 [details]
proposed patch.
Comment 2 Mark Lam 2016-12-12 13:04:59 PST
Thanks for the review.  Landed in r209723: <http://trac.webkit.org/r209723>.