66 |
66 |
67 jobject handle() const { return _handle; } |
67 jobject handle() const { return _handle; } |
68 // Get the VM oop that this object holds. |
68 // Get the VM oop that this object holds. |
69 oop get_oop() const; |
69 oop get_oop() const; |
70 |
70 |
71 void init_flags_from(oop x); |
|
72 |
|
73 // Virtual behavior of the print() method. |
71 // Virtual behavior of the print() method. |
74 virtual void print_impl(outputStream* st) {} |
72 virtual void print_impl(outputStream* st) {} |
75 |
73 |
76 virtual const char* type_string() { return "ciObject"; } |
74 virtual const char* type_string() { return "ciObject"; } |
77 |
75 |
83 bool equals(ciObject* obj); |
81 bool equals(ciObject* obj); |
84 |
82 |
85 // A hash value for the convenience of compilers. |
83 // A hash value for the convenience of compilers. |
86 int hash(); |
84 int hash(); |
87 |
85 |
88 // Tells if this oop has an encoding as a constant. |
|
89 // True if is_perm is true. |
|
90 // Also true if ScavengeRootsInCode is non-zero. |
|
91 // If it does not have an encoding, the compiler is responsible for |
|
92 // making other arrangements for dealing with the oop. |
|
93 // See ciEnv::make_array |
|
94 bool can_be_constant(); |
|
95 |
|
96 // Tells if this oop should be made a constant. |
86 // Tells if this oop should be made a constant. |
97 // True if is_perm is true or ScavengeRootsInCode > 1. |
|
98 bool should_be_constant(); |
87 bool should_be_constant(); |
99 |
|
100 // Might this object possibly move during a scavenge operation? |
|
101 // If the answer is true and ScavengeRootsInCode==0, the oop cannot be embedded in code. |
|
102 bool is_scavengable() { return (_ident & SCAVENGABLE_FLAG) != 0; } |
|
103 |
88 |
104 // The address which the compiler should embed into the |
89 // The address which the compiler should embed into the |
105 // generated code to represent this oop. This address |
90 // generated code to represent this oop. This address |
106 // is not the true address of the oop -- it will get patched |
91 // is not the true address of the oop -- it will get patched |
107 // during nmethod creation. |
92 // during nmethod creation. |