1.1 --- a/src/share/vm/c1/c1_LIR.hpp Mon Mar 08 04:46:30 2010 -0800 1.2 +++ b/src/share/vm/c1/c1_LIR.hpp Tue Mar 09 20:16:19 2010 +0100 1.3 @@ -840,6 +840,7 @@ 1.4 , lir_optvirtual_call 1.5 , lir_icvirtual_call 1.6 , lir_virtual_call 1.7 + , lir_dynamic_call 1.8 , end_opJavaCall 1.9 , begin_opArrayCopy 1.10 , lir_arraycopy 1.11 @@ -1052,6 +1053,16 @@ 1.12 LIR_Opr receiver() const { return _receiver; } 1.13 ciMethod* method() const { return _method; } 1.14 1.15 + // JSR 292 support. 1.16 + bool is_invokedynamic() const { return code() == lir_dynamic_call; } 1.17 + bool is_method_handle_invoke() const { 1.18 + return 1.19 + is_invokedynamic() // An invokedynamic is always a MethodHandle call site. 1.20 + || 1.21 + (method()->holder()->name() == ciSymbol::java_dyn_MethodHandle() && 1.22 + method()->name() == ciSymbol::invoke_name()); 1.23 + } 1.24 + 1.25 intptr_t vtable_offset() const { 1.26 assert(_code == lir_virtual_call, "only have vtable for real vcall"); 1.27 return (intptr_t) addr(); 1.28 @@ -1766,6 +1777,10 @@ 1.29 intptr_t vtable_offset, LIR_OprList* arguments, CodeEmitInfo* info) { 1.30 append(new LIR_OpJavaCall(lir_virtual_call, method, receiver, result, vtable_offset, arguments, info)); 1.31 } 1.32 + void call_dynamic(ciMethod* method, LIR_Opr receiver, LIR_Opr result, 1.33 + address dest, LIR_OprList* arguments, CodeEmitInfo* info) { 1.34 + append(new LIR_OpJavaCall(lir_dynamic_call, method, receiver, result, dest, arguments, info)); 1.35 + } 1.36 1.37 void get_thread(LIR_Opr result) { append(new LIR_Op0(lir_get_thread, result)); } 1.38 void word_align() { append(new LIR_Op0(lir_word_align)); }