Mercurial > hg > graal-jvmci-8
comparison src/cpu/x86/vm/methodHandles_x86.cpp @ 1133:aa62b9388fce
6894206: JVM needs a way to traverse method handle structures
Summary: We need a way to walk chained method handles in the JVM to call the right methods and to generate required bytecode adapters for the compilers.
Reviewed-by: kvn
author | twisti |
---|---|
date | Mon, 04 Jan 2010 15:52:40 +0100 |
parents | 85f13cdfbc1d |
children | e66fd840cb6b |
comparison
equal
deleted
inserted
replaced
1131:40e7c1d24e4a | 1133:aa62b9388fce |
---|---|
266 // And adjust the argslot address to point at the deletion point. | 266 // And adjust the argslot address to point at the deletion point. |
267 __ lea(rax_argslot, Address(rax_argslot, arg_slots, Address::times_ptr)); | 267 __ lea(rax_argslot, Address(rax_argslot, arg_slots, Address::times_ptr)); |
268 } | 268 } |
269 | 269 |
270 #ifndef PRODUCT | 270 #ifndef PRODUCT |
271 extern "C" void print_method_handle(oop mh); | |
271 void trace_method_handle_stub(const char* adaptername, | 272 void trace_method_handle_stub(const char* adaptername, |
272 oopDesc* mh, | 273 oop mh, |
273 intptr_t* entry_sp, | 274 intptr_t* entry_sp, |
274 intptr_t* saved_sp, | 275 intptr_t* saved_sp, |
275 intptr_t* saved_bp) { | 276 intptr_t* saved_bp) { |
276 // called as a leaf from native code: do not block the JVM! | 277 // called as a leaf from native code: do not block the JVM! |
277 intptr_t* last_sp = (intptr_t*) saved_bp[frame::interpreter_frame_last_sp_offset]; | 278 intptr_t* last_sp = (intptr_t*) saved_bp[frame::interpreter_frame_last_sp_offset]; |
278 intptr_t* base_sp = (intptr_t*) saved_bp[frame::interpreter_frame_monitor_block_top_offset]; | 279 intptr_t* base_sp = (intptr_t*) saved_bp[frame::interpreter_frame_monitor_block_top_offset]; |
279 printf("MH %s mh="INTPTR_FORMAT" sp=("INTPTR_FORMAT"+"INTX_FORMAT") stack_size="INTX_FORMAT" bp="INTPTR_FORMAT"\n", | 280 printf("MH %s mh="INTPTR_FORMAT" sp=("INTPTR_FORMAT"+"INTX_FORMAT") stack_size="INTX_FORMAT" bp="INTPTR_FORMAT"\n", |
280 adaptername, (intptr_t)mh, (intptr_t)entry_sp, (intptr_t)(saved_sp - entry_sp), (intptr_t)(base_sp - last_sp), (intptr_t)saved_bp); | 281 adaptername, (intptr_t)mh, (intptr_t)entry_sp, (intptr_t)(saved_sp - entry_sp), (intptr_t)(base_sp - last_sp), (intptr_t)saved_bp); |
281 if (last_sp != saved_sp) | 282 if (last_sp != saved_sp) |
282 printf("*** last_sp="INTPTR_FORMAT"\n", (intptr_t)last_sp); | 283 printf("*** last_sp="INTPTR_FORMAT"\n", (intptr_t)last_sp); |
284 if (Verbose) print_method_handle(mh); | |
283 } | 285 } |
284 #endif //PRODUCT | 286 #endif //PRODUCT |
285 | 287 |
286 // Generate an "entry" field for a method handle. | 288 // Generate an "entry" field for a method handle. |
287 // This determines how the method handle will respond to calls. | 289 // This determines how the method handle will respond to calls. |