34 // The class represents a java.lang.invoke.MethodHandle object. |
34 // The class represents a java.lang.invoke.MethodHandle object. |
35 class ciMethodHandle : public ciInstance { |
35 class ciMethodHandle : public ciInstance { |
36 private: |
36 private: |
37 ciMethod* _callee; |
37 ciMethod* _callee; |
38 ciMethod* _caller; |
38 ciMethod* _caller; |
39 ciCallProfile* _profile; |
39 ciCallProfile _profile; |
40 |
40 |
41 // Return an adapter for this MethodHandle. |
41 // Return an adapter for this MethodHandle. |
42 ciMethod* get_adapter_impl(bool is_invokedynamic) const; |
42 ciMethod* get_adapter_impl(bool is_invokedynamic) const; |
43 ciMethod* get_adapter( bool is_invokedynamic) const; |
43 ciMethod* get_adapter( bool is_invokedynamic) const; |
44 |
44 |
47 |
47 |
48 public: |
48 public: |
49 ciMethodHandle(instanceHandle h_i) : |
49 ciMethodHandle(instanceHandle h_i) : |
50 ciInstance(h_i), |
50 ciInstance(h_i), |
51 _callee(NULL), |
51 _callee(NULL), |
52 _caller(NULL), |
52 _caller(NULL) |
53 _profile(NULL) |
|
54 {} |
53 {} |
55 |
54 |
56 // What kind of ciObject is this? |
55 // What kind of ciObject is this? |
57 bool is_method_handle() const { return true; } |
56 bool is_method_handle() const { return true; } |
58 |
57 |
59 void set_callee(ciMethod* m) { _callee = m; } |
58 void set_callee(ciMethod* m) { _callee = m; } |
60 void set_caller(ciMethod* m) { _caller = m; } |
59 void set_caller(ciMethod* m) { _caller = m; } |
61 void set_call_profile(ciCallProfile* profile) { _profile = profile; } |
60 void set_call_profile(ciCallProfile profile) { _profile = profile; } |
62 |
61 |
63 // Return an adapter for a MethodHandle call. |
62 // Return an adapter for a MethodHandle call. |
64 ciMethod* get_method_handle_adapter() const { return get_adapter(false); } |
63 ciMethod* get_method_handle_adapter() const { return get_adapter(false); } |
65 |
64 |
66 // Return an adapter for an invokedynamic call. |
65 // Return an adapter for an invokedynamic call. |