--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java Tue Jan 26 12:11:55 2016 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java Thu Jan 28 09:09:34 2016 +0530
@@ -2173,8 +2173,8 @@
}
public void visitTypeCast(JCTypeCast tree) {
+ result = genExpr(tree.expr, tree.clazz.type).load();
setTypeAnnotationPositions(tree.pos);
- result = genExpr(tree.expr, tree.clazz.type).load();
// Additional code is only needed if we cast to a reference type
// which is not statically a supertype of the expression's type.
// For basic types, the coerce(...) in genExpr(...) will do
@@ -2191,8 +2191,8 @@
}
public void visitTypeTest(JCInstanceOf tree) {
+ genExpr(tree.expr, tree.expr.type).load();
setTypeAnnotationPositions(tree.pos);
- genExpr(tree.expr, tree.expr.type).load();
code.emitop2(instanceof_, makeRef(tree.pos(), tree.clazz.type));
result = items.makeStackItem(syms.booleanType);
}