   # already exist.
   find: (name, options) ->
     return true if @check name, options
-    @variables.push {name, type: 'var'}
+    @setVar name, 'var'
     false
 
   # Test variables and return true the first time fn(v, k) returns true

  freeVariable: (type) ->
    index = 0
    index++ while @check(temp = @temporary type, index) and @type(temp) isnt 'reuse'
    @variables.push {name: temp, type: 'var'}
    last(@garbage).push temp if @garbage.length
    temp

  # Ensure that an assignment is made at the top of this scope
  # (or at the top-level scope, if requested).
  assign: (name, value) ->
    @variables.push {name, type: { value: value, assigned: true }}

  # Does this scope reference any variables that need to be declared in the
  # given function body?

  # Reserve a variable name as originating from a function parameter for this
  # scope. No `var` required for internal references.
  parameter: (name) ->
    @setVar name, 'param'

  # Just check to see if a variable has already been declared, without reserving,
  # walks up to the root scope.
