comparison src/cpu/x86/vm/methodHandles_x86.cpp @ 1507:cd5dbf694d45

6939134: JSR 292 adjustments to method handle invocation Summary: split MethodHandle.invoke into invokeExact and invokeGeneric; also clean up JVM-to-Java interfaces Reviewed-by: twisti
author jrose
date Sat, 01 May 2010 02:42:18 -0700
parents 2338d41fbd81
children c18cbe5936b8
comparison
equal deleted inserted replaced
1506:2338d41fbd81 1507:cd5dbf694d45
259 if (last_sp != saved_sp) 259 if (last_sp != saved_sp)
260 printf("*** last_sp="INTPTR_FORMAT"\n", (intptr_t)last_sp); 260 printf("*** last_sp="INTPTR_FORMAT"\n", (intptr_t)last_sp);
261 if (Verbose) print_method_handle(mh); 261 if (Verbose) print_method_handle(mh);
262 } 262 }
263 #endif //PRODUCT 263 #endif //PRODUCT
264
265 // which conversion op types are implemented here?
266 int MethodHandles::adapter_conversion_ops_supported_mask() {
267 return ((1<<sun_dyn_AdapterMethodHandle::OP_RETYPE_ONLY)
268 |(1<<sun_dyn_AdapterMethodHandle::OP_RETYPE_RAW)
269 |(1<<sun_dyn_AdapterMethodHandle::OP_CHECK_CAST)
270 |(1<<sun_dyn_AdapterMethodHandle::OP_PRIM_TO_PRIM)
271 |(1<<sun_dyn_AdapterMethodHandle::OP_REF_TO_PRIM)
272 |(1<<sun_dyn_AdapterMethodHandle::OP_SWAP_ARGS)
273 |(1<<sun_dyn_AdapterMethodHandle::OP_ROT_ARGS)
274 |(1<<sun_dyn_AdapterMethodHandle::OP_DUP_ARGS)
275 |(1<<sun_dyn_AdapterMethodHandle::OP_DROP_ARGS)
276 //|(1<<sun_dyn_AdapterMethodHandle::OP_SPREAD_ARGS) //BUG!
277 );
278 // FIXME: MethodHandlesTest gets a crash if we enable OP_SPREAD_ARGS.
279 }
264 280
265 // Generate an "entry" field for a method handle. 281 // Generate an "entry" field for a method handle.
266 // This determines how the method handle will respond to calls. 282 // This determines how the method handle will respond to calls.
267 void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHandles::EntryKind ek) { 283 void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHandles::EntryKind ek) {
268 // Here is the register state during an interpreted call, 284 // Here is the register state during an interpreted call,