/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* WARNING: The contents of this source file are not part of any
* supported API. Code that depends on them does so at its own risk:
* they are subject to change or removal without notice.
*/
public
/**
* Constructor
*/
super(VARDECLARATION, where);
}
super(VARDECLARATION, where);
}
/**
* Check statement
*/
}
&& field.isInnerClass()) {
}
if (field.isInnerClass()) {
try {
} catch (ClassNotFound ee) {
}
return vset;
}
}
// Argument 'expr' is either an IdentifierExpression for a declaration of
// the form 'type x' or an AssignmentExpression for a declaration of the
// form 'type x = initvalue'. Note that these expressions are treated
// specially in this context, and don't have much connection to their ordinary
// meaning.
Expression e = expr;
e = ((AssignExpression)e).left;
} else {
}
while (e.op == ARRAYACCESS) {
declError = true;
}
}
}
if (field.isConstant()) {
// Keep in mind that isConstant() only means expressions
// that are constant according to the JLS. They might
// not be either constants or evaluable (eg. 1/0).
}
} else if (declError) {
} else {
}
return vset;
}
return vset;
}
/**
* Inline
*/
if (field.isInnerClass()) {
return null;
}
// Don't generate code for variable if unused and
// optimization is on, whether or not debugging is on
}
// This code looks like it tests whether a final variable
// is being initialized by an identifier expression.
// Then if the identifier is a local of the same method
// it makes the final variable eligible to be inlined.
// BUT: why isn't the local also checked to make sure
// it is itself final? Unknown.
//System.out.println("FINAL IDENT = " + field + " in " + ctx.field);
// The two lines below used to elide the declaration
// of inlineable variables, on the theory that there
// wouldn't be any references. But this breaks the
// translation of nested classes, which might refer to
// the variable.
//expr = null;
//return null;
}
}
//System.out.println("FINAL = " + field + " in " + ctx.field);
// The two lines below used to elide the declaration
// of inlineable variables, on the theory that there
// wouldn't be any references. But this breaks the
// translation of nested classes, which might refer to
// the variable. Fix for 4073244.
//expr = null;
//return null;
}
}
}
return this;
}
/**
* Create a copy of the statement for method inlining
*/
}
return s;
}
/**
* The cost of inlining this statement
*/
return thresh; // don't copy classes...
}
}
/**
* Code
*/
// The two lines of code directly following this comment used
// to be in the opposite order. They were switched so that
// lines like the following:
//
// int j = (j = 4);
//
// will compile correctly. (Constructions like the above are
// legal. JLS 14.3.2 says that the scope of a local variable
// includes its own initializer.) It is important that we
// declare `field' before we code `expr', because otherwise
// situations can arise where `field' thinks it is assigned
// a local variable slot that is, in actuality, assigned to
// an entirely different variable. (Bug id 4076729)
} else {
// an initial side effect, rather than an initial value
}
}
}
/**
* Print
*/
}
} else {
}
}
}