equal
deleted
inserted
replaced
979 |
979 |
980 static int conversion_offset_in_bytes() { return _conversion_offset; } |
980 static int conversion_offset_in_bytes() { return _conversion_offset; } |
981 }; |
981 }; |
982 |
982 |
983 |
983 |
|
984 // A simple class that maintains an invocation count |
|
985 class java_lang_invoke_CountingMethodHandle: public java_lang_invoke_MethodHandle { |
|
986 friend class JavaClasses; |
|
987 |
|
988 private: |
|
989 static int _vmcount_offset; |
|
990 static void compute_offsets(); |
|
991 |
|
992 public: |
|
993 // Accessors |
|
994 static int vmcount(oop mh); |
|
995 static void set_vmcount(oop mh, int count); |
|
996 |
|
997 // Testers |
|
998 static bool is_subclass(klassOop klass) { |
|
999 return SystemDictionary::CountingMethodHandle_klass() != NULL && |
|
1000 Klass::cast(klass)->is_subclass_of(SystemDictionary::CountingMethodHandle_klass()); |
|
1001 } |
|
1002 static bool is_instance(oop obj) { |
|
1003 return obj != NULL && is_subclass(obj->klass()); |
|
1004 } |
|
1005 |
|
1006 // Accessors for code generation: |
|
1007 static int vmcount_offset_in_bytes() { return _vmcount_offset; } |
|
1008 }; |
|
1009 |
|
1010 |
|
1011 |
984 // Interface to java.lang.invoke.MemberName objects |
1012 // Interface to java.lang.invoke.MemberName objects |
985 // (These are a private interface for Java code to query the class hierarchy.) |
1013 // (These are a private interface for Java code to query the class hierarchy.) |
986 |
1014 |
987 class java_lang_invoke_MemberName: AllStatic { |
1015 class java_lang_invoke_MemberName: AllStatic { |
988 friend class JavaClasses; |
1016 friend class JavaClasses; |