Commits

Anonymous committed 4cfe1e4

Support the set! ast node type in the search for free variables.

  • Participants
  • Parent commits 9517cdb

Comments (0)

Files changed (1)

File blub_closure.ml

 	VarSet.union (find fn) arg_free
     | A_let _ -> assert false
     | A_callcc _ -> assert false
-    | A_set _ -> assert false
+    | A_set (var, expr) -> 
+	if VarSet.mem var bound_vars then
+	  find expr
+	else
+	  VarSet.add var (find expr)
   in
   let free_vars = find ast in
   free_vars