Bytecode Class Reference

*.ybc I/O More...

#include <Bytecode.h>

List of all members.

Classes

class  Invalid
struct  namespaceentry_t
 references to namespaces More...

Static Public Member Functions

static std::ostream & writeBool (std::ostream &streamref, bool value)
static bool readBool (bytecodeistream &streamref)
static std::ostream & writeString (std::ostream &streamref, const std::string &stringref)
static bool readString (bytecodeistream &streamref, std::string &stringref)
static std::ostream & writeUstring (std::ostream &streamref, const Ustring ustringref)
static Ustring readUstring (bytecodeistream &streamref)
static std::ostream & writeCharp (std::ostream &streamref, const char *charp)
static char * readCharp (bytecodeistream &streamref)
static std::ostream & writeBytep (std::ostream &streamref, const unsigned char *bytep, unsigned int len)
static unsigned char * readBytep (bytecodeistream &streamref)
static std::ostream & writeInt32 (std::ostream &str, const u_int32_t value)
static u_int32_t readInt32 (bytecodeistream &str)
static std::ostream & writeType (std::ostream &str, constTypePtr type)
static TypePtr readType (bytecodeistream &str)
static std::ostream & writeValue (std::ostream &str, const YCPValue value)
static YCPValue readValue (bytecodeistream &str)
static std::ostream & writeYCodelist (std::ostream &str, const ycodelist_t *codelist)
static bool readYCodelist (bytecodeistream &str, ycodelist_t **anchor)
static void namespaceInit ()
static int namespaceId (const Y2Namespace *name_space)
static const Y2NamespacenamespacePtr (int namespace_id)
static int pushNamespace (const Y2Namespace *name_space, bool with_xrefs=false)
static int popNamespace (const Y2Namespace *name_space)
static void popUptoNamespace (const Y2Namespace *name_space)
static int tareStack ()
static void untareStack (int tare_id)
static std::ostream & writeEntry (std::ostream &str, const SymbolEntryPtr entry)
static SymbolEntryPtr readEntry (bytecodeistream &str)
static YCodePtr readCode (bytecodeistream &str)
static YBlockPtr readModule (const string &mname)
static YCodePtr readFile (const string &filename)
static bool writeFile (const YCodePtr code, const string &filename)

Static Private Attributes

static int m_namespace_nesting_level = -1
static int m_namespace_nesting_array_size = 0
static int m_namespace_tare_level = 0
static namespaceentry_tm_namespace_nesting_array = 0
static map< string, YBlockPtr > * m_bytecodeCache = NULL

Detailed Description

*.ybc I/O


Member Function Documentation

int Bytecode::namespaceId ( const Y2Namespace name_space  )  [static]
void Bytecode::namespaceInit (  )  [static]
const Y2Namespace * Bytecode::namespacePtr ( int  namespace_id  )  [static]
int Bytecode::popNamespace ( const Y2Namespace name_space  )  [static]
void Bytecode::popUptoNamespace ( const Y2Namespace name_space  )  [static]
int Bytecode::pushNamespace ( const Y2Namespace name_space,
bool  with_xrefs = false 
) [static]
bool Bytecode::readBool ( bytecodeistream streamref  )  [static]
unsigned char * Bytecode::readBytep ( bytecodeistream streamref  )  [static]

References readInt32().

char * Bytecode::readCharp ( bytecodeistream streamref  )  [static]
YCodePtr Bytecode::readCode ( bytecodeistream str  )  [static]

References bytecodeistream::isVersion(), YECall::readCall(), y2error, YCode::ycConstant, YCode::ycFunction, YCode::ycLocale, YCode::yeBinary, YCode::yeBlock, YCode::yeBracket, YCode::yeBuiltin, YCode::yeCompare, YCode::yeExpression, YCode::yeFunction, YCode::yeFunctionPointer, YCode::yeIs, YCode::yeList, YCode::yeLocale, YCode::yeMap, YCode::yePropagate, YCode::yeReference, YCode::yeReturn, YCode::yeTerm, YCode::yeTriple, YCode::yeUnary, YCode::yeVariable, YCode::ysAssign, YCode::ysBlock, YCode::ysBracket, YCode::ysBreak, YCode::ysContinue, YCode::ysDo, YCode::ysExpression, YCode::ysFilename, YCode::ysFunction, YCode::ysIf, YCode::ysImport, YCode::ysInclude, YCode::ysRepeat, YCode::ysReturn, YCode::ysSwitch, YCode::ysTextdomain, YCode::ysTypedef, YCode::ysVariable, and YCode::ysWhile.

