Reduce dynamic memory allocation by reusing scope maps in symbol table.

This commit is contained in:
Matt Pharr
2012-05-04 12:45:22 -07:00
parent 78d62705cc
commit e495ef2c48
2 changed files with 13 additions and 2 deletions

2
sym.h
View File

@@ -260,6 +260,8 @@ private:
typedef std::map<std::string, Symbol *> SymbolMapType;
std::vector<SymbolMapType *> variables;
std::vector<SymbolMapType *> freeSymbolMaps;
/** Function declarations are *not* scoped. (C99, for example, allows
an implementation to maintain function declarations in a single
namespace.) A STL \c vector is used to store the function symbols