compiler/passes/normalize.cpp
// Determines if we explicitly declare an exported function as returning an
// array.  In that case, we should make a wrapper (if we aren't already), and
// transform that array into a form that a caller from another programming
// language would understand.
Determines if we explicitly declare an exported function as returning an
array.  In that case, we should make a wrapper (if we aren't already), and
transform that array into a form that a caller from another programming
language would understand.
Determines if we explicitly declare an exported function as returning an array . In that case we should make a wrapper ( if we aren ' t already ) and transform that array into a form that a caller from another programming language would understand .
static bool returnsArray(FnSymbol* fn) {
  if (fn->retExprType != NULL) {
    if (CallExpr* call = toCallExpr(fn->retExprType->body.tail)) {
      if (call->isNamed("chpl__buildArrayRuntimeType")) {
        return true;
      }
    }
  }
  return false;
}
static bool returnsArray ( FnSymbol * fn ) { if ( fn -> retExprType != NULL ) { if ( CallExpr * call = toCallExpr ( fn -> retExprType -> body . tail ) ) { if ( call -> isNamed ( " " ) ) { return true ; } } } return false ; }
Determines if we explicitly declare an exported function as returning an
array.
Determines if we explicitly declare an exported function as returning an array .
// SIMPLIFYING ASSUMPTION: // If we don't have a declared return type, assume we don't return an array