#include <asmfile.h>
Inheritance diagram for VM::AssemblerFile:
This class is NOT C++-safe.
Definition at line 54 of file asmfile.h.
|
|
|
Do not use:.
|
|
Constructor creates empty "assembler file content"; use derived class. Definition at line 250 of file asmfile.cc. References nspc_root, VM::AssemblerFile::SLabelInfo::pfunc, slabel_init, and slabel_start. |
|
Destructor frees everything including the info tree and program memory. Definition at line 270 of file asmfile.cc. References DELETE(), nspc_root, VM::AssemblerFile::SLabelInfo::pfunc, slabel_init, and slabel_start. |
|
|
Resolve SymRefs in gobal vars.
For internal use only.
Definition at line 174 of file asmfile.cc. References Assert, Error(), filename, VM::AssemblerFile::_GlobVars::globvarq, and symref2symbol. Referenced by ResolveIDsNamespaceLocal(). |
|
|
|
Read in an assembler file. Read in file named fname; errors during opening are returned in error, parse errors are reported directly to the user. Note: Only one file may be read in. You need to use multiple AssemblerFile objects for more than one file. file_num is a serial number for the file used to make non-exported symbol names unique. Returns number of errors. Reimplemented in VM::AssemblerFile_Plaintext. Definition at line 235 of file asmfile.cc. References CritAssert, and uint32. |
|
Resolve/lookup all TypeIDs and SymRefs in the namespace tree. This will resolve all TypeIDs in all namespace nodes in the tree (i.e. class base entries) but not in the program section. Also, all SymRefs in the vtables and global vars of the file as well as the SymRef labels (i.e. symref entries in ProgramStorage::Function) will be resolved into SymbolEntry's. This means, that after the call, the ID-and-Pointer unions hold the correct value in the pointer member and the ID member is invalid (see ClassInfo::VTableEntry, ClassInfo::BaseEntry). Returns number of errors. Definition at line 197 of file asmfile.cc. References _ResolveIDsNamespaceLocal_Recursive(), _ResolveSymrefsInGlobal(), Assert, Error(), VM::ProgramStorage::FirstFunction(), gvar_p, gvar_v, VM::ProgramStorage::Function::loc, LinkedListBase< Function >::next, nspc_root, VM::AssemblerFile::SLabelInfo::pfunc, program, VM::ProgramStorage::Function::se, slabel_init, slabel_start, VM::ProgramStorage::Function::symref, and symref2symbol. Referenced by VM::VMLinker::LinkAll(). |
|
Write an assembler file. This function will write the current content of the class to the passed assembler file. Possible file IO error is returned in the SError object. Returns 0 on sucess, non-zero on failure. Reimplemented in VM::AssemblerFile_Plaintext. Definition at line 243 of file asmfile.cc. References CritAssert. Referenced by main(). |
|
|
|
ABI version noted in the file.
Definition at line 184 of file asmfile.h. Referenced by VM::VMLinker::LinkAll(). |
|
Configuration data stored here.
|
|
Serial number of the file assigned when reading in the file used to make unique non-exported symbol names. |
|
Which file was read in; only the file name is set in this object.
Definition at line 177 of file asmfile.h. Referenced by VM::VMLinker::_GenerateSymbolProvideMap_AddGlobal(), VM::VMLinker::_LinkGlobalStorage(), _ResolveIDsNamespaceLocal_Recursive(), _ResolveSymrefsInGlobal(), and VM::VMLinker::LinkAll(). |
|
Referenced by VM::VMLinker::_GenerateSymbolProvideMap(), VM::VMLinker::_LinkerFileNeeded(), and ResolveIDsNamespaceLocal(). |
|
Referenced by VM::VMLinker::_GenerateSymbolProvideMap(), VM::VMLinker::_LinkerFileNeeded(), and ResolveIDsNamespaceLocal(). |
|
Like internal_symbols for internal TypeIDs. Well, somebody must take care of the memory and allocation... Definition at line 220 of file asmfile.h. Referenced by VM::VMLinker::_CheckNamespaceInfo_Recursive(), and _ResolveIDsNamespaceLocal_Recursive(). |
|
Like symref2symbol but for internal symbols.
Definition at line 217 of file asmfile.h. Referenced by VM::VMLinker::_LinkerNeedClassConstruct(), and _ResolveIDsNamespaceLocal_Recursive(). |
|
Root of the namespace / class info tree. Note: Root is always plain NamespaceInfo and name is a NULL ref. Definition at line 188 of file asmfile.h. Referenced by VM::VMLinker::_CreateInitFunction(), VM::VMLinker::_GenerateSymbolProvideMap(), VM::VMLinker::_GetDefinitionFile(), VM::VMLinker::_MergeNamespaceAndVTableInfo(), AssemblerFile(), VM::VMLinker::LinkAll(), ResolveIDsNamespaceLocal(), and ~AssemblerFile(). |
|
The program code.
Definition at line 203 of file asmfile.h. Referenced by VM::VMLinker::_CreateInitFunction(), VM::VMLinker::_GenerateSymbolProvideMap(), VM::VMLinker::_LinkFunction(), and ResolveIDsNamespaceLocal(). |
|
.start and and .init info, if specified (max 1 per file of each)
Referenced by VM::VMLinker::_CreateInitFunction(), VM::VMLinker::_LinkerFileNeeded(), AssemblerFile(), VM::VMLinker::LinkAll(), ResolveIDsNamespaceLocal(), and ~AssemblerFile(). |
|
.start and and .init info, if specified (max 1 per file of each)
Referenced by VM::VMLinker::_LinkFunction(), AssemblerFile(), VM::VMLinker::LinkAll(), ResolveIDsNamespaceLocal(), and ~AssemblerFile(). |
|
Mapping SYMREF -> program function (in current file; in linked list in program). This is "provide" information for functions. Not for ".init"/".start" Non-internal symbols, only. Definition at line 228 of file asmfile.h. Referenced by VM::VMLinker::_LinkFunction(), and VM::VMLinker::LinkAll(). |
|
This is "provide" information for global variables (non-intrnl).
Definition at line 231 of file asmfile.h. Referenced by VM::VMLinker::_LinkGlobalStorage(). |
|
Mapping SYMREF -> symbol name + info; for this file, only. This is "need/map" information. Non-internal symbols, only. Definition at line 214 of file asmfile.h. Referenced by VM::VMLinker::_LinkFunction(), VM::VMLinker::_LinkGlobalStorage(), _ResolveIDsNamespaceLocal_Recursive(), _ResolveSymrefsInGlobal(), VM::VMLinker::LinkAll(), and ResolveIDsNamespaceLocal(). |
|
Mapping TYPEID -> ClassInfo for this file, only. Non-internal TypeIDs, only. Definition at line 208 of file asmfile.h. Referenced by VM::VMLinker::_LinkFunction(), VM::VMLinker::_MergeNamespaceInfo_Recursive(), and _ResolveIDsNamespaceLocal_Recursive(). |