src/share/vm/code/dependencies.cpp

changeset 4037
da91efe96a93
parent 3701
49036505ab5f
child 4052
75f33eecc1b3
     1.1 --- a/src/share/vm/code/dependencies.cpp	Fri Aug 31 16:39:35 2012 -0700
     1.2 +++ b/src/share/vm/code/dependencies.cpp	Sat Sep 01 13:25:18 2012 -0400
     1.3 @@ -30,6 +30,7 @@
     1.4  #include "code/dependencies.hpp"
     1.5  #include "compiler/compileLog.hpp"
     1.6  #include "oops/oop.inline.hpp"
     1.7 +#include "runtime/handles.hpp"
     1.8  #include "runtime/handles.inline.hpp"
     1.9  #include "utilities/copy.hpp"
    1.10  
    1.11 @@ -51,7 +52,7 @@
    1.12    _dep_seen = new(arena) GrowableArray<int>(arena, 500, 0, 0);
    1.13    DEBUG_ONLY(_deps[end_marker] = NULL);
    1.14    for (int i = (int)FIRST_TYPE; i < (int)TYPE_LIMIT; i++) {
    1.15 -    _deps[i] = new(arena) GrowableArray<ciObject*>(arena, 10, 0, 0);
    1.16 +    _deps[i] = new(arena) GrowableArray<ciBaseObject*>(arena, 10, 0, 0);
    1.17    }
    1.18    _content_bytes = NULL;
    1.19    _size_in_bytes = (size_t)-1;
    1.20 @@ -121,9 +122,9 @@
    1.21  // Helper function.  If we are adding a new dep. under ctxk2,
    1.22  // try to find an old dep. under a broader* ctxk1.  If there is
    1.23  //
    1.24 -bool Dependencies::maybe_merge_ctxk(GrowableArray<ciObject*>* deps,
    1.25 +bool Dependencies::maybe_merge_ctxk(GrowableArray<ciBaseObject*>* deps,
    1.26                                      int ctxk_i, ciKlass* ctxk2) {
    1.27 -  ciKlass* ctxk1 = deps->at(ctxk_i)->as_klass();
    1.28 +  ciKlass* ctxk1 = deps->at(ctxk_i)->as_metadata()->as_klass();
    1.29    if (ctxk2->is_subtype_of(ctxk1)) {
    1.30      return true;  // success, and no need to change
    1.31    } else if (ctxk1->is_subtype_of(ctxk2)) {
    1.32 @@ -135,10 +136,10 @@
    1.33    }
    1.34  }
    1.35  
    1.36 -void Dependencies::assert_common_1(DepType dept, ciObject* x) {
    1.37 +void Dependencies::assert_common_1(DepType dept, ciBaseObject* x) {
    1.38    assert(dep_args(dept) == 1, "sanity");
    1.39    log_dependency(dept, x);
    1.40 -  GrowableArray<ciObject*>* deps = _deps[dept];
    1.41 +  GrowableArray<ciBaseObject*>* deps = _deps[dept];
    1.42  
    1.43    // see if the same (or a similar) dep is already recorded
    1.44    if (note_dep_seen(dept, x)) {
    1.45 @@ -149,10 +150,10 @@
    1.46  }
    1.47  
    1.48  void Dependencies::assert_common_2(DepType dept,
    1.49 -                                   ciObject* x0, ciObject* x1) {
    1.50 +                                   ciBaseObject* x0, ciBaseObject* x1) {
    1.51    assert(dep_args(dept) == 2, "sanity");
    1.52    log_dependency(dept, x0, x1);
    1.53 -  GrowableArray<ciObject*>* deps = _deps[dept];
    1.54 +  GrowableArray<ciBaseObject*>* deps = _deps[dept];
    1.55  
    1.56    // see if the same (or a similar) dep is already recorded
    1.57    bool has_ctxk = has_explicit_context_arg(dept);
    1.58 @@ -162,9 +163,9 @@
    1.59        // look in this bucket for redundant assertions
    1.60        const int stride = 2;
    1.61        for (int i = deps->length(); (i -= stride) >= 0; ) {
    1.62 -        ciObject* y1 = deps->at(i+1);
    1.63 +        ciBaseObject* y1 = deps->at(i+1);
    1.64          if (x1 == y1) {  // same subject; check the context
    1.65 -          if (maybe_merge_ctxk(deps, i+0, x0->as_klass())) {
    1.66 +          if (maybe_merge_ctxk(deps, i+0, x0->as_metadata()->as_klass())) {
    1.67              return;
    1.68            }
    1.69          }
    1.70 @@ -176,8 +177,8 @@
    1.71        // look in this bucket for redundant assertions
    1.72        const int stride = 2;
    1.73        for (int i = deps->length(); (i -= stride) >= 0; ) {
    1.74 -        ciObject* y0 = deps->at(i+0);
    1.75 -        ciObject* y1 = deps->at(i+1);
    1.76 +        ciBaseObject* y0 = deps->at(i+0);
    1.77 +        ciBaseObject* y1 = deps->at(i+1);
    1.78          if (x0 == y0 && x1 == y1) {
    1.79            return;
    1.80          }
    1.81 @@ -191,31 +192,31 @@
    1.82  }
    1.83  
    1.84  void Dependencies::assert_common_3(DepType dept,
    1.85 -                                   ciKlass* ctxk, ciObject* x, ciObject* x2) {
    1.86 +                                   ciKlass* ctxk, ciBaseObject* x, ciBaseObject* x2) {
    1.87    assert(dep_context_arg(dept) == 0, "sanity");
    1.88    assert(dep_args(dept) == 3, "sanity");
    1.89    log_dependency(dept, ctxk, x, x2);
    1.90 -  GrowableArray<ciObject*>* deps = _deps[dept];
    1.91 +  GrowableArray<ciBaseObject*>* deps = _deps[dept];
    1.92  
    1.93    // try to normalize an unordered pair:
    1.94    bool swap = false;
    1.95    switch (dept) {
    1.96    case abstract_with_exclusive_concrete_subtypes_2:
    1.97 -    swap = (x->ident() > x2->ident() && x != ctxk);
    1.98 +    swap = (x->ident() > x2->ident() && x->as_metadata()->as_klass() != ctxk);
    1.99      break;
   1.100    case exclusive_concrete_methods_2:
   1.101 -    swap = (x->ident() > x2->ident() && x->as_method()->holder() != ctxk);
   1.102 +    swap = (x->ident() > x2->ident() && x->as_metadata()->as_method()->holder() != ctxk);
   1.103      break;
   1.104    }
   1.105 -  if (swap) { ciObject* t = x; x = x2; x2 = t; }
   1.106 +  if (swap) { ciBaseObject* t = x; x = x2; x2 = t; }
   1.107  
   1.108    // see if the same (or a similar) dep is already recorded
   1.109    if (note_dep_seen(dept, x) && note_dep_seen(dept, x2)) {
   1.110      // look in this bucket for redundant assertions
   1.111      const int stride = 3;
   1.112      for (int i = deps->length(); (i -= stride) >= 0; ) {
   1.113 -      ciObject* y  = deps->at(i+1);
   1.114 -      ciObject* y2 = deps->at(i+2);
   1.115 +      ciBaseObject* y  = deps->at(i+1);
   1.116 +      ciBaseObject* y2 = deps->at(i+2);
   1.117        if (x == y && x2 == y2) {  // same subjects; check the context
   1.118          if (maybe_merge_ctxk(deps, i+0, ctxk)) {
   1.119            return;
   1.120 @@ -241,24 +242,24 @@
   1.121    assert(size_in_bytes() % sizeof(HeapWord) == 0, "copy by words");
   1.122  }
   1.123  
   1.124 -static int sort_dep(ciObject** p1, ciObject** p2, int narg) {
   1.125 +static int sort_dep(ciBaseObject** p1, ciBaseObject** p2, int narg) {
   1.126    for (int i = 0; i < narg; i++) {
   1.127      int diff = p1[i]->ident() - p2[i]->ident();
   1.128      if (diff != 0)  return diff;
   1.129    }
   1.130    return 0;
   1.131  }
   1.132 -static int sort_dep_arg_1(ciObject** p1, ciObject** p2)
   1.133 +static int sort_dep_arg_1(ciBaseObject** p1, ciBaseObject** p2)
   1.134  { return sort_dep(p1, p2, 1); }
   1.135 -static int sort_dep_arg_2(ciObject** p1, ciObject** p2)
   1.136 +static int sort_dep_arg_2(ciBaseObject** p1, ciBaseObject** p2)
   1.137  { return sort_dep(p1, p2, 2); }
   1.138 -static int sort_dep_arg_3(ciObject** p1, ciObject** p2)
   1.139 +static int sort_dep_arg_3(ciBaseObject** p1, ciBaseObject** p2)
   1.140  { return sort_dep(p1, p2, 3); }
   1.141  
   1.142  void Dependencies::sort_all_deps() {
   1.143    for (int deptv = (int)FIRST_TYPE; deptv < (int)TYPE_LIMIT; deptv++) {
   1.144      DepType dept = (DepType)deptv;
   1.145 -    GrowableArray<ciObject*>* deps = _deps[dept];
   1.146 +    GrowableArray<ciBaseObject*>* deps = _deps[dept];
   1.147      if (deps->length() <= 1)  continue;
   1.148      switch (dep_args(dept)) {
   1.149      case 1: deps->sort(sort_dep_arg_1, 1); break;
   1.150 @@ -273,33 +274,33 @@
   1.151    size_t est_size = 100;
   1.152    for (int deptv = (int)FIRST_TYPE; deptv < (int)TYPE_LIMIT; deptv++) {
   1.153      DepType dept = (DepType)deptv;
   1.154 -    GrowableArray<ciObject*>* deps = _deps[dept];
   1.155 +    GrowableArray<ciBaseObject*>* deps = _deps[dept];
   1.156      est_size += deps->length()*2;  // tags and argument(s)
   1.157    }
   1.158    return est_size;
   1.159  }
   1.160  
   1.161 -ciKlass* Dependencies::ctxk_encoded_as_null(DepType dept, ciObject* x) {
   1.162 +ciKlass* Dependencies::ctxk_encoded_as_null(DepType dept, ciBaseObject* x) {
   1.163    switch (dept) {
   1.164    case abstract_with_exclusive_concrete_subtypes_2:
   1.165 -    return x->as_klass();
   1.166 +    return x->as_metadata()->as_klass();
   1.167    case unique_concrete_method:
   1.168    case exclusive_concrete_methods_2:
   1.169 -    return x->as_method()->holder();
   1.170 +    return x->as_metadata()->as_method()->holder();
   1.171    }
   1.172    return NULL;  // let NULL be NULL
   1.173  }
   1.174  
   1.175 -klassOop Dependencies::ctxk_encoded_as_null(DepType dept, oop x) {
   1.176 +Klass* Dependencies::ctxk_encoded_as_null(DepType dept, Metadata* x) {
   1.177    assert(must_be_in_vm(), "raw oops here");
   1.178    switch (dept) {
   1.179    case abstract_with_exclusive_concrete_subtypes_2:
   1.180      assert(x->is_klass(), "sanity");
   1.181 -    return (klassOop) x;
   1.182 +    return (Klass*) x;
   1.183    case unique_concrete_method:
   1.184    case exclusive_concrete_methods_2:
   1.185      assert(x->is_method(), "sanity");
   1.186 -    return ((methodOop)x)->method_holder();
   1.187 +    return ((Method*)x)->method_holder();
   1.188    }
   1.189    return NULL;  // let NULL be NULL
   1.190  }
   1.191 @@ -312,7 +313,7 @@
   1.192  
   1.193    for (int deptv = (int)FIRST_TYPE; deptv < (int)TYPE_LIMIT; deptv++) {
   1.194      DepType dept = (DepType)deptv;
   1.195 -    GrowableArray<ciObject*>* deps = _deps[dept];
   1.196 +    GrowableArray<ciBaseObject*>* deps = _deps[dept];
   1.197      if (deps->length() == 0)  continue;
   1.198      int stride = dep_args(dept);
   1.199      int ctxkj  = dep_context_arg(dept);  // -1 if no context arg
   1.200 @@ -321,8 +322,8 @@
   1.201        jbyte code_byte = (jbyte)dept;
   1.202        int skipj = -1;
   1.203        if (ctxkj >= 0 && ctxkj+1 < stride) {
   1.204 -        ciKlass*  ctxk = deps->at(i+ctxkj+0)->as_klass();
   1.205 -        ciObject* x    = deps->at(i+ctxkj+1);  // following argument
   1.206 +        ciKlass*  ctxk = deps->at(i+ctxkj+0)->as_metadata()->as_klass();
   1.207 +        ciBaseObject* x     = deps->at(i+ctxkj+1);  // following argument
   1.208          if (ctxk == ctxk_encoded_as_null(dept, x)) {
   1.209            skipj = ctxkj;  // we win:  maybe one less oop to keep track of
   1.210            code_byte |= default_context_type_bit;
   1.211 @@ -331,7 +332,13 @@
   1.212        bytes.write_byte(code_byte);
   1.213        for (int j = 0; j < stride; j++) {
   1.214          if (j == skipj)  continue;
   1.215 -        bytes.write_int(_oop_recorder->find_index(deps->at(i+j)->constant_encoding()));
   1.216 +        ciBaseObject* v = deps->at(i+j);
   1.217 +        if (v->is_object()) {
   1.218 +          bytes.write_int(_oop_recorder->find_index(v->as_object()->constant_encoding()));
   1.219 +        } else {
   1.220 +          ciMetadata* meta = v->as_metadata();
   1.221 +          bytes.write_int(_oop_recorder->find_index(meta->constant_encoding()));
   1.222 +        }
   1.223        }
   1.224      }
   1.225    }
   1.226 @@ -397,10 +404,10 @@
   1.227  // for the sake of the compiler log, print out current dependencies:
   1.228  void Dependencies::log_all_dependencies() {
   1.229    if (log() == NULL)  return;
   1.230 -  ciObject* args[max_arg_count];
   1.231 +  ciBaseObject* args[max_arg_count];
   1.232    for (int deptv = (int)FIRST_TYPE; deptv < (int)TYPE_LIMIT; deptv++) {
   1.233      DepType dept = (DepType)deptv;
   1.234 -    GrowableArray<ciObject*>* deps = _deps[dept];
   1.235 +    GrowableArray<ciBaseObject*>* deps = _deps[dept];
   1.236      if (deps->length() == 0)  continue;
   1.237      int stride = dep_args(dept);
   1.238      for (int i = 0; i < deps->length(); i += stride) {
   1.239 @@ -415,31 +422,39 @@
   1.240  
   1.241  void Dependencies::write_dependency_to(CompileLog* log,
   1.242                                         DepType dept,
   1.243 -                                       int nargs, oop args[],
   1.244 -                                       klassOop witness) {
   1.245 +                                       int nargs, DepArgument args[],
   1.246 +                                       Klass* witness) {
   1.247    if (log == NULL) {
   1.248      return;
   1.249    }
   1.250    ciEnv* env = ciEnv::current();
   1.251 -  ciObject* ciargs[max_arg_count];
   1.252 +  ciBaseObject* ciargs[max_arg_count];
   1.253    assert(nargs <= max_arg_count, "oob");
   1.254    for (int j = 0; j < nargs; j++) {
   1.255 -    ciargs[j] = env->get_object(args[j]);
   1.256 +    if (args[j].is_oop()) {
   1.257 +      ciargs[j] = env->get_object(args[j].oop_value());
   1.258 +    } else {
   1.259 +      ciargs[j] = env->get_metadata(args[j].metadata_value());
   1.260 +    }
   1.261    }
   1.262    Dependencies::write_dependency_to(log, dept, nargs, ciargs, witness);
   1.263  }
   1.264  
   1.265  void Dependencies::write_dependency_to(CompileLog* log,
   1.266                                         DepType dept,
   1.267 -                                       int nargs, ciObject* args[],
   1.268 -                                       klassOop witness) {
   1.269 +                                       int nargs, ciBaseObject* args[],
   1.270 +                                       Klass* witness) {
   1.271    if (log == NULL)  return;
   1.272    assert(nargs <= max_arg_count, "oob");
   1.273    int argids[max_arg_count];
   1.274    int ctxkj = dep_context_arg(dept);  // -1 if no context arg
   1.275    int j;
   1.276    for (j = 0; j < nargs; j++) {
   1.277 -    argids[j] = log->identify(args[j]);
   1.278 +    if (args[j]->is_object()) {
   1.279 +      argids[j] = log->identify(args[j]->as_object());
   1.280 +    } else {
   1.281 +      argids[j] = log->identify(args[j]->as_metadata());
   1.282 +    }
   1.283    }
   1.284    if (witness != NULL) {
   1.285      log->begin_elem("dependency_failed");
   1.286 @@ -468,8 +483,8 @@
   1.287  
   1.288  void Dependencies::write_dependency_to(xmlStream* xtty,
   1.289                                         DepType dept,
   1.290 -                                       int nargs, oop args[],
   1.291 -                                       klassOop witness) {
   1.292 +                                       int nargs, DepArgument args[],
   1.293 +                                       Klass* witness) {
   1.294    if (xtty == NULL)  return;
   1.295    ttyLocker ttyl;
   1.296    int ctxkj = dep_context_arg(dept);  // -1 if no context arg
   1.297 @@ -480,16 +495,24 @@
   1.298    }
   1.299    xtty->print(" type='%s'", dep_name(dept));
   1.300    if (ctxkj >= 0) {
   1.301 -    xtty->object("ctxk", args[ctxkj]);
   1.302 +    xtty->object("ctxk", args[ctxkj].metadata_value());
   1.303    }
   1.304    // write remaining arguments, if any.
   1.305    for (int j = 0; j < nargs; j++) {
   1.306      if (j == ctxkj)  continue;  // already logged
   1.307      if (j == 1) {
   1.308 -      xtty->object("x", args[j]);
   1.309 +      if (args[j].is_oop()) {
   1.310 +        xtty->object("x", args[j].oop_value());
   1.311 +      } else {
   1.312 +        xtty->object("x", args[j].metadata_value());
   1.313 +      }
   1.314      } else {
   1.315        char xn[10]; sprintf(xn, "x%d", j);
   1.316 -      xtty->object(xn, args[j]);
   1.317 +      if (args[j].is_oop()) {
   1.318 +        xtty->object(xn, args[j].oop_value());
   1.319 +      } else {
   1.320 +        xtty->object(xn, args[j].metadata_value());
   1.321 +      }
   1.322      }
   1.323    }
   1.324    if (witness != NULL) {
   1.325 @@ -499,8 +522,8 @@
   1.326    xtty->end_elem();
   1.327  }
   1.328  
   1.329 -void Dependencies::print_dependency(DepType dept, int nargs, oop args[],
   1.330 -                                    klassOop witness) {
   1.331 +void Dependencies::print_dependency(DepType dept, int nargs, DepArgument args[],
   1.332 +                                    Klass* witness) {
   1.333    ResourceMark rm;
   1.334    ttyLocker ttyl;   // keep the following output all in one block
   1.335    tty->print_cr("%s of type %s",
   1.336 @@ -509,26 +532,29 @@
   1.337    // print arguments
   1.338    int ctxkj = dep_context_arg(dept);  // -1 if no context arg
   1.339    for (int j = 0; j < nargs; j++) {
   1.340 -    oop arg = args[j];
   1.341 +    DepArgument arg = args[j];
   1.342      bool put_star = false;
   1.343 -    if (arg == NULL)  continue;
   1.344 +    if (arg.is_null())  continue;
   1.345      const char* what;
   1.346      if (j == ctxkj) {
   1.347 +      assert(arg.is_metadata(), "must be");
   1.348        what = "context";
   1.349 -      put_star = !Dependencies::is_concrete_klass((klassOop)arg);
   1.350 -    } else if (arg->is_method()) {
   1.351 +      put_star = !Dependencies::is_concrete_klass((Klass*)arg.metadata_value());
   1.352 +    } else if (arg.is_method()) {
   1.353        what = "method ";
   1.354 -      put_star = !Dependencies::is_concrete_method((methodOop)arg);
   1.355 -    } else if (arg->is_klass()) {
   1.356 +      put_star = !Dependencies::is_concrete_method((Method*)arg.metadata_value());
   1.357 +    } else if (arg.is_klass()) {
   1.358        what = "class  ";
   1.359      } else {
   1.360        what = "object ";
   1.361      }
   1.362      tty->print("  %s = %s", what, (put_star? "*": ""));
   1.363 -    if (arg->is_klass())
   1.364 -      tty->print("%s", Klass::cast((klassOop)arg)->external_name());
   1.365 +    if (arg.is_klass())
   1.366 +      tty->print("%s", Klass::cast((Klass*)arg.metadata_value())->external_name());
   1.367 +    else if (arg.is_method())
   1.368 +      ((Method*)arg.metadata_value())->print_value();
   1.369      else
   1.370 -      arg->print_value();
   1.371 +      ShouldNotReachHere(); // Provide impl for this type.
   1.372      tty->cr();
   1.373    }
   1.374    if (witness != NULL) {
   1.375 @@ -539,13 +565,20 @@
   1.376    }
   1.377  }
   1.378  
   1.379 -void Dependencies::DepStream::log_dependency(klassOop witness) {
   1.380 +void Dependencies::DepStream::log_dependency(Klass* witness) {
   1.381    if (_deps == NULL && xtty == NULL)  return;  // fast cutout for runtime
   1.382 +  if (type() == call_site_target_value) {
   1.383 +    os::breakpoint();
   1.384 +  }
   1.385    int nargs = argument_count();
   1.386 -  oop args[max_arg_count];
   1.387 +  DepArgument args[max_arg_count];
   1.388    for (int j = 0; j < nargs; j++) {
   1.389 +    if (type() == call_site_target_value) {
   1.390 +      args[j] = argument_oop(j);
   1.391 +    } else {
   1.392      args[j] = argument(j);
   1.393    }
   1.394 +  }
   1.395    if (_deps != NULL && _deps->log() != NULL) {
   1.396      Dependencies::write_dependency_to(_deps->log(),
   1.397                                        type(), nargs, args, witness);
   1.398 @@ -555,9 +588,9 @@
   1.399    }
   1.400  }
   1.401  
   1.402 -void Dependencies::DepStream::print_dependency(klassOop witness, bool verbose) {
   1.403 +void Dependencies::DepStream::print_dependency(Klass* witness, bool verbose) {
   1.404    int nargs = argument_count();
   1.405 -  oop args[max_arg_count];
   1.406 +  DepArgument args[max_arg_count];
   1.407    for (int j = 0; j < nargs; j++) {
   1.408      args[j] = argument(j);
   1.409    }
   1.410 @@ -615,27 +648,47 @@
   1.411    }
   1.412  }
   1.413  
   1.414 +inline Metadata* Dependencies::DepStream::recorded_metadata_at(int i) {
   1.415 +  Metadata* o = NULL;
   1.416 +  if (_code != NULL) {
   1.417 +    o = _code->metadata_at(i);
   1.418 +  } else {
   1.419 +    o = _deps->oop_recorder()->metadata_at(i);
   1.420 +  }
   1.421 +  assert(o == NULL || o->is_metadata(),
   1.422 +         err_msg("Should be perm " PTR_FORMAT, o));
   1.423 +  return o;
   1.424 +}
   1.425 +
   1.426  inline oop Dependencies::DepStream::recorded_oop_at(int i) {
   1.427    return (_code != NULL)
   1.428           ? _code->oop_at(i)
   1.429 -         : JNIHandles::resolve(_deps->oop_recorder()->handle_at(i));
   1.430 +    : JNIHandles::resolve(_deps->oop_recorder()->oop_at(i));
   1.431  }
   1.432  
   1.433 -oop Dependencies::DepStream::argument(int i) {
   1.434 -  return recorded_oop_at(argument_index(i));
   1.435 +Metadata* Dependencies::DepStream::argument(int i) {
   1.436 +  Metadata* result = recorded_metadata_at(argument_index(i));
   1.437 +  assert(result == NULL || result->is_klass() || result->is_method(), "must be");
   1.438 +  return result;
   1.439  }
   1.440  
   1.441 -klassOop Dependencies::DepStream::context_type() {
   1.442 +oop Dependencies::DepStream::argument_oop(int i) {
   1.443 +  oop result = recorded_oop_at(argument_index(i));
   1.444 +  assert(result == NULL || result->is_oop(), "must be");
   1.445 +  return result;
   1.446 +}
   1.447 +
   1.448 +Klass* Dependencies::DepStream::context_type() {
   1.449    assert(must_be_in_vm(), "raw oops here");
   1.450  
   1.451    // Most dependencies have an explicit context type argument.
   1.452    {
   1.453      int ctxkj = dep_context_arg(_type);  // -1 if no explicit context arg
   1.454      if (ctxkj >= 0) {
   1.455 -      oop k = argument(ctxkj);
   1.456 +      Metadata* k = argument(ctxkj);
   1.457        if (k != NULL) {       // context type was not compressed away
   1.458          assert(k->is_klass(), "type check");
   1.459 -        return (klassOop) k;
   1.460 +        return (Klass*) k;
   1.461        }
   1.462        // recompute "default" context type
   1.463        return ctxk_encoded_as_null(_type, argument(ctxkj+1));
   1.464 @@ -647,9 +700,9 @@
   1.465    {
   1.466      int ctxkj = dep_implicit_context_arg(_type);
   1.467      if (ctxkj >= 0) {
   1.468 -      oop k = argument(ctxkj)->klass();
   1.469 +      Klass* k = argument_oop(ctxkj)->klass();
   1.470        assert(k->is_klass(), "type check");
   1.471 -      return (klassOop) k;
   1.472 +      return (Klass*) k;
   1.473      }
   1.474    }
   1.475  
   1.476 @@ -675,16 +728,16 @@
   1.477    Symbol* _signature;
   1.478  
   1.479    // special classes which are not allowed to be witnesses:
   1.480 -  klassOop  _participants[PARTICIPANT_LIMIT+1];
   1.481 +  Klass*    _participants[PARTICIPANT_LIMIT+1];
   1.482    int       _num_participants;
   1.483  
   1.484    // cache of method lookups
   1.485 -  methodOop _found_methods[PARTICIPANT_LIMIT+1];
   1.486 +  Method* _found_methods[PARTICIPANT_LIMIT+1];
   1.487  
   1.488    // if non-zero, tells how many witnesses to convert to participants
   1.489    int       _record_witnesses;
   1.490  
   1.491 -  void initialize(klassOop participant) {
   1.492 +  void initialize(Klass* participant) {
   1.493      _record_witnesses = 0;
   1.494      _participants[0]  = participant;
   1.495      _found_methods[0] = NULL;
   1.496 @@ -697,7 +750,7 @@
   1.497      }
   1.498    }
   1.499  
   1.500 -  void initialize_from_method(methodOop m) {
   1.501 +  void initialize_from_method(Method* m) {
   1.502      assert(m != NULL && m->is_method(), "sanity");
   1.503      _name      = m->name();
   1.504      _signature = m->signature();
   1.505 @@ -706,15 +759,15 @@
   1.506   public:
   1.507    // The walker is initialized to recognize certain methods and/or types
   1.508    // as friendly participants.
   1.509 -  ClassHierarchyWalker(klassOop participant, methodOop m) {
   1.510 +  ClassHierarchyWalker(Klass* participant, Method* m) {
   1.511      initialize_from_method(m);
   1.512      initialize(participant);
   1.513    }
   1.514 -  ClassHierarchyWalker(methodOop m) {
   1.515 +  ClassHierarchyWalker(Method* m) {
   1.516      initialize_from_method(m);
   1.517      initialize(NULL);
   1.518    }
   1.519 -  ClassHierarchyWalker(klassOop participant = NULL) {
   1.520 +  ClassHierarchyWalker(Klass* participant = NULL) {
   1.521      _name      = NULL;
   1.522      _signature = NULL;
   1.523      initialize(participant);
   1.524 @@ -727,15 +780,15 @@
   1.525    }
   1.526  
   1.527    int num_participants() { return _num_participants; }
   1.528 -  klassOop participant(int n) {
   1.529 +  Klass* participant(int n) {
   1.530      assert((uint)n <= (uint)_num_participants, "oob");
   1.531      return _participants[n];
   1.532    }
   1.533  
   1.534    // Note:  If n==num_participants, returns NULL.
   1.535 -  methodOop found_method(int n) {
   1.536 +  Method* found_method(int n) {
   1.537      assert((uint)n <= (uint)_num_participants, "oob");
   1.538 -    methodOop fm = _found_methods[n];
   1.539 +    Method* fm = _found_methods[n];
   1.540      assert(n == _num_participants || fm != NULL, "proper usage");
   1.541      assert(fm == NULL || fm->method_holder() == _participants[n], "sanity");
   1.542      return fm;
   1.543 @@ -744,7 +797,7 @@
   1.544  #ifdef ASSERT
   1.545    // Assert that m is inherited into ctxk, without intervening overrides.
   1.546    // (May return true even if this is not true, in corner cases where we punt.)
   1.547 -  bool check_method_context(klassOop ctxk, methodOop m) {
   1.548 +  bool check_method_context(Klass* ctxk, Method* m) {
   1.549      if (m->method_holder() == ctxk)
   1.550        return true;  // Quick win.
   1.551      if (m->is_private())
   1.552 @@ -753,10 +806,10 @@
   1.553        // The override story is complex when packages get involved.
   1.554        return true;  // Must punt the assertion to true.
   1.555      Klass* k = Klass::cast(ctxk);
   1.556 -    methodOop lm = k->lookup_method(m->name(), m->signature());
   1.557 +    Method* lm = k->lookup_method(m->name(), m->signature());
   1.558      if (lm == NULL && k->oop_is_instance()) {
   1.559        // It might be an abstract interface method, devoid of mirandas.
   1.560 -      lm = ((instanceKlass*)k)->lookup_method_in_all_interfaces(m->name(),
   1.561 +      lm = ((InstanceKlass*)k)->lookup_method_in_all_interfaces(m->name(),
   1.562                                                                  m->signature());
   1.563      }
   1.564      if (lm == m)
   1.565 @@ -788,7 +841,7 @@
   1.566    }
   1.567  #endif
   1.568  
   1.569 -  void add_participant(klassOop participant) {
   1.570 +  void add_participant(Klass* participant) {
   1.571      assert(_num_participants + _record_witnesses < PARTICIPANT_LIMIT, "oob");
   1.572      int np = _num_participants++;
   1.573      _participants[np] = participant;
   1.574 @@ -802,11 +855,11 @@
   1.575      _record_witnesses = add;
   1.576    }
   1.577  
   1.578 -  bool is_witness(klassOop k) {
   1.579 +  bool is_witness(Klass* k) {
   1.580      if (doing_subtype_search()) {
   1.581        return Dependencies::is_concrete_klass(k);
   1.582      } else {
   1.583 -      methodOop m = instanceKlass::cast(k)->find_method(_name, _signature);
   1.584 +      Method* m = InstanceKlass::cast(k)->find_method(_name, _signature);
   1.585        if (m == NULL || !Dependencies::is_concrete_method(m))  return false;
   1.586        _found_methods[_num_participants] = m;
   1.587        // Note:  If add_participant(k) is called,
   1.588 @@ -815,7 +868,7 @@
   1.589      }
   1.590    }
   1.591  
   1.592 -  bool is_participant(klassOop k) {
   1.593 +  bool is_participant(Klass* k) {
   1.594      if (k == _participants[0]) {
   1.595        return true;
   1.596      } else if (_num_participants <= 1) {
   1.597 @@ -824,7 +877,7 @@
   1.598        return in_list(k, &_participants[1]);
   1.599      }
   1.600    }
   1.601 -  bool ignore_witness(klassOop witness) {
   1.602 +  bool ignore_witness(Klass* witness) {
   1.603      if (_record_witnesses == 0) {
   1.604        return false;
   1.605      } else {
   1.606 @@ -833,9 +886,9 @@
   1.607        return true;
   1.608      }
   1.609    }
   1.610 -  static bool in_list(klassOop x, klassOop* list) {
   1.611 +  static bool in_list(Klass* x, Klass** list) {
   1.612      for (int i = 0; ; i++) {
   1.613 -      klassOop y = list[i];
   1.614 +      Klass* y = list[i];
   1.615        if (y == NULL)  break;
   1.616        if (y == x)  return true;
   1.617      }
   1.618 @@ -844,15 +897,15 @@
   1.619  
   1.620   private:
   1.621    // the actual search method:
   1.622 -  klassOop find_witness_anywhere(klassOop context_type,
   1.623 +  Klass* find_witness_anywhere(Klass* context_type,
   1.624                                   bool participants_hide_witnesses,
   1.625                                   bool top_level_call = true);
   1.626    // the spot-checking version:
   1.627 -  klassOop find_witness_in(KlassDepChange& changes,
   1.628 -                           klassOop context_type,
   1.629 +  Klass* find_witness_in(KlassDepChange& changes,
   1.630 +                         Klass* context_type,
   1.631                             bool participants_hide_witnesses);
   1.632   public:
   1.633 -  klassOop find_witness_subtype(klassOop context_type, KlassDepChange* changes = NULL) {
   1.634 +  Klass* find_witness_subtype(Klass* context_type, KlassDepChange* changes = NULL) {
   1.635      assert(doing_subtype_search(), "must set up a subtype search");
   1.636      // When looking for unexpected concrete types,
   1.637      // do not look beneath expected ones.
   1.638 @@ -865,7 +918,7 @@
   1.639        return find_witness_anywhere(context_type, participants_hide_witnesses);
   1.640      }
   1.641    }
   1.642 -  klassOop find_witness_definer(klassOop context_type, KlassDepChange* changes = NULL) {
   1.643 +  Klass* find_witness_definer(Klass* context_type, KlassDepChange* changes = NULL) {
   1.644      assert(!doing_subtype_search(), "must set up a method definer search");
   1.645      // When looking for unexpected concrete methods,
   1.646      // look beneath expected ones, to see if there are overrides.
   1.647 @@ -926,11 +979,11 @@
   1.648  #endif //PRODUCT
   1.649  
   1.650  
   1.651 -klassOop ClassHierarchyWalker::find_witness_in(KlassDepChange& changes,
   1.652 -                                               klassOop context_type,
   1.653 +Klass* ClassHierarchyWalker::find_witness_in(KlassDepChange& changes,
   1.654 +                                               Klass* context_type,
   1.655                                                 bool participants_hide_witnesses) {
   1.656    assert(changes.involves_context(context_type), "irrelevant dependency");
   1.657 -  klassOop new_type = changes.new_type();
   1.658 +  Klass* new_type = changes.new_type();
   1.659  
   1.660    count_find_witness_calls();
   1.661    NOT_PRODUCT(deps_find_witness_singles++);
   1.662 @@ -940,7 +993,7 @@
   1.663    // Must not move the class hierarchy during this check:
   1.664    assert_locked_or_safepoint(Compile_lock);
   1.665  
   1.666 -  int nof_impls = instanceKlass::cast(context_type)->nof_implementors();
   1.667 +  int nof_impls = InstanceKlass::cast(context_type)->nof_implementors();
   1.668    if (nof_impls > 1) {
   1.669      // Avoid this case: *I.m > { A.m, C }; B.m > C
   1.670      // %%% Until this is fixed more systematically, bail out.
   1.671 @@ -952,7 +1005,7 @@
   1.672    if (participants_hide_witnesses) {
   1.673      // If the new type is a subtype of a participant, we are done.
   1.674      for (int i = 0; i < num_participants(); i++) {
   1.675 -      klassOop part = participant(i);
   1.676 +      Klass* part = participant(i);
   1.677        if (part == NULL)  continue;
   1.678        assert(changes.involves_context(part) == Klass::cast(new_type)->is_subtype_of(part),
   1.679               "correct marking of participants, b/c new_type is unique");
   1.680 @@ -977,7 +1030,7 @@
   1.681  // them only if participants_hide_witnesses is false.
   1.682  // If top_level_call is false, skip testing the context type,
   1.683  // because the caller has already considered it.
   1.684 -klassOop ClassHierarchyWalker::find_witness_anywhere(klassOop context_type,
   1.685 +Klass* ClassHierarchyWalker::find_witness_anywhere(Klass* context_type,
   1.686                                                       bool participants_hide_witnesses,
   1.687                                                       bool top_level_call) {
   1.688    // Current thread must be in VM (not native mode, as in CI):
   1.689 @@ -1005,13 +1058,13 @@
   1.690    // Now we must check each implementor and each subclass.
   1.691    // Use a short worklist to avoid blowing the stack.
   1.692    // Each worklist entry is a *chain* of subklass siblings to process.
   1.693 -  const int CHAINMAX = 100;  // >= 1 + instanceKlass::implementors_limit
   1.694 +  const int CHAINMAX = 100;  // >= 1 + InstanceKlass::implementors_limit
   1.695    Klass* chains[CHAINMAX];
   1.696    int    chaini = 0;  // index into worklist
   1.697    Klass* chain;       // scratch variable
   1.698  #define ADD_SUBCLASS_CHAIN(k)                     {  \
   1.699      assert(chaini < CHAINMAX, "oob");                \
   1.700 -    chain = instanceKlass::cast(k)->subklass();      \
   1.701 +    chain = InstanceKlass::cast(k)->subklass();      \
   1.702      if (chain != NULL)  chains[chaini++] = chain;    }
   1.703  
   1.704    // Look for non-abstract subclasses.
   1.705 @@ -1020,9 +1073,9 @@
   1.706  
   1.707    // If it is an interface, search its direct implementors.
   1.708    // (Their subclasses are additional indirect implementors.
   1.709 -  // See instanceKlass::add_implementor.)
   1.710 +  // See InstanceKlass::add_implementor.)
   1.711    // (Note:  nof_implementors is always zero for non-interfaces.)
   1.712 -  int nof_impls = instanceKlass::cast(context_type)->nof_implementors();
   1.713 +  int nof_impls = InstanceKlass::cast(context_type)->nof_implementors();
   1.714    if (nof_impls > 1) {
   1.715      // Avoid this case: *I.m > { A.m, C }; B.m > C
   1.716      // Here, I.m has 2 concrete implementations, but m appears unique
   1.717 @@ -1034,7 +1087,7 @@
   1.718      return context_type;
   1.719    }
   1.720    if (nof_impls > 0) {
   1.721 -    klassOop impl = instanceKlass::cast(context_type)->implementor();
   1.722 +    Klass* impl = InstanceKlass::cast(context_type)->implementor();
   1.723      assert(impl != NULL, "just checking");
   1.724      // If impl is the same as the context_type, then more than one
   1.725      // implementor has seen. No exact info in this case.
   1.726 @@ -1057,8 +1110,7 @@
   1.727    // Recursively process each non-trivial sibling chain.
   1.728    while (chaini > 0) {
   1.729      Klass* chain = chains[--chaini];
   1.730 -    for (Klass* subk = chain; subk != NULL; subk = subk->next_sibling()) {
   1.731 -      klassOop sub = subk->as_klassOop();
   1.732 +    for (Klass* sub = chain; sub != NULL; sub = sub->next_sibling()) {
   1.733        if (do_counts) { NOT_PRODUCT(deps_find_witness_steps++); }
   1.734        if (is_participant(sub)) {
   1.735          if (participants_hide_witnesses)  continue;
   1.736 @@ -1076,7 +1128,7 @@
   1.737          // no need for the recursive call to re-test.  That's handy,
   1.738          // since the recursive call sees sub as the context_type.)
   1.739          if (do_counts) { NOT_PRODUCT(deps_find_witness_recursions++); }
   1.740 -        klassOop witness = find_witness_anywhere(sub,
   1.741 +        Klass* witness = find_witness_anywhere(sub,
   1.742                                                   participants_hide_witnesses,
   1.743                                                   /*top_level_call=*/ false);
   1.744          if (witness != NULL)  return witness;
   1.745 @@ -1090,7 +1142,7 @@
   1.746  }
   1.747  
   1.748  
   1.749 -bool Dependencies::is_concrete_klass(klassOop k) {
   1.750 +bool Dependencies::is_concrete_klass(Klass* k) {
   1.751    if (Klass::cast(k)->is_abstract())  return false;
   1.752    // %%% We could treat classes which are concrete but
   1.753    // have not yet been instantiated as virtually abstract.
   1.754 @@ -1099,7 +1151,7 @@
   1.755    return true;
   1.756  }
   1.757  
   1.758 -bool Dependencies::is_concrete_method(methodOop m) {
   1.759 +bool Dependencies::is_concrete_method(Method* m) {
   1.760    // Statics are irrelevant to virtual call sites.
   1.761    if (m->is_static())  return false;
   1.762  
   1.763 @@ -1148,7 +1200,7 @@
   1.764  // Any use of the contents (bytecodes) of a method must be
   1.765  // marked by an "evol_method" dependency, if those contents
   1.766  // can change.  (Note: A method is always dependent on itself.)
   1.767 -klassOop Dependencies::check_evol_method(methodOop m) {
   1.768 +Klass* Dependencies::check_evol_method(Method* m) {
   1.769    assert(must_be_in_vm(), "raw oops here");
   1.770    // Did somebody do a JVMTI RedefineClasses while our backs were turned?
   1.771    // Or is there a now a breakpoint?
   1.772 @@ -1168,17 +1220,17 @@
   1.773  // can be optimized more strongly than this, because we
   1.774  // know that the checked type comes from a concrete type,
   1.775  // and therefore we can disregard abstract types.)
   1.776 -klassOop Dependencies::check_leaf_type(klassOop ctxk) {
   1.777 +Klass* Dependencies::check_leaf_type(Klass* ctxk) {
   1.778    assert(must_be_in_vm(), "raw oops here");
   1.779    assert_locked_or_safepoint(Compile_lock);
   1.780 -  instanceKlass* ctx = instanceKlass::cast(ctxk);
   1.781 +  InstanceKlass* ctx = InstanceKlass::cast(ctxk);
   1.782    Klass* sub = ctx->subklass();
   1.783    if (sub != NULL) {
   1.784 -    return sub->as_klassOop();
   1.785 +    return sub;
   1.786    } else if (ctx->nof_implementors() != 0) {
   1.787      // if it is an interface, it must be unimplemented
   1.788      // (if it is not an interface, nof_implementors is always zero)
   1.789 -    klassOop impl = ctx->implementor();
   1.790 +    Klass* impl = ctx->implementor();
   1.791      assert(impl != NULL, "must be set");
   1.792      return impl;
   1.793    } else {
   1.794 @@ -1190,8 +1242,8 @@
   1.795  // The type conck itself is allowed to have have further concrete subtypes.
   1.796  // This allows the compiler to narrow occurrences of ctxk by conck,
   1.797  // when dealing with the types of actual instances.
   1.798 -klassOop Dependencies::check_abstract_with_unique_concrete_subtype(klassOop ctxk,
   1.799 -                                                                   klassOop conck,
   1.800 +Klass* Dependencies::check_abstract_with_unique_concrete_subtype(Klass* ctxk,
   1.801 +                                                                   Klass* conck,
   1.802                                                                     KlassDepChange* changes) {
   1.803    ClassHierarchyWalker wf(conck);
   1.804    return wf.find_witness_subtype(ctxk, changes);
   1.805 @@ -1200,7 +1252,7 @@
   1.806  // If a non-concrete class has no concrete subtypes, it is not (yet)
   1.807  // instantiatable.  This can allow the compiler to make some paths go
   1.808  // dead, if they are gated by a test of the type.
   1.809 -klassOop Dependencies::check_abstract_with_no_concrete_subtype(klassOop ctxk,
   1.810 +Klass* Dependencies::check_abstract_with_no_concrete_subtype(Klass* ctxk,
   1.811                                                                 KlassDepChange* changes) {
   1.812    // Find any concrete subtype, with no participants:
   1.813    ClassHierarchyWalker wf;
   1.814 @@ -1210,7 +1262,7 @@
   1.815  
   1.816  // If a concrete class has no concrete subtypes, it can always be
   1.817  // exactly typed.  This allows the use of a cheaper type test.
   1.818 -klassOop Dependencies::check_concrete_with_no_concrete_subtype(klassOop ctxk,
   1.819 +Klass* Dependencies::check_concrete_with_no_concrete_subtype(Klass* ctxk,
   1.820                                                                 KlassDepChange* changes) {
   1.821    // Find any concrete subtype, with only the ctxk as participant:
   1.822    ClassHierarchyWalker wf(ctxk);
   1.823 @@ -1223,12 +1275,12 @@
   1.824  // proper subtypes, return ctxk itself, whether it is concrete or not.
   1.825  // The returned subtype is allowed to have have further concrete subtypes.
   1.826  // That is, return CC1 for CX > CC1 > CC2, but NULL for CX > { CC1, CC2 }.
   1.827 -klassOop Dependencies::find_unique_concrete_subtype(klassOop ctxk) {
   1.828 +Klass* Dependencies::find_unique_concrete_subtype(Klass* ctxk) {
   1.829    ClassHierarchyWalker wf(ctxk);   // Ignore ctxk when walking.
   1.830    wf.record_witnesses(1);          // Record one other witness when walking.
   1.831 -  klassOop wit = wf.find_witness_subtype(ctxk);
   1.832 +  Klass* wit = wf.find_witness_subtype(ctxk);
   1.833    if (wit != NULL)  return NULL;   // Too many witnesses.
   1.834 -  klassOop conck = wf.participant(0);
   1.835 +  Klass* conck = wf.participant(0);
   1.836    if (conck == NULL) {
   1.837  #ifndef PRODUCT
   1.838      // Make sure the dependency mechanism will pass this discovery:
   1.839 @@ -1268,10 +1320,10 @@
   1.840  // except possibly for further subtypes of k[12] themselves.
   1.841  // The context type must be abstract.  The types k1 and k2 are themselves
   1.842  // allowed to have further concrete subtypes.
   1.843 -klassOop Dependencies::check_abstract_with_exclusive_concrete_subtypes(
   1.844 -                                                klassOop ctxk,
   1.845 -                                                klassOop k1,
   1.846 -                                                klassOop k2,
   1.847 +Klass* Dependencies::check_abstract_with_exclusive_concrete_subtypes(
   1.848 +                                                Klass* ctxk,
   1.849 +                                                Klass* k1,
   1.850 +                                                Klass* k2,
   1.851                                                  KlassDepChange* changes) {
   1.852    ClassHierarchyWalker wf;
   1.853    wf.add_participant(k1);
   1.854 @@ -1285,12 +1337,12 @@
   1.855  // (Note that a return of 0 means there are exactly no concrete subtypes.)
   1.856  // In this search, if ctxk is concrete, it will be reported alone.
   1.857  // For any type CC reported, no proper subtypes of CC will be reported.
   1.858 -int Dependencies::find_exclusive_concrete_subtypes(klassOop ctxk,
   1.859 +int Dependencies::find_exclusive_concrete_subtypes(Klass* ctxk,
   1.860                                                     int klen,
   1.861 -                                                   klassOop karray[]) {
   1.862 +                                                   Klass* karray[]) {
   1.863    ClassHierarchyWalker wf;
   1.864    wf.record_witnesses(klen);
   1.865 -  klassOop wit = wf.find_witness_subtype(ctxk);
   1.866 +  Klass* wit = wf.find_witness_subtype(ctxk);
   1.867    if (wit != NULL)  return -1;  // Too many witnesses.
   1.868    int num = wf.num_participants();
   1.869    assert(num <= klen, "oob");
   1.870 @@ -1332,7 +1384,7 @@
   1.871  
   1.872  // If a class (or interface) has a unique concrete method uniqm, return NULL.
   1.873  // Otherwise, return a class that contains an interfering method.
   1.874 -klassOop Dependencies::check_unique_concrete_method(klassOop ctxk, methodOop uniqm,
   1.875 +Klass* Dependencies::check_unique_concrete_method(Klass* ctxk, Method* uniqm,
   1.876                                                      KlassDepChange* changes) {
   1.877    // Here is a missing optimization:  If uniqm->is_final(),
   1.878    // we don't really need to search beneath it for overrides.
   1.879 @@ -1346,13 +1398,13 @@
   1.880  // (The method m must be defined or inherited in ctxk.)
   1.881  // Include m itself in the set, unless it is abstract.
   1.882  // If this set has exactly one element, return that element.
   1.883 -methodOop Dependencies::find_unique_concrete_method(klassOop ctxk, methodOop m) {
   1.884 +Method* Dependencies::find_unique_concrete_method(Klass* ctxk, Method* m) {
   1.885    ClassHierarchyWalker wf(m);
   1.886    assert(wf.check_method_context(ctxk, m), "proper context");
   1.887    wf.record_witnesses(1);
   1.888 -  klassOop wit = wf.find_witness_definer(ctxk);
   1.889 +  Klass* wit = wf.find_witness_definer(ctxk);
   1.890    if (wit != NULL)  return NULL;  // Too many witnesses.
   1.891 -  methodOop fm = wf.found_method(0);  // Will be NULL if num_parts == 0.
   1.892 +  Method* fm = wf.found_method(0);  // Will be NULL if num_parts == 0.
   1.893    if (Dependencies::is_concrete_method(m)) {
   1.894      if (fm == NULL) {
   1.895        // It turns out that m was always the only implementation.
   1.896 @@ -1373,9 +1425,9 @@
   1.897    return fm;
   1.898  }
   1.899  
   1.900 -klassOop Dependencies::check_exclusive_concrete_methods(klassOop ctxk,
   1.901 -                                                        methodOop m1,
   1.902 -                                                        methodOop m2,
   1.903 +Klass* Dependencies::check_exclusive_concrete_methods(Klass* ctxk,
   1.904 +                                                        Method* m1,
   1.905 +                                                        Method* m2,
   1.906                                                          KlassDepChange* changes) {
   1.907    ClassHierarchyWalker wf(m1);
   1.908    wf.add_participant(m1->method_holder());
   1.909 @@ -1389,15 +1441,15 @@
   1.910  // Fill the given array m[0..(mlen-1)] with this set, and return the length.
   1.911  // (The length may be zero if no concrete methods are found anywhere.)
   1.912  // If there are too many concrete methods to fit in marray, return -1.
   1.913 -int Dependencies::find_exclusive_concrete_methods(klassOop ctxk,
   1.914 +int Dependencies::find_exclusive_concrete_methods(Klass* ctxk,
   1.915                                                    int mlen,
   1.916 -                                                  methodOop marray[]) {
   1.917 -  methodOop m0 = marray[0];
   1.918 +                                                  Method* marray[]) {
   1.919 +  Method* m0 = marray[0];
   1.920    ClassHierarchyWalker wf(m0);
   1.921    assert(wf.check_method_context(ctxk, m0), "proper context");
   1.922    wf.record_witnesses(mlen);
   1.923    bool participants_hide_witnesses = true;
   1.924 -  klassOop wit = wf.find_witness_definer(ctxk);
   1.925 +  Klass* wit = wf.find_witness_definer(ctxk);
   1.926    if (wit != NULL)  return -1;  // Too many witnesses.
   1.927    int num = wf.num_participants();
   1.928    assert(num <= mlen, "oob");
   1.929 @@ -1407,7 +1459,7 @@
   1.930    if (Dependencies::is_concrete_method(m0))
   1.931      mfill++;  // keep m0 as marray[0], the first result
   1.932    for (int i = 0; i < num; i++) {
   1.933 -    methodOop fm = wf.found_method(i);
   1.934 +    Method* fm = wf.found_method(i);
   1.935      if (fm == m0)  continue;  // Already put this guy in the list.
   1.936      if (mfill == mlen) {
   1.937        return -1;              // Oops.  Too many methods after all!
   1.938 @@ -1438,19 +1490,15 @@
   1.939  }
   1.940  
   1.941  
   1.942 -klassOop Dependencies::check_has_no_finalizable_subclasses(klassOop ctxk, KlassDepChange* changes) {
   1.943 -  Klass* search_at = ctxk->klass_part();
   1.944 +Klass* Dependencies::check_has_no_finalizable_subclasses(Klass* ctxk, KlassDepChange* changes) {
   1.945 +  Klass* search_at = ctxk;
   1.946    if (changes != NULL)
   1.947 -    search_at = changes->new_type()->klass_part(); // just look at the new bit
   1.948 -  Klass* result = find_finalizable_subclass(search_at);
   1.949 -  if (result == NULL) {
   1.950 -    return NULL;
   1.951 -  }
   1.952 -  return result->as_klassOop();
   1.953 +    search_at = changes->new_type(); // just look at the new bit
   1.954 +  return find_finalizable_subclass(search_at);
   1.955  }
   1.956  
   1.957  
   1.958 -klassOop Dependencies::check_call_site_target_value(oop call_site, oop method_handle, CallSiteDepChange* changes) {
   1.959 +Klass* Dependencies::check_call_site_target_value(oop call_site, oop method_handle, CallSiteDepChange* changes) {
   1.960    assert(call_site    ->is_a(SystemDictionary::CallSite_klass()),     "sanity");
   1.961    assert(method_handle->is_a(SystemDictionary::MethodHandle_klass()), "sanity");
   1.962    if (changes == NULL) {
   1.963 @@ -1468,7 +1516,7 @@
   1.964  }
   1.965  
   1.966  
   1.967 -void Dependencies::DepStream::trace_and_log_witness(klassOop witness) {
   1.968 +void Dependencies::DepStream::trace_and_log_witness(Klass* witness) {
   1.969    if (witness != NULL) {
   1.970      if (TraceDependencies) {
   1.971        print_dependency(witness, /*verbose=*/ true);
   1.972 @@ -1479,11 +1527,11 @@
   1.973  }
   1.974  
   1.975  
   1.976 -klassOop Dependencies::DepStream::check_klass_dependency(KlassDepChange* changes) {
   1.977 +Klass* Dependencies::DepStream::check_klass_dependency(KlassDepChange* changes) {
   1.978    assert_locked_or_safepoint(Compile_lock);
   1.979    Dependencies::check_valid_dependency_type(type());
   1.980  
   1.981 -  klassOop witness = NULL;
   1.982 +  Klass* witness = NULL;
   1.983    switch (type()) {
   1.984    case evol_method:
   1.985      witness = check_evol_method(method_argument(0));
   1.986 @@ -1521,14 +1569,14 @@
   1.987  }
   1.988  
   1.989  
   1.990 -klassOop Dependencies::DepStream::check_call_site_dependency(CallSiteDepChange* changes) {
   1.991 +Klass* Dependencies::DepStream::check_call_site_dependency(CallSiteDepChange* changes) {
   1.992    assert_locked_or_safepoint(Compile_lock);
   1.993    Dependencies::check_valid_dependency_type(type());
   1.994  
   1.995 -  klassOop witness = NULL;
   1.996 +  Klass* witness = NULL;
   1.997    switch (type()) {
   1.998    case call_site_target_value:
   1.999 -    witness = check_call_site_target_value(argument(0), argument(1), changes);
  1.1000 +    witness = check_call_site_target_value(argument_oop(0), argument_oop(1), changes);
  1.1001      break;
  1.1002    default:
  1.1003      witness = NULL;
  1.1004 @@ -1539,7 +1587,7 @@
  1.1005  }
  1.1006  
  1.1007  
  1.1008 -klassOop Dependencies::DepStream::spot_check_dependency_at(DepChange& changes) {
  1.1009 +Klass* Dependencies::DepStream::spot_check_dependency_at(DepChange& changes) {
  1.1010    // Handle klass dependency
  1.1011    if (changes.is_klass_change() && changes.as_klass_change()->involves_context(context_type()))
  1.1012      return check_klass_dependency(changes.as_klass_change());
  1.1013 @@ -1556,23 +1604,23 @@
  1.1014  void DepChange::print() {
  1.1015    int nsup = 0, nint = 0;
  1.1016    for (ContextStream str(*this); str.next(); ) {
  1.1017 -    klassOop k = str.klass();
  1.1018 +    Klass* k = str.klass();
  1.1019      switch (str.change_type()) {
  1.1020      case Change_new_type:
  1.1021 -      tty->print_cr("  dependee = %s", instanceKlass::cast(k)->external_name());
  1.1022 +      tty->print_cr("  dependee = %s", InstanceKlass::cast(k)->external_name());
  1.1023        break;
  1.1024      case Change_new_sub:
  1.1025        if (!WizardMode) {
  1.1026          ++nsup;
  1.1027        } else {
  1.1028 -        tty->print_cr("  context super = %s", instanceKlass::cast(k)->external_name());
  1.1029 +        tty->print_cr("  context super = %s", InstanceKlass::cast(k)->external_name());
  1.1030        }
  1.1031        break;
  1.1032      case Change_new_impl:
  1.1033        if (!WizardMode) {
  1.1034          ++nint;
  1.1035        } else {
  1.1036 -        tty->print_cr("  context interface = %s", instanceKlass::cast(k)->external_name());
  1.1037 +        tty->print_cr("  context interface = %s", InstanceKlass::cast(k)->external_name());
  1.1038        }
  1.1039        break;
  1.1040      }
  1.1041 @@ -1583,7 +1631,7 @@
  1.1042  }
  1.1043  
  1.1044  void DepChange::ContextStream::start() {
  1.1045 -  klassOop new_type = _changes.is_klass_change() ? _changes.as_klass_change()->new_type() : (klassOop) NULL;
  1.1046 +  Klass* new_type = _changes.is_klass_change() ? _changes.as_klass_change()->new_type() : (Klass*) NULL;
  1.1047    _change_type = (new_type == NULL ? NO_CHANGE : Start_Klass);
  1.1048    _klass = new_type;
  1.1049    _ti_base = NULL;
  1.1050 @@ -1594,7 +1642,7 @@
  1.1051  bool DepChange::ContextStream::next() {
  1.1052    switch (_change_type) {
  1.1053    case Start_Klass:             // initial state; _klass is the new type
  1.1054 -    _ti_base = instanceKlass::cast(_klass)->transitive_interfaces();
  1.1055 +    _ti_base = InstanceKlass::cast(_klass)->transitive_interfaces();
  1.1056      _ti_index = 0;
  1.1057      _change_type = Change_new_type;
  1.1058      return true;
  1.1059 @@ -1604,7 +1652,7 @@
  1.1060    case Change_new_sub:
  1.1061      // 6598190: brackets workaround Sun Studio C++ compiler bug 6629277
  1.1062      {
  1.1063 -      _klass = instanceKlass::cast(_klass)->super();
  1.1064 +      _klass = InstanceKlass::cast(_klass)->super();
  1.1065        if (_klass != NULL) {
  1.1066          return true;
  1.1067        }
  1.1068 @@ -1614,7 +1662,7 @@
  1.1069      _change_type = Change_new_impl;
  1.1070    case Change_new_impl:
  1.1071      if (_ti_index < _ti_limit) {
  1.1072 -      _klass = klassOop( _ti_base->obj_at(_ti_index++) );
  1.1073 +      _klass = _ti_base->at(_ti_index++);
  1.1074        return true;
  1.1075      }
  1.1076      // fall through:
  1.1077 @@ -1634,9 +1682,9 @@
  1.1078    // Mark all dependee and all its superclasses
  1.1079    // Mark transitive interfaces
  1.1080    for (ContextStream str(*this); str.next(); ) {
  1.1081 -    klassOop d = str.klass();
  1.1082 -    assert(!instanceKlass::cast(d)->is_marked_dependent(), "checking");
  1.1083 -    instanceKlass::cast(d)->set_is_marked_dependent(true);
  1.1084 +    Klass* d = str.klass();
  1.1085 +    assert(!InstanceKlass::cast(d)->is_marked_dependent(), "checking");
  1.1086 +    InstanceKlass::cast(d)->set_is_marked_dependent(true);
  1.1087    }
  1.1088  }
  1.1089  
  1.1090 @@ -1644,16 +1692,16 @@
  1.1091    // Unmark all dependee and all its superclasses
  1.1092    // Unmark transitive interfaces
  1.1093    for (ContextStream str(*this); str.next(); ) {
  1.1094 -    klassOop d = str.klass();
  1.1095 -    instanceKlass::cast(d)->set_is_marked_dependent(false);
  1.1096 +    Klass* d = str.klass();
  1.1097 +    InstanceKlass::cast(d)->set_is_marked_dependent(false);
  1.1098    }
  1.1099  }
  1.1100  
  1.1101 -bool KlassDepChange::involves_context(klassOop k) {
  1.1102 +bool KlassDepChange::involves_context(Klass* k) {
  1.1103    if (k == NULL || !Klass::cast(k)->oop_is_instance()) {
  1.1104      return false;
  1.1105    }
  1.1106 -  instanceKlass* ik = instanceKlass::cast(k);
  1.1107 +  InstanceKlass* ik = InstanceKlass::cast(k);
  1.1108    bool is_contained = ik->is_marked_dependent();
  1.1109    assert(is_contained == Klass::cast(new_type())->is_subtype_of(k),
  1.1110           "correct marking of potential context types");

mercurial