trying to get annie's to work
This commit is contained in:
@ -13,6 +13,7 @@
|
||||
|
||||
struct TableNode;
|
||||
typedef struct TFList TFList;
|
||||
typedef struct CGNode CGNode;
|
||||
|
||||
typedef struct Constant_Stack {
|
||||
struct TableNode *theType;
|
||||
@ -327,4 +328,40 @@ Track 4: Memory Access & Integration
|
||||
* Document the complete intermediate instruction set
|
||||
* Build integration test suite covering all language features
|
||||
* Implement row-major/column-major array layout calculation
|
||||
*/
|
||||
*/
|
||||
//-------------------------------------------------------------
|
||||
extern FILE *cg_flag;
|
||||
typedef struct CGNode {
|
||||
TableNode *tn;
|
||||
int address;
|
||||
CGNode *next;
|
||||
}CGNode;
|
||||
|
||||
int generate();
|
||||
CGNode *getNextCG(CGNode *cg);
|
||||
int getAddress(CGNode *cg);
|
||||
TableNode *getTNofCG(CGNode *cg);
|
||||
int generateLabel(Instruction *instruction);
|
||||
int generateAdd(Instruction *instruction);
|
||||
int generateSub(Instruction *instruction);
|
||||
int generateMult(Instruction *instruction);
|
||||
int generateDiv(Instruction *instruction);
|
||||
int generateMod(Instruction *instruction);
|
||||
int generateOr(Instruction *instruction);
|
||||
int generateAnd(Instruction *instruction);
|
||||
int generateNeg(Instruction *instruction);
|
||||
int generateNot(Instruction *instruction);
|
||||
int generateDiv(Instruction *instruction);
|
||||
int generateAssign(Instruction *instruction); // is this for something like x = 1?
|
||||
int generateGoto(Instruction *instruction);
|
||||
int generateCondGoto(Instruction *instruction);
|
||||
int generateIfTrue(Instruction *instruction);
|
||||
int generateIfFalse(Instruction *instruction);
|
||||
int generateLessThan(Instruction *instruction);
|
||||
int generateEqualTo(Instruction *instruction);
|
||||
int generateCall(Instruction *instruction);
|
||||
int generateReturn(Instruction *instruction);
|
||||
int generateCopyRight(Instruction *instruction);
|
||||
int generateCopyLeft(Instruction *instruction);
|
||||
int generateAddressOf(Instruction *instruction);
|
||||
int generateParam(Instruction *instruction);
|
Reference in New Issue
Block a user