src/som/interpreter/nodes/TypeCheckNode.java
public static ExpressionNode create(final ExpressionNode type, final ExpressionNode expr,
      final SourceSection sourceSection) {
    // Only create the type check if type checking is enabled
    if (VmSettings.USE_TYPE_CHECKING) {
      if (VmSettings.COLLECT_TYPE_STATS) {
        ++numTypeCheckLocations;
      }
      // Create the type check
      return UnresolvedTypeCheckNodeFactory.create(sourceSection, type, expr);
    }
    // Otherwise return the expression as is.
    return expr;
  }
/**
   * Creates a type check.
   *
   * @param type - the type expression to check objects as
   * @param expr - the expression to be type checked
   * @param sourceSection - the location in the source
   * @return The wrapped expression
   */
Creates a type check.
@param type - the type expression to check objects as
@param expr - the expression to be type checked
@param sourceSection - the location in the source
@return The wrapped expression
Creates a type check . @param type - the type expression to check objects as @param expr - the expression to be type checked @param sourceSection - the location in the source @return The wrapped expression
public static ExpressionNode create(final ExpressionNode type, final ExpressionNode expr,
      final SourceSection sourceSection) {
    if (VmSettings.USE_TYPE_CHECKING) {
      if (VmSettings.COLLECT_TYPE_STATS) {
        ++numTypeCheckLocations;
      }
      return UnresolvedTypeCheckNodeFactory.create(sourceSection, type, expr);
    }
    return expr;
  }
public static ExpressionNode create ( final ExpressionNode type , final ExpressionNode expr , final SourceSection sourceSection ) { if ( VmSettings . USE_TYPE_CHECKING ) { if ( VmSettings . COLLECT_TYPE_STATS ) { ++ numTypeCheckLocations ; } return UnresolvedTypeCheckNodeFactory . create ( sourceSection , type , expr ) ; } return expr ; }
Creates a type check.
Creates a type check .
// Only create the type check if type checking is enabled // Create the type check // Otherwise return the expression as is.