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

//data type to describe a location in the output file which requires a function address to be written, once offsets of all functions are known
data CallRefAddress {
	char intf[]
	char name[]
	int refAddress
}

data CGResult {
	int relocations[]
	CallRefAddress callRefs[]
}

interface CodeGen {

	CodeGen()

	CGResult generate(File output, Code code, store OpToken instructions[], DanaType types[], LiteralsTable literals, TypeTable typeTable, TypeMapping mappings[], FunctionInfo function, int textOffset, int nniTableOffset, int hwidSet[])

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