@Override
  public final RTValue f(final RTResultFunction rootNode, final RTExecutionContext $ec)
      throws CALExecutorException {
    // Arguments
    RTValue record = rootNode.getArgValue();

    // Release the fields in the root node to open them to garbage collection
    rootNode.clearMembers();

    return f1S(RTValue.lastRef(record.evaluate($ec), record = null), $ec);
  }
  @Override
  public final RTValue f1S(final RTValue record, final RTExecutionContext $ec)
      throws CALExecutorException {
    $ec.incrementNMethodCalls();
    if (LECCMachineConfiguration.generateDebugCode()
        && $ec.isDebugProcessingNeeded(getQualifiedName())) {
      $ec.debugProcessing(getQualifiedName(), new RTValue[] {record});
    }

    final RTRecordValue recordValue = (RTRecordValue) record;

    for (int i = 0, nFields = recordValue.getNFields(); i < nFields; ++i) {
      final RTValue fieldValue = recordValue.getNthValue(i);
      final RTValue evaluatedFieldValue = fieldValue.evaluate($ec);
      if (fieldValue != evaluatedFieldValue) {
        // called for the side effect of collapsing any indirections. This is important for freeing
        // up space.
        recordValue.getNthValue(i);
      }
    }

    return recordValue;
  }
  @Override
  public final RTValue f1L(RTValue record, RTExecutionContext $ec) throws CALExecutorException {

    return f1S(RTValue.lastRef(record.evaluate($ec), record = null), $ec);
  }