compiler/passes/normalize.cpp
// Calls to _statementLevelSymbol() are inserted here and in
// function resolution to ensure that sync vars are in the correct
// state (empty) if they are used but not assigned to anything.
Calls to _statementLevelSymbol() are inserted here and in
function resolution to ensure that sync vars are in the correct
state (empty) if they are used but not assigned to anything.
Calls to _statementLevelSymbol () are inserted here and in function resolution to ensure that sync vars are in the correct state ( empty ) if they are used but not assigned to anything .
forv_Vec(SymExpr, se, gSymExprs) {
      if (FnSymbol* parentFn = toFnSymbol(se->parentSymbol)) {
        if (se == se->getStmtExpr() &&
            (isDirectlyUnderBlockStmt(se) || !isBlockStmt(se->parentExpr))) {
          if (parentFn->retExprType != se->parentExpr) {
            SET_LINENO(se);
            CallExpr* call = new CallExpr("_statementLevelSymbol");
            se->insertBefore(call);
            call->insertAtTail(se->remove());
          }
        }
      }
    }
forv_Vec ( SymExpr , se , gSymExprs ) { if ( FnSymbol * parentFn = toFnSymbol ( se -> parentSymbol ) ) { if ( se == se -> getStmtExpr ( ) && ( isDirectlyUnderBlockStmt ( se ) || ! isBlockStmt ( se -> parentExpr ) ) ) { if ( parentFn -> retExprType != se -> parentExpr ) { SET_LINENO ( se ) ; CallExpr * call = new CallExpr ( " " ) ; se -> insertBefore ( call ) ; call -> insertAtTail ( se -> remove ( ) ) ; } } } }
Calls to _statementLevelSymbol() are inserted here and in
function resolution to ensure that sync vars are in the correct
state (empty) if they are used but not assigned to anything.
Calls to _statementLevelSymbol () are inserted here and in function resolution to ensure that sync vars are in the correct state ( empty ) if they are used but not assigned to anything .
// avoid exprs under ForallIntents // Don't add these calls for the return type, since // _statementLevelSymbol would do nothing in that case // anyway, and it contributes to order-of-resolution issues for // extern functions with declared return type.