30 VarDictType::iterator
iter =
_map.find(name);
32 return iter->second.get();
50 VarDictType::const_iterator
iter =
_map.find(name);
52 return iter->second.get();
65 iter->second = prototype;
67 _functions.insert(std::make_pair(name, prototype));
72 VarDictType::iterator
iter =
_map.find(name);
76 iter->second = std::move(var);
78 _map.insert(std::make_pair(name, std::move(var)));
82 typedef std::map<std::pair<ExprLocalVar*, ExprLocalVar*>, std::string>
MakeMap;
86 const std::string& name =
ienv.first;
94 const std::string& name =
ienv.first;
Node that contains local function.
ExprLocalVar join (merge) references. Remembers which variables are possible assigners to this.
ExprLocalVar reference, all local variables in seexpr are subclasses of this or this itself.
Variable scope for tracking variable lookup.
void add(const std::string &name, std::unique_ptr< ExprLocalVar > var)
Add a variable refernece.
std::vector< std::vector< std::pair< std::string, ExprLocalVarPhi * > > > _mergedVariables
Keep track of all merged variables in.
ExprLocalVar * find(const std::string &name)
Find a variable name by name (recursive to parents)
ExprVarEnv * _parent
Parent variable environment has all variablesf rom previou scope (for lookup)
std::vector< std::unique_ptr< ExprLocalVar > > shadowedVariables
Variables that have been superceded (and thus are inaccessible)
ExprLocalVar const * lookup(const std::string &name) const
Find a const variable reference name by name (recursive to parents)
void resetAndSetParent(ExprVarEnv *parent)
Resets the scope (deletes all variables) and sets parent.
void addFunction(const std::string &name, ExprLocalFunctionNode *prototype)
Add a function.
ExprLocalFunctionNode * findFunction(const std::string &name)
Find a function by name (recursive to parents)
size_t mergeBranches(const ExprType &type, ExprVarEnv &env1, ExprVarEnv &env2)
Add all variables into scope by name, but modify their lifetimes to the given type's lifetime.
you may not use this file except in compliance with the License and the following modification to it