comparison src/share/vm/prims/methodHandleWalk.cpp @ 1793:d257356e35f0

6939224: MethodHandle.invokeGeneric needs to perform the correct set of conversions Reviewed-by: never
author jrose
date Mon, 13 Sep 2010 23:24:30 -0700
parents d5d065957597
children f95d63e2154a
comparison
equal deleted inserted replaced
1792:d20603ee9e10 1793:d257356e35f0
331 lose("no boxing method", CHECK_(empty)); 331 lose("no boxing method", CHECK_(empty));
332 } 332 }
333 ArgToken arglist[2]; 333 ArgToken arglist[2];
334 arglist[0] = arg; // outgoing value 334 arglist[0] = arg; // outgoing value
335 arglist[1] = ArgToken(); // sentinel 335 arglist[1] = ArgToken(); // sentinel
336 assert(false, "I think the argument count must be 1 instead of 0"); 336 arg = make_invoke(NULL, boxer, Bytecodes::_invokevirtual, false, 1, &arglist[0], CHECK_(empty));
337 arg = make_invoke(NULL, boxer, Bytecodes::_invokevirtual, false, 0, &arglist[0], CHECK_(empty));
338 change_argument(src, arg_slot, T_OBJECT, arg); 337 change_argument(src, arg_slot, T_OBJECT, arg);
339 break; 338 break;
340 } 339 }
341 340
342 case sun_dyn_AdapterMethodHandle::OP_SWAP_ARGS: { 341 case sun_dyn_AdapterMethodHandle::OP_SWAP_ARGS: {
1396 }; 1395 };
1397 #endif // 0 1396 #endif // 0
1398 1397
1399 extern "C" 1398 extern "C"
1400 void print_method_handle(oop mh) { 1399 void print_method_handle(oop mh) {
1401 if (java_dyn_MethodHandle::is_instance(mh)) { 1400 if (!mh->is_oop()) {
1401 tty->print_cr("*** not a method handle: "INTPTR_FORMAT, (intptr_t)mh);
1402 } else if (java_dyn_MethodHandle::is_instance(mh)) {
1402 //MethodHandlePrinter::print(mh); 1403 //MethodHandlePrinter::print(mh);
1403 } else { 1404 } else {
1404 tty->print("*** not a method handle: "); 1405 tty->print("*** not a method handle: ");
1405 mh->print(); 1406 mh->print();
1406 } 1407 }