< prev index next >

src/hotspot/share/code/dependencies.hpp

Print this page




 187     // default context, depending on the type of the dependency.
 188     // This bit signals that a default context has been compressed away.
 189     default_context_type_bit = (1<<LG2_TYPE_LIMIT)
 190   };
 191 
 192   static const char* dep_name(DepType dept);
 193   static int         dep_args(DepType dept);
 194 
 195   static bool is_klass_type(           DepType dept) { return dept_in_mask(dept, klass_types        ); }
 196 
 197   static bool has_explicit_context_arg(DepType dept) { return dept_in_mask(dept, explicit_ctxk_types); }
 198   static bool has_implicit_context_arg(DepType dept) { return dept_in_mask(dept, implicit_ctxk_types); }
 199 
 200   static int           dep_context_arg(DepType dept) { return has_explicit_context_arg(dept) ? 0 : -1; }
 201   static int  dep_implicit_context_arg(DepType dept) { return has_implicit_context_arg(dept) ? 0 : -1; }
 202 
 203   static void check_valid_dependency_type(DepType dept);
 204 
 205 #if INCLUDE_JVMCI
 206   // A Metadata* or object value recorded in an OopRecorder
 207   class DepValue VALUE_OBJ_CLASS_SPEC {
 208    private:
 209     // Unique identifier of the value within the associated OopRecorder that
 210     // encodes both the category of the value (0: invalid, positive: metadata, negative: object)
 211     // and the index within a category specific array (metadata: index + 1, object: -(index + 1))
 212     int _id;
 213 
 214    public:
 215     DepValue() : _id(0) {}
 216     DepValue(OopRecorder* rec, Metadata* metadata, DepValue* candidate = NULL) {
 217       assert(candidate == NULL || candidate->is_metadata(), "oops");
 218       if (candidate != NULL && candidate->as_metadata(rec) == metadata) {
 219         _id = candidate->_id;
 220       } else {
 221         _id = rec->find_index(metadata) + 1;
 222       }
 223     }
 224     DepValue(OopRecorder* rec, jobject obj, DepValue* candidate = NULL) {
 225       assert(candidate == NULL || candidate->is_object(), "oops");
 226       if (candidate != NULL && candidate->as_object(rec) == obj) {
 227         _id = candidate->_id;




 187     // default context, depending on the type of the dependency.
 188     // This bit signals that a default context has been compressed away.
 189     default_context_type_bit = (1<<LG2_TYPE_LIMIT)
 190   };
 191 
 192   static const char* dep_name(DepType dept);
 193   static int         dep_args(DepType dept);
 194 
 195   static bool is_klass_type(           DepType dept) { return dept_in_mask(dept, klass_types        ); }
 196 
 197   static bool has_explicit_context_arg(DepType dept) { return dept_in_mask(dept, explicit_ctxk_types); }
 198   static bool has_implicit_context_arg(DepType dept) { return dept_in_mask(dept, implicit_ctxk_types); }
 199 
 200   static int           dep_context_arg(DepType dept) { return has_explicit_context_arg(dept) ? 0 : -1; }
 201   static int  dep_implicit_context_arg(DepType dept) { return has_implicit_context_arg(dept) ? 0 : -1; }
 202 
 203   static void check_valid_dependency_type(DepType dept);
 204 
 205 #if INCLUDE_JVMCI
 206   // A Metadata* or object value recorded in an OopRecorder
 207   class DepValue {
 208    private:
 209     // Unique identifier of the value within the associated OopRecorder that
 210     // encodes both the category of the value (0: invalid, positive: metadata, negative: object)
 211     // and the index within a category specific array (metadata: index + 1, object: -(index + 1))
 212     int _id;
 213 
 214    public:
 215     DepValue() : _id(0) {}
 216     DepValue(OopRecorder* rec, Metadata* metadata, DepValue* candidate = NULL) {
 217       assert(candidate == NULL || candidate->is_metadata(), "oops");
 218       if (candidate != NULL && candidate->as_metadata(rec) == metadata) {
 219         _id = candidate->_id;
 220       } else {
 221         _id = rec->find_index(metadata) + 1;
 222       }
 223     }
 224     DepValue(OopRecorder* rec, jobject obj, DepValue* candidate = NULL) {
 225       assert(candidate == NULL || candidate->is_object(), "oops");
 226       if (candidate != NULL && candidate->as_object(rec) == obj) {
 227         _id = candidate->_id;


< prev index next >