                 rv
 
         visitVariableDeclarator: (n) ->
-                @scope_stack.top[n.id.name] = true
+                @scope_stack.top.set(n.id.name, true)
                 n
 
         visitImportSpecifier: (n) ->
-                @scope_stack.top[n.id.name] = true
+                @scope_stack.top.set(n.id.name, true)
                 n
 
         visitObjectExpression: (n) ->

class MarkLocalAndGlobalVariables extends TreeVisitor
        constructor: ->
                # initialize the scope stack with the global (empty) scope
                @scope_stack = new Stack Object.create null

        findIdentifierInScope: (ident) ->
                for scope in @scope_stack.stack
                        if hasOwnProperty.call scope, ident.name
                                return true
                return false

        intrinsicForIdentifier: (id) ->

                n

        visitCatchClause: (n) ->
                new_scope = new Map
                new_scope.set(n.param.name, true)
                n.guard = @visit n.guard
                n.body = @visitWithScope new_scope, n.body
                n
