Mercurial > hg > truffle
diff src/share/vm/graal/graalCompilerToVM.cpp @ 7002:74f0207b82f5
fixed bug in bytecode reconstitution
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 22 Nov 2012 12:56:52 +0100 |
parents | bf2ea3ed3bce |
children | 6838696d54ac |
line wrap: on
line diff
--- a/src/share/vm/graal/graalCompilerToVM.cpp Wed Nov 21 23:36:06 2012 +0100 +++ b/src/share/vm/graal/graalCompilerToVM.cpp Thu Nov 22 12:56:52 2012 +0100 @@ -99,7 +99,7 @@ assert(i < method->constants()->length(), "sanity check"); Bytes::put_Java_u2((address) reconstituted_code + bci + 1, (u2)i); } else if (opcode == Bytecodes::_fast_aldc) { - int cpci = reconstituted_code[bci + 1]; + int cpci = reconstituted_code[bci + 1] & 0xff; int i = method->constants()->object_to_cp_index(cpci); assert(i < method->constants()->length(), "sanity check"); reconstituted_code[bci + 1] = (jbyte)i; @@ -398,8 +398,7 @@ assert(obj->is_instance(), "must be an instance"); result = VMToCompiler::createConstantObject(obj, CHECK_NULL); } else { - tty->print("unknown constant pool tag at cpi %d in %s: ", index, cp->pool_holder()->name()->as_C_string()); - tag.print_on(tty); + tty->print("unknown constant pool tag (%s) at cpi %d in %s: ", tag.internal_name(), index, cp->pool_holder()->name()->as_C_string()); ShouldNotReachHere(); }