Commits

Anonymous committed 54da957

Fixed augops.

Comments (0)

Files changed (3)

 arana: ${EXECUTABLE} ${HEADERS}
 
 clean:
-	@${ECHO} Cleaning...
+	@${ECHO} "Cleaning... "
 	@rm -f ${OBJ}
 	@rm -f ${EXECUTABLE}
 	@rm -f arana/_opmap.h arana/_astmap.h arana/_opcode_targets.h
 	@rm -f arana/grammar.c arana/grammar.h arana/grammar.out arana/lexnparse.c
+	@${ECHO} "done."
 
 .PHONY: all clean test
           static AR
           arana_integer_add(ARG_SIG, AR self, AR args)
           {
-                  AR other;
-                  AR_PARSE(args, "N:+", &other);
-                  return AR_INTEGER(AR_AS_LONG(self) +
-                                    AR_AS_LONG(other));
+              AR other;
+              AR_PARSE(args, "N::add", &other);
+              return AR_INTEGER(AR_AS_LONG(self) +
+                                AR_AS_LONG(other));
           }
 
         Some of the macros in this function are taking advantage
         of AR_SIG variables.  To invoke another AR_SIG function
-        is the AR_ISIG macro:
+        the AR_ISIG macro can be used:
 
-          static void
-          arana_myobject_free(ARG_SIG, AR self)
+          AR
+          arana_call(AR_SIG, AR object, AR args)
           {
-              AR_FREE(((ArMyObject*)self)->my_field);
-              arana_generic_free(ARG_ISIG, self);
+              return arana_call_with_self(AR_ISIG, object,
+                                          AR_NONE, args);
           }
 
         AR_ISIG forwards all AR_SIG parameters.
 {
     ArOp *op;
     ArCodeUnit *unit = compiler->unit;
-    if (unit->ops_allocated <= unit->op_count - 1) {
+    if (unit->op_count >= unit->ops_allocated) {
         Ar_size_t new_size = unit->ops_allocated * 1.3;
         void *tmp = AR_REALLOCTN(unit->ops, ArOp, new_size);
         if (!tmp)
     0,
     0,
     0,
+    AR_OP_CONCAT,
     AR_OP_ADD,
     AR_OP_SUB,
     AR_OP_MUL,