src/share/vm/ci/ciMethod.cpp

changeset 2047
d2ede61b7a12
parent 2017
e0ba4e04c839
child 2103
3e8fbc61cee8
     1.1 --- a/src/share/vm/ci/ciMethod.cpp	Wed Aug 11 01:17:27 2010 -0700
     1.2 +++ b/src/share/vm/ci/ciMethod.cpp	Wed Aug 11 05:51:21 2010 -0700
     1.3 @@ -55,10 +55,10 @@
     1.4    _exception_handlers = NULL;
     1.5    _liveness           = NULL;
     1.6    _method_blocks = NULL;
     1.7 -#ifdef COMPILER2
     1.8 +#if defined(COMPILER2) || defined(SHARK)
     1.9    _flow               = NULL;
    1.10    _bcea               = NULL;
    1.11 -#endif // COMPILER2
    1.12 +#endif // COMPILER2 || SHARK
    1.13  
    1.14    ciEnv *env = CURRENT_ENV;
    1.15    if (env->jvmti_can_hotswap_or_post_breakpoint() && _is_compilable) {
    1.16 @@ -123,10 +123,10 @@
    1.17    _can_be_statically_bound = false;
    1.18    _method_blocks = NULL;
    1.19    _method_data = NULL;
    1.20 -#ifdef COMPILER2
    1.21 +#if defined(COMPILER2) || defined(SHARK)
    1.22    _flow = NULL;
    1.23    _bcea = NULL;
    1.24 -#endif // COMPILER2
    1.25 +#endif // COMPILER2 || SHARK
    1.26  }
    1.27  
    1.28  
    1.29 @@ -229,6 +229,20 @@
    1.30  }
    1.31  
    1.32  
    1.33 +#ifdef SHARK
    1.34 +// ------------------------------------------------------------------
    1.35 +// ciMethod::itable_index
    1.36 +//
    1.37 +// Get the position of this method's entry in the itable, if any.
    1.38 +int ciMethod::itable_index() {
    1.39 +  check_is_loaded();
    1.40 +  assert(holder()->is_linked(), "must be linked");
    1.41 +  VM_ENTRY_MARK;
    1.42 +  return klassItable::compute_itable_index(get_methodOop());
    1.43 +}
    1.44 +#endif // SHARK
    1.45 +
    1.46 +
    1.47  // ------------------------------------------------------------------
    1.48  // ciMethod::native_entry
    1.49  //
    1.50 @@ -294,34 +308,34 @@
    1.51  // ------------------------------------------------------------------
    1.52  // ciMethod::get_flow_analysis
    1.53  ciTypeFlow* ciMethod::get_flow_analysis() {
    1.54 -#ifdef COMPILER2
    1.55 +#if defined(COMPILER2) || defined(SHARK)
    1.56    if (_flow == NULL) {
    1.57      ciEnv* env = CURRENT_ENV;
    1.58      _flow = new (env->arena()) ciTypeFlow(env, this);
    1.59      _flow->do_flow();
    1.60    }
    1.61    return _flow;
    1.62 -#else // COMPILER2
    1.63 +#else // COMPILER2 || SHARK
    1.64    ShouldNotReachHere();
    1.65    return NULL;
    1.66 -#endif // COMPILER2
    1.67 +#endif // COMPILER2 || SHARK
    1.68  }
    1.69  
    1.70  
    1.71  // ------------------------------------------------------------------
    1.72  // ciMethod::get_osr_flow_analysis
    1.73  ciTypeFlow* ciMethod::get_osr_flow_analysis(int osr_bci) {
    1.74 -#ifdef COMPILER2
    1.75 +#if defined(COMPILER2) || defined(SHARK)
    1.76    // OSR entry points are always place after a call bytecode of some sort
    1.77    assert(osr_bci >= 0, "must supply valid OSR entry point");
    1.78    ciEnv* env = CURRENT_ENV;
    1.79    ciTypeFlow* flow = new (env->arena()) ciTypeFlow(env, this, osr_bci);
    1.80    flow->do_flow();
    1.81    return flow;
    1.82 -#else // COMPILER2
    1.83 +#else // COMPILER2 || SHARK
    1.84    ShouldNotReachHere();
    1.85    return NULL;
    1.86 -#endif // COMPILER2
    1.87 +#endif // COMPILER2 || SHARK
    1.88  }
    1.89  
    1.90  // ------------------------------------------------------------------

mercurial