Java Code Examples for com.sun.tools.javac.jvm.Target#instance()

The following examples show how to use com.sun.tools.javac.jvm.Target#instance() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Lower.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
protected Lower(Context context) {
    context.put(lowerKey, this);
    names = Names.instance(context);
    log = Log.instance(context);
    syms = Symtab.instance(context);
    rs = Resolve.instance(context);
    chk = Check.instance(context);
    attr = Attr.instance(context);
    make = TreeMaker.instance(context);
    writer = ClassWriter.instance(context);
    reader = ClassReader.instance(context);
    cfolder = ConstFold.instance(context);
    target = Target.instance(context);
    source = Source.instance(context);
    typeEnvs = TypeEnvs.instance(context);
    allowEnums = source.allowEnums();
    dollarAssertionsDisabled = names.
        fromString(target.syntheticNameChar() + "assertionsDisabled");
    classDollar = names.
        fromString("class" + target.syntheticNameChar());

    types = Types.instance(context);
    Options options = Options.instance(context);
    debugLower = options.isSet("debuglower");
    pkginfoOpt = PkgInfo.get(options);
}
 
Example 2
Source File: Lower.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
protected Lower(Context context) {
    context.put(lowerKey, this);
    names = Names.instance(context);
    log = Log.instance(context);
    syms = Symtab.instance(context);
    rs = Resolve.instance(context);
    chk = Check.instance(context);
    attr = Attr.instance(context);
    make = TreeMaker.instance(context);
    writer = ClassWriter.instance(context);
    reader = ClassReader.instance(context);
    cfolder = ConstFold.instance(context);
    target = Target.instance(context);
    source = Source.instance(context);
    typeEnvs = TypeEnvs.instance(context);
    allowEnums = source.allowEnums();
    dollarAssertionsDisabled = names.
        fromString(target.syntheticNameChar() + "assertionsDisabled");
    classDollar = names.
        fromString("class" + target.syntheticNameChar());

    types = Types.instance(context);
    Options options = Options.instance(context);
    debugLower = options.isSet("debuglower");
    pkginfoOpt = PkgInfo.get(options);
}
 
Example 3
Source File: Lower.java    From java-n-IDE-for-Android with Apache License 2.0 6 votes vote down vote up
protected Lower(Context context) {
    context.put(lowerKey, this);
    names = Names.instance(context);
    log = Log.instance(context);
    syms = Symtab.instance(context);
    rs = Resolve.instance(context);
    chk = Check.instance(context);
    attr = Attr.instance(context);
    make = TreeMaker.instance(context);
    writer = ClassWriter.instance(context);
    reader = ClassReader.instance(context);
    cfolder = ConstFold.instance(context);
    target = Target.instance(context);
    source = Source.instance(context);
    allowEnums = source.allowEnums();
    dollarAssertionsDisabled = names.
        fromString(target.syntheticNameChar() + "assertionsDisabled");
    classDollar = names.
        fromString("class" + target.syntheticNameChar());

    types = Types.instance(context);
    Options options = Options.instance(context);
    debugLower = options.isSet("debuglower");
    pkginfoOpt = PkgInfo.get(options);
}
 
Example 4
Source File: Lower.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
protected Lower(Context context) {
    context.put(lowerKey, this);
    names = Names.instance(context);
    log = Log.instance(context);
    syms = Symtab.instance(context);
    rs = Resolve.instance(context);
    chk = Check.instance(context);
    attr = Attr.instance(context);
    make = TreeMaker.instance(context);
    writer = ClassWriter.instance(context);
    reader = ClassReader.instance(context);
    cfolder = ConstFold.instance(context);
    target = Target.instance(context);
    source = Source.instance(context);
    typeEnvs = TypeEnvs.instance(context);
    allowEnums = source.allowEnums();
    dollarAssertionsDisabled = names.
        fromString(target.syntheticNameChar() + "assertionsDisabled");
    classDollar = names.
        fromString("class" + target.syntheticNameChar());

    types = Types.instance(context);
    Options options = Options.instance(context);
    debugLower = options.isSet("debuglower");
    pkginfoOpt = PkgInfo.get(options);
}
 
