Mercurial > hg > shark > hotspot
changeset 2245:349b3dccd98b
Add some more (sketchy!) retyping
author | Gary Benson <gbenson@redhat.com> |
---|---|
date | Fri, 25 Feb 2011 12:22:28 +0000 |
parents | 102d593d8b3e |
children | 1b870e61aac1 |
files | src/cpu/zero/vm/cppInterpreter_zero.cpp |
diffstat | 1 files changed, 21 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/cpu/zero/vm/cppInterpreter_zero.cpp Fri Feb 25 12:15:45 2011 +0000 +++ b/src/cpu/zero/vm/cppInterpreter_zero.cpp Fri Feb 25 12:22:28 2011 +0000 @@ -909,14 +909,28 @@ // Adapt the result type, if necessary if (src_rtype != dst_rtype) { - if (src_rtype != T_VOID || dst_rtype != T_INT) { - tty->cr(); - tty->print_cr("src_rtype = %s", type2name(src_rtype)); - tty->print_cr("dst_rtype = %s", type2name(dst_rtype)); - tty->cr(); - Unimplemented(); + if (dst_rtype == T_INT) { + switch (src_rtype) { + case T_VOID: + // XXX check for overflow + // XXX what to push? + stack->push(0); + return; + + case T_BOOLEAN: + case T_CHAR: + case T_BYTE: + case T_SHORT: + // XXX should we be converting? + return; + } } - stack->push(0); // XXX what? + + tty->cr(); + tty->print_cr("src_rtype = %s", type2name(src_rtype)); + tty->print_cr("dst_rtype = %s", type2name(dst_rtype)); + tty->cr(); + Unimplemented(); } }