   return result
 
 GE.visitEmitterChip = (path, chip, constants, bindings) ->
-  memoryPatches = []
-  ioPatches = []
   evaluationContext = GE.makeEvaluationContext(constants, bindings)
 
   # Return "DONE" signal, so it can be put in sequences


# Returns an object mapping pin expression names to their values 
# pinFunctions is an object that contains 'in' and 'out' attributes
GE.evaluateInputPinExpressions = (path, evaluationContext, pinDefs, pinFunctions) ->
  evaluatedPins = {}

  for pinName, pinOptions of pinDefs
    # Resolve pin expression value. If the board doesn't specify a value, use the default, it it exists. Otherwise, throw exception for input values
    if pinOptions.direction not in ["in", "inout"] then continue

    if pinFunctions.in?[pinName] 
      pinFunction = pinFunctions.in[pinName]
    else if pinOptions.default? 

      throw GE.makeExecutionError("Missing input pin expression function for pin '#{pinName}'", path)
    
    try
      # Get the value
      evaluatedPins[pinName] = GE.evaluateExpressionFunction(constants, evaluationContext, pinFunction)
      
      # Protect inout pins from changing buffer values directly by cloning the data
      if pinOptions.direction is "inout"
        evaluatedPins[pinName] = GE.cloneData(evaluatedPins[pinName]) 
    catch error
      throw GE.makeExecutionError("Error evaluating the input pin expression expression '#{pinFunction}' for pin '#{pinName}': #{error.stack}", path)
  return evaluatedPins

# Updates the evaluation context by evaluating the output pin expressions
# pinFunctions is an object that contains 'in' and 'out' attributes
GE.evaluateOutputPinExpressions = (path, bindings, evaluationContext, memoryPatches, ioPatches, pinDefs, pinFunctions, evaluatedPins) ->
  for pinName, pinFunction of pinFunctions?.out
    try
      outputValue = evaluationContext.evaluateExpressionFunction(pinFunction, evaluatedPins)
    catch error
      throw GE.makeExecutionError("Error evaluating the output pin expression '#{pinFunction}' for pin '#{pinName}': #{error.stack}\nOutput pins were #{JSON.stringify(outPins)}.", path)

    GE.derivePatches(bindings, path, evaluationContext, memoryPatches, ioPatches, pinName, outputValue)

GE.calculateBindingSet = (path, chip, constants, oldBindings) ->
  bindingSet = []
