From a619072cc347bf4652535c92b31031de8d94c6ff Mon Sep 17 00:00:00 2001 From: Andrew McCreight Date: Mon, 23 Jan 2017 10:52:22 -0800 Subject: [PATCH] Bug 1332445 - Get rid of SymbolTable::globalScope. r=kanru MozReview-Commit-ID: Ar69yiCqJnT --HG-- extra : rebase_source : 33a19aaf6f1586bd1c023cfe7637201ea6774301 --- ipc/ipdl/ipdl/type.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/ipc/ipdl/ipdl/type.py b/ipc/ipdl/ipdl/type.py index 3a880d67a92b..92782844dd41 100644 --- a/ipc/ipdl/ipdl/type.py +++ b/ipc/ipdl/ipdl/type.py @@ -490,13 +490,11 @@ class SymbolTable: def __init__(self, errors): self.errors = errors self.scopes = [ { } ] # stack({}) - self.globalScope = self.scopes[0] - self.currentScope = self.globalScope + self.currentScope = self.scopes[0] def enterScope(self, node): - assert (isinstance(self.scopes[0], dict) - and self.globalScope is self.scopes[0]) - assert (isinstance(self.currentScope, dict)) + assert isinstance(self.scopes[0], dict) + assert isinstance(self.currentScope, dict) if not hasattr(node, 'symtab'): node.symtab = { } @@ -510,8 +508,7 @@ class SymbolTable: self.currentScope = self.scopes[-1] - assert (isinstance(self.scopes[0], dict) - and self.globalScope is self.scopes[0]) + assert isinstance(self.scopes[0], dict) assert isinstance(self.currentScope, dict) def lookup(self, sym):