Mercurial > hg > jdk9-shenandoah > langtools
changeset 2907:fc00bb06172c
8079335: The field Gen.stringBufferType is no longer needed (and not always initialized properly)
Summary: Removed Gen.stringBufferType field.
Reviewed-by: jlahoda, mcimadamore
author | alundblad |
---|---|
date | Tue, 05 May 2015 15:47:38 +0200 |
parents | e847f2a2c3d0 |
children | 67ae665c791e |
files | src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java |
diffstat | 1 files changed, 4 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java Tue Apr 28 15:20:25 2015 +0530 +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java Tue May 05 15:47:38 2015 +0200 @@ -69,7 +69,6 @@ private final TreeMaker make; private final Names names; private final Target target; - private final Type stringBufferType; private final Map<Type,Symbol> stringBufferAppend; private Name accessDollar; private final Types types; @@ -107,7 +106,6 @@ target = Target.instance(context); types = Types.instance(context); methodType = new MethodType(null, null, null, syms.methodClass); - stringBufferType = syms.stringBuilderType; stringBufferAppend = new HashMap<>(); accessDollar = names. fromString("access" + target.syntheticNameChar()); @@ -2070,10 +2068,10 @@ /** Make a new string buffer. */ void makeStringBuffer(DiagnosticPosition pos) { - code.emitop2(new_, makeRef(pos, stringBufferType)); + code.emitop2(new_, makeRef(pos, syms.stringBuilderType)); code.emitop0(dup); callMethod( - pos, stringBufferType, names.init, List.<Type>nil(), false); + pos, syms.stringBuilderType, names.init, List.<Type>nil(), false); } /** Append value (on tos) to string buffer (on tos - 1). @@ -2091,7 +2089,7 @@ if (method == null) { method = rs.resolveInternalMethod(tree.pos(), attrEnv, - stringBufferType, + syms.stringBuilderType, names.append, List.of(t), null); @@ -2122,7 +2120,7 @@ void bufferToString(DiagnosticPosition pos) { callMethod( pos, - stringBufferType, + syms.stringBuilderType, names.toString, List.<Type>nil(), false);