< prev index next >

src/share/vm/code/dependencies.cpp

Print this page




 923     }
 924   }
 925 
 926   assert(result == NULL || result->is_klass() || result->is_method(), "must be");
 927   return result;
 928 }
 929 
 930 /**
 931  * Returns a unique identifier for each dependency argument.
 932  */
 933 uintptr_t Dependencies::DepStream::get_identifier(int i) {
 934   if (is_oop_argument(i)) {
 935     return (uintptr_t)(oopDesc*)argument_oop(i);
 936   } else {
 937     return (uintptr_t)argument(i);
 938   }
 939 }
 940 
 941 oop Dependencies::DepStream::argument_oop(int i) {
 942   oop result = recorded_oop_at(argument_index(i));
 943   assert(result == NULL || result->is_oop(), "must be");
 944   return result;
 945 }
 946 
 947 Klass* Dependencies::DepStream::context_type() {
 948   assert(must_be_in_vm(), "raw oops here");
 949 
 950   // Most dependencies have an explicit context type argument.
 951   {
 952     int ctxkj = dep_context_arg(type());  // -1 if no explicit context arg
 953     if (ctxkj >= 0) {
 954       Metadata* k = argument(ctxkj);
 955       assert(k != NULL && k->is_klass(), "type check");
 956       return (Klass*)k;
 957     }
 958   }
 959 
 960   // Some dependencies are using the klass of the first object
 961   // argument as implicit context type.
 962   {
 963     int ctxkj = dep_implicit_context_arg(type());




 923     }
 924   }
 925 
 926   assert(result == NULL || result->is_klass() || result->is_method(), "must be");
 927   return result;
 928 }
 929 
 930 /**
 931  * Returns a unique identifier for each dependency argument.
 932  */
 933 uintptr_t Dependencies::DepStream::get_identifier(int i) {
 934   if (is_oop_argument(i)) {
 935     return (uintptr_t)(oopDesc*)argument_oop(i);
 936   } else {
 937     return (uintptr_t)argument(i);
 938   }
 939 }
 940 
 941 oop Dependencies::DepStream::argument_oop(int i) {
 942   oop result = recorded_oop_at(argument_index(i));
 943   assert(result == NULL || oopDesc::is_oop(result), "must be");
 944   return result;
 945 }
 946 
 947 Klass* Dependencies::DepStream::context_type() {
 948   assert(must_be_in_vm(), "raw oops here");
 949 
 950   // Most dependencies have an explicit context type argument.
 951   {
 952     int ctxkj = dep_context_arg(type());  // -1 if no explicit context arg
 953     if (ctxkj >= 0) {
 954       Metadata* k = argument(ctxkj);
 955       assert(k != NULL && k->is_klass(), "type check");
 956       return (Klass*)k;
 957     }
 958   }
 959 
 960   // Some dependencies are using the klass of the first object
 961   // argument as implicit context type.
 962   {
 963     int ctxkj = dep_implicit_context_arg(type());


< prev index next >