comparison src/share/vm/c1/c1_LIR.hpp @ 1295:3cf667df43ef

6919934: JSR 292 needs to support x86 C1 Summary: This implements JSR 292 support for C1 x86. Reviewed-by: never, jrose, kvn
author twisti
date Tue, 09 Mar 2010 20:16:19 +0100
parents 614b7e3a9f48
children c466efa608d5
comparison
equal deleted inserted replaced
1293:51db1e4b379d 1295:3cf667df43ef
838 , begin_opJavaCall 838 , begin_opJavaCall
839 , lir_static_call 839 , lir_static_call
840 , lir_optvirtual_call 840 , lir_optvirtual_call
841 , lir_icvirtual_call 841 , lir_icvirtual_call
842 , lir_virtual_call 842 , lir_virtual_call
843 , lir_dynamic_call
843 , end_opJavaCall 844 , end_opJavaCall
844 , begin_opArrayCopy 845 , begin_opArrayCopy
845 , lir_arraycopy 846 , lir_arraycopy
846 , end_opArrayCopy 847 , end_opArrayCopy
847 , begin_opLock 848 , begin_opLock
1050 , _method(method) { assert(is_in_range(code, begin_opJavaCall, end_opJavaCall), "code check"); } 1051 , _method(method) { assert(is_in_range(code, begin_opJavaCall, end_opJavaCall), "code check"); }
1051 1052
1052 LIR_Opr receiver() const { return _receiver; } 1053 LIR_Opr receiver() const { return _receiver; }
1053 ciMethod* method() const { return _method; } 1054 ciMethod* method() const { return _method; }
1054 1055
1056 // JSR 292 support.
1057 bool is_invokedynamic() const { return code() == lir_dynamic_call; }
1058 bool is_method_handle_invoke() const {
1059 return
1060 is_invokedynamic() // An invokedynamic is always a MethodHandle call site.
1061 ||
1062 (method()->holder()->name() == ciSymbol::java_dyn_MethodHandle() &&
1063 method()->name() == ciSymbol::invoke_name());
1064 }
1065
1055 intptr_t vtable_offset() const { 1066 intptr_t vtable_offset() const {
1056 assert(_code == lir_virtual_call, "only have vtable for real vcall"); 1067 assert(_code == lir_virtual_call, "only have vtable for real vcall");
1057 return (intptr_t) addr(); 1068 return (intptr_t) addr();
1058 } 1069 }
1059 1070
1763 append(new LIR_OpJavaCall(lir_icvirtual_call, method, receiver, result, dest, arguments, info)); 1774 append(new LIR_OpJavaCall(lir_icvirtual_call, method, receiver, result, dest, arguments, info));
1764 } 1775 }
1765 void call_virtual(ciMethod* method, LIR_Opr receiver, LIR_Opr result, 1776 void call_virtual(ciMethod* method, LIR_Opr receiver, LIR_Opr result,
1766 intptr_t vtable_offset, LIR_OprList* arguments, CodeEmitInfo* info) { 1777 intptr_t vtable_offset, LIR_OprList* arguments, CodeEmitInfo* info) {
1767 append(new LIR_OpJavaCall(lir_virtual_call, method, receiver, result, vtable_offset, arguments, info)); 1778 append(new LIR_OpJavaCall(lir_virtual_call, method, receiver, result, vtable_offset, arguments, info));
1779 }
1780 void call_dynamic(ciMethod* method, LIR_Opr receiver, LIR_Opr result,
1781 address dest, LIR_OprList* arguments, CodeEmitInfo* info) {
1782 append(new LIR_OpJavaCall(lir_dynamic_call, method, receiver, result, dest, arguments, info));
1768 } 1783 }
1769 1784
1770 void get_thread(LIR_Opr result) { append(new LIR_Op0(lir_get_thread, result)); } 1785 void get_thread(LIR_Opr result) { append(new LIR_Op0(lir_get_thread, result)); }
1771 void word_align() { append(new LIR_Op0(lir_word_align)); } 1786 void word_align() { append(new LIR_Op0(lir_word_align)); }
1772 void membar() { append(new LIR_Op0(lir_membar)); } 1787 void membar() { append(new LIR_Op0(lir_membar)); }