equal
deleted
inserted
replaced
1858 } |
1858 } |
1859 |
1859 |
1860 public void visitAssign(JCAssign tree) { |
1860 public void visitAssign(JCAssign tree) { |
1861 Item l = genExpr(tree.lhs, tree.lhs.type); |
1861 Item l = genExpr(tree.lhs, tree.lhs.type); |
1862 genExpr(tree.rhs, tree.lhs.type).load(); |
1862 genExpr(tree.rhs, tree.lhs.type).load(); |
|
1863 if (tree.rhs.type.hasTag(BOT)) { |
|
1864 /* This is just a case of widening reference conversion that per 5.1.5 simply calls |
|
1865 for "regarding a reference as having some other type in a manner that can be proved |
|
1866 correct at compile time." |
|
1867 */ |
|
1868 code.state.forceStackTop(tree.lhs.type); |
|
1869 } |
1863 result = items.makeAssignItem(l); |
1870 result = items.makeAssignItem(l); |
1864 } |
1871 } |
1865 |
1872 |
1866 public void visitAssignop(JCAssignOp tree) { |
1873 public void visitAssignop(JCAssignOp tree) { |
1867 OperatorSymbol operator = (OperatorSymbol) tree.operator; |
1874 OperatorSymbol operator = (OperatorSymbol) tree.operator; |
2270 } |
2277 } |
2271 |
2278 |
2272 public void visitLiteral(JCLiteral tree) { |
2279 public void visitLiteral(JCLiteral tree) { |
2273 if (tree.type.hasTag(BOT)) { |
2280 if (tree.type.hasTag(BOT)) { |
2274 code.emitop0(aconst_null); |
2281 code.emitop0(aconst_null); |
2275 if (types.dimensions(pt) > 1) { |
2282 result = items.makeStackItem(tree.type); |
2276 code.emitop2(checkcast, makeRef(tree.pos(), pt)); |
|
2277 result = items.makeStackItem(pt); |
|
2278 } else { |
|
2279 result = items.makeStackItem(tree.type); |
|
2280 } |
|
2281 } |
2283 } |
2282 else |
2284 else |
2283 result = items.makeImmediateItem(tree.type, tree.value); |
2285 result = items.makeImmediateItem(tree.type, tree.value); |
2284 } |
2286 } |
2285 |
2287 |