/** The name of the access method with number `anum' and access code `acode'. */ Name accessName(int anum, int acode) { return names.fromString( "access" + target.syntheticNameChar() + anum + acode / 10 + acode % 10); }
/** Beginning in 1.4, we take advantage of the possibility of emitting * code to initialize fields before calling the superclass constructor. * This is allowed by the VM spec, but the verifier refused to allow * it until 1.4. This is necesary to translate some code involving * inner classes. See, for example, 4030374. */ public boolean initializeFieldsBeforeSuper() { return compareTo(JDK1_4) >= 0; }
rs = Resolve.instance(context); make = TreeMaker.instance(context); target = Target.instance(context); types = Types.instance(context); methodType = new MethodType(null, null, null, syms.methodClass); allowGenerics = Source.instance(context).allowGenerics(); stringBufferType = target.useStringBuilder() ? syms.stringBuilderType : syms.stringBufferType; stringBufferAppend = new HashMap<Type,Symbol>(); accessDollar = names. fromString("access" + target.syntheticNameChar()); target.requiresIproxy() || options.get("miranda") != null; if (target.generateStackMapTable()) { if (target.generateCLDCStackmap()) { this.stackMap = StackMapFormat.CLDC; } else {
return sym; Symbol qualifier = target.arrayBinaryCompatibility() ? new ClassSymbol(Flags.PUBLIC, site.tsym.name, site, syms.noSymbol) return sym; if (!target.obeyBinaryCompatibility()) return rs.isAccessible(attrEnv, (TypeSymbol)sym.owner) ? sym : sym.clone(site.tsym); if (!target.interfaceFieldsBinaryCompatibility()) { if ((sym.owner.flags() & INTERFACE) != 0 && sym.kind == VAR) return sym; return sym; if (!target.interfaceObjectOverridesBinaryCompatibility()) { if ((sym.owner.flags() & INTERFACE) != 0 && syms.objectType.tsym.members().lookup(sym.name).scope != null)
if (target.classLiteralsNoInit()) { names.fromString("cl" + target.syntheticNameChar()), syms.classLoaderType, outerCacheClass); if (target.hasInitCause()) {
protected Lower(Context context) { context.put(lowerKey, this); names = Name.Table.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.get("debuglower") != null; }
names = Name.Table.instance( ctx ); reader = ClassReader.instance( ctx ); target = Target.instance( ctx ); chk = Check.instance( ctx ); syms = Symtab.instance( ctx );
/** Box up a single primitive expression. */ JCExpression boxPrimitive(JCExpression tree, Type box) { make_at(tree.pos()); if (target.boxWithConstructors()) { Symbol ctor = lookupConstructor(tree.pos(), box, List.<Type>nil() .prepend(tree.type)); return make.Create(ctor, List.of(tree)); } else { Symbol valueOfSym = lookupMethod(tree.pos(), names.valueOf, box, List.<Type>nil() .prepend(tree.type)); return make.App(make.QualIdent(valueOfSym), List.of(tree)); } }
options.isUnset(Option.XDIAGS) && options.isUnset("rawDiagnostics"); verboseResolutionMode = VerboseResolutionMode.getVerboseResolutionMode(options); Target target = Target.instance(context); allowMethodHandles = target.hasMethodHandles(); allowDefaultMethods = source.allowDefaultMethods(); allowStructuralMostSpecific = source.allowStructuralMostSpecific();
j += (target.generateEmptyAfterBig() ? 1 : Code.width(frame.locals[j]))) { localCount++; databuf.appendChar(localCount); for (int j=0; j<frame.locals.length; j += (target.generateEmptyAfterBig() ? 1 : Code.width(frame.locals[j]))) { if (debugstackmap) System.out.print(" local[" + j + "]="); writeStackMapType(frame.locals[j]); j += (target.generateEmptyAfterBig() ? 1 : Code.width(frame.stack[j]))) { stackCount++; databuf.appendChar(stackCount); for (int j=0; j<frame.stack.length; j += (target.generateEmptyAfterBig() ? 1 : Code.width(frame.stack[j]))) { if (debugstackmap) System.out.print(" stack[" + j + "]="); writeStackMapType(frame.stack[j]);
rs = Resolve.instance(context); make = TreeMaker.instance(context); target = Target.instance(context); types = Types.instance(context); methodType = new MethodType(null, null, null, syms.methodClass); allowGenerics = Source.instance(context).allowGenerics(); stringBufferType = target.useStringBuilder() ? syms.stringBuilderType : syms.stringBufferType; stringBufferAppend = new HashMap<Type,Symbol>(); accessDollar = names. fromString("access" + target.syntheticNameChar()); target.requiresIproxy() || options.get("miranda") != null; if (target.generateStackMapTable()) { if (target.generateCLDCStackmap()) { this.stackMap = StackMapFormat.CLDC; } else {
return sym; Symbol qualifier = target.arrayBinaryCompatibility() ? new ClassSymbol(Flags.PUBLIC, site.tsym.name, site, syms.noSymbol) return sym; if (!target.obeyBinaryCompatibility()) return rs.isAccessible(attrEnv, (TypeSymbol)sym.owner) ? sym : sym.clone(site.tsym); if (!target.interfaceFieldsBinaryCompatibility()) { if ((sym.owner.flags() & INTERFACE) != 0 && sym.kind == VAR) return sym; return sym; if (!target.interfaceObjectOverridesBinaryCompatibility()) { if ((sym.owner.flags() & INTERFACE) != 0 && syms.objectType.tsym.members().lookup(sym.name).scope != null)
if (target.classLiteralsNoInit()) { names.fromString("cl" + target.syntheticNameChar()), syms.classLoaderType, outerCacheClass); if (target.hasInitCause()) {
protected Lower(Context context) { context.put(lowerKey, this); names = Name.Table.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.get("debuglower") != null; }
/** Construct a class writer, given an options table. */ private ClassWriter(Context context) { context.put(classWriterKey, this); log = Log.instance(context); names = Name.Table.instance(context); syms = Symtab.instance(context); options = Options.instance(context); target = Target.instance(context); source = Source.instance(context); types = Types.instance(context); fileManager = context.get(JavaFileManager.class); verbose = options.get("-verbose") != null; scramble = options.get("-scramble") != null; scrambleAll = options.get("-scrambleAll") != null; retrofit = options.get("-retrofit") != null; genCrt = options.get("-Xjcov") != null; debugstackmap = options.get("debugstackmap") != null; emitSourceFile = options.get("-g:")==null || options.get("-g:source")!=null; String dumpModFlags = options.get("dumpmodifiers"); dumpClassModifiers = (dumpModFlags != null && dumpModFlags.indexOf('c') != -1); dumpFieldModifiers = (dumpModFlags != null && dumpModFlags.indexOf('f') != -1); dumpInnerClassModifiers = (dumpModFlags != null && dumpModFlags.indexOf('i') != -1); dumpMethodModifiers = (dumpModFlags != null && dumpModFlags.indexOf('m') != -1); }
/** Box up a single primitive expression. */ JCExpression boxPrimitive(JCExpression tree, Type box) { make_at(tree.pos()); if (target.boxWithConstructors()) { Symbol ctor = lookupConstructor(tree.pos(), box, List.<Type>nil() .prepend(tree.type)); return make.Create(ctor, List.of(tree)); } else { Symbol valueOfSym = lookupMethod(tree.pos(), names.valueOf, box, List.<Type>nil() .prepend(tree.type)); return make.App(make.QualIdent(valueOfSym), List.of(tree)); } }
options.isUnset(Option.XDIAGS) && options.isUnset("rawDiagnostics"); verboseResolutionMode = VerboseResolutionMode.getVerboseResolutionMode(options); Target target = Target.instance(context); allowMethodHandles = target.hasMethodHandles(); allowFunctionalInterfaceMostSpecific = source.allowFunctionalInterfaceMostSpecific(); checkVarargsAccessAfterResolution =
j += (target.generateEmptyAfterBig() ? 1 : Code.width(frame.locals[j]))) { localCount++; databuf.appendChar(localCount); for (int j=0; j<frame.locals.length; j += (target.generateEmptyAfterBig() ? 1 : Code.width(frame.locals[j]))) { if (debugstackmap) System.out.print(" local[" + j + "]="); writeStackMapType(frame.locals[j]); j += (target.generateEmptyAfterBig() ? 1 : Code.width(frame.stack[j]))) { stackCount++; databuf.appendChar(stackCount); for (int j=0; j<frame.stack.length; j += (target.generateEmptyAfterBig() ? 1 : Code.width(frame.stack[j]))) { if (debugstackmap) System.out.print(" stack[" + j + "]="); writeStackMapType(frame.stack[j]);