src/share/classes/com/sun/tools/javac/jvm/Code.java

changeset 2303
dac1b0a17386
parent 2186
6e0f31d61e56
child 2406
372fd7283bf0
equal deleted inserted replaced
2302:f35effa10297 2303:dac1b0a17386
1 /* 1 /*
2 * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this 7 * published by the Free Software Foundation. Oracle designates this
2187 */ 2187 */
2188 void putVar(LocalVar var) { 2188 void putVar(LocalVar var) {
2189 // Keep local variables if 2189 // Keep local variables if
2190 // 1) we need them for debug information 2190 // 1) we need them for debug information
2191 // 2) it is an exception type and it contains type annotations 2191 // 2) it is an exception type and it contains type annotations
2192 if (!varDebugInfo && 2192 boolean keepLocalVariables = varDebugInfo ||
2193 (!var.sym.isExceptionParameter() || 2193 (var.sym.isExceptionParameter() && var.sym.hasTypeAnnotations());
2194 var.sym.hasTypeAnnotations())) return; 2194 if (!keepLocalVariables) return;
2195 if ((var.sym.flags() & Flags.SYNTHETIC) != 0) return; 2195 if ((var.sym.flags() & Flags.SYNTHETIC) != 0) return;
2196 if (varBuffer == null) 2196 if (varBuffer == null)
2197 varBuffer = new LocalVar[20]; 2197 varBuffer = new LocalVar[20];
2198 else 2198 else
2199 varBuffer = ArrayUtils.ensureCapacity(varBuffer, varBufferSize); 2199 varBuffer = ArrayUtils.ensureCapacity(varBuffer, varBufferSize);

mercurial