Lab: Remove unnecessary call target

This commit is contained in:
Alex Hirsch 2021-05-14 02:30:13 +02:00
parent e5bfabc3fc
commit bfc8cefdd5

View File

@ -68,10 +68,7 @@ struct tac_function {
struct tac_instruction { struct tac_instruction {
enum tac_instruction_op op; enum tac_instruction_op op;
uint64_t label; uint64_t label;
const char *function;
struct tac_instruction *next; struct tac_instruction *next;
}; };
@ -124,7 +121,7 @@ struct tac_function example_function()
append_instruction(&function, (struct tac_instruction){.op = TAC_INSTRUCTION_OP_PUSH}); append_instruction(&function, (struct tac_instruction){.op = TAC_INSTRUCTION_OP_PUSH});
append_instruction(&function, (struct tac_instruction){.op = TAC_INSTRUCTION_OP_PUSH}); append_instruction(&function, (struct tac_instruction){.op = TAC_INSTRUCTION_OP_PUSH});
append_instruction(&function, (struct tac_instruction){.op = TAC_INSTRUCTION_OP_PUSH}); append_instruction(&function, (struct tac_instruction){.op = TAC_INSTRUCTION_OP_PUSH});
append_instruction(&function, (struct tac_instruction){.op = TAC_INSTRUCTION_OP_CALL, .function = "fun"}); append_instruction(&function, (struct tac_instruction){.op = TAC_INSTRUCTION_OP_CALL});
append_instruction(&function, (struct tac_instruction){.op = TAC_INSTRUCTION_OP_RETURN}); append_instruction(&function, (struct tac_instruction){.op = TAC_INSTRUCTION_OP_RETURN});
return function; return function;