Esempio n. 1
0
InstFakeKill::InstFakeKill(Cfg *Func, const VarList &KilledRegs,
                           const Inst *Linked)
    : Inst(Func, Inst::FakeKill, KilledRegs.size(), NULL), Linked(Linked) {
  for (VarList::const_iterator I = KilledRegs.begin(), E = KilledRegs.end();
       I != E; ++I) {
    Variable *Var = *I;
    addSource(Var);
  }
}
Variable FunctionCheckInit::call( Variable &input, VarList lParams ) {
	VarList::const_iterator i = lParams.begin();
	
	// Fetch values
	Bu::String what = (*i).getString();
	
	// Lets check stuff!
	pContext->getView()->checkBegin(what);
	
	return new Variable(Variable::typeNone);
}
Esempio n. 3
0
    const Var* var( const std::string name ) const
    {
        VarList::const_iterator var = m_vars.begin();
        VarList::const_iterator last = m_vars.end();
        while ( var != last )
        {
            if ( (*var)->name() == name ) break;

            var++;
        }

        return( *var );
    }
Esempio n. 4
0
    const Var* var( const size_t index ) const
    {
        VarList::const_iterator var = m_vars.begin();
        VarList::const_iterator last = m_vars.end();
        size_t counter = 0;
        while ( var != last )
        {
            if ( counter++ == index ) break;
            var++;
        }

        return( *var );
    }
Esempio n. 5
0
    ~File( void )
    {
        if ( m_file ) delete m_file;

        DimList::iterator dim = m_dims.begin();
        DimList::const_iterator last_dim = m_dims.end();
        while ( dim != last_dim )
        {
            if ( *dim ) delete *dim;
            dim++;
        }
        m_dims.clear();

        VarList::iterator var = m_vars.begin();
        VarList::const_iterator last_var = m_vars.end();
        while ( var != last_var )
        {
            if ( *var ) delete *var;
            var++;
        }
        m_vars.clear();
    }
Esempio n. 6
0
/**
 * Convenience function for conditioning one iterator on the current
 * value of another. This equalivalent to the following code
 * <pre>
 * DomainIterator it1(...), it2(...);
 * DomainIterator::VarList vars = it1.getVars();
 * DomainIterator::IndList inds = it1.getSubInd();
 * it2.condition(vars.begin(),vars.end(),inds.begin(), inds.end());
 * </pre>
 * @see DomainIterator::condition(const VarIt,const VarIt,const IndIt,const IndIt)
 */
void DomainIterator::condition(const DomainIterator& it)
{
   VarList vars = it.getVars();
   IndList inds = it.getSubInd();
   condition(vars.begin(),vars.end(),inds.begin(), inds.end());
}