Example 5
Source File: Lower.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
protected Lower(Context context) {
    context.put(lowerKey, this);
    names = Names.instance(context);
    log = Log.instance(context);
    syms = Symtab.instance(context);
    rs = Resolve.instance(context);
    chk = Check.instance(context);
    attr = Attr.instance(context);
    make = TreeMaker.instance(context);
    writer = ClassWriter.instance(context);
    reader = ClassReader.instance(context);
    cfolder = ConstFold.instance(context);
    target = Target.instance(context);
    source = Source.instance(context);
    typeEnvs = TypeEnvs.instance(context);
    allowEnums = source.allowEnums();
    dollarAssertionsDisabled = names.
        fromString(target.syntheticNameChar() + "assertionsDisabled");
    classDollar = names.
        fromString("class" + target.syntheticNameChar());

    types = Types.instance(context);
    Options options = Options.instance(context);
    debugLower = options.isSet("debuglower");
    pkginfoOpt = PkgInfo.get(options);
}
 
Example 6
Source File: Lower.java    From javaide with GNU General Public License v3.0 6 votes vote down vote up
protected Lower(Context context) {
    context.put(lowerKey, this);
    names = Names.instance(context);
    log = Log.instance(context);
    syms = Symtab.instance(context);
    rs = Resolve.instance(context);
    chk = Check.instance(context);
    attr = Attr.instance(context);
    make = TreeMaker.instance(context);
    writer = ClassWriter.instance(context);
    reader = ClassReader.instance(context);
    cfolder = ConstFold.instance(context);
    target = Target.instance(context);
    source = Source.instance(context);
    allowEnums = source.allowEnums();
    dollarAssertionsDisabled = names.
        fromString(target.syntheticNameChar() + "assertionsDisabled");
    classDollar = names.
        fromString("class" + target.syntheticNameChar());

    types = Types.instance(context);
    Options options = Options.instance(context);
    debugLower = options.isSet("debuglower");
    pkginfoOpt = PkgInfo.get(options);
}
 
Example 7
Source File: Lower.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
protected Lower(Context context) {
    context.put(lowerKey, this);
    names = Names.instance(context);
    log = Log.instance(context);
    syms = Symtab.instance(context);
    rs = Resolve.instance(context);
    chk = Check.instance(context);
    attr = Attr.instance(context);
    make = TreeMaker.instance(context);
    writer = ClassWriter.instance(context);
    reader = ClassReader.instance(context);
    cfolder = ConstFold.instance(context);
    target = Target.instance(context);
    source = Source.instance(context);
    typeEnvs = TypeEnvs.instance(context);
    allowEnums = source.allowEnums();
    dollarAssertionsDisabled = names.
        fromString(target.syntheticNameChar() + "assertionsDisabled");
    classDollar = names.
        fromString("class" + target.syntheticNameChar());

    types = Types.instance(context);
    Options options = Options.instance(context);
    debugLower = options.isSet("debuglower");
    pkginfoOpt = PkgInfo.get(options);
}
 
Example 8
Source File: Lower.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
protected Lower(Context context) {
    context.put(lowerKey, this);
    names = Names.instance(context);
    log = Log.instance(context);
    syms = Symtab.instance(context);
    rs = Resolve.instance(context);
    chk = Check.instance(context);
    attr = Attr.instance(context);
    make = TreeMaker.instance(context);
    writer = ClassWriter.instance(context);
    reader = ClassReader.instance(context);
    cfolder = ConstFold.instance(context);
    target = Target.instance(context);
    source = Source.instance(context);
    allowEnums = source.allowEnums();
    dollarAssertionsDisabled = names.
        fromString(target.syntheticNameChar() + "assertionsDisabled");
    classDollar = names.
        fromString("class" + target.syntheticNameChar());

    types = Types.instance(context);
    Options options = Options.instance(context);
    debugLower = options.isSet("debuglower");
    pkginfoOpt = PkgInfo.get(options);
}
 
