src/hotspot/share/opto/compile.cpp
changeset 53632 d620a4a1d5ed
parent 53594 47a8fdf84424
child 53766 7e4a9e912759
--- a/src/hotspot/share/opto/compile.cpp	Mon Feb 04 21:42:47 2019 +0100
+++ b/src/hotspot/share/opto/compile.cpp	Mon Feb 04 17:35:35 2019 -0800
@@ -3820,6 +3820,11 @@
   }
 }
 
+bool Compile::is_compiling_clinit_for(ciKlass* k) {
+  ciMethod* root = method(); // the root method of compilation
+  return root->is_static_initializer() && root->holder() == k; // access in the context of clinit
+}
+
 #ifndef PRODUCT
 //------------------------------verify_graph_edges---------------------------
 // Walk the Graph and verify that there is a one-to-one correspondence