Request for review (M): 6998541: JSR 292 implement missing return-type conversion for OP_RETYPE_RAW (original) (raw)
Tom Rodriguez tom.rodriguez at oracle.com
Wed May 11 09:25:25 PDT 2011
- Previous message: Request for review (M): 6998541: JSR 292 implement missing return-type conversion for OP_RETYPE_RAW
- Next message: Request for review (M): 6998541: JSR 292 implement missing return-type conversion for OP_RETYPE_RAW
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On May 11, 2011, at 9:16 AM, Christian Thalinger wrote:
On May 11, 2011, at 5:36 PM, Tom Rodriguez wrote:
methodHandleWalk.cpp:
There are two copies of the retype code. Can that be factored out? Well, they are slightly different (changeargument vs. makeinvoke) and the conversion for return types has still an Untested in there since I couldn't produce a test case to trigger that.
Oh I missed that difference.
I can factor it with a bool forreturn argument if that's better.
If it factors cleanly that would be nice.
This doesn't seem right. 2 becomes false but 1 becomes true? + case TBOOLEAN: { + jvalue onejvalue; onejvalue.i = 1; + ArgToken one = makeprimconstant(TINT, &onejvalue, CHECK(zero)); + emitloadconstant(one); + emitbc(Bytecodes::iand); + break; + } I just asked John and that's how JSR 292 defines narrowing conversions to boolean. That's how the interpreter does it and I mimic that in the compiler.
A little comment on it might be nice since it just seems so wrong.
tom
Put these on separate lines ! Symbol* name; Symbol* sig; Done. -- Christian Otherwise it looks good. tom
On May 11, 2011, at 3:42 AM, Christian Thalinger wrote: http://cr.openjdk.java.net/~twisti/6998541 6998541: JSR 292 implement missing return-type conversion for OPRETYPERAW Reviewed-by: jrose There is an unimplemented path in the MethodHandleWalker for OPRETYPERAW return-type conversions. This change also includes a couple of x86 fixes found by John Rose, removes the check for genericInvoker on x86 and SPARC and some miscellaneous fixes (e.g. MethodHandlePrinter output). There is also a test for the type conversions which will be pushed later into the JDK 7 repository. src/cpu/sparc/vm/methodHandlessparc.cpp src/cpu/x86/vm/methodHandlesx86.cpp src/share/vm/prims/methodHandleWalk.cpp src/share/vm/prims/methodHandleWalk.hpp src/share/vm/prims/methodHandles.cpp src/share/vm/prims/methodHandles.hpp
- Previous message: Request for review (M): 6998541: JSR 292 implement missing return-type conversion for OP_RETYPE_RAW
- Next message: Request for review (M): 6998541: JSR 292 implement missing return-type conversion for OP_RETYPE_RAW
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the hotspot-compiler-dev mailing list