Referenced by YECall::readCall(), readFile(), readYCodelist(), YFunction::setDefinition(), TableEntry::TableEntry(), YBlock::YBlock(), YCPCode::YCPCode(), YEBinary::YEBinary(), YEBracket::YEBracket(), YEBuiltin::YEBuiltin(), YECall::YECall(), YECompare::YECompare(), YEIs::YEIs(), YELocale::YELocale(), YEMap::YEMap(), YEPropagate::YEPropagate(), YEReturn::YEReturn(), YETriple::YETriple(), YEUnary::YEUnary(), YFunction::YFunction(), YSAssign::YSAssign(), YSBlock::YSBlock(), YSBracket::YSBracket(), YSDo::YSDo(), YSExpression::YSExpression(), YSFunction::YSFunction(), YSIf::YSIf(), YSRepeat::YSRepeat(), YSReturn::YSReturn(), YSSwitch::YSSwitch(), YSWhile::YSWhile(), and YSymbolEntry::YSymbolEntry().

SymbolEntryPtr Bytecode::readEntry ( bytecodeistream str  )  [static]
YCodePtr Bytecode::readFile ( const string &  filename  )  [static]
u_int32_t Bytecode::readInt32 ( bytecodeistream str  )  [static]
YBlockPtr Bytecode::readModule ( const string &  mname  )  [static]
bool Bytecode::readString ( bytecodeistream streamref,
std::string &  stringref 
) [static]

References readInt32().

Referenced by fromStream(), YBlock::YBlock(), and YCPTerm::YCPTerm().

TypePtr Bytecode::readType ( bytecodeistream str  )  [static]
Ustring Bytecode::readUstring ( bytecodeistream streamref  )  [static]
YCPValue Bytecode::readValue ( bytecodeistream str  )  [static]
bool Bytecode::readYCodelist ( bytecodeistream str,
ycodelist_t **  anchor 
) [static]
int Bytecode::tareStack (  )  [static]
void Bytecode::untareStack ( int  tare_id  )  [static]

References m_namespace_tare_level.

Referenced by readModule().

std::ostream & Bytecode::writeBool ( std::ostream &  streamref,
bool  value 
) [static]
std::ostream & Bytecode::writeBytep ( std::ostream &  streamref,
const unsigned char *  bytep,
unsigned int  len 
) [static]

References writeInt32().

Referenced by YCPByteblockRep::toStream().

std::ostream & Bytecode::writeCharp ( std::ostream &  streamref,
const char *  charp 
) [static]
std::ostream & Bytecode::writeEntry ( std::ostream &  str,
const SymbolEntryPtr  entry 
) [static]
bool Bytecode::writeFile ( const YCodePtr  code,
const string &  filename 
) [static]
std::ostream & Bytecode::writeInt32 ( std::ostream &  str,
const u_int32_t  value 
) [static]
std::ostream & Bytecode::writeString ( std::ostream &  streamref,
const std::string &  stringref 
) [static]
std::ostream & Bytecode::writeType ( std::ostream &  str,
constTypePtr  type 
) [static]
std::ostream & Bytecode::writeUstring ( std::ostream &  streamref,
const Ustring  ustringref 
) [static]
std::ostream & Bytecode::writeValue ( std::ostream &  str,
const YCPValue  value 
) [static]
std::ostream & Bytecode::writeYCodelist ( std::ostream &  str,
const ycodelist_t codelist 
) [static]

Member Data Documentation

map< string, YBlockPtr > * Bytecode::m_bytecodeCache = NULL [static, private]

Referenced by readModule().

int Bytecode::m_namespace_nesting_array_size = 0 [static, private]
int Bytecode::m_namespace_nesting_level = -1 [static, private]
int Bytecode::m_namespace_tare_level = 0 [static, private]

The documentation for this class was generated from the following files:

Generated on a sunny day for yast2-core by doxygen 1.6.3