/*
* 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
*/
}
/**
* Check statement
*/
try {
// Check 'try' block. A variable is DA (DU) before the try
// block if it is DA (DU) before the try statement.
// A variable is DA before a catch block if it is DA before the
// try statement. A variable is DU before a catch block if it
// is DU after the try block and before any 'break', 'continue',
// 'throw', or 'return' contained therein. That is, the variable
// is DU upon entry to the try-statement and is not assigned to
// anywhere within the try block.
// A variable is DA (DU) after a try statement if
// it is DA (DU) after every catch block.
}
// Check that catch statements are actually reached
continue;
}
for (int j = 0 ; j < i ; j++) {
continue;
}
break;
}
}
}
// Make sure the exception is actually throw in that part of the code
continue;
}
// CatchStatement.checkValue() will have already printed
// an error message
continue;
}
// Anyone can throw these!
continue;
}
// Make sure the exception is actually throw in that part of the code
boolean ok = false;
ok = true;
break;
}
}
}
if (!ok) {
}
}
// Only carry over exceptions that are not caught
boolean add = true;
continue;
}
continue;
add = false;
break;
}
}
if (add) {
}
}
// A variable is DA (DU) after a try statement if it is DA (DU)
// after the try block and after every catch block. These variables
// are represented by 'vs'. If the try statement is labelled, we
// may also exit from it (including from within a catch block) via
// a break statement.
// If there is a finally block, the Vset returned here is further
// adjusted. Note that this 'TryStatement' node will be a child of
// a 'FinallyStatement' node in that case.
} catch (ClassNotFound e) {
return vset;
}
}
/**
* Inline
*/
}
return null;
}
}
}
}
/**
* Create a copy of the statement for method inlining
*/
}
}
}
return s;
}
/**
* Compute cost of inlining this statement
*/
// Don't inline methods containing try statements.
// If the try statement is being inlined in order to
// inline a method that returns a value which is
// a subexpression of an expression involving the
// operand stack, then the early operands may get lost.
// This shows up as a verifier error. For example,
// in the following:
//
// public static int test() {
// try { return 2; } catch (Exception e) { return 0; }
// }
//
// System.out.println(test());
//
// an inlined call to test() might look like this:
//
// 0 getstatic <Field java.io.PrintStream out>
// 3 iconst_2
// 4 goto 9
// 7 pop
// 8 iconst_0
// 9 invokevirtual <Method void println(int)>
// 12 return
// Exception table:
// from to target type
// 3 7 7 <Class java.lang.Exception>
//
// This fails to verify because the operand stored
// for System.out gets axed at an exception, leading to
// an inconsistent stack depth at pc=7.
//
// Note that although all code must be able to be inlined
// to implement initializers, this problem doesn't come up,
// as try statements themselves can never be expressions.
// It suffices here to make sure they are never inlined as part
// of optimization.
return thresh;
}
/**
* Code
*/
} else {
}
}
}
}
}
/**
* Print
*/
} else {
}
}
}
}