From 05b347ba6324720f5cbbe419d616ad5dfb7d6f29 Mon Sep 17 00:00:00 2001 From: Meyer Simon Date: Tue, 6 May 2025 17:34:46 -0400 Subject: [PATCH] Hello --- src/intermediate_code.c | 2 +- src/intermediate_code.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/intermediate_code.c b/src/intermediate_code.c index 4bbac3e..3a473a1 100644 --- a/src/intermediate_code.c +++ b/src/intermediate_code.c @@ -316,7 +316,7 @@ void emit_return(TNodeOrConst *value) { void emit_reserve(TableNode *result, TNodeOrConst *size) { // this needs to change // we need to take a int - emit_parameter(size); + emit_binary_op(E_MUL, result, emit_function_call(result, 1, tn_or_const(NODE, look_up(cur, "reserve"))); } diff --git a/src/intermediate_code.h b/src/intermediate_code.h index 87e3123..67c6346 100644 --- a/src/intermediate_code.h +++ b/src/intermediate_code.h @@ -49,7 +49,7 @@ typedef enum { // these are from page 364 E_SUB, // 1 E_MUL, // 1 E_DIV, // 1 - E_MOD, // 1 TODO: Please change to REM + E_MOD, // 1 E_OR, // 1 E_AND, // 1 E_NEG, // 2