shithub: mc

Download patch

ref: 503c566fb9c0e3bb4aac69d36873fc6c1e113f22
parent: ec9b1cfee38a882f64cecd3dbe17f5361e655ae4
author: Ori Bernstein <[email protected]>
date: Tue Aug 28 18:22:50 EDT 2012

Rename compare to match.

    We're going to be extracting values instead of just comparing.
    fix the name.

--- a/6/simp.c
+++ b/6/simp.c
@@ -443,7 +443,7 @@
         return load(addk(addr(n, t), off));
 }
 
-static void ucompare(Simp *s, Node *a, Node *b, Type *t, size_t off, Node *iftrue, Node *iffalse)
+static void umatch(Simp *s, Node *a, Node *b, Type *t, size_t off, Node *iftrue, Node *iffalse)
 {
     Node *v, *x, *y;
     Node *next;
@@ -482,7 +482,7 @@
             append(s, next);
             if (uc->etype) {
                 off += Wordsz;
-                ucompare(s, a, b, uc->etype, off, iftrue, iffalse);
+                umatch(s, a, b, uc->etype, off, iftrue, iffalse);
             }
             break;
     }
@@ -508,7 +508,7 @@
         /* check pattern */
         cur = genlbl();
         next = genlbl();
-        ucompare(s, val, m->match.pat, val->expr.type, 0, cur, next);
+        umatch(s, val, m->match.pat, val->expr.type, 0, cur, next);
 
         /* do the action if it matches */
         append(s, cur);