Mercurial > hg > graal-jvmci-8
comparison src/share/vm/prims/methodHandles.hpp @ 2357:8033953d67ff
7012648: move JSR 292 to package java.lang.invoke and adjust names
Summary: package and class renaming only; delete unused methods and classes
Reviewed-by: twisti
author | jrose |
---|---|
date | Fri, 11 Mar 2011 22:34:57 -0800 |
parents | 3582bf76420e |
children | 2a23b1b5a0a8 |
comparison
equal
deleted
inserted
replaced
2356:72dee110246f | 2357:8033953d67ff |
---|---|
35 class Label; | 35 class Label; |
36 class MethodHandleEntry; | 36 class MethodHandleEntry; |
37 | 37 |
38 class MethodHandles: AllStatic { | 38 class MethodHandles: AllStatic { |
39 // JVM support for MethodHandle, MethodType, and related types | 39 // JVM support for MethodHandle, MethodType, and related types |
40 // in java.dyn and java.dyn.hotspot. | 40 // in java.lang.invoke and sun.invoke. |
41 // See also javaClasses for layouts java_dyn_Method{Handle,Type,Type::Form}. | 41 // See also javaClasses for layouts java_lang_invoke_Method{Handle,Type,Type::Form}. |
42 public: | 42 public: |
43 enum EntryKind { | 43 enum EntryKind { |
44 _raise_exception, // stub for error generation from other stubs | 44 _raise_exception, // stub for error generation from other stubs |
45 _invokestatic_mh, // how a MH emulates invokestatic | 45 _invokestatic_mh, // how a MH emulates invokestatic |
46 _invokespecial_mh, // ditto for the other invokes... | 46 _invokespecial_mh, // ditto for the other invokes... |
52 _bound_ref_direct_mh, // same as above, with direct linkage to methodOop | 52 _bound_ref_direct_mh, // same as above, with direct linkage to methodOop |
53 _bound_int_direct_mh, | 53 _bound_int_direct_mh, |
54 _bound_long_direct_mh, | 54 _bound_long_direct_mh, |
55 | 55 |
56 _adapter_mh_first, // adapter sequence goes here... | 56 _adapter_mh_first, // adapter sequence goes here... |
57 _adapter_retype_only = _adapter_mh_first + sun_dyn_AdapterMethodHandle::OP_RETYPE_ONLY, | 57 _adapter_retype_only = _adapter_mh_first + java_lang_invoke_AdapterMethodHandle::OP_RETYPE_ONLY, |
58 _adapter_retype_raw = _adapter_mh_first + sun_dyn_AdapterMethodHandle::OP_RETYPE_RAW, | 58 _adapter_retype_raw = _adapter_mh_first + java_lang_invoke_AdapterMethodHandle::OP_RETYPE_RAW, |
59 _adapter_check_cast = _adapter_mh_first + sun_dyn_AdapterMethodHandle::OP_CHECK_CAST, | 59 _adapter_check_cast = _adapter_mh_first + java_lang_invoke_AdapterMethodHandle::OP_CHECK_CAST, |
60 _adapter_prim_to_prim = _adapter_mh_first + sun_dyn_AdapterMethodHandle::OP_PRIM_TO_PRIM, | 60 _adapter_prim_to_prim = _adapter_mh_first + java_lang_invoke_AdapterMethodHandle::OP_PRIM_TO_PRIM, |
61 _adapter_ref_to_prim = _adapter_mh_first + sun_dyn_AdapterMethodHandle::OP_REF_TO_PRIM, | 61 _adapter_ref_to_prim = _adapter_mh_first + java_lang_invoke_AdapterMethodHandle::OP_REF_TO_PRIM, |
62 _adapter_prim_to_ref = _adapter_mh_first + sun_dyn_AdapterMethodHandle::OP_PRIM_TO_REF, | 62 _adapter_prim_to_ref = _adapter_mh_first + java_lang_invoke_AdapterMethodHandle::OP_PRIM_TO_REF, |
63 _adapter_swap_args = _adapter_mh_first + sun_dyn_AdapterMethodHandle::OP_SWAP_ARGS, | 63 _adapter_swap_args = _adapter_mh_first + java_lang_invoke_AdapterMethodHandle::OP_SWAP_ARGS, |
64 _adapter_rot_args = _adapter_mh_first + sun_dyn_AdapterMethodHandle::OP_ROT_ARGS, | 64 _adapter_rot_args = _adapter_mh_first + java_lang_invoke_AdapterMethodHandle::OP_ROT_ARGS, |
65 _adapter_dup_args = _adapter_mh_first + sun_dyn_AdapterMethodHandle::OP_DUP_ARGS, | 65 _adapter_dup_args = _adapter_mh_first + java_lang_invoke_AdapterMethodHandle::OP_DUP_ARGS, |
66 _adapter_drop_args = _adapter_mh_first + sun_dyn_AdapterMethodHandle::OP_DROP_ARGS, | 66 _adapter_drop_args = _adapter_mh_first + java_lang_invoke_AdapterMethodHandle::OP_DROP_ARGS, |
67 _adapter_collect_args = _adapter_mh_first + sun_dyn_AdapterMethodHandle::OP_COLLECT_ARGS, | 67 _adapter_collect_args = _adapter_mh_first + java_lang_invoke_AdapterMethodHandle::OP_COLLECT_ARGS, |
68 _adapter_spread_args = _adapter_mh_first + sun_dyn_AdapterMethodHandle::OP_SPREAD_ARGS, | 68 _adapter_spread_args = _adapter_mh_first + java_lang_invoke_AdapterMethodHandle::OP_SPREAD_ARGS, |
69 _adapter_flyby = _adapter_mh_first + sun_dyn_AdapterMethodHandle::OP_FLYBY, | 69 _adapter_flyby = _adapter_mh_first + java_lang_invoke_AdapterMethodHandle::OP_FLYBY, |
70 _adapter_ricochet = _adapter_mh_first + sun_dyn_AdapterMethodHandle::OP_RICOCHET, | 70 _adapter_ricochet = _adapter_mh_first + java_lang_invoke_AdapterMethodHandle::OP_RICOCHET, |
71 _adapter_mh_last = _adapter_mh_first + sun_dyn_AdapterMethodHandle::CONV_OP_LIMIT - 1, | 71 _adapter_mh_last = _adapter_mh_first + java_lang_invoke_AdapterMethodHandle::CONV_OP_LIMIT - 1, |
72 | 72 |
73 // Optimized adapter types | 73 // Optimized adapter types |
74 | 74 |
75 // argument list reordering | 75 // argument list reordering |
76 _adapter_opt_swap_1, | 76 _adapter_opt_swap_1, |
105 public: | 105 public: |
106 static bool enabled() { return _enabled; } | 106 static bool enabled() { return _enabled; } |
107 static void set_enabled(bool z); | 107 static void set_enabled(bool z); |
108 | 108 |
109 private: | 109 private: |
110 enum { // import sun_dyn_AdapterMethodHandle::CONV_OP_* | 110 enum { // import java_lang_invoke_AdapterMethodHandle::CONV_OP_* |
111 CONV_OP_LIMIT = sun_dyn_AdapterMethodHandle::CONV_OP_LIMIT, | 111 CONV_OP_LIMIT = java_lang_invoke_AdapterMethodHandle::CONV_OP_LIMIT, |
112 CONV_OP_MASK = sun_dyn_AdapterMethodHandle::CONV_OP_MASK, | 112 CONV_OP_MASK = java_lang_invoke_AdapterMethodHandle::CONV_OP_MASK, |
113 CONV_VMINFO_MASK = sun_dyn_AdapterMethodHandle::CONV_VMINFO_MASK, | 113 CONV_VMINFO_MASK = java_lang_invoke_AdapterMethodHandle::CONV_VMINFO_MASK, |
114 CONV_VMINFO_SHIFT = sun_dyn_AdapterMethodHandle::CONV_VMINFO_SHIFT, | 114 CONV_VMINFO_SHIFT = java_lang_invoke_AdapterMethodHandle::CONV_VMINFO_SHIFT, |
115 CONV_OP_SHIFT = sun_dyn_AdapterMethodHandle::CONV_OP_SHIFT, | 115 CONV_OP_SHIFT = java_lang_invoke_AdapterMethodHandle::CONV_OP_SHIFT, |
116 CONV_DEST_TYPE_SHIFT = sun_dyn_AdapterMethodHandle::CONV_DEST_TYPE_SHIFT, | 116 CONV_DEST_TYPE_SHIFT = java_lang_invoke_AdapterMethodHandle::CONV_DEST_TYPE_SHIFT, |
117 CONV_SRC_TYPE_SHIFT = sun_dyn_AdapterMethodHandle::CONV_SRC_TYPE_SHIFT, | 117 CONV_SRC_TYPE_SHIFT = java_lang_invoke_AdapterMethodHandle::CONV_SRC_TYPE_SHIFT, |
118 CONV_STACK_MOVE_SHIFT = sun_dyn_AdapterMethodHandle::CONV_STACK_MOVE_SHIFT, | 118 CONV_STACK_MOVE_SHIFT = java_lang_invoke_AdapterMethodHandle::CONV_STACK_MOVE_SHIFT, |
119 CONV_STACK_MOVE_MASK = sun_dyn_AdapterMethodHandle::CONV_STACK_MOVE_MASK | 119 CONV_STACK_MOVE_MASK = java_lang_invoke_AdapterMethodHandle::CONV_STACK_MOVE_MASK |
120 }; | 120 }; |
121 | 121 |
122 static bool _enabled; | 122 static bool _enabled; |
123 static MethodHandleEntry* _entries[_EK_LIMIT]; | 123 static MethodHandleEntry* _entries[_EK_LIMIT]; |
124 static const char* _entry_names[_EK_LIMIT+1]; | 124 static const char* _entry_names[_EK_LIMIT+1]; |
469 | 469 |
470 static Symbol* convert_to_signature(oop type_str, bool polymorphic, TRAPS); | 470 static Symbol* convert_to_signature(oop type_str, bool polymorphic, TRAPS); |
471 }; | 471 }; |
472 | 472 |
473 | 473 |
474 // Access methods for the "entry" field of a java.dyn.MethodHandle. | 474 // Access methods for the "entry" field of a java.lang.invoke.MethodHandle. |
475 // The field is primarily a jump target for compiled calls. | 475 // The field is primarily a jump target for compiled calls. |
476 // However, we squirrel away some nice pointers for other uses, | 476 // However, we squirrel away some nice pointers for other uses, |
477 // just before the jump target. | 477 // just before the jump target. |
478 // Aspects of a method handle entry: | 478 // Aspects of a method handle entry: |
479 // - from_compiled_entry - stub used when compiled code calls the MH | 479 // - from_compiled_entry - stub used when compiled code calls the MH |