Example 9
Source File: Lower.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
protected Lower(Context context) {
    context.put(lowerKey, this);
    names = Names.instance(context);
    log = Log.instance(context);
    syms = Symtab.instance(context);
    rs = Resolve.instance(context);
    chk = Check.instance(context);
    attr = Attr.instance(context);
    make = TreeMaker.instance(context);
    writer = ClassWriter.instance(context);
    reader = ClassReader.instance(context);
    cfolder = ConstFold.instance(context);
    target = Target.instance(context);
    source = Source.instance(context);
    allowEnums = source.allowEnums();
    dollarAssertionsDisabled = names.
        fromString(target.syntheticNameChar() + "assertionsDisabled");
    classDollar = names.
        fromString("class" + target.syntheticNameChar());

    types = Types.instance(context);
    Options options = Options.instance(context);
    debugLower = options.isSet("debuglower");
    pkginfoOpt = PkgInfo.get(options);
}
 
Example 10
Source File: Attr.java    From java-n-IDE-for-Android with Apache License 2.0 5 votes vote down vote up
protected Attr(Context context) {
    context.put(attrKey, this);

    names = Names.instance(context);
    log = Log.instance(context);
    syms = Symtab.instance(context);
    rs = Resolve.instance(context);
    chk = Check.instance(context);
    memberEnter = MemberEnter.instance(context);
    make = TreeMaker.instance(context);
    enter = Enter.instance(context);
    infer = Infer.instance(context);
    cfolder = ConstFold.instance(context);
    target = Target.instance(context);
    types = Types.instance(context);
    diags = JCDiagnostic.Factory.instance(context);
    annotate = Annotate.instance(context);
    deferredLintHandler = DeferredLintHandler.instance(context);

    Options options = Options.instance(context);

    Source source = Source.instance(context);
    allowGenerics = source.allowGenerics();
    allowVarargs = source.allowVarargs();
    allowEnums = source.allowEnums();
    allowBoxing = source.allowBoxing();
    allowCovariantReturns = source.allowCovariantReturns();
    allowAnonOuterThis = source.allowAnonOuterThis();
    allowStringsInSwitch = source.allowStringsInSwitch();
    sourceName = source.name;
    relax = (options.isSet("-retrofit") ||
             options.isSet("-relax"));
    findDiamonds = options.get("findDiamond") != null &&
             source.allowDiamond();
    useBeforeDeclarationWarning = options.isSet("useBeforeDeclarationWarning");
}
 
Example 11
Source File: Lower.java    From lua-for-android with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
protected Lower(Context context) {
    context.put(lowerKey, this);
    names = Names.instance(context);
    log = Log.instance(context);
    syms = Symtab.instance(context);
    rs = Resolve.instance(context);
    operators = Operators.instance(context);
    chk = Check.instance(context);
    attr = Attr.instance(context);
    make = TreeMaker.instance(context);
    writer = ClassWriter.instance(context);
    cfolder = ConstFold.instance(context);
    target = Target.instance(context);
    source = Source.instance(context);
    typeEnvs = TypeEnvs.instance(context);
    dollarAssertionsDisabled = names.
        fromString(target.syntheticNameChar() + "assertionsDisabled");
    classDollar = names.
        fromString("class" + target.syntheticNameChar());
    dollarCloseResource = names.
        fromString(target.syntheticNameChar() + "closeResource");

    types = Types.instance(context);
    Options options = Options.instance(context);
    debugLower = options.isSet("debuglower");
    pkginfoOpt = PkgInfo.get(options);
}
 
Example 12
Source File: Attr.java    From javaide with GNU General Public License v3.0 5 votes vote down vote up
protected Attr(Context context) {
    context.put(attrKey, this);

    names = Names.instance(context);
    log = Log.instance(context);
    syms = Symtab.instance(context);
    rs = Resolve.instance(context);
    chk = Check.instance(context);
    memberEnter = MemberEnter.instance(context);
    make = TreeMaker.instance(context);
    enter = Enter.instance(context);
    infer = Infer.instance(context);
    cfolder = ConstFold.instance(context);
    target = Target.instance(context);
    types = Types.instance(context);
    diags = JCDiagnostic.Factory.instance(context);
    annotate = Annotate.instance(context);
    deferredLintHandler = DeferredLintHandler.instance(context);

    Options options = Options.instance(context);

    Source source = Source.instance(context);
    allowGenerics = source.allowGenerics();
    allowVarargs = source.allowVarargs();
    allowEnums = source.allowEnums();
    allowBoxing = source.allowBoxing();
    allowCovariantReturns = source.allowCovariantReturns();
    allowAnonOuterThis = source.allowAnonOuterThis();
    allowStringsInSwitch = source.allowStringsInSwitch();
    sourceName = source.name;
    relax = (options.isSet("-retrofit") ||
             options.isSet("-relax"));
    findDiamonds = options.get("findDiamond") != null &&
             source.allowDiamond();
    useBeforeDeclarationWarning = options.isSet("useBeforeDeclarationWarning");
}
 
