equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
92 Types types; |
92 Types types; |
93 JCDiagnostic.Factory diags; |
93 JCDiagnostic.Factory diags; |
94 public final boolean allowMethodHandles; |
94 public final boolean allowMethodHandles; |
95 public final boolean allowFunctionalInterfaceMostSpecific; |
95 public final boolean allowFunctionalInterfaceMostSpecific; |
96 public final boolean checkVarargsAccessAfterResolution; |
96 public final boolean checkVarargsAccessAfterResolution; |
97 private final boolean debugResolve; |
|
98 private final boolean compactMethodDiags; |
97 private final boolean compactMethodDiags; |
99 final EnumSet<VerboseResolutionMode> verboseResolutionMode; |
98 final EnumSet<VerboseResolutionMode> verboseResolutionMode; |
100 |
99 |
101 WriteableScope polymorphicSignatureScope; |
100 WriteableScope polymorphicSignatureScope; |
102 |
101 |
118 finder = ClassFinder.instance(context); |
117 finder = ClassFinder.instance(context); |
119 types = Types.instance(context); |
118 types = Types.instance(context); |
120 diags = JCDiagnostic.Factory.instance(context); |
119 diags = JCDiagnostic.Factory.instance(context); |
121 Source source = Source.instance(context); |
120 Source source = Source.instance(context); |
122 Options options = Options.instance(context); |
121 Options options = Options.instance(context); |
123 debugResolve = options.isSet("debugresolve"); |
|
124 compactMethodDiags = options.isSet(Option.XDIAGS, "compact") || |
122 compactMethodDiags = options.isSet(Option.XDIAGS, "compact") || |
125 options.isUnset(Option.XDIAGS) && options.isUnset("rawDiagnostics"); |
123 options.isUnset(Option.XDIAGS) && options.isUnset("rawDiagnostics"); |
126 verboseResolutionMode = VerboseResolutionMode.getVerboseResolutionMode(options); |
124 verboseResolutionMode = VerboseResolutionMode.getVerboseResolutionMode(options); |
127 Target target = Target.instance(context); |
125 Target target = Target.instance(context); |
128 allowMethodHandles = target.hasMethodHandles(); |
126 allowMethodHandles = target.hasMethodHandles(); |
3895 |
3893 |
3896 AccessError(Env<AttrContext> env, Type site, Symbol sym) { |
3894 AccessError(Env<AttrContext> env, Type site, Symbol sym) { |
3897 super(HIDDEN, sym, "access error"); |
3895 super(HIDDEN, sym, "access error"); |
3898 this.env = env; |
3896 this.env = env; |
3899 this.site = site; |
3897 this.site = site; |
3900 if (debugResolve) |
|
3901 log.error("proc.messager", sym + " @ " + site + " is inaccessible."); |
|
3902 } |
3898 } |
3903 |
3899 |
3904 @Override |
3900 @Override |
3905 public boolean exists() { |
3901 public boolean exists() { |
3906 return false; |
3902 return false; |