HomeForumSourceResearchGuide
Sign in to contribute to source. how it works
Type definition file util.compiler.EnvelopeWriter by barry
expand copy to clipboardexpand
uses OpParser
uses io.File
uses LiteralsTable
uses TypeTable

data VariableRef {
	int typeOffset
	int dataOffset
	byte typeClass
}

data ImplementedFunction {
	char name[]
	OpFunction function
	int offset
	int references[]
}

data ImplementedInterface {
	char type[]

	ImplementedFunction functions[]
}

data ImplementedObject {
	char type[]
	char semantic[]

	ImplementedInterface interfaces[]
	ImplementedFunction localFunctions[]
	ImplementedFunction initFunction
}

data FunctionInfo {
	int localsReferenceOffset
	int dataContentSize
	int registerCount
	int textOffset
	int codeStart
	int exPos
	VariableRef variables[]
}

data TypeMapping {
	char name[]
	int index
}

interface EnvelopeWriter {

	const byte EM_BIG = 1
	const byte EM_LITTLE = 2

	const byte OS_LINUX = 1
	const byte OS_WINDOWS = 2
	const byte OS_UBC = 128

	EnvelopeWriter(char sourceName[], int addressWidth, opt byte hostEndianMode, byte osType)

	ImplementedObject[] prepareEnvelope(OpParseResult parseResult, DanaType types[], LiteralsTable lt)

	TypeMapping[] getTypeMappings()
	
	bool writeEnvelope(File output, OpParseResult parseResult, ImplementedObject intfs[], DanaType types[], LiteralsTable lt, TypeTable tt, int classInitOffset, bool reloc)

	FunctionInfo writeFrameHeader(File output, ImplementedFunction function, DanaType types[], LiteralsTable lt, int textOffset)

	void writeTextEnd(File fd)

	void writeRelocations(File fd)

	void writeInfoSection(File fd, char id[], char contentType[], byte content[])

	void addRelocations(int list[])

	int getTextOffset()

	int getNNITableOffset()
	
	}
Revision history
To propose a new revision to this entity, use dana source put -ut your/new/version.dn -n util.compiler.EnvelopeWriter -m "reason for update" -u yourUsername
Version 2 by barry
Version 1 (this version) by barry
Notes for this version: New compiler components