Example 13
Source File: Lower.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
protected Lower(Context context) {
    context.put(lowerKey, this);
    names = Names.instance(context);
    log = Log.instance(context);
    syms = Symtab.instance(context);
    rs = Resolve.instance(context);
    operators = Operators.instance(context);
    chk = Check.instance(context);
    attr = Attr.instance(context);
    make = TreeMaker.instance(context);
    writer = ClassWriter.instance(context);
    cfolder = ConstFold.instance(context);
    target = Target.instance(context);
    source = Source.instance(context);
    typeEnvs = TypeEnvs.instance(context);
    dollarAssertionsDisabled = names.
        fromString(target.syntheticNameChar() + "assertionsDisabled");
    classDollar = names.
        fromString("class" + target.syntheticNameChar());
    dollarCloseResource = names.
        fromString(target.syntheticNameChar() + "closeResource");

    types = Types.instance(context);
    Options options = Options.instance(context);
    debugLower = options.isSet("debuglower");
    pkginfoOpt = PkgInfo.get(options);
}
 
Example 14
Source File: Check.java    From lua-for-android with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
protected Check(Context context) {
    context.put(checkKey, this);

    names = Names.instance(context);
    dfltTargetMeta = new Name[] { names.PACKAGE, names.TYPE,
        names.FIELD, names.METHOD, names.CONSTRUCTOR,
        names.ANNOTATION_TYPE, names.LOCAL_VARIABLE, names.PARAMETER};
    log = Log.instance(context);
    rs = Resolve.instance(context);
    syms = Symtab.instance(context);
    enter = Enter.instance(context);
    deferredAttr = DeferredAttr.instance(context);
    infer = Infer.instance(context);
    types = Types.instance(context);
    typeAnnotations = TypeAnnotations.instance(context);
    diags = JCDiagnostic.Factory.instance(context);
    Options options = Options.instance(context);
    lint = Lint.instance(context);
    fileManager = context.get(JavaFileManager.class);

    source = Source.instance(context);
    allowSimplifiedVarargs = source.allowSimplifiedVarargs();
    allowDefaultMethods = source.allowDefaultMethods();
    allowStrictMethodClashCheck = source.allowStrictMethodClashCheck();
    allowPrivateSafeVarargs = source.allowPrivateSafeVarargs();
    allowDiamondWithAnonymousClassCreation = source.allowDiamondWithAnonymousClassCreation();
    warnOnAnyAccessToMembers = options.isSet("warnOnAccessToMembers");

    Target target = Target.instance(context);
    syntheticNameChar = target.syntheticNameChar();

    profile = Profile.instance(context);

    boolean verboseDeprecated = lint.isEnabled(LintCategory.DEPRECATION);
    boolean verboseRemoval = lint.isEnabled(LintCategory.REMOVAL);
    boolean verboseUnchecked = lint.isEnabled(LintCategory.UNCHECKED);
    boolean enforceMandatoryWarnings = true;

    deprecationHandler = new MandatoryWarningHandler(log, verboseDeprecated,
            enforceMandatoryWarnings, "deprecated", LintCategory.DEPRECATION);
    removalHandler = new MandatoryWarningHandler(log, verboseRemoval,
            enforceMandatoryWarnings, "removal", LintCategory.REMOVAL);
    uncheckedHandler = new MandatoryWarningHandler(log, verboseUnchecked,
            enforceMandatoryWarnings, "unchecked", LintCategory.UNCHECKED);
    sunApiHandler = new MandatoryWarningHandler(log, false,
            enforceMandatoryWarnings, "sunapi", null);

    deferredLintHandler = DeferredLintHandler.instance(context);
}