Implemented integer comparison
[fur] / templates / arithmetic_instruction.c
index a78a579..5b68efd 100644 (file)
@@ -1,12 +1,12 @@
 void {{ name }}(struct Thread* thread, const union Argument argument) {
-  // We're going to reuse result as both the addend and the sum
+  // We're going to reuse result as both the first input and the result
   assert(!Stack_isEmpty(&(thread->stack)));
   Object result = Stack_pop(&(thread->stack));
   assert(result.type == INTEGER);
 
   assert(!Stack_isEmpty(&(thread->stack)));
   Object other = Stack_pop(&(thread->stack));
-  assert(result.type == INTEGER);
+  assert(other.type == INTEGER);
 
   result.value.integer = other.value.integer {{ operation }} result.value.integer;