gcc config
[prop.git] / prop-src / env.cc
blob45b3cb9a5a3a59d91bc8305408ff2215cf7f6947
1 ///////////////////////////////////////////////////////////////////////////////
2 // This file is generated automatically using Prop (version 2.3.6),
3 // last updated on Nov 2, 1999.
4 // The original source file is "env.pcc".
5 ///////////////////////////////////////////////////////////////////////////////
7 #line 1 "env.pcc"
8 ///////////////////////////////////////////////////////////////////////////////
9 //
10 // Environment
12 ///////////////////////////////////////////////////////////////////////////////
13 #include "env.h"
15 ///////////////////////////////////////////////////////////////////////////////
17 // Constructor and destructor
19 ///////////////////////////////////////////////////////////////////////////////
20 Env::Env() : env(string_hash,string_equal) {}
21 Env::Env(const Env& E) : env(string_hash,string_equal)
22 { foreach_entry(i,E.env) env.insert(i->k,i->v); }
23 Env::~Env() {}
25 ///////////////////////////////////////////////////////////////////////////////
27 // Type lookup
29 ///////////////////////////////////////////////////////////////////////////////
30 Ty Env::operator () (Id id) const
31 { HashTable::Entry * e = env.lookup(id);
32 if (e) return (Ty)(e->v); else return NOty;
35 ///////////////////////////////////////////////////////////////////////////////
37 // Insert a new entry to the environment
39 ///////////////////////////////////////////////////////////////////////////////
40 void Env::bind(Id id, Ty ty) { env.insert(id,ty); }
41 #line 34 "env.pcc"
43 ------------------------------- Statistics -------------------------------
44 Merge matching rules = yes
45 Number of DFA nodes merged = 0
46 Number of ifs generated = 0
47 Number of switches generated = 0
48 Number of labels = 0
49 Number of gotos = 0
50 Adaptive matching = enabled
51 Fast string matching = disabled
52 Inline downcasts = enabled
53 --------------------------------------------------------------------------