Extra calls to annotate.flush()
joel.franck at oracle.com
Wed Oct 2 10:19:52 PDT 2013
Hi Werner and others,
I noticed that 2 extra calls in MemberEnter to annotate.flush() were introduced with the first type annotation checkin:
692- annotateLater(tree.mods.annotations, localEnv, v, tree.pos());
693- typeAnnotate(tree.vartype, env, v, tree.pos());
695- v.pos = tree.pos;
1011- for (JCExpression impl : tree.implementing)
1012- typeAnnotate(impl, baseEnv, sym, tree.pos());
1015- // Determine supertype.
1080- for (JCTypeParameter tp : tree.typarams)
1081- typeAnnotate(tp, baseEnv, sym, tree.pos());
1084- // Add default constructor if needed.
Previously there were just one at the end of complete:
langtools jbf$ ag -B 2 -A 2 "annotate.flush()" src/
1054- // commit pending annotations
The fact that there are two in complete() seem unnecessary but isn't causing to much harm that I know of, but the extra one in visitVarDef is causing trouble.
Overall there seems to be a lot of extra calls to flush in type anno code, 6 extra added in the first merge from the type anno repo to tl:
hg log -p -r 1519 | ag annotate.flush
Do you know why so many were added?
More information about the type-annotations-dev