hotspot/src/share/vm/runtime/stubCodeGenerator.cpp
changeset 36074 11263906664c
parent 31620 53be635ad49c
child 36301 cb578d8c6cba
--- a/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp	Mon Feb 15 20:02:51 2016 +0300
+++ b/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp	Mon Feb 15 20:26:02 2016 +0300
@@ -37,7 +37,7 @@
 
 StubCodeDesc* StubCodeDesc::_list = NULL;
 int           StubCodeDesc::_count = 0;
-
+bool          StubCodeDesc::_frozen = false;
 
 StubCodeDesc* StubCodeDesc::desc_for(address pc) {
   StubCodeDesc* p = _list;
@@ -46,20 +46,23 @@
   return p;
 }
 
-
 StubCodeDesc* StubCodeDesc::desc_for_index(int index) {
   StubCodeDesc* p = _list;
   while (p != NULL && p->index() != index) p = p->_next;
   return p;
 }
 
-
 const char* StubCodeDesc::name_for(address pc) {
   StubCodeDesc* p = desc_for(pc);
   return p == NULL ? NULL : p->name();
 }
 
 
+void StubCodeDesc::freeze() {
+  assert(!_frozen, "repeated freeze operation");
+  _frozen = true;
+}
+
 void StubCodeDesc::print_on(outputStream* st) const {
   st->print("%s", group());
   st->print("::");
@@ -110,12 +113,10 @@
   }
 }
 
-
 void StubCodeGenerator::stub_prolog(StubCodeDesc* cdesc) {
   // default implementation - do nothing
 }
 
-
 void StubCodeGenerator::stub_epilog(StubCodeDesc* cdesc) {
   // default implementation - record the cdesc
   if (_first_stub == NULL)  _first_stub = cdesc;