Const Class Reference

#include <include/exp.h>

Inheritance diagram for Const:

Exp List of all members.

Detailed Description

Definition at line 374 of file exp.h.

Public Member Functions

virtual Expaccept (ExpModifier *v)
virtual bool accept (ExpVisitor *v)
virtual void appendDotFile (std::ofstream &of)
virtual TypeascendType ()
virtual Expclone ()
 Const (Const &o)
 Const (Proc *p)
 Const (char *p)
 Const (double d)
 Const (ADDRESS a)
 
Remarks:
This is bad. We need a way of constructing true unsigned constants

 Const (QWord ll)
 Const (int i)
virtual void descendType (Type *parentType, bool &ch, Statement *s)
virtual ExpgenConstraints (Exp *restrictTo)
ADDRESS getAddr ()
int getConscript ()
double getFlt ()
const char * getFuncName ()
int getInt ()
QWord getLong ()
char * getStr ()
TypegetType ()
virtual bool match (const char *pattern, std::map< std::string, Exp * > &bindings)
virtual bool operator *= (Exp &o)
virtual bool operator< (const Exp &o) const
virtual bool operator== (const Exp &o) const
virtual void print (std::ostream &os, bool html=false)
void printNoQuotes (std::ostream &os)
virtual void printx (int ind)
void setAddr (ADDRESS a)
void setConscript (int cs)
void setFlt (double d)
void setInt (int i)
void setLong (QWord ll)
void setStr (char *p)
void setType (Type *ty)

Private Attributes

int conscript
Typetype
union {
   ADDRESS   a
   double   d
   int   i
   QWord   ll
   char *   p
   Proc *   pp
u

Friends

class XMLProgParser


Constructor & Destructor Documentation

Const::Const int  i  ) 
 

Definition at line 53 of file exp.cpp.

References u.

Referenced by clone().

Const::Const QWord  ll  ) 
 

Definition at line 54 of file exp.cpp.

References u.

Const::Const ADDRESS  a  ) 
 

Remarks:
This is bad. We need a way of constructing true unsigned constants

Definition at line 59 of file exp.cpp.

References u.

Const::Const double  d  ) 
 

Definition at line 55 of file exp.cpp.

References u.

Const::Const char *  p  ) 
 

Definition at line 56 of file exp.cpp.

References u.

Const::Const Proc p  ) 
 

Definition at line 57 of file exp.cpp.

References p, and u.

Const::Const Const o  ) 
 

Definition at line 62 of file exp.cpp.

References conscript, type, and u.


Member Function Documentation

Exp * Const::accept ExpModifier v  )  [virtual]
 

Implements Exp.

Definition at line 3747 of file exp.cpp.

References ExpModifier::postVisit(), and ExpModifier::preVisit().

bool Const::accept ExpVisitor v  )  [virtual]
 

Implements Exp.

Definition at line 3650 of file exp.cpp.

References ExpVisitor::visit().

void Const::appendDotFile std::ofstream &  of  )  [virtual]
 

Implements Exp.

Definition at line 1079 of file exp.cpp.

References Exp::op, operStrings, opFltConst, opFuncConst, opIntConst, opStrConst, and u.

Type * Const::ascendType  )  [virtual]
 

Reimplemented from Exp.

Definition at line 994 of file dfa.cpp.

References Exp::op, opFltConst, opFuncConst, opIntConst, opLongConst, opStrConst, Type::resolvesToVoid(), STD_SIZE, type, and u.

Referenced by Unary::descendType().

Exp * Const::clone  )  [virtual]
 

Implements Exp.

Definition at line 285 of file exp.cpp.

References Const().

Referenced by ExpTest::testAccumulate(), ExpTest::testBinaries(), ExpTest::testCompare5(), ExpTest::testCompare6(), ExpTest::testFixSuccessor(), ExpTest::testIsAfpTerm(), ExpTest::testSearch1(), ExpTest::testSearch2(), ExpTest::testSearch3(), ExpTest::testSearchAll(), and ExpTest::testSimplifyUnary().

void Const::descendType Type parentType,
bool &  ch,
Statement s
[virtual]
 

Reimplemented from Exp.

Definition at line 1176 of file dfa.cpp.

References d, Type::meetWith(), Exp::op, opFltConst, opIntConst, opLongConst, Type::resolvesToFloat(), type, and u.

Referenced by Unary::descendType().

Exp * Const::genConstraints Exp restrictTo  )  [virtual]
 

Reimplemented from Exp.

Definition at line 3173 of file exp.cpp.

References match(), opEquals, opFalse, opFltConst, opIntConst, opLongConst, opStrConst, opTypeOf, result, and u.

ADDRESS Const::getAddr  )  [inline]
 

Definition at line 414 of file exp.h.

References u.

int Const::getConscript  )  [inline]
 

Definition at line 443 of file exp.h.

References conscript.

Referenced by ExpConstCaster::preVisit().

double Const::getFlt  )  [inline]
 

Definition at line 412 of file exp.h.

References u.

const char * Const::getFuncName  ) 
 

Definition at line 3549 of file exp.cpp.

References u.

int Const::getInt  )  [inline]
 

Definition at line 410 of file exp.h.

References u.

Referenced by PentiumDecoder::decodeInstruction(), Unary::descendType(), findSwParams(), Exp::fixSuccessor(), Ternary::polySimplify(), and ExpCastInserter::postVisit().

QWord Const::getLong  )  [inline]
 

Definition at line 411 of file exp.h.

References u.

char* Const::getStr  )  [inline]
 

Definition at line 413 of file exp.h.

References u.

Type* Const::getType  )  [inline]
 

Definition at line 425 of file exp.h.

References type.

Referenced by ExpCastInserter::postVisit().

bool Const::match const char *  pattern,
std::map< std::string, Exp * > &  bindings
[virtual]
 

Reimplemented from Exp.

Definition at line 1489 of file exp.cpp.

References LOG, and Exp::match().

Referenced by genConstraints().

bool Const::operator *= Exp o  )  [virtual]
 

Implements Exp.

Definition at line 511 of file exp.cpp.

References Exp::getOper(), Exp::getSubExp1(), and opSubscript.

bool Const::operator< const Exp o  )  const [virtual]
 

Implements Exp.

Definition at line 425 of file exp.cpp.

References conscript, Exp::getOper(), LOG, Exp::op, operStrings, opFltConst, opIntConst, opStrConst, and u.

bool Const::operator== const Exp o  )  const [virtual]
 

Implements Exp.

Definition at line 340 of file exp.cpp.

References conscript, LOG, Exp::op, operStrings, opFltConst, opIntConst, opStrConst, opWild, opWildIntConst, opWildStrConst, and u.

void Const::print std::ostream &  os,
bool  html = false
[virtual]
 

Implements Exp.

Definition at line 583 of file exp.cpp.

References conscript, LOG, Exp::op, operStrings, opFltConst, opIntConst, opLongConst, opStrConst, Exp::setLexBegin(), Exp::setLexEnd(), and u.

Referenced by printNoQuotes(), ExpTest::test99(), ExpTest::testFlt(), and UserProc::updateArguments().

void Const::printNoQuotes std::ostream &  os  ) 
 

Definition at line 615 of file exp.cpp.

References Exp::op, opStrConst, print(), and u.

void Const::printx int  ind  )  [virtual]
 

Implements Exp.

Definition at line 3788 of file exp.cpp.

References conscript, operStrings, opFltConst, opFuncConst, opIntConst, opStrConst, and u.

void Const::setAddr ADDRESS  a  )  [inline]
 

Definition at line 422 of file exp.h.

References u.

void Const::setConscript int  cs  )  [inline]
 

Definition at line 444 of file exp.h.

References conscript.

Referenced by SetConscripts::visit().

void Const::setFlt double  d  )  [inline]
 

Definition at line 420 of file exp.h.

References u.

void Const::setInt int  i  )  [inline]
 

Definition at line 418 of file exp.h.

References u.

Referenced by PentiumFrontEnd::bumpRegisterAll(), PentiumDecoder::decodeInstruction(), Exp::fixSuccessor(), and StatementTest::testLocationSet().

void Const::setLong QWord  ll  )  [inline]
 

Definition at line 419 of file exp.h.

References u.

void Const::setStr char *  p  )  [inline]
 

Definition at line 421 of file exp.h.

References u.

void Const::setType Type ty  )  [inline]
 

Definition at line 426 of file exp.h.

References type.


Friends And Related Function Documentation

friend class XMLProgParser [friend]
 

Reimplemented from Exp.

Definition at line 450 of file exp.h.


Member Data Documentation

ADDRESS Const::a [private]
 

Definition at line 379 of file exp.h.

Referenced by XMLProgParser::persistToXML().

int Const::conscript [private]
 

Definition at line 386 of file exp.h.

Referenced by Const(), getConscript(), operator<(), operator==(), XMLProgParser::persistToXML(), print(), printx(), and setConscript().

double Const::d [private]
 

Definition at line 381 of file exp.h.

Referenced by descendType(), and XMLProgParser::persistToXML().

int Const::i [private]
 

Definition at line 376 of file exp.h.

Referenced by XMLProgParser::persistToXML().

QWord Const::ll [private]
 

Definition at line 380 of file exp.h.

char* Const::p [private]
 

Definition at line 382 of file exp.h.

Referenced by Const(), and XMLProgParser::persistToXML().

Proc* Const::pp [private]
 

Definition at line 384 of file exp.h.

Type* Const::type [private]
 

Definition at line 387 of file exp.h.

Referenced by ascendType(), Const(), descendType(), getType(), and setType().

union { ... } Const::u [private]
 

Referenced by appendDotFile(), ascendType(), Const(), descendType(), genConstraints(), getAddr(), getFlt(), getFuncName(), getInt(), getLong(), getStr(), operator<(), operator==(), XMLProgParser::persistToXML(), print(), printNoQuotes(), printx(), setAddr(), setFlt(), setInt(), setLong(), and setStr().


The documentation for this class was generated from the following files:
Generated on Tue Sep 19 21:18:41 2006 for Boomerang by  doxygen 1.4.6