| 116 | ProbabilityTable<unsigned int, eVariableScope> *VariableSelector::scopeTable_ = NULL; |
| 117 | |
| 118 | void |
| 119 | VariableSelector::InitScopeTable() |
| 120 | { |
| 121 | if (scopeTable_ == NULL) { |
| 122 | scopeTable_ = new ProbabilityTable<unsigned int, eVariableScope>(); |
| 123 | if (CGOptions::global_variables()) { |
| 124 | scopeTable_->add_elem(35, eGlobal); |
| 125 | scopeTable_->add_elem(65, eParentLocal); |
| 126 | scopeTable_->add_elem(95, eParentParam); |
| 127 | scopeTable_->add_elem(100, eNewValue); |
| 128 | } |
| 129 | else { |
| 130 | scopeTable_->add_elem(50, eParentLocal); |
| 131 | scopeTable_->add_elem(95, eParentParam); |
| 132 | scopeTable_->add_elem(100, eNewValue); |
| 133 | } |
| 134 | } |
| 135 | } |
| 136 | |
| 137 | ////////////////////////////////////////////////////////////////////////////// |
| 138 | // -------------------------------------------------------------- |