langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java
changeset 39599 3c7da4996d8c
parent 39589 0cbaed77814c
child 40594 8cbf5df9c503
equal deleted inserted replaced
39598:cfe9d74c11eb 39599:3c7da4996d8c
    60 import java.util.Properties;
    60 import java.util.Properties;
    61 import java.util.Set;
    61 import java.util.Set;
    62 import java.util.function.BiFunction;
    62 import java.util.function.BiFunction;
    63 import java.util.function.BiPredicate;
    63 import java.util.function.BiPredicate;
    64 
    64 
       
    65 import com.sun.tools.javac.main.Option;
       
    66 
    65 import static com.sun.tools.javac.code.TypeTag.*;
    67 import static com.sun.tools.javac.code.TypeTag.*;
    66 
    68 
    67 /** Helper class for type parameter inference, used by the attribution phase.
    69 /** Helper class for type parameter inference, used by the attribution phase.
    68  *
    70  *
    69  *  <p><b>This is NOT part of any supported API.
    71  *  <p><b>This is NOT part of any supported API.
    85     boolean allowGraphInference;
    87     boolean allowGraphInference;
    86 
    88 
    87     /**
    89     /**
    88      * folder in which the inference dependency graphs should be written.
    90      * folder in which the inference dependency graphs should be written.
    89      */
    91      */
    90     final private String dependenciesFolder;
    92     private final String dependenciesFolder;
    91 
    93 
    92     /**
    94     /**
    93      * List of graphs awaiting to be dumped to a file.
    95      * List of graphs awaiting to be dumped to a file.
    94      */
    96      */
    95     private List<String> pendingGraphs;
    97     private List<String> pendingGraphs;
   112         log = Log.instance(context);
   114         log = Log.instance(context);
   113         inferenceException = new InferenceException(diags);
   115         inferenceException = new InferenceException(diags);
   114         Options options = Options.instance(context);
   116         Options options = Options.instance(context);
   115         allowGraphInference = Source.instance(context).allowGraphInference()
   117         allowGraphInference = Source.instance(context).allowGraphInference()
   116                 && options.isUnset("useLegacyInference");
   118                 && options.isUnset("useLegacyInference");
   117         dependenciesFolder = options.get("dumpInferenceGraphsTo");
   119         dependenciesFolder = options.get("debug.dumpInferenceGraphsTo");
   118         pendingGraphs = List.nil();
   120         pendingGraphs = List.nil();
   119 
   121 
   120         emptyContext = new InferenceContext(this, List.<Type>nil());
   122         emptyContext = new InferenceContext(this, List.<Type>nil());
   121     }
   123     }
   122 
   124