diff --git a/src/compiler.cpp b/src/compiler.cpp index ec8d33c..7c29f87 100644 --- a/src/compiler.cpp +++ b/src/compiler.cpp @@ -104,14 +104,11 @@ Result Compiler::compile_primop(Context& context, Symbol& op, Expression ex = TRY(Expression::create()); Oc opcode = Oc::Unknown; - const char* name = ""; if (TRY(op.cmp("+")) == 0) { opcode = Oc::Add; - name = "add"; } else if (TRY(op.cmp("*")) == 0) { opcode = Oc::Mul; - name = "mul"; } else { return ERROR(NotImplemented); } @@ -119,7 +116,6 @@ Result Compiler::compile_primop(Context& context, Symbol& op, if (cur.is()) { uint64_t reg = context.alloc_reg(); int64_t zero = TRY(context.add_const(TRY(Value::create((int64_t)0)))); - std::cout << "mov r" << reg << ", c" << zero << "\n"; TRY(ex.add_opcode(Oc::Mov, {0, (int64_t)reg}, {1, zero})); return ex; @@ -152,8 +148,6 @@ Result Compiler::compile_primop(Context& context, Symbol& op, else res = context.alloc_reg(); - std::cout << name << " r" << res << ", r" << reg << ", r" << comp.reg - << "\n"; TRY(ex.add_opcode(opcode, {0, (int64_t)res}, {0, (int64_t)reg}, {0, (int64_t)comp.reg})); @@ -184,7 +178,6 @@ Result Compiler::compile_int64(Context& context, Int64& value) { int64_t c = TRY(context.add_const(TRY(value.copy()))); - std::cout << "mov r" << reg << ", c" << c << "\n"; TRY(ex.add_opcode(Oc::Mov, {0, (int64_t)reg}, {1, (int64_t)c})); ex.reg = reg;