aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorquou <quou@disroot.org>2023-05-27 10:30:55 +1000
committerquou <quou@disroot.org>2023-05-27 10:30:55 +1000
commit32d8c607e49ecaedc001196aaeb46e9a665311b5 (patch)
tree003e35e59e46d2cf13fb9df6ef402cb9588399fb
parent2a1419ccca1e04f822b1d5b5f91a72fdef7e48c4 (diff)
Remove some dead code from the compiler.
-rw-r--r--compiler.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/compiler.c b/compiler.c
index 44b2230..e025992 100644
--- a/compiler.c
+++ b/compiler.c
@@ -204,12 +204,9 @@ void gen_val(Compiler* c, Stack_Value v, unsigned char r) {
c->numbers[v.idx],
regs[r]
);
- } else if (v.reg != r) {
- /*printf(
- "mov %%rax, %%%s\n",
- regs[r]
- );*/
}
+ /* The result of the last sub-expression is already
+ * in the rax register, no need to do anything. */
}
void generate(Compiler* c) {