--- a/hotspot/src/share/vm/ci/ciMethod.cpp Wed Aug 11 01:17:27 2010 -0700
+++ b/hotspot/src/share/vm/ci/ciMethod.cpp Wed Aug 11 05:51:21 2010 -0700
@@ -55,10 +55,10 @@
_exception_handlers = NULL;
_liveness = NULL;
_method_blocks = NULL;
-#ifdef COMPILER2
+#if defined(COMPILER2) || defined(SHARK)
_flow = NULL;
_bcea = NULL;
-#endif // COMPILER2
+#endif // COMPILER2 || SHARK
ciEnv *env = CURRENT_ENV;
if (env->jvmti_can_hotswap_or_post_breakpoint() && _is_compilable) {
@@ -123,10 +123,10 @@
_can_be_statically_bound = false;
_method_blocks = NULL;
_method_data = NULL;
-#ifdef COMPILER2
+#if defined(COMPILER2) || defined(SHARK)
_flow = NULL;
_bcea = NULL;
-#endif // COMPILER2
+#endif // COMPILER2 || SHARK
}
@@ -229,6 +229,20 @@
}
+#ifdef SHARK
+// ------------------------------------------------------------------
+// ciMethod::itable_index
+//
+// Get the position of this method's entry in the itable, if any.
+int ciMethod::itable_index() {
+ check_is_loaded();
+ assert(holder()->is_linked(), "must be linked");
+ VM_ENTRY_MARK;
+ return klassItable::compute_itable_index(get_methodOop());
+}
+#endif // SHARK
+
+
// ------------------------------------------------------------------
// ciMethod::native_entry
//
@@ -294,34 +308,34 @@
// ------------------------------------------------------------------
// ciMethod::get_flow_analysis
ciTypeFlow* ciMethod::get_flow_analysis() {
-#ifdef COMPILER2
+#if defined(COMPILER2) || defined(SHARK)
if (_flow == NULL) {
ciEnv* env = CURRENT_ENV;
_flow = new (env->arena()) ciTypeFlow(env, this);
_flow->do_flow();
}
return _flow;
-#else // COMPILER2
+#else // COMPILER2 || SHARK
ShouldNotReachHere();
return NULL;
-#endif // COMPILER2
+#endif // COMPILER2 || SHARK
}
// ------------------------------------------------------------------
// ciMethod::get_osr_flow_analysis
ciTypeFlow* ciMethod::get_osr_flow_analysis(int osr_bci) {
-#ifdef COMPILER2
+#if defined(COMPILER2) || defined(SHARK)
// OSR entry points are always place after a call bytecode of some sort
assert(osr_bci >= 0, "must supply valid OSR entry point");
ciEnv* env = CURRENT_ENV;
ciTypeFlow* flow = new (env->arena()) ciTypeFlow(env, this, osr_bci);
flow->do_flow();
return flow;
-#else // COMPILER2
+#else // COMPILER2 || SHARK
ShouldNotReachHere();
return NULL;
-#endif // COMPILER2
+#endif // COMPILER2 || SHARK
}
// ------------------------------------------------------------------