Bug 1179063 - Cleanup: Rename scopal back to scopeStmt. (r=me)
authorShu-yu Guo <shu@rfrn.org>
Thu, 30 Jul 2015 22:17:04 -0700
changeset 287245 856f588ad29e8bd7c29b12f6d5fca4c7b125ccc4
parent 287244 ab699f666b06a1e75a7efb55a243b6746610b4f7
child 287246 7b5a9b0979d9dc24c64e80185dfb0d3b320f97de
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1179063
milestone42.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1179063 - Cleanup: Rename scopal back to scopeStmt. (r=me)
js/src/frontend/BytecodeEmitter.cpp
js/src/frontend/BytecodeEmitter.h
js/src/frontend/Parser.h
js/src/frontend/SharedContext.h
--- a/js/src/frontend/BytecodeEmitter.cpp
+++ b/js/src/frontend/BytecodeEmitter.cpp
@@ -925,17 +925,17 @@ BytecodeEmitter::enterNestedScope(StmtIn
         parent = stmt->blockScopeIndex;
 
     stmt->blockScopeIndex = blockScopeList.length();
     if (!blockScopeList.append(scopeObjectIndex, offset(), parent))
         return false;
 
     pushStatement(stmt, stmtType, offset());
     scopeObj->initEnclosingNestedScope(enclosingStaticScope());
-    stmtStack.linkAsInnermostScopal(stmt, *scopeObj);
+    stmtStack.linkAsInnermostScopeStmt(stmt, *scopeObj);
     MOZ_ASSERT(stmt->linksScope());
     stmt->isBlockScope = (stmtType == StmtType::BLOCK);
 
     return true;
 }
 
 // Patches |breaks| and |continues| unless the top statement info record
 // represents a try-catch-finally suite.
--- a/js/src/frontend/BytecodeEmitter.h
+++ b/js/src/frontend/BytecodeEmitter.h
@@ -215,17 +215,17 @@ struct BytecodeEmitter
     BytecodeEmitter(BytecodeEmitter* parent, Parser<FullParseHandler>* parser, SharedContext* sc,
                     HandleScript script, Handle<LazyScript*> lazyScript,
                     bool insideEval, HandleScript evalCaller,
                     bool insideNonGlobalEval, uint32_t lineNum, EmitterMode emitterMode = Normal);
     bool init();
     bool updateLocalsToFrameSlots();
 
     StmtInfoBCE* innermostStmt() const { return stmtStack.innermost(); }
-    StmtInfoBCE* innermostScopeStmt() const { return stmtStack.innermostScopal(); }
+    StmtInfoBCE* innermostScopeStmt() const { return stmtStack.innermostScopeStmt(); }
 
     bool isAliasedName(ParseNode* pn);
 
     MOZ_ALWAYS_INLINE
     bool makeAtomIndex(JSAtom* atom, jsatomid* indexp) {
         AtomIndexAddPtr p = atomIndices->lookupForAdd(atom);
         if (p) {
             *indexp = p.value();
--- a/js/src/frontend/Parser.h
+++ b/js/src/frontend/Parser.h
@@ -282,17 +282,17 @@ struct ParseContext : public GenericPars
 
     ~ParseContext();
 
     bool init(TokenStream& ts);
 
     unsigned blockid() { return stmtStack.innermost() ? stmtStack.innermost()->blockid : bodyid; }
 
     StmtInfoPC* innermostStmt() const { return stmtStack.innermost(); }
-    StmtInfoPC* innermostScopeStmt() const { return stmtStack.innermostScopal(); }
+    StmtInfoPC* innermostScopeStmt() const { return stmtStack.innermostScopeStmt(); }
 
     // True if we are at the topmost level of a entire script or function body.
     // For example, while parsing this code we would encounter f1 and f2 at
     // body level, but we would not encounter f3 or f4 at body level:
     //
     //   function f1() { function f2() { } }
     //   if (cond) { function f3() { if (cond) { function f4() { } } } }
     //
--- a/js/src/frontend/SharedContext.h
+++ b/js/src/frontend/SharedContext.h
@@ -562,54 +562,54 @@ class MOZ_STACK_CLASS StmtInfoStack
 
   public:
     explicit StmtInfoStack(ExclusiveContext* cx)
       : innermostStmt_(nullptr),
         innermostScopeStmt_(nullptr)
     { }
 
     StmtInfo* innermost() const { return innermostStmt_; }
-    StmtInfo* innermostScopal() const { return innermostScopeStmt_; }
+    StmtInfo* innermostScopeStmt() const { return innermostScopeStmt_; }
 
     void push(StmtInfo* stmt, StmtType type) {
         stmt->type = type;
         stmt->isBlockScope = false;
         stmt->isForLetBlock = false;
         stmt->label = nullptr;
         stmt->staticScope = nullptr;
         stmt->enclosing = innermostStmt_;
         stmt->enclosingScope = nullptr;
         innermostStmt_ = stmt;
     }
 
     void pushNestedScope(StmtInfo* stmt, StmtType type, NestedScopeObject& staticScope) {
         push(stmt, type);
-        linkAsInnermostScopal(stmt, staticScope);
+        linkAsInnermostScopeStmt(stmt, staticScope);
     }
 
     void pop() {
         StmtInfo* stmt = innermostStmt_;
         innermostStmt_ = stmt->enclosing;
         if (stmt->linksScope())
             innermostScopeStmt_ = stmt->enclosingScope;
     }
 
-    void linkAsInnermostScopal(StmtInfo* stmt, NestedScopeObject& staticScope) {
-        MOZ_ASSERT(stmt != innermostScopal());
+    void linkAsInnermostScopeStmt(StmtInfo* stmt, NestedScopeObject& staticScope) {
+        MOZ_ASSERT(stmt != innermostScopeStmt_);
         MOZ_ASSERT(!stmt->enclosingScope);
         stmt->enclosingScope = innermostScopeStmt_;
         innermostScopeStmt_ = stmt;
         stmt->staticScope = &staticScope;
     }
 
     void makeInnermostLexicalScope(StaticBlockObject& blockObj) {
         MOZ_ASSERT(!innermostStmt_->isBlockScope);
         MOZ_ASSERT(innermostStmt_->canBeBlockScope());
         innermostStmt_->isBlockScope = true;
-        linkAsInnermostScopal(innermostStmt_, blockObj);
+        linkAsInnermostScopeStmt(innermostStmt_, blockObj);
     }
 };
 
 } // namespace frontend
 
 } // namespace js
 
 #endif /* frontend_SharedContext_h */