MCPcopy Create free account
hub / github.com/csmith-project/csmith / InitScopeTable

Method InitScopeTable

src/VariableSelector.cpp:118–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116ProbabilityTable<unsigned int, eVariableScope> *VariableSelector::scopeTable_ = NULL;
117
118void
119VariableSelector::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// --------------------------------------------------------------

Callers

nothing calls this directly

Calls 1

add_elemMethod · 0.45

Tested by

no test coverage detected