 # 2) adds mappings for all .closed variables
 class SubstituteVariables extends TreeTransformer
         constructor: (module) ->
-                super
                 @function_stack = new Stack
                 @mappings = new Stack
+                super
 
         currentMapping: -> if @mappings.depth > 0 then @mappings.top else Object.create null
 



class NameAnonymousFunctions extends TreeTransformer
        visitAssignmentExpression: (n) ->
                n = super n
                lhs = n.left

                                create_intrinsic "setGlobal", [lhs, new_rhs]
                else
                        n.left = @visit n.left
                        n.right = new_rhs
                        n
                        

