<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>rm-global.arc</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -510,6 +510,7 @@ int main (int argc, char * argv[]) {
             (,to-3-if &quot;3-arg-if TRANSFORMATION&quot;)
             ; --------AST form
             (,[xe _ ()] &quot;AST TRANSFORMATION&quot;)
+            (,rm-global &quot;UNUSED GLOBAL REMOVAL&quot;)
             (,sharedvars-convert-assert &quot;SHARED VARIABLE CONVERSION&quot;)
             (,cps-convert &quot;CPS-CONVERSION&quot;)
             (,closure-convert &quot;CLOSURE-CONVERSION&quot;)))</diff>
      <filename>codegen.arc</filename>
    </modified>
    <modified>
      <diff>@@ -4,7 +4,7 @@
   (if
     (no s1)
       '()
-    (mem (car s1) s2)
+    (some (car s1) s2)
       (diff (cdr s1) s2)
       (cons (car s1) (diff (cdr s1) s2))))
 
@@ -12,7 +12,7 @@
   (if
     (no s1)
       s2
-    (mem (car s1) s2)
+    (some (car s1) s2)
       (union (cdr s1) s2)
       (cons (car s1) (union (cdr s1) s2))))
 
@@ -24,6 +24,13 @@
     base
     (foldl f (f base (car lst)) (cdr lst))))
 
+(def equalset (s1 s2)
+  &quot; Determines if two sets are equal.  Works correctly only
+    if both sets do not have duplicate elements. &quot;
+  (and (is (len s1) (len s2))
+       ; assuming s1 doesn't have duplicates, should work properly
+       (all [some _ s2] s1)))
+
 (def liststr (lst)
   (let result &quot;&quot;
     (each elt lst</diff>
      <filename>utils.arc</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>79ed3a081e7352ce252f1a8f9f297a238cbc69f0</id>
    </parent>
  </parents>
  <author>
    <name>Alan Manuel K. Gloria</name>
    <email>almkglor@gmail.com</email>
  </author>
  <url>http://github.com/sacado/arc2c/commit/d353e35feb00cbaf3640f59332ce5b7e0dec3fe2</url>
  <id>d353e35feb00cbaf3640f59332ce5b7e0dec3fe2</id>
  <committed-date>2008-04-07T07:14:47-07:00</committed-date>
  <authored-date>2008-04-07T07:14:47-07:00</authored-date>
  <message>Unused globals are now removed

  Globals that are assigned to, but not read, have their assignments
  removed.  Also, expressions that won't have side-effects and which
  won't return - e.g. expressions that aren't in the tail position of
  a 'do sequence - are removed.  This allows for transformations like:
    (do
      (set g1 (set g2 42))
      (set g3
        (fn () g1))
      (set g4
        (fn () g2))
      (prn (g3)))
    =&gt;
    (do
      (set g1 42)
      (set g3
        (fn () g1))
      (prn (g3)))

  codegen: added rm-global step

  utils: a few utilities

  rm-global: the function that performs unused global removal</message>
  <tree>cfbf2882905c7682f0884a8b3ad0ea37c4ca0e7b</tree>
  <committer>
    <name>Alan Manuel K. Gloria</name>
    <email>almkglor@gmail.com</email>
  </committer>
</commit>
