Skip to content

Commit

Permalink
Issue #2035: Only emit @annotations when we're bootstrapping.
Browse files Browse the repository at this point in the history
  • Loading branch information
tombentley committed Feb 4, 2015
1 parent 84910ba commit a4b2606
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -94,6 +94,7 @@
import com.sun.tools.javac.code.Symtab;
import com.sun.tools.javac.code.Type;
import com.sun.tools.javac.code.TypeTags;
import com.sun.tools.javac.main.OptionName;
import com.sun.tools.javac.tree.JCTree;
import com.sun.tools.javac.tree.JCTree.Factory;
import com.sun.tools.javac.tree.JCTree.JCAnnotation;
Expand All @@ -119,6 +120,7 @@
import com.sun.tools.javac.util.Log;
import com.sun.tools.javac.util.Name;
import com.sun.tools.javac.util.Names;
import com.sun.tools.javac.util.Options;
import com.sun.tools.javac.util.Position;
import com.sun.tools.javac.util.Position.LineMap;

Expand Down Expand Up @@ -148,6 +150,8 @@ protected boolean printQualifier() {
private Stack<java.util.List<TypeParameter>> typeParameterSubstitutions = new Stack<java.util.List<TypeParameter>>();
protected Map<String, Long> omittedModelAnnotations;

private boolean isBootstrap;

public AbstractTransformer(Context context) {
this.context = context;
make = TreeMaker.instance(context);
Expand All @@ -157,6 +161,7 @@ public AbstractTransformer(Context context) {
typeFact = TypeFactory.instance(context);
log = CeylonLog.instance(context);
naming = Naming.instance(context);
isBootstrap = Options.instance(context).get(OptionName.BOOTSTRAPCEYLON) != null;
}

Context getContext() {
Expand Down Expand Up @@ -2974,7 +2979,7 @@ Long getModelModifierMask(Annotation annotation) {
}

List<JCAnnotation> makeAtAnnotations(java.util.List<Annotation> annotations) {
if(annotations == null || annotations.isEmpty())
if(!isBootstrap || annotations == null || annotations.isEmpty())
return List.nil();
long modifiers = 0;
ListBuffer<JCExpression> array = new ListBuffer<JCTree.JCExpression>();
Expand Down

0 comments on commit a4b2606

Please sign in to comment.