Completed interface implementation. Hopefully that's it for now..

This commit is contained in:
Tomas Lindquist Olsen
2009-04-16 13:18:56 +02:00
parent bb98d68f64
commit 5db458d8da
4 changed files with 74 additions and 25 deletions

View File

@@ -84,6 +84,14 @@ protected:
/// Basically: static object.Interface[num_interfaces]
llvm::GlobalVariable* classInterfacesArray;
/// std::vector of BaseClass*
typedef std::vector<BaseClass*> BaseClassVector;
/// Array of all interface vtbl implementations - in order - implemented
/// by this class.
/// Corresponds to the Interface instances needed to be output.
BaseClassVector interfacesWithVtbls;
//////////////////////////////////////////////////////////////////////////
/// Create static default initializer for struct.
@@ -93,7 +101,10 @@ protected:
LLConstant* createClassDefaultInitializer();
/// Returns vtbl for interface implementation, creates it if not already built.
llvm::GlobalVariable* getInterfaceVtbl(BaseClass* b, bool new_inst);
llvm::GlobalVariable* getInterfaceVtbl(
BaseClass* b,
bool new_inst,
size_t interfaces_index);
/// Add base class data to initializer list.
/// Also creates the IrField instance for each data field.