44 import static com.sun.tools.javac.code.Flags.*; |
44 import static com.sun.tools.javac.code.Flags.*; |
45 import static com.sun.tools.javac.code.Kinds.*; |
45 import static com.sun.tools.javac.code.Kinds.*; |
46 import static com.sun.tools.javac.code.TypeTags.*; |
46 import static com.sun.tools.javac.code.TypeTags.*; |
47 import static com.sun.tools.javac.jvm.ByteCodes.*; |
47 import static com.sun.tools.javac.jvm.ByteCodes.*; |
48 import static com.sun.tools.javac.jvm.CRTFlags.*; |
48 import static com.sun.tools.javac.jvm.CRTFlags.*; |
|
49 import static com.sun.tools.javac.main.OptionName.*; |
49 |
50 |
50 /** This pass maps flat Java (i.e. without inner classes) to bytecodes. |
51 /** This pass maps flat Java (i.e. without inner classes) to bytecodes. |
51 * |
52 * |
52 * <p><b>This is NOT part of any supported API. |
53 * <p><b>This is NOT part of any supported API. |
53 * If you write code that depends on this, you do so at your own risk. |
54 * If you write code that depends on this, you do so at your own risk. |
111 accessDollar = names. |
112 accessDollar = names. |
112 fromString("access" + target.syntheticNameChar()); |
113 fromString("access" + target.syntheticNameChar()); |
113 |
114 |
114 Options options = Options.instance(context); |
115 Options options = Options.instance(context); |
115 lineDebugInfo = |
116 lineDebugInfo = |
116 options.get("-g:") == null || |
117 options.isUnset(G_CUSTOM) || |
117 options.get("-g:lines") != null; |
118 options.isSet(G_CUSTOM, "lines"); |
118 varDebugInfo = |
119 varDebugInfo = |
119 options.get("-g:") == null |
120 options.isUnset(G_CUSTOM) |
120 ? options.get("-g") != null |
121 ? options.isSet(G) |
121 : options.get("-g:vars") != null; |
122 : options.isSet(G_CUSTOM, "vars"); |
122 genCrt = options.get("-Xjcov") != null; |
123 genCrt = options.isSet(XJCOV); |
123 debugCode = options.get("debugcode") != null; |
124 debugCode = options.isSet("debugcode"); |
124 allowInvokedynamic = target.hasInvokedynamic() || options.get("invokedynamic") != null; |
125 allowInvokedynamic = target.hasInvokedynamic() || options.isSet("invokedynamic"); |
125 |
126 |
126 generateIproxies = |
127 generateIproxies = |
127 target.requiresIproxy() || |
128 target.requiresIproxy() || |
128 options.get("miranda") != null; |
129 options.isSet("miranda"); |
129 |
130 |
130 if (target.generateStackMapTable()) { |
131 if (target.generateStackMapTable()) { |
131 // ignore cldc because we cannot have both stackmap formats |
132 // ignore cldc because we cannot have both stackmap formats |
132 this.stackMap = StackMapFormat.JSR202; |
133 this.stackMap = StackMapFormat.JSR202; |
133 } else { |
134 